ULTRA l1b: Refactor extendedspin.py to make a single call to get_valid_de_count_summary() - #3500
Merged
lacoak21 merged 2 commits intoSep 29, 2026
Conversation
lacoak21
requested review from
bryan-harter,
jaredclaypoole and
tmplummer
and
a lite review from Copilot
September 25, 2026 18:58
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The smoothing helper breaks callers that pass combine_spin_bin_radius=None, a previously supported no-op configuration.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Refactors ULTRA L1B culling to compute and reuse one direct-event count summary.
Changes:
- Extracts spin-bin smoothing into
combine_de_counts_summary. - Updates culling APIs and extended-spin integration.
- Updates unit tests for the refactored interfaces.
| File | Summary |
|---|---|
imap_processing/ultra/l1b/ultra_l1b_culling.py |
Refactors culling APIs and adds count-summary smoothing. |
imap_processing/ultra/l1b/extendedspin.py |
Computes and reuses one shared count summary. |
imap_processing/tests/ultra/unit/test_ultra_l1b_culling.py |
Updates tests for the new interfaces. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
|
There was a weird failure of Tests / test (ubuntu-latest, 3.10). Seems like a package (spiceypy?) failed to build due to non compliance with something? Strange. I asked to rerun. |
lacoak21
force-pushed
the
ultra_l1b_refactor_counts_summary
branch
from
September 28, 2026 20:48
27286e9 to
3a45006
Compare
lacoak21
merged commit Sep 29, 2026
bea4cd8
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 #3497
Overview
Minor refactor to make one single call to get_valid_de_count_summary vs many. Originally I had individual calls because I thought there were going to be differences in the binning over the spin_bin dimension but that turned out not to be the case.
File changes