Skip to content

Commit

Permalink
Apply 180 degree offset due to change in defintions
Browse files Browse the repository at this point in the history
  • Loading branch information
mfisherlevine committed Nov 12, 2021
1 parent d8e2a9e commit b49e8e3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions python/lsst/obs/lsst/translators/latiss.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@
# DATE-END is not to be trusted before this date
DATE_END_IS_BAD = Time("2020-02-01T00:00", format="isot", scale="utc")

# The convention for the reporting of ROTPA changed by 180 here
ROTPA_CONVENTION_180_SWITCH1 = Time("2020-11-19T00:00", format="isot", scale="utc")
ROTPA_CONVENTION_180_SWITCH2 = Time("2021-10-29T00:00", format="isot", scale="utc")

# Scaling factor radians to degrees. Keep it simple.
RAD2DEG = 180.0 / math.pi

Expand Down Expand Up @@ -390,6 +394,10 @@ def fix_header(cls, header, instrument, obsid, filename=None):
if header[h]:
header[h] += offset

if date < ROTPA_CONVENTION_180_SWITCH2 and date > ROTPA_CONVENTION_180_SWITCH1:
header['ROTPA'] = header['ROTPA'] - 180
modified = True

return modified

def _is_on_mountain(self):
Expand Down

0 comments on commit b49e8e3

Please sign in to comment.