BUG — GLOWS: instrument team exclusion-handling - #3475
Merged
Conversation
leowerneck
requested review from
bryan-harter,
jaredclaypoole,
lacoak21,
tech3371,
tmplummer and
vineetbansal
and removed request for
bryan-harter and
jtniehof
September 18, 2026 14:18
leowerneck
merged commit Sep 18, 2026
689461c
into
IMAP-Science-Operations-Center:dev
22 checks passed
leowerneck
deleted the
3474-bug---glows-l1b--issue-with-handling-exclusions-by-instrument-team
branch
September 18, 2026 14:37
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
Closes #3474.
Overview
GLOWS L1b exclusions defined by the instrument team are keyed by a unique block identifier: the UTC start time of an L1b block. The instrument team and the SDC sometimes use different sclk kernel versions when converting this time, which can shift the identifier by a couple of seconds (up to ~1 s observed so far). The current exact string comparison in
flag_from_mask_dataset()misses those shifted entries and silently drops the corresponding exclusions.This PR replaces the exact match with a timestamp comparison using a 5-second tolerance, picking the closest entry when more than one falls within the window. A 5-second tolerance is safe because the shortest L1b block lasts ~15 s. The change matches the suggested implementation by @mstrumik in #3474.
File changes
imap_processing/glows/l1b/glows_l1b_data.py: InHistogramL1B.flag_from_mask_dataset(), match block identifiers asdatetime64[s]within a ±5 s tolerance instead of by exact string equality, selecting the closest entry on multiple matches.imap_processing/tests/glows/test_glows_l1b_data.py: Addtest_flag_from_mask_dataset_toleranceandtest_flag_from_mask_dataset_picks_closest_within_tolerancecovering exact match, within-tolerance, boundary, beyond-tolerance, and closest-of-several cases.Testing
Running the GLOWS test suite:
results in 96 out of 96 tests passing.