Skip to content

Commit

Permalink
Silence warnings when removing mask planes unless loglevel=debug
Browse files Browse the repository at this point in the history
  • Loading branch information
isullivan committed Mar 4, 2019
1 parent 77d0fd1 commit 077a801
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 @@ -933,8 +933,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 077a801

Please sign in to comment.