Skip to content

Commit

Permalink
Add basic sanity check on RA and dec
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrondel committed Oct 14, 2024
1 parent 88c0a9d commit cd50031
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/lsst/consdb/hinfo_fix_missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ def fix_telescope_position(self, exposure_rec: dict[str, Any]) -> dict[str, Any]
# Bail out because we don't have enough info.
return dict()

if exposure_rec["s_ra"] == 0. and exposure_rec["s_dec"] == 0.:
# Bail out because ra and dec don't appear to be valid.
return dict()

# Convert from RA and Dec
s_ra, s_dec = map(lambda x: float(exposure_rec[x]), ("s_ra", "s_dec"))
location = EarthLocation.of_site("LSST")
Expand Down

0 comments on commit cd50031

Please sign in to comment.