Skip to content

Commit

Permalink
Merge pull request #275 from lsst/tickets/DM-17845
Browse files Browse the repository at this point in the history
DM-17845: Silence warnings when removing mask planes
  • Loading branch information
isullivan committed May 30, 2019
2 parents 9f32fab + 4b44080 commit 865eaf9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/lsst/pipe/tasks/assembleCoadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,8 +937,9 @@ def removeMaskPlanes(self, maskedImage):
for maskPlane in self.config.removeMaskPlanes:
try:
mask &= ~mask.getPlaneBitMask(maskPlane)
except Exception as e:
self.log.warn("Unable to remove mask plane %s: %s", maskPlane, e.args[0])
except pexExceptions.InvalidParameterError:
self.log.debug("Unable to remove mask plane %s: no mask plane with that name was found.",
maskPlane)

@staticmethod
def setRejectedMaskMapping(statsCtrl):
Expand Down

0 comments on commit 865eaf9

Please sign in to comment.