-
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
Inital Codice L1b processing (for SIT-3) #622
Inital Codice L1b processing (for SIT-3) #622
Conversation
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.
Everything looks good to me. Just a couple minor questions.
Also, the unit test failure your getting is because I messed up a Lo merge. If you rebase that should go away.
l1b_dataset.attrs["cdf_filename"] = write_cdf(l1b_dataset) | ||
logger.info(f"\tCreated CDF file: {l1b_dataset.cdf_filename}") | ||
|
||
return l1b_dataset |
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.
Could return just the filename instead of the whole dataset?
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.
Yeah, I think I could do that for L1b. For L1a, I am returning the whole dataset to make it easier to write unit tests (in that way, my test code doesn't need to go open the file), but since my L1b tests are just checking the filename, I could just return that instead.
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.
Gotcha, yeah, whatever works better for you
imap_processing/codice/codice_l1b.py
Outdated
|
||
# Write the dataset to CDF | ||
logger.info(f"\nFinal data product:\n{l1b_dataset}\n") | ||
l1b_dataset.attrs["Data_version"] = data_version |
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.
Does adding the version directly replace needing to make this call? attr_mgr.add_global_attribute("Data_version", data_version)
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.
Good catch. i just forgot to update this to use that method of setting the Data_version
.
Change Summary
Overview
This PR adds initial support for CoDICE L1b data products. It is pretty bare bones for now, just to get data products produced for the SIT-3 test (for example, the data arrays are simply being converted from integers to floats). This will be revisited after SIT-3 to actually apply appropriate processing.
New Files
imap_processing/cdf/config/imap_codice_global_cdf_attrs.yaml
imap_processing/codice/codice_l1b.py
imap_processing/tests/codice/test_codice_l1b.py
Updated Files
imap_processing/cdf/config/imap_codice_global_cdf_attrs.yaml
imap_processing/cli.py