Skip to content

Commit

Permalink
Merge branch 'tickets/DM-37022'
Browse files Browse the repository at this point in the history
  • Loading branch information
czwa committed Nov 17, 2022
2 parents e3fba82 + df3370d commit 9ca8237
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion python/lsst/ip/isr/overscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,15 @@ def run(self, exposure, amp, isTransposed=False):

maskIm = exposure.getMaskedImage()
maskIm = maskIm.Factory(maskIm, parallelOverscanBBox)
makeThresholdMask(maskIm, threshold=self.config.numSigmaClip, growFootprints=0)

# The serial overscan correction has removed the majority
# of the signal in the parallel overscan region, so the
# mean should be close to zero. The noise in both should
# be similar, so we can use the noise from the serial
# overscan region to set the threshold for bleed
# detection.
thresholdLevel = self.config.numSigmaClip * serialResults.overscanSigmaResidual
makeThresholdMask(maskIm, threshold=thresholdLevel, growFootprints=0)
maskPix = countMaskedPixels(maskIm, self.config.maskPlanes)
xSize, ySize = parallelOverscanBBox.getDimensions()
if maskPix > xSize*ySize*self.config.parallelOverscanMaskThreshold:
Expand Down

0 comments on commit 9ca8237

Please sign in to comment.