Skip to content

Commit

Permalink
Use correct bounding box for MultibandFootprint
Browse files Browse the repository at this point in the history
The original version of this code used the bounding box of the
spanset, not the mask that was used to create the spanset.
When the mask contains empty rows the two will differ, which
caused some sources to be placed incorrectly in the footprint.
  • Loading branch information
fred3m committed Nov 10, 2021
1 parent a158fd8 commit 9cb58b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/lsst/meas/extensions/scarlet/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,6 @@ def modelToHeavy(source, mExposure, blend, xy0=Point2I(), dtype=np.float32):
# Create the MultibandHeavyFootprint
foot = Footprint(spans)
foot.setPeakCatalog(peakCat)
model = MultibandImage(mExposure.filters, model, spans.getBBox())
model = MultibandImage(mExposure.filters, model, valid.getBBox())
mHeavy = MultibandFootprint.fromImages(mExposure.filters, model, footprint=foot)
return mHeavy

0 comments on commit 9cb58b2

Please sign in to comment.