CoDICE: Changed references of 'pha' to 'direct-events' - #1917
Merged
bourque merged 1 commit intoJul 9, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
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:
bourque
commented
Jul 8, 2025
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 |
Collaborator
Author
There was a problem hiding this comment.
This should have been included in #1906, but I forgot, so I am sneaking it into this PR.
bourque
requested review from
a team,
greglucas,
joeymukherjee,
maxineofficial and
tech3371
and removed request for
a team
July 8, 2025 18:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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