Repository navigation
Hi Goodtimes - Compute qualified-event mask from each pointing's matched gain config - #3625
Conversation
…figuration into account
There was a problem hiding this comment.
🔵 Needs a closer look
Because the change affects Hi science-quality qualification and Statistical Filter 1 across gain configurations, it requires instrument-team/runtime validation that automated review cannot provide for the full suite and representative products.
No open issues 🎉
What changed in this PR
Updates Hi Goodtimes to qualify events using only the gain configuration matched to each pointing, preventing unrelated calibration windows from affecting Statistical Filter 1.
Changes:
- Added per-pointing gain-configuration matching and qualified-event masks.
- Excluded unmatched surrounding pointings from Statistical Filter 1 while retaining the current pointing.
- Added tests for multiple gain configurations, unmatched pointings, invalid events, and filter-1 dataset selection.
| File | Description |
|---|---|
imap_processing/tests/hi/test_hi_goodtimes.py |
Adds coverage for gain-specific qualification and unmatched-pointing behavior. |
imap_processing/hi/hi_goodtimes.py |
Implements gain-specific event masks and matched-pointing selection for Statistical Filter 1. |
Review effort: Lite
|
I started to review it. I will need more time to digest everything, but in the meantime I'll share one of the findings from my local agent: |
There should almost never be an unmatched pointing. I believe there is one to date that occurred on the pointing where the gain configuration of Hi was updated during the uplink contact. In general though, a unmatched pointing will be rare and only caused by live commanding or an anomaly. Raising in this situation is the appropriate thing to do. |
leowerneck
left a comment
There was a problem hiding this comment.
LGTM.
I have only one non-blocking comment/question: the new code refactored the calculation of hv_deltas as the _get_gain_match_values() function. I like this, but from the diff it seems like we went from performing the operation once in mark_unmatched_gain_config() to three times [added work is now in _add_qualified_event_masks() and mark_overflow_packets()]. I just wanted to bring this up to double check that this small amount additional work is indeed intended, or if we would prefer to just pass the single result around.
Yeah, I see what you mean. Really only two of these are duplicated work because the |
c4bf1d6
into
IMAP-Science-Operations-Center:dev
Change Summary
Overview
Closes #3618. Goodtimes now qualifies each pointing's events using only the cal-prod rows of that pointing's matched gain config. Surrounding pointings that match no gain config get no qualified events and are excluded from Statistical Filter 1. The overflow packet filter likewise uses only the current pointing's matched gain config.
File changes
hi_goodtimes.py: new_add_qualified_event_masks()(per-pointing gain-config selection) and_get_gain_match_values()helper; Filter 1 is passed only matched pointings plus the current one.mark_overflow_packetsuses the matched gain config's coincidence types.test_hi_goodtimes.py: new tests for per-gain-config masks and Filter 1 pointing selection; existing_apply_goodtimes_filterstests updated.Testing