3088 hi l1c esa dependent backgrounds#3140
Merged
tmplummer merged 4 commits intoMay 5, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds ESA-energy-step–dependent background scaling to IMAP-Hi L1C processing while keeping background event counting based on TOF/coincidence windows shared across ESA steps. This updates the background config schema and adjusts L1C background application logic accordingly.
Changes:
- Extend Hi background config indexing to include
esa_energy_step, add cross-ESA TOF/coincidence consistency validation, addget_tof_config(), and support sparse CSV via forward-fill. - Update Hi L1C background counting to use the shared TOF config and apply scaling/uncertainty per ESA step (with additional coordinate validation and safer dimension handling).
- Update test background CSV format and expand unit tests for new validation/helpers and ESA-dependent behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
imap_processing/hi/utils.py |
Extend BackgroundConfig to be ESA-indexed; add TOF consistency validation, get_tof_config(), and sparse CSV forward-fill support. |
imap_processing/hi/hi_l1c.py |
Use TOF-only config for background counting; apply ESA-dependent scaling/uncertainty and validate coords; transpose/broadcast using output dims. |
imap_processing/tests/hi/test_utils.py |
Add/adjust tests for new BackgroundConfig behavior (3-level index, validation, get_tof_config, forward-fill). |
imap_processing/tests/hi/test_hi_l1c.py |
Extend tests to verify ESA-dependent background outputs and new mismatch validation. |
imap_processing/tests/hi/data/l1/imap_hi_90sensor-backgrounds_20240101_v001.csv |
Update test ancillary file format to include esa_energy_step and sparse rows for TOF/coincidence fields. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8d5ae3a to
ae6254b
Compare
b10319a
into
IMAP-Science-Operations-Center:dev
14 checks passed
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
Summary
Adds ESA-dependent background scaling to IMAP-Hi L1C processing. Background counts are still computed using the same TOF windows across all ESA energy steps, but each ESA step now has its own scaling_factor and uncertainty values.
Key Changes
imap_processing/hi/utils.py
imap_processing/hi/hi_l1c.py
imap_processing/tests/hi/data/l1/imap_hi_90sensor-backgrounds_20240101_v001.csv
Tests
Closes: #3088