Skip to content

Commit

Permalink
Add support for old LSST GAIN or new LSST ISR GAIN keywords.
Browse files Browse the repository at this point in the history
  • Loading branch information
erykoff committed Jul 23, 2024
1 parent f69910c commit 1014b82
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions python/lsst/cp/pipe/cpDark.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,12 @@ def _get_gains(exposure):
gains = {}
for amp in det:
ampName = amp.getName()
key = f"LSST GAIN {ampName}"
if key in metadata:
gains[ampName] = metadata[key]
# The GAIN key may be the new LSST ISR GAIN or the old
# LSST GAIN.
if (key1 := f"LSST ISR GAIN {ampName}") in metadata:
gains[ampName] = metadata[key1]
elif (key2 := f"LSST GAIN {ampName}") in metadata:
gains[ampName] = metadata[key2]
else:
gains[ampName] = amp.getGain()
return gains

0 comments on commit 1014b82

Please sign in to comment.