Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-31997: Apply 180 degree offset due to change in defintions #370

Merged
merged 1 commit into from
Nov 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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