Skip to content

Commit

Permalink
Merge branch 'tickets/DM-37643'
Browse files Browse the repository at this point in the history
  • Loading branch information
czwa committed Feb 6, 2023
2 parents becde43 + 172b030 commit f838e9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/lsst/cp/pipe/ptc/cpExtractPtcTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,9 +756,9 @@ def getGainFromFlatPair(self, im1Area, im2Area, imStatsCtrl, mu1, mu2,
if correctionType not in ['NONE', 'SIMPLE', 'FULL']:
raise RuntimeError("Unknown correction type: %s" % correctionType)

if correctionType != 'NONE' and readNoise is None:
if correctionType != 'NONE' and not np.isfinite(readNoise):
self.log.warning("'correctionType' in 'getGainFromFlatPair' is %s, "
"but 'readNoise' is 'None'. Setting 'correctionType' "
"but 'readNoise' is NaN. Setting 'correctionType' "
"to 'NONE', so a gain value will be estimated without "
"corrections." % correctionType)
correctionType = 'NONE'
Expand Down Expand Up @@ -824,6 +824,6 @@ def getReadNoiseFromMetadata(self, taskMetadata, ampName):
else:
self.log.warning("Median readout noise from ISR metadata for amp %s "
"could not be calculated." % ampName)
readNoise = None
readNoise = np.nan

return readNoise

0 comments on commit f838e9e

Please sign in to comment.