3274 hi goodtimes filter out gain tests - #3358
Open
tmplummer wants to merge 8 commits into
Open
Conversation
…tification of gain tests
tmplummer
requested review from
Copilot,
laspsandoval and
tech3371
and removed request for
laspsandoval
July 29, 2026 21:18
Contributor
There was a problem hiding this comment.
Pull request overview
Adds gain-configuration classification and gain-test filtering to IMAP-Hi processing by introducing a gain-configuration ancillary table, using it to classify pointings / flag HV excursions in L1B DE, and propagating the classified configuration into L1C PSET geometric-factor lookup.
Changes:
- Introduces
imap_hi_{sensor}-gain-configuration_*.csvand a loader (load_gain_configuration) plus a new MET→config lookup (GainConfigLookupTable). - Updates Hi L1B DE processing to (a) build
ccsds_qfincrementally and (b) filter/flag packets whose detector HV does not match the pointing’s gain configuration; addsgain_configuration_idglobal attr. - Updates Hi L1C PSET generation to compute
pset_geometric_factorvia the gain-configuration ancillary table; updates CLI plumbing and test suite accordingly.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| imap_processing/cli.py | Wires new gain-configuration ancillary dependency into L1B/L1C processing. |
| imap_processing/hi/hi_l1b.py | Adds gain-config classification + detector-HV-based filtering and new gain_configuration_id attribute. |
| imap_processing/hi/hi_l1c.py | Adds pset_geometric_factor lookup using gain_configuration_id and gain-config ancillary file. |
| imap_processing/hi/hi_goodtimes.py | Renames ESA-voltage culling to generalized HV culling and updates cull code name. |
| imap_processing/hi/utils.py | Adds gain-config constants, CSV loader, and GainConfigLookupTable. |
| imap_processing/quality_flags.py | Extends Hi L1B DE packet flags with BAD_ESA_VOLTAGE and BAD_DETECTOR_VOLTAGE bits. |
| imap_processing/cdf/config/imap_hi_variable_attrs.yaml | Updates ccsds_qf bit documentation and adds PSET geometric-factor variable attrs. |
| imap_processing/tests/test_cli.py | Updates CLI dependency expectations for new ancillary input. |
| imap_processing/tests/hi/conftest.py | Adds session fixture for gain-configuration ancillary path. |
| imap_processing/tests/hi/test_hi_l1b.py | Adds/updates tests for new L1B gain-config logic and ccsds_qf behavior. |
| imap_processing/tests/hi/test_hi_l1c.py | Updates tests for new L1C gain-config dependency and geometric factor lookup. |
| imap_processing/tests/hi/test_hi_goodtimes.py | Updates tests for renamed HV culling and cull code rename. |
| imap_processing/tests/hi/test_utils.py | Adds tests for load_gain_configuration behavior/validation. |
| imap_processing/tests/hi/data/l1/imap_hi_90sensor-gain-configuration_20240101_v001.csv | Adds test ancillary gain-configuration table used by unit tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Sorry for the size of this PR. Hi has requested I get these changes in for COSPAR next week 😬.
Closes: #3274
Summary
This branch (3274-hi-goodtimes---filter-out-gain-tests) adds per-pointing gain-configuration classification and detector-voltage-based gain-test filtering to IMAP-Hi processing. Summary of changes:
Details
New capability: gain configuration classification
L1B DE processing
L1C PSET processing
Goodtimes
Plumbing & schema