Skip to content

Ultra l1a - added cdf for apid 882#1854

Merged
laspsandoval merged 5 commits intoIMAP-Science-Operations-Center:devfrom
laspsandoval:ialirt_cdf_updates
Jun 27, 2025
Merged

Ultra l1a - added cdf for apid 882#1854
laspsandoval merged 5 commits intoIMAP-Science-Operations-Center:devfrom
laspsandoval:ialirt_cdf_updates

Conversation

@laspsandoval
Copy link
Copy Markdown
Contributor

@laspsandoval laspsandoval commented Jun 26, 2025

Change Summary

Overview

Added apid 882 (energy rates)

Updated Files

  • ultra_l1a.py
    • Updated logic to include the energy rates data
  • ultra_utils.py
    • Added keys and packet properties
  • decom_ultra.py
    • Added function to decom the packet
  • imap_ultra_global_cdf_attrs.yaml
    • Modified global attributes
  • imap_ultra_l1a_variable_attrs.yaml
    • Modified variable attributes

Testing

conftest.py
test_decom_apid_882.py
test_ultra_l1a.py

@laspsandoval laspsandoval self-assigned this Jun 26, 2025
@laspsandoval laspsandoval marked this pull request as draft June 26, 2025 22:00
@laspsandoval laspsandoval added Ins: Ultra Related to the IMAP-Ultra instrument Level: L1 Level 1 processing labels Jun 26, 2025
@laspsandoval laspsandoval added this to the June 2025 milestone Jun 26, 2025
@laspsandoval laspsandoval marked this pull request as ready for review June 26, 2025 22:08
Copy link
Copy Markdown
Collaborator

@greglucas greglucas left a comment

Choose a reason for hiding this comment

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

The branch is called ialirt_cdf_updates, but this does look like it only contains ultra l1a 882 changes. I have a minor suggestion for refactoring the function to be more general, but that might be a good follow-up task for @lacoak21 and would get her familiar with the unpacking L0 data.

While working through these, I don't think metadata on l1a products is important, so don't feel like we need to add all the variable information right now, that can easily come later IMO. If it is easiest just to do it at the same time then that is fine but just don't think you need to do it if it is slowing everything down.

return ds


def process_ultra_energy_rates(ds: xr.Dataset) -> xr.Dataset:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is very close to the above function. If you are going to be doing this on other rate-type packets too it might be good to abstract the boilerplate stuff out and pass in the apid/enum to do the lookup of the packet-specific things within a common function instead of needing to duplicate all the looping/logic.

def process_rates_l0(ds, packet_enum):
    # Lookup from whatever enum you passed in
    packet_enum.width, ...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes. I know. This is the last rates packet, though.

@laspsandoval laspsandoval merged commit cb333b9 into IMAP-Science-Operations-Center:dev Jun 27, 2025
14 checks passed
@github-project-automation github-project-automation bot moved this to Done in IMAP Jun 27, 2025
@laspsandoval laspsandoval deleted the ialirt_cdf_updates branch June 27, 2025 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ins: Ultra Related to the IMAP-Ultra instrument Level: L1 Level 1 processing

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants