ULTRA l1b spectral cull #2940
Merged
lacoak21 merged 6 commits intoIMAP-Science-Operations-Center:devfrom Apr 9, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds new ULTRA L1b culling/quality-flagging for upstream-ion contamination and spectral anomalies, and wires those flags into the extendedspin→goodtimes→filtering flow.
Changes:
- Introduces upstream-ion and spectral spin-bin flagging functions and new culling constants (channels/thresholds).
- Integrates the new flags into
calculate_extendedspinand the downstream quality-flag filtering lists / goodtimes fill behavior. - Updates and extends unit tests + fixtures to cover the new flags and required input fields.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
imap_processing/ultra/l1b/ultra_l1b_culling.py |
Adds upstream-ion and spectral culling flag functions; minor energy-range bin edge indexing tweak. |
imap_processing/ultra/l1b/extendedspin.py |
Calls new culling functions, updates masking order, and emits new quality flag variables. |
imap_processing/ultra/l1b/quality_flag_filters.py |
Includes new quality flag arrays in the set used for energy/spin-dependent filtering. |
imap_processing/ultra/l1b/goodtimes.py |
Ensures new quality flags exist (fill values) when goodtimes is empty. |
imap_processing/ultra/constants.py |
Adds channel sets and sigma thresholds for the new culling steps. |
imap_processing/tests/ultra/unit/test_ultra_l1b_culling.py |
Adds fixture reuse and new validation tests for upstream-ion and spectral culls. |
imap_processing/tests/ultra/unit/test_spacecraft_pset.py |
Extends test datasets with theta/phi fields. |
imap_processing/tests/ultra/unit/conftest.py |
Extends mocked goodtimes dataset with the new quality flag variables. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
acf9eb6 to
f2e107c
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
laspsandoval
approved these changes
Apr 9, 2026
Contributor
laspsandoval
left a comment
There was a problem hiding this comment.
Looks good. One question.
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 #
Overview
Adds new ULTRA L1b culling/quality-flagging for upstream-ion contamination and spectral anomalies, and wires those flags into the extendedspin→goodtimes→filtering flow.
Changes:
Introduces upstream-ion and spectral spin-bin flagging functions and new culling constants (channels/thresholds).
Integrates the new flags into calculate_extendedspin and the downstream quality-flag filtering lists / goodtimes fill behavior.
Updates and extends unit tests + fixtures to cover the new flags and required input fields.
File changes
Testing
Validation test using bobs data