Skip to content

Commit

Permalink
Mask edges when doBrighterFatter=True.
Browse files Browse the repository at this point in the history
The edges of amplifiers that have had the brighter-fatter correction
applied may not have had the appropriate correction applied.  To
reflect this fact, ensure that the number of edge pixels matching the
kernel are masked with the EDGE bit, using the maskEdges method.
  • Loading branch information
czwa committed Jul 15, 2019
1 parent 104821f commit 241ab4b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions python/lsst/ip/isr/isrTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,16 @@ def run(self, ccdExposure, camera=None, bias=None, linearizer=None, crosstalkSou
bfCorr -= interpExp.getMaskedImage().getImage()
image += bfCorr

# Applying the brighter-fatter correction applies a
# convolution to the science image. At the edges this
# convolution may not have sufficient valid pixels to
# produce a valid correction. Mark pixels within the size
# of the brighter-fatter kernel as EDGE to warn of this
# fact.
self.maskEdges(ccdExposure, numEdgePixels=numpy.max(bfKernel.shape),
maskPlane="EDGE")
self.log.warn("Ensuring image edges are masked as SUSPECT to the brighter-fatter kernel size.")

self.debugView(ccdExposure, "doBrighterFatter")

if self.config.doDark:
Expand Down

0 comments on commit 241ab4b

Please sign in to comment.