Skip to content

Commit

Permalink
Only update coverage if using the meas catalog.
Browse files Browse the repository at this point in the history
  • Loading branch information
fred3m committed Sep 27, 2023
1 parent 3c46264 commit 6ab565d
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit 6ab565d

Please sign in to comment.