Skip to content

Idex release two updates - #3399

Open
aldo9253 wants to merge 6 commits into
IMAP-Science-Operations-Center:devfrom
aldo9253:idex_release_two_updates
Open

Idex release two updates#3399
aldo9253 wants to merge 6 commits into
IMAP-Science-Operations-Center:devfrom
aldo9253:idex_release_two_updates

Conversation

@aldo9253

Copy link
Copy Markdown
Collaborator

Change Summary

Overview

Adds IDEX event classification and waveform saturation flags through L1A–L2A, with
saturation- and Science-mode-aware velocity and mass estimates.

File changes

  • Adds event and waveform saturation flag logic.
  • Propagates flags through L1A, L1B, and L2A.
  • Updates L2A velocity/mass calculations and masking behavior.
  • Adds CDF metadata and tests.

Testing

Relevant IDEX tests, formatting, linting, type checks, and pre-commit checks pass.
The local 20260719 processing chain completed successfully through L2A.

…dicate instrument status (science, pulser, noise capture). Added flag to indicate if the event was an actual dust event. Resolved ion grid velocity and mass estimates to use the QI/Qt ratio and Qt respectively. Added logic to NaN fields based on flag states.
@bryan-harter
bryan-harter requested review from lacoak21 and a balanced review from Copilot August 20, 2026 19:49

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.

Pull request overview

Adds IDEX release-two event classification and saturation-aware processing across L1A–L2B.

Changes:

  • Adds event and waveform saturation flags through L1A–L2A.
  • Updates velocity, mass, and L2B count selection logic.
  • Adds CDF metadata, tests, and a local processing script.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
run_local_idex_chain.sh Adds local L1A–L2A processing workflow.
imap_processing/idex/idex_event_flags.py Implements event and saturation classification.
imap_processing/idex/idex_l1a.py Generates event flags.
imap_processing/idex/idex_l1b.py Propagates flags to L1B.
imap_processing/idex/idex_l2a.py Adds saturation-aware estimates and masking.
imap_processing/idex/idex_l2b.py Filters events and selects target estimates.
imap_processing/tests/idex/test_idex_event_flags.py Tests flag classification.
imap_processing/tests/idex/test_idex_l0.py Updates expected variable count.
imap_processing/tests/idex/test_idex_l1b.py Tests L1B flag propagation.
imap_processing/tests/idex/test_idex_l2a.py Tests masking and Ion Grid estimates.
imap_processing/tests/idex/test_idex_l2b.py Tests filtering and target selection.
imap_processing/cdf/config/imap_idex_l1a_variable_attrs.yaml Defines L1A flag metadata.
imap_processing/cdf/config/imap_idex_l1b_variable_attrs.yaml Defines L1B flag metadata.
imap_processing/cdf/config/imap_idex_l2a_variable_attrs.yaml Defines L2A flag metadata.
imap_processing/cdf/config/imap_idex_l2b_variable_attrs.yaml Corrects charge units to pC.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +117 to +118
use_target_high = ~target_high_saturated
use_target_low = target_high_saturated & ~target_low_saturated
Comment on lines +345 to +349
for waveform in (mid, low):
index = int(np.nanargmin(np.abs(times - peak_time)))
corrected, _ = _baseline_corrected(waveform, times)
if not _is_saturated(float(waveform[index])):
return _fwhm(corrected, times, index)
Comment on lines +400 to +403
if peak_index in (left, right):
return np.nan
left_time = _crossing_time(corrected, times, left, left + 1, half_height)
right_time = _crossing_time(corrected, times, right - 1, right, half_height)
Comment thread run_local_idex_chain.sh
Comment on lines +24 to +25
L1A_PRODUCT="$DATA_ROOT/idex/l1a/2026/07/imap_idex_l1a_sci-10days_${START_DATE}_v${LOCAL_MAJOR_VERSION}.$(printf '%04d' "$LOCAL_MINOR_VERSION").cdf"
L1B_PRODUCT="$DATA_ROOT/idex/l1b/2026/07/imap_idex_l1b_sci-10days_${START_DATE}_v${LOCAL_MAJOR_VERSION}.$(printf '%04d' "$LOCAL_MINOR_VERSION").cdf"
Comment thread run_local_idex_chain.sh
echo "Local IDEX processing chain completed for $START_DATE"
echo "L1A: $L1A_PRODUCT"
echo "L1B: $L1B_PRODUCT"
echo "L2A: $DATA_ROOT/idex/l2a/2026/07/imap_idex_l2a_sci-10days_${START_DATE}_v${LOCAL_MAJOR_VERSION}.$(printf '%04d' "$LOCAL_MINOR_VERSION").cdf"
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.

2 participants