Skip to content

Skip IDEX low-rate waveform fits below 4.0 rms - #3600

Merged
lacoak21 merged 4 commits into
IMAP-Science-Operations-Center:devfrom
aldo9253:fit_signal_threshold
Nov 10, 2026
Merged

lacoak21 merged 4 commits into
IMAP-Science-Operations-Center:devfrom
aldo9253:fit_signal_threshold

Conversation

@aldo9253

@aldo9253 aldo9253 commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Change Summary

Overview

Require a sample beyond the first 3 µs to exceed 4 × baseline RMS before fitting Target or Ion Grid waveforms. Targets require positive excursions; Ion Grid allows either polarity.

File changes

  • idex_l2a.py: calculate the noise threshold and return NaN fit products for rejected waveforms.
  • test_idex_signal_threshold.py, test_idex_l2a.py: verify threshold boundaries, polarity, missing data, and independent channel processing.

Testing

222 IDEX tests passed; Local CDFs passed product checks and visual review at 4 × RMS

@aldo9253 aldo9253 changed the title Skip IDEX low-rate waveform fits below 1.5 sigma Skip IDEX low-rate waveform fits below 4.0 rms Nov 2, 2026
@aldo9253
aldo9253 marked this pull request as ready for review November 2, 2026 21:34
@lacoak21
lacoak21 self-requested a review November 4, 2026 15:59
@lacoak21
lacoak21 requested a balanced review from Copilot November 4, 2026 15:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the IDEX L2A signal-strength gating change.

No open issues 🎉

What changed in this PR

This PR adds a signal-strength gate to IDEX L2A processing so weak Target and Ion Grid waveforms are skipped rather than fitted.

Changes:

  • Require a sample outside the first 3 µs to strictly exceed 4 × baseline RMS, with positive excursions for Targets and either polarity for Ion Grid.
  • Return NaN fit products when a waveform fails the threshold or lacks finite baseline samples.
  • Add tests for threshold boundaries, polarity, missing data, and independent event and channel processing.
File Description
imap_processing/​tests/​idex/​test_idex_signal_threshold.py Adds threshold and independent-processing tests.
imap_processing/​tests/​idex/​test_idex_l2a.py Updates expectations for nonfinite and constant waveforms.
imap_processing/​idex/​idex_l2a.py Implements and documents the signal gate and NaN fallback.

Review effort: Balanced

@lacoak21 lacoak21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have a few suggestions before I approve

Comment thread imap_processing/idex/idex_l2a.py Resolved
Comment thread imap_processing/idex/idex_l2a.py Resolved
@aldo9253

aldo9253 commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

Two comments addressed!

@lacoak21

Copy link
Copy Markdown
Contributor

Thanks!

@lacoak21
lacoak21 self-requested a review November 10, 2026 15:39

@lacoak21 lacoak21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@lacoak21
lacoak21 merged commit 1cc9df8 into IMAP-Science-Operations-Center:dev Nov 10, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants