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-42238: Add a check of consistency whether the noise measurements from the PTC fit and the overscan #35

Merged
merged 1 commit into from
Feb 2, 2024
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
11 changes: 11 additions & 0 deletions python/lsst/cp/verify/verifyPtc.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,17 @@ def verify(self, calib, statisticsDict, camera=None):
verify['PTC_GAIN'] = bool(diffGain < self.config.gainThreshold)
verify['PTC_NOISE'] = bool(diffNoise < self.config.noiseThreshold)

# Check that the noises measured in cpPtcExtract do not evolve
# as a function of flux.
# We check that the reduced chi squared statistic between the
# noises and the mean of the noises less than 1.25 sigmas
mask = calib.expIdMask[ampName]
noiseList = calib.noiseList[ampName][mask]
expectedNoiseList = np.zeros_like(noiseList) + np.mean(noiseList)
chiSquared = np.sum((noiseList - expectedNoiseList)**2 / np.std(noiseList))
reducedChiSquared = chiSquared / len(noiseList)
verify['NOISE_SIGNAL_INDEPENDENCE'] = bool(reducedChiSquared < 1.25)

# DMTN-101: 16.3
# Check that the measured PTC turnoff is at least greater than the
# full-well requirement of 90k e-.
Expand Down