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-35528: Update TS8 info in obs_lsst for FITS header changes and CCD replacement in slot S00 RTM-004 #411

Merged
merged 2 commits into from Jul 15, 2022

Conversation

jchiang87
Copy link
Contributor

No description provided.

@jchiang87 jchiang87 requested a review from timj July 11, 2022 17:39
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.

I think the obsid code needs to be tweaked so it handles old data. Please add a new test header as well so we can be sure it works.

filename = self._header["FILENAME"]
self._used_these_cards("FILENAME")
return filename[:filename.rfind(".")]
observation_id = self._header["OBSID"]
Copy link
Member

Choose a reason for hiding this comment

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

This will break with old TS8 data (there is a reason I didn't use OBSID before) and I don't think it's going to pass the tests. I think you will need to do:

if self._is_key_ok("OBSID"):
    observation_id = self._header["OBSID"]
    self._used_these_cards("OBSID")
    return observation_id
filename = self._header["FILENAME"]
...

and leave the old FILENAME code in place.

You likely should add a new TS8 header to the tests/header directory and add a test for it.

@@ -242,6 +242,10 @@ def to_exposure_id(self):
@cache_translation
def to_observation_id(self):
# Docstring will be inherited. Property defined in properties.py
if self.is_key_ok('OBSID'):
Copy link
Member

Choose a reason for hiding this comment

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

Minor nit: This method is using double quotes everywhere except this line.

@jchiang87 jchiang87 merged commit a5c010b into main Jul 15, 2022
@jchiang87 jchiang87 deleted the tickets/DM-35528 branch July 15, 2022 20:28
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