Skip to content

Commit

Permalink
match Gemini ad class on TELESCOP too, not just OBSERVAT. Also remove…
Browse files Browse the repository at this point in the history
…d a leftover debugging print statement.
  • Loading branch information
KathleenLabrie committed May 22, 2019
1 parent 0d5dfd1 commit 4864a84
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions gemini_instruments/gemini/adclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,15 @@ class AstroDataGemini(AstroDataFits):
@staticmethod
def _matches_data(source):
obs = source[0].header.get('OBSERVAT', '').upper()
# This covers variants like 'Gemini-North', 'Gemini North', etc.
return obs in ('GEMINI-NORTH', 'GEMINI-SOUTH')
tel = source[0].header.get('TELESCOP', '').upper()

isGemini = False
if obs in ('GEMINI-NORTH', 'GEMINI-SOUTH'):
isGemini = True
elif tel in ('GEMINI-NORTH', 'GEMINI-SOUTH'):
isGemini = True

return isGemini

@astro_data_tag
def _type_observatory(self):
Expand Down Expand Up @@ -173,7 +180,6 @@ def _type_site(self):
@astro_data_tag
def _type_mode(self):
mode = self.phu.get(self._keyword_for('observation_mode'), '').upper()
print(type(mode))

if mode:
tags = [mode]
Expand Down

0 comments on commit 4864a84

Please sign in to comment.