From a4ef957bd227437b20b3f57945c1be1cf829e01f Mon Sep 17 00:00:00 2001 From: John Parejko Date: Tue, 12 Nov 2024 10:22:08 -0800 Subject: [PATCH] Only add plane if it is not the default and missing --- python/lsst/meas/algorithms/maskStreaks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/lsst/meas/algorithms/maskStreaks.py b/python/lsst/meas/algorithms/maskStreaks.py index 954311dd8..2da632936 100644 --- a/python/lsst/meas/algorithms/maskStreaks.py +++ b/python/lsst/meas/algorithms/maskStreaks.py @@ -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(