Skip to content

Commit

Permalink
isr: mark amp as bad if entirely saturated
Browse files Browse the repository at this point in the history
If the amp is completely saturated, overscan subtraction may fail.
  • Loading branch information
PaulPrice committed Feb 16, 2017
1 parent 105b842 commit 479ed1d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/lsst/obs/subaru/isr.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,11 @@ def runDataRef(self, sensorRef):
self.saturationDetection(ccdExposure, amp)
if self.config.doSuspect and not badAmp:
self.suspectDetection(ccdExposure, amp)
ampMask = afwImage.MaskU(ccdExposure.getMaskedImage().getMask(), amp.getRawDataBBox(),
afwImage.PARENT)
maskVal = ampMask.getPlaneBitMask([self.config.saturatedMaskName, self.config.suspectMaskName])
if numpy.all(ampMask.getArray() & maskVal > 0):
badAmp = True
if self.config.doOverscan and not badAmp:
ampImage = afwImage.MaskedImageF(ccdExposure.getMaskedImage(), amp.getRawDataBBox(),
afwImage.PARENT)
Expand Down

0 comments on commit 479ed1d

Please sign in to comment.