Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-40921: Only update data coverage if using the meas catalog #74

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions python/lsst/meas/extensions/scarlet/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,15 +415,17 @@ def updateCatalogFootprints(self, catalog, band, psfModel, maskImage=None, redis
peaks = parent.getFootprint().peaks
# Set the footprint and coverage of the sources in this blend
# to zero
parentRecord["deblend_dataCoverage"] = 0
if updateFluxColumns:
parentRecord["deblend_dataCoverage"] = 0
for sourceId, sourceData in blendModel.sources.items():
sourceRecord = catalog.find(sourceId)
footprint = Footprint()
peakIdx = np.where(peaks["id"] == sourceData.peakId)[0][0]
peak = peaks[peakIdx]
footprint.addPeak(peak.getIx(), peak.getIy(), peak.getPeakValue())
sourceRecord.setFootprint(footprint)
sourceRecord["deblend_dataCoverage"] = 0
if updateFluxColumns:
sourceRecord["deblend_dataCoverage"] = 0
continue

# Get the index of the model for the given band
Expand Down