Skip to content

Commit

Permalink
Merge pull request #410 from lsst/tickets/DM-35524
Browse files Browse the repository at this point in the history
DM-35524: Change default TS8 filter from NONE to unknown
  • Loading branch information
timj committed Jul 9, 2022
2 parents 3768f7a + 62fb3b5 commit baa0eb2
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions python/lsst/obs/lsst/translators/ts8.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,14 @@ def to_physical_filter(self):
this properly.
"""

default = "unknown"
try:
filter_pos = self._header["FILTPOS"]
self._used_these_cards("FILTPOS")
except KeyError:
log.warning("%s: FILTPOS key not found in header (assuming NONE)",
self._log_prefix)
return "NONE"
log.warning("%s: FILTPOS key not found in header (assuming %s)",
self._log_prefix, default)
return default

try:
return {
Expand All @@ -214,9 +215,9 @@ def to_physical_filter(self):
6: 'y',
}[filter_pos]
except KeyError:
log.warning("%s: Unknown filter position (assuming NONE): %d",
self._log_prefix, filter_pos)
return "NONE"
log.warning("%s: Unknown filter position (assuming %s): %d",
self._log_prefix, default, filter_pos)
return default

def to_exposure_id(self):
"""Generate a unique exposure ID number
Expand Down

0 comments on commit baa0eb2

Please sign in to comment.