Skip to content

CoDICE: Changed references of 'pha' to 'direct-events' - #1917

Merged
bourque merged 1 commit into
IMAP-Science-Operations-Center:devfrom
bourque:codice-pha-name-change
Jul 9, 2025
Merged

CoDICE: Changed references of 'pha' to 'direct-events'#1917
bourque merged 1 commit into
IMAP-Science-Operations-Center:devfrom
bourque:codice-pha-name-change

Conversation

@bourque

@bourque bourque commented Jul 8, 2025

Copy link
Copy Markdown
Collaborator

This PR updates the CoDICE pipelines to change the "pha" naming convention to "direct events", which is recommended by the project for better consistency across instruments.

Closes #1502

@bourque
bourque requested a review from Copilot July 8, 2025 17:38
@bourque bourque self-assigned this Jul 8, 2025
@bourque bourque added Ins: CoDICE Related to the CoDICE instrument Level: L1 Level 1 processing Level: L2 Level 2 processing labels Jul 8, 2025

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 renames all instances of the “pha” data product to “direct-events” for consistency across instruments and updates related constants, tests, and CDF configuration.

  • Renamed test filenames and fixtures from “pha” to “direct-events”.
  • Updated constants, variable lists, and global attribute lookups to reflect “direct-events”.
  • Added new support variables in L2 CDF config and cleaned up the PHA naming workaround.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
imap_processing/tests/external_test_data_config.py Updated test data file names from “pha” to “direct-events”
imap_processing/tests/codice/test_codice_l1a.py Updated product list and expected shapes for “direct-events”
imap_processing/tests/codice/conftest.py Updated fixture paths to use “direct-events” filenames
imap_processing/codice/constants.py Renamed CDF field and variable constants to DE suffix, updated map
imap_processing/codice/codice_l2.py Removed temporary PHA naming workaround
imap_processing/codice/codice_l1b.py Adjusted L1B skip condition to use “direct-events” descriptors
imap_processing/codice/codice_l1a.py Updated global attribute lookups for direct-events
imap_processing/cdf/config/imap_codice_l2_variable_attrs.yaml Added new support variables epoch_delta_minus and epoch_delta_plus
imap_processing/cdf/config/imap_codice_global_cdf_attrs.yaml Renamed logical_source entries and Data_type for direct-events
Comments suppressed due to low confidence (2)

imap_processing/codice/constants.py:130

  • [nitpick] The abbreviation 'DE' may not be immediately clear; consider renaming these constants to 'HI_DIRECT_EVENTS_CDF_FIELDS' and 'LO_DIRECT_EVENTS_CDF_FIELDS' for readability.
HI_DE_CDF_FIELDS = [

imap_processing/cdf/config/imap_codice_l2_variable_attrs.yaml:33

  • Consider adding tests to verify that the new support variables 'epoch_delta_minus' and 'epoch_delta_plus' are correctly included and populated in the CoDICE L2 output datasets.
epoch_delta_minus:

Comment on lines +33 to +55
epoch_delta_minus:
CATDESC: Time from acquisition start to acquisition center
FIELDNAM: epoch_delta_minus
FILLVAL: *int_fillval
FORMAT: I18
LABLAXIS: epoch_delta_minus
SCALETYP: linear
UNITS: ns
VALIDMIN: *min_int
VALIDMAX: *max_int
VAR_TYPE: support_data

epoch_delta_plus:
CATDESC: Time from acquisition center to acquisition end
FIELDNAM: epoch_delta_plus
FILLVAL: *int_fillval
FORMAT: I18
LABLAXIS: epoch_delta_plus
SCALETYP: linear
UNITS: ns
VALIDMIN: *min_int
VALIDMAX: *max_int
VAR_TYPE: support_data

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This should have been included in #1906, but I forgot, so I am sneaking it into this PR.

@bourque
bourque requested review from a team, greglucas, joeymukherjee, maxineofficial and tech3371 and removed request for a team July 8, 2025 18:01

@tech3371 tech3371 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.

LGTM

@bourque
bourque merged commit fa7f12c into IMAP-Science-Operations-Center:dev Jul 9, 2025
14 checks passed
@bourque
bourque deleted the codice-pha-name-change branch July 9, 2025 16:38
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 Level: L2 Level 2 processing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CoDICE: Change references of "PHA" to "direct events"

3 participants