-
Notifications
You must be signed in to change notification settings - Fork 22
CoDICE l2 fix intensity calculations for invalid half_spin_per_esa_steps #2631
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
CoDICE l2 fix intensity calculations for invalid half_spin_per_esa_steps #2631
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Fixes CoDICE L2 intensity/geometric-factor calculations to properly handle invalid (fill-valued) half_spin_per_esa_step entries, preventing incorrect mode/assignment behavior when the LUT data is padded or masked.
Changes:
- Introduces a shared
HALF_SPIN_FILLVALconstant (63) forhalf_spin_per_esa_stepinvalid values. - Updates L2 geometric factor mode selection and LO angular intensity A/B indexing to ignore fill-valued half-spin steps.
- Updates LO L1A products to pad and mask
half_spin_per_esa_stepusing the fill value instead ofNaN/literal63.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| imap_processing/codice/constants.py | Adds HALF_SPIN_FILLVAL constant used to mark invalid half-spin steps. |
| imap_processing/codice/codice_l2.py | Filters out fill-valued half spins in geometric factor mode selection and LO angular A/B index calculation. |
| imap_processing/codice/codice_l1a_lo_species.py | Pads/masks half_spin_per_esa_step using HALF_SPIN_FILLVAL instead of NaN/63. |
| imap_processing/codice/codice_l1a_lo_priority.py | Pads/masks half_spin_per_esa_step using HALF_SPIN_FILLVAL instead of NaN/63. |
| imap_processing/codice/codice_l1a_lo_counters_singles.py | Pads/masks half_spin_per_esa_step using HALF_SPIN_FILLVAL instead of NaN/63. |
| imap_processing/codice/codice_l1a_lo_counters_aggregated.py | Pads/masks half_spin_per_esa_step using HALF_SPIN_FILLVAL instead of NaN/63. |
| imap_processing/codice/codice_l1a_lo_angular.py | Pads/masks half_spin_per_esa_step using HALF_SPIN_FILLVAL instead of NaN/63. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
laspsandoval
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Just a couple of things.
176a6df
into
IMAP-Science-Operations-Center:dev
Change Summary
Overview
I ran a final check on dec 28th data and noticed a bug where we are not checking whether the half_spin_per_esa step is valid in l2 computations that use this variable.
Updated Files