Skip to content

ULTRA L1b: replace the DE product lookup with the extendedspin priority config - #3511

Merged
lacoak21 merged 13 commits into
IMAP-Science-Operations-Center:devfrom
lacoak21:ultra_culling_update_de_products
Oct 1, 2026
Merged

lacoak21 merged 13 commits into
IMAP-Science-Operations-Center:devfrom
lacoak21:ultra_culling_update_de_products

Conversation

@lacoak21

@lacoak21 lacoak21 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Change Summary

closes #3498
closes #3499

Overview

Before this PR, L1b extendedspin read a de-product-lookup ancillary file whose only job was to say which L1b DE product (raw or priority 1–4) to use for each repointing.

This PR replaces it with a new l1b-{sensor}sensor-extendedspin-config ancillary file. Each row applies from its pointing number until the next row's pointing, and holds:

  • Priority config: which DE product to use for culling.
  • Culling thresholds: one per energy
  • Calibration config (cal_config) and an effective date.

This PR also updates how valid events are counted, at each energy bin, we may use a different direct event source. E.g. the last energy bin should always use the priority 0 (raw de) data, otherwise use priority 1 ( some of this logic doesnt make sense to me but its what Bob implemented so im going to ask him about this in the tagup tomorrow)

Testing

Update tests to work with new config file.

@lacoak21
lacoak21 requested review from bryan-harter and leowerneck and a balanced review from Copilot September 29, 2026 20:59
@lacoak21 lacoak21 self-assigned this Sep 29, 2026

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

Copilot review overview

🟡 Changes recommended

Configured culling thresholds and DE priorities are not applied consistently, and valid date-only L1B processing is blocked.

Review effort: Balanced
Findings: 2 High severity · 1 Medium severity · 2 Low severity

Open (5)

Comment thread imap_processing/cli.py
Comment thread imap_processing/ultra/l1b/extendedspin.py
Comment thread imap_processing/ultra/l1b/ultra_l1b_culling.py
Comment thread imap_processing/tests/ultra/unit/test_ultra_l1b_culling.py
Comment thread imap_processing/ultra/l1b/lookup_utils.py
@leowerneck leowerneck added the Ins: Ultra Related to the IMAP-Ultra instrument label Oct 1, 2026

@leowerneck leowerneck 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.

I left a few optional comments, but I don't think a new review is necessary even if you choose to address them.

Comment thread imap_processing/ultra/l1b/lookup_utils.py
Comment thread imap_processing/ultra/l1b/lookup_utils.py
Comment thread imap_processing/tests/ultra/unit/test_ultra_l1b.py
@lacoak21
lacoak21 merged commit 227dc78 into IMAP-Science-Operations-Center:dev Oct 1, 2026
22 checks passed
@lacoak21
lacoak21 deleted the ultra_culling_update_de_products branch October 1, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ins: Ultra Related to the IMAP-Ultra instrument

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Determine which de dataset to use per energy range based on the culling config Add data class to hold info about culling configurations

3 participants