Skip to content

Commit

Permalink
Return empty dict if no detector
Browse files Browse the repository at this point in the history
  • Loading branch information
kadrlica committed Sep 17, 2024
1 parent d135263 commit 01580aa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/lsst/ip/isr/isrFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1210,6 +1210,9 @@ def getExposureGains(exposure):
Dictionary of gain values, keyed by amplifier name.
"""
det = exposure.getDetector()
if det is None:
return dict()

metadata = exposure.getMetadata()
gains = {}
for amp in det:
Expand Down Expand Up @@ -1238,6 +1241,9 @@ def getExposureReadNoises(exposure):
Dictionary of read noise values, keyed by amplifier name.
"""
det = exposure.getDetector()
if det is None:
return dict()

metadata = exposure.getMetadata()
readnoises = {}
for amp in det:
Expand Down

0 comments on commit 01580aa

Please sign in to comment.