Skip to content

Commit

Permalink
Enhance commentary associated with obstype determination
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Apr 9, 2019
1 parent 7a72eb1 commit 10044c7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions python/lsst/obs/lsst/translators/auxTel.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,17 +206,23 @@ def to_observation_type(self):
# AuxTel observation type is documented to appear in OBSTYPE
# but for historical reasons prefers IMGTYPE. Some data puts
# it in GROUPID (which is meant to be for something else).
test_keys = ["OBSTYPE", "IMGTYPE"]
# Test the keys in order until we find one that contains a
# defined value.
obstype_keys = ["OBSTYPE", "IMGTYPE"]

# For now, hope that GROUPID does not contain an obs type value
# when on the mountain.
if not self._is_on_mountain():
test_keys.append("GROUPID")
obstype_keys.append("GROUPID")

for k in test_keys:
for k in obstype_keys:
if self.is_key_ok(k):
obstype = self._header[k]
self._used_these_cards(k)
return obstype.lower()

# In the absence of any observation type information, return
# unknown unless we think it might be a bias.
exptime = self.to_exposure_time()
if exptime == 0.0:
obstype = "bias"
Expand Down

0 comments on commit 10044c7

Please sign in to comment.