Skip to content

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

Open
laspsandoval wants to merge 3 commits intoIMAP-Science-Operations-Center:devfrom
laspsandoval:bad_angle_flags
Open

GLOWS - Propagate bad-angle flags from L1B Histogram to L2 in GLOWS#2813
laspsandoval wants to merge 3 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 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 2 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>
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: No status

Development

Successfully merging this pull request may close these issues.

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

2 participants