Skip to content

Commit

Permalink
Use new is_key_ok and are_keys_ok APIs in translators
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Apr 3, 2019
1 parent ff3e217 commit c96940a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/lsst/obs/lsst/translators/lsstsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class LsstSimTranslator(LsstBaseTranslator):
def to_telescope(self):
# Docstring will be inherited. Property defined in properties.py
telescope = None
if "OUTFILE" in self._header and self._header["OUTFILE"].startswith("lsst"):
if self.is_key_ok("OUTFILE") and self._header["OUTFILE"].startswith("lsst"):
telescope = "LSST"
self._used_these_cards("OUTFILE")
elif "LSST_NUM" in self._header:
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/obs/lsst/translators/phosim.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def to_tracking_radec(self):
def to_altaz_begin(self):
# Docstring will be inherited. Property defined in properties.py
# Fallback to the "derive from ra/dec" if keys are missing
if "ZENITH" in self._header and "AZIMUTH" in self._header:
if self.are_keys_ok(["ZENITH", "AZIMUTH"]):
return altaz_from_degree_headers(self, (("ZENITH", "AZIMUTH"),),
self.to_datetime_begin(), is_zd=set(["ZENITH"]))
else:
Expand Down

0 comments on commit c96940a

Please sign in to comment.