Skip to content

Commit

Permalink
Add test for invariance of noise vs flux
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Broughton committed Feb 1, 2024
1 parent 5892d95 commit d388a5d
Showing 1 changed file with 11 additions and 0 deletions.
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

0 comments on commit d388a5d

Please sign in to comment.