Idex l2b agnostic - #3410
Conversation
9d4ccf2 to
43a891b
Compare
There was a problem hiding this comment.
🟡 Changes recommended
There is a documented-vs-implemented units mismatch in the PR description (rates are computed in s^-1) and a small maintainability issue in the new agnostic histogram binning.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds new mass-/charge-agnostic IDEX L2B/L2C products (counts/rates by spin phase and by sky position) using dust_hit_flag == 1, alongside metadata updates and a regression test.
Changes:
- Add agnostic
counts/rate(L2B) andcounts_map/rate_map(L2C) outputs derived from dust-hit filtering. - Update IDEX L2B/L2C CDF variable-attribute YAML to include new variables and adjust rate metadata.
- Add a regression test ensuring non-dust events are excluded from the new agnostic products.
File summaries
| File | Description |
|---|---|
| imap_processing/idex/idex_l2b.py | Adds agnostic count/rate computations and wires them into L2B/L2C outputs. |
| imap_processing/cdf/config/imap_idex_l2b_variable_attrs.yaml | Adds metadata for new L2B agnostic variables and updates rate metadata. |
| imap_processing/cdf/config/imap_idex_l2c_variable_attrs.yaml | Adds metadata for new L2C agnostic map variables and updates rate metadata. |
| imap_processing/tests/idex/test_idex_l2b.py | Adds a regression test for dust-hit filtering and updates expected L2B variables. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
lacoak21
left a comment
There was a problem hiding this comment.
LGTM! Had a few comments. Im going to keep this blocked until i get them resolved.
There was a problem hiding this comment.
🟡 Changes recommended
Published rates can contain invalid negative values and incorrect quality flags for non-positive uptime.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
imap_processing/cdf/config/imap_idex_l2c_variable_attrs.yaml:148
- This DICT_KEY omits the
Support>hierarchy segment and is inconsistent with the matching L2B agnostic rate metadata atimap_idex_l2b_variable_attrs.yaml:162. Classify this map as the same dust count-rate quantity so L2B and L2C resolve to the same valid SPASE metadata path.
DICT_KEY: SPASE>SupportQuantity:CountRate,Qualifier:Array
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Balanced
| rate, rate_map = compute_rates_agnostic( | ||
| counts, counts_map, epoch_doy_unique, daily_on_percentage | ||
| ) |
| rate = np.full(counts.shape, -1.0) | ||
| rate_map = np.full(counts_map.shape, -1.0) |
Change Summary
Closes #3407
Overview
Adds mass- and charge-agnostic IDEX L2B/L2C products for improved counting statistics when event rates are low.
The new products:
dust_hit_flag == 1.s^-1.File changes
imap_processing/idex/idex_l2b.pydust_hit_flag.imap_processing/cdf/config/imap_idex_l2b_variable_attrs.yamlimap_processing/cdf/config/imap_idex_l2c_variable_attrs.yamlimap_processing/tests/idex/test_idex_l2b.pyTesting