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

Inital Codice L1b processing (for SIT-3) #622

Merged
merged 9 commits into from
Jun 14, 2024

Conversation

bourque
Copy link
Collaborator

@bourque bourque commented Jun 13, 2024

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
    • Added L1b attributes
  • imap_processing/codice/codice_l1b.py
    • Initial implementation of L1b processing
  • imap_processing/tests/codice/test_codice_l1b.py
    • Tests for L1b processing

Updated Files

  • imap_processing/cdf/config/imap_codice_global_cdf_attrs.yaml
    • Added L1b attributes
  • imap_processing/cli.py
    • Added L1b processing

@bourque bourque added Ins: CoDICE Related to the CoDICE instrument Level: L1 Level 1 processing labels Jun 13, 2024
@bourque bourque requested review from joeymukherjee and a team June 13, 2024 21:25
@bourque bourque self-assigned this Jun 13, 2024
@bourque bourque requested review from sdhoyt, greglucas, subagonsouth, tech3371, vmartinez-cu, laspsandoval and maxinelasp and removed request for a team June 13, 2024 21:25
Copy link
Contributor

@sdhoyt sdhoyt left a 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
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link
Contributor

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


# Write the dataset to CDF
logger.info(f"\nFinal data product:\n{l1b_dataset}\n")
l1b_dataset.attrs["Data_version"] = data_version
Copy link
Contributor

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)

Copy link
Collaborator Author

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.

@bourque bourque merged commit ac89000 into IMAP-Science-Operations-Center:dev Jun 14, 2024
17 checks passed
@bourque bourque deleted the codice-l1b branch June 14, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ins: CoDICE Related to the CoDICE instrument Level: L1 Level 1 processing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants