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

Conversation

mfisherlevine
Copy link
Contributor

No description provided.

Copy link
Member

@timj timj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Minor comments.

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

if date > ROTPA_CONVENTION_180_SWITCH1 and date < ROTPA_CONVENTION_180_SWITCH2:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we reverse these tests please? For most of the data we take the date will be greater than SWITCH1 and the test will be true but for only a small fraction of date will the second test be true. If we do the least common case first this will help us for all the remaining data.

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

if date > ROTPA_CONVENTION_180_SWITCH1 and date < ROTPA_CONVENTION_180_SWITCH2:
header['ROTPA'] = header['ROTPA']-180
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually we leave a space around the operator.

@mfisherlevine mfisherlevine merged commit c47704b into master Nov 12, 2021
@mfisherlevine mfisherlevine deleted the tickets/DM-31997 branch November 12, 2021 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants