IDEX: l1b / l2b spin phase updates - #3453
Merged
lacoak21 merged 4 commits intoSep 14, 2026
Merged
Conversation
lacoak21
requested review from
aldo9253 and
bryan-harter
and
a balanced review from Copilot
September 11, 2026 20:22
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Published metadata remains inconsistent, and the new test does not validate the generated coordinate.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Updates IDEX spin-phase handling to use instrument-frame phases and correct L2B bin-center coordinates.
Changes:
- Uses IDEX instrument spin phase in L1B.
- Corrects L2B quadrant edges and binning.
- Adds a bin-center regression test.
File summaries
| File | Description |
|---|---|
imap_processing/idex/idex_l1b.py |
Uses instrument-frame spin phase. |
imap_processing/idex/idex_l2b.py |
Corrects spin-phase edges and binning. |
imap_processing/tests/idex/test_idex_l2b.py |
Tests expected bin centers. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
tech3371
approved these changes
Sep 14, 2026
tech3371
left a comment
Contributor
There was a problem hiding this comment.
Code changes looks good to me and glad to see Alex comment because I didn't know impact of these angle bins changes.
lacoak21
merged commit Sep 14, 2026
edc9340
into
IMAP-Science-Operations-Center:dev
22 checks passed
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.
Change Summary
closes #3452
closes #3451
Overview
Fixes a binning bug in l2b. I originally had the spin bin edges in "np.digitize" friendly values. E.g. shifted by 45 so cross 0 degree events would bin nicely. The issue was then I forgot to account for that when creating the coords using that array.
This updates the SPIN_PHASE_BIN_EDGES to be more realistic and then the binning function handles the shift itself.
Testing
Adds a small test to assert the center bins are correct.