Skip to content

GLOWS - Propagate bad-angle flags from L1B Histogram to L2 in GLOWS#2813

Merged
laspsandoval merged 4 commits intoIMAP-Science-Operations-Center:devfrom
laspsandoval:bad_angle_flags
Mar 5, 2026
Merged

GLOWS - Propagate bad-angle flags from L1B Histogram to L2 in GLOWS#2813
laspsandoval merged 4 commits intoIMAP-Science-Operations-Center:devfrom
laspsandoval:bad_angle_flags

Conversation

@laspsandoval
Copy link
Contributor

This pull request improves the handling and propagation of the histogram_flag_array in the GLOWS L2 data processing pipeline, ensuring that flags are correctly OR'd across all relevant L1B blocks per bin. It also updates and expands the test suite to verify this logic, including edge cases for empty datasets.

Flag propagation logic:

  • Updated the __post_init__ method in glows_l2_data.py to compute histogram_flag_array by OR'ing all flag values across epochs and flag rows for each bin, per Section 12.3.4, ensuring a flag is set in L2 if it is set in any L1B block.

Test suite improvements:

  • Modified test fixtures in test_glows_l2_data.py to include the correct shape and initialization for histogram_flag_array, matching the updated logic. [1] [2]
  • Added new tests to verify flag OR-propagation across epochs and flag rows, and to check that the output is all zeros when the input dataset is empty.

@laspsandoval laspsandoval added this to the March 2026 milestone Mar 4, 2026
@laspsandoval laspsandoval self-assigned this Mar 4, 2026
@laspsandoval laspsandoval added this to IMAP Mar 4, 2026
@laspsandoval laspsandoval added the Ins: GLOWS Related to the GLOWS instrument label Mar 4, 2026
@laspsandoval laspsandoval linked an issue Mar 4, 2026 that may be closed by this pull request
@laspsandoval laspsandoval changed the title GLOWS - add flags GLOWS - Propagate bad-angle flags from L1B Histogram to L2 in GLOWS Mar 4, 2026
@laspsandoval laspsandoval requested a review from maxinelasp March 4, 2026 00:25
Copy link
Contributor

@tech3371 tech3371 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

laspsandoval and others added 3 commits March 4, 2026 09:55
Co-authored-by: Tenzin Choedon <36522642+tech3371@users.noreply.github.com>
Co-authored-by: Tenzin Choedon <36522642+tech3371@users.noreply.github.com>
@laspsandoval laspsandoval merged commit 3661b65 into IMAP-Science-Operations-Center:dev Mar 5, 2026
14 checks passed
@github-project-automation github-project-automation bot moved this to Done in IMAP Mar 5, 2026
@laspsandoval laspsandoval deleted the bad_angle_flags branch March 5, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ins: GLOWS Related to the GLOWS instrument

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ENH - Propagate bad-angle flags from L1B Histogram to L2 in GLOWS

2 participants