ULTRA l1b updates to spin and energy culling bins#2789
Merged
lacoak21 merged 11 commits intoIMAP-Science-Operations-Center:devfrom Mar 3, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates ULTRA L1B culling configuration and logic to use revised energy-bin grouping and to smooth/aggregate spin-bin counts for high-energy culling, with corresponding constant and test updates.
Changes:
- Update energy-bin grouping for culling (new base bin, fewer culling thresholds, and optional “merge-above-energy” behavior).
- Modify high-energy culling to optionally combine multiple spin bins when computing counts.
- Refresh unit/external-validation tests to reflect the updated binning/threshold expectations.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
imap_processing/ultra/l1b/ultra_l1b_culling.py |
Adds optional spin-bin combining for high-energy culling and adds max_energy handling to energy-range binning. |
imap_processing/ultra/constants.py |
Updates culling constants: base energy bin, max-energy threshold, earth angle threshold, cull thresholds, and combined spin-bin size. |
imap_processing/tests/ultra/unit/test_ultra_l1b_culling.py |
Updates tests and expected outputs for revised energy ranges/threshold counts and adds a test for binned energy ranges. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
laspsandoval
approved these changes
Mar 2, 2026
Contributor
laspsandoval
left a comment
There was a problem hiding this comment.
Just one thing I caught. Nicely done Luisa!
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
Overview
Bob made some updates to the spin and energy bins that are used to cull spins at l1b. This includes combining spin bins into coarser bins for the high energy cull and updates to the number and size of the energy bins.
File changes
Testing
Created new data for the high energy validation test using Bobs updated code.