Skip to content

Commit

Permalink
FringeTask: fix confusion between mask plane and mask bit
Browse files Browse the repository at this point in the history
setMaskFromFootprintList wants a mask bit, but we have been giving
it a mask plane.

Thanks to Michitaro Koike for discovering and fixing this bug.
  • Loading branch information
PaulPrice committed Oct 19, 2016
1 parent a5bc178 commit 16008d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/lsst/pipe/drivers/constructCalibs.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ def processSingle(self, sensorRef):
mi /= bgLevel
footprintSets = self.detection.detectFootprints(exposure, sigma=self.config.detectSigma)
mask = exposure.getMaskedImage().getMask()
detected = mask.addMaskPlane("DETECTED")
detected = 1 << mask.addMaskPlane("DETECTED")
for fpSet in (footprintSets.positive, footprintSets.negative):
if fpSet is not None:
afwDet.setMaskFromFootprintList(mask, fpSet.getFootprints(), detected)
Expand Down

0 comments on commit 16008d1

Please sign in to comment.