Skip to content

CoDICE: consistent dimension order - #1920

Merged
bourque merged 6 commits into
IMAP-Science-Operations-Center:devfrom
bourque:codice-consistent-dimensions
Jul 11, 2025
Merged

CoDICE: consistent dimension order#1920
bourque merged 6 commits into
IMAP-Science-Operations-Center:devfrom
bourque:codice-consistent-dimensions

Conversation

@bourque

@bourque bourque commented Jul 9, 2025

Copy link
Copy Markdown
Collaborator

This PR updates some CoDICE data products to have consistent ordering of dimensions (i.e. time, energy, azimuth, spin) across the CoDICE data products (and other instruments).

In making these changes, I was able to simplify how dimensions are defined and used in the code, which was a nice byproduct of this.

I also added a new unit test to ensure that the order of dimensions are correct/expected.

Closes #1504

@bourque bourque self-assigned this Jul 9, 2025
@bourque bourque added Ins: CoDICE Related to the CoDICE instrument Level: L1 Level 1 processing labels Jul 9, 2025
@bourque
bourque requested a review from Copilot July 9, 2025 18:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR ensures consistent ordering of dimensions (time, energy, azimuth, spin) across CoDICE data products and simplifies how dimensions are defined and used.

  • Replaces separate input_dims/output_dims with a unified dims configuration key.
  • Refactors data reshaping to place the counter dimension last and eliminates explicit transposition.
  • Updates tests to expect arrays with the new dimension ordering.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
imap_processing/tests/codice/test_codice_l1a.py Updated expected array shapes for low‐energy products to match the new dimension order
imap_processing/codice/constants.py Replaced input_dims/output_dims entries with a single dims field
imap_processing/codice/codice_l1a.py Refactored coordinate and data‐variable definitions; reshaped and extracted counters using dims

Comment thread imap_processing/codice/codice_l1a.py Outdated
Comment thread imap_processing/codice/codice_l1a.py Outdated
@bourque
bourque requested review from a team, greglucas, joeymukherjee, lacoak21 and tech3371 and removed request for a team July 9, 2025 21:54
@bourque
bourque merged commit f853a1b into IMAP-Science-Operations-Center:dev Jul 11, 2025
14 checks passed
@bourque
bourque deleted the codice-consistent-dimensions branch July 11, 2025 15:46
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.

CoDICE: Make sure data product dimensions are consistent with the other instruments

3 participants