Repository navigation
Add per-waveform baseline and RMS statistics to IDEX L1b - #3588
Merged
lacoak21 merged 4 commits intoNov 9, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the waveform-statistics changes and their reuse in L2A processing.
No open issues 🎉
What changed in this PR
Adds per-event baseline and RMS noise statistics for all six IDEX waveforms to L1B products, then reuses them in L2A processing.
Changes:
- Calculates statistics from finite samples in each waveform’s first 3 µs and stores them with CDF metadata.
- Uses stored statistics for L2A signal-to-noise ratios and fit initialization, with fallback calculations for older L1B products.
- Adds tests for window selection, missing samples, statistics reuse, and CDF round-trip preservation.
| File | Description |
|---|---|
imap_processing/tests/idex/test_idex_utils.py |
Tests baseline and RMS calculations and edge cases. |
imap_processing/tests/idex/test_idex_l2a.py |
Tests statistics reuse, legacy fallback, and fit initialization. |
imap_processing/tests/idex/test_idex_l1b.py |
Verifies all channels’ statistics, units, and CDF round trips. |
imap_processing/idex/idex_utils.py |
Adds the shared baseline and RMS calculation helper. |
imap_processing/idex/idex_l2a.py |
Consumes stored statistics or calculates missing legacy fields. |
imap_processing/idex/idex_l1b.py |
Adds twelve per-event waveform statistics to L1B products. |
imap_processing/cdf/config/imap_idex_l1b_variable_attrs.yaml |
Defines metadata for the new baseline and RMS fields. |
Review effort: Balanced
lacoak21
approved these changes
Nov 5, 2026
lacoak21
left a comment
Contributor
There was a problem hiding this comment.
LGTM! Good refactor! Nothing major just some small requests.
| time = np.asarray(time, dtype=float) | ||
| finite_time = np.isfinite(time) | ||
| start = np.min( | ||
| np.where(finite_time, time, np.inf), axis=-1, keepdims=True, initial=np.inf |
Contributor
There was a problem hiding this comment.
Can you add some comments in here?
Collaborator
Author
|
I believe all comments have been addressed. |
Contributor
|
Excellent thanks! |
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
Add baseline and RMS noise statistics for all six waveforms using the first 3 µs, and use them in L2A processing.
File changes
idex_utils.py,idex_l1b.py: calculate and store per-event statistics.idex_l2a.py: use these statistics for SNR and fit initialization, with fallback for older L1B files.Testing
130 IDEX tests passed; Local CDF processing passed.