Skip to content

Commit

Permalink
Update vignette mask plane to NO_DATA convention
Browse files Browse the repository at this point in the history
The calib.py HscFlatCombineConfig class in obs_subaru has set a long-standing
convention of marking the vignetted region with the NO_DATA mask plane.  For
consistency, the same should be done in cp_pipe.
  • Loading branch information
laurenam committed Jul 17, 2021
1 parent c2681e9 commit 5dbbe24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions python/lsst/cp/pipe/cpCombine.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ class CalibCombineByFilterTask(CalibCombineTask):


def VignetteExposure(exposure, polygon=None,
doUpdateMask=True, maskPlane='BAD',
doUpdateMask=True, maskPlane="NO_DATA",
doSetValue=False, vignetteValue=0.0,
log=None):
"""Apply vignetted polygon to image pixels.
Expand All @@ -567,7 +567,7 @@ def VignetteExposure(exposure, polygon=None,
Image to be updated.
doUpdateMask : `bool`, optional
Update the exposure mask for vignetted area?
maskPlane : `str`, optional,
maskPlane : `str`, optional
Mask plane to assign.
doSetValue : `bool`, optional
Set image value for vignetted area?
Expand Down
3 changes: 1 addition & 2 deletions python/lsst/cp/pipe/cpFlatNormTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ def run(self, inputExp):
List containing the statistics.
"""
if self.config.doVignette:
VignetteExposure(inputExp, doUpdateMask=True, maskPlane='BAD',
doSetValue=False, log=self.log)
VignetteExposure(inputExp, doUpdateMask=True, doSetValue=False, log=self.log)
mask = inputExp.getMask()
maskVal = mask.getPlaneBitMask(self.config.maskNameList)
statsControl = afwMath.StatisticsControl(self.config.numSigmaClip,
Expand Down

0 comments on commit 5dbbe24

Please sign in to comment.