-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add Hi sensor name to imap_hi_l1b_hk products #633
Add Hi sensor name to imap_hi_l1b_hk products #633
Conversation
Convert l1b hk to use CDF attribute manager Move Logical_source update to common l1b location Update test value for l1b_hk Logical_source
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had one question. Otherwise, it looks great!
# TODO: write a function that extracts the sensor from Logical_source | ||
# some functionality can be found in imap_data_access.file_validation but | ||
# only works on full file names | ||
sensor_str = logical_source_parts[-1].split("-")[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before you had like this, was that not working?
sensor_str = l1a_dataset.attrs["Logical_source"].split("_")[-1].split("-")[0]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was working, but it was parsing directly from Logical_source
. I moved this code up into the hi_l1b
function where I had already performed the first part of the parsing. Line 39 of hi_l1b.py
:
logical_source_parts = l1a_dataset.attrs["Logical_source"].split("_")
.
Ultimately, this logic should be moved to a common location so that any instrument that wants to parse the sensor from Logical_source or filename can call that function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok. Sorry, missed that part. Cool, that makes sense.
9b1c351
into
IMAP-Science-Operations-Center:dev
Change Summary
Fixes missing sensor name in Hi l1b housekeeping file
Overview
New Dependencies
None
New Files
None
Deleted Files
None
Updated Files
Testing
Test updated with new Logical_source value
closes #632