Skip to content

Commit

Permalink
Only add plane if it is not the default and missing
Browse files Browse the repository at this point in the history
  • Loading branch information
parejkoj committed Dec 4, 2024
1 parent bcfae0f commit a4ef957
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/lsst/meas/algorithms/maskStreaks.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,9 @@ def run(self, maskedImage):
"""
streaks = self.find(maskedImage)

maskedImage.mask.addMaskPlane(self.config.streaksMaskPlane)
if (self.config.streaksMaskPlane != "STREAK") and \
(self.config.streaksMaskPlane not in maskedImage.mask.getMaskPlaneDict()):
maskedImage.mask.addMaskPlane(self.config.streaksMaskPlane)
maskedImage.mask.array[streaks.mask] |= maskedImage.mask.getPlaneBitMask(self.config.streaksMaskPlane)

return pipeBase.Struct(
Expand Down

0 comments on commit a4ef957

Please sign in to comment.