Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-26484: Run read noise eotest task at NCSA #170

Merged
merged 2 commits into from
Jan 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 14 additions & 2 deletions python/lsst/ip/isr/isrTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -1378,10 +1378,22 @@ def run(self, ccdExposure, camera=None, bias=None, linearizer=None,
qaMedian = qaStats.getValue(afwMath.MEDIAN)
qaStdev = qaStats.getValue(afwMath.STDEVCLIP)

self.metadata.set(f"ISR OSCAN {amp.getName()} MEDIAN", qaMedian)
self.metadata.set(f"ISR OSCAN {amp.getName()} STDEV", qaStdev)
self.metadata.set(f"FIT MEDIAN {amp.getName()}", qaMedian)
self.metadata.set(f"FIT STDEV {amp.getName()}", qaStdev)
self.log.debug(" Overscan stats for amplifer %s: %f +/- %f",
amp.getName(), qaMedian, qaStdev)

# Residuals after overscan correction
qaStatsAfter = afwMath.makeStatistics(overscanResults.overscanImage,
afwMath.MEDIAN | afwMath.STDEVCLIP)
qaMedianAfter = qaStatsAfter.getValue(afwMath.MEDIAN)
qaStdevAfter = qaStatsAfter.getValue(afwMath.STDEVCLIP)

self.metadata.set(f"RESIDUAL MEDIAN {amp.getName()}", qaMedianAfter)
self.metadata.set(f"RESIDUAL STDEV {amp.getName()}", qaStdevAfter)
self.log.debug(" Overscan stats for amplifer %s after correction: %f +/- %f",
amp.getName(), qaMedianAfter, qaStdevAfter)

ccdExposure.getMetadata().set('OVERSCAN', "Overscan corrected")
else:
if badAmp:
Expand Down