Skip to content

Glows - second flag#2782

Merged
laspsandoval merged 3 commits intoIMAP-Science-Operations-Center:devfrom
laspsandoval:glows_second_flag
Feb 27, 2026
Merged

Glows - second flag#2782
laspsandoval merged 3 commits intoIMAP-Science-Operations-Center:devfrom
laspsandoval:glows_second_flag

Conversation

@laspsandoval
Copy link
Contributor

This pull request enhances the GLOWS L1b data processing by improving how sky regions are flagged for exclusion and updating related tests and flag definitions. The main update is the introduction of a new method to simultaneously flag bins close to UV sources and bins inside excluded sky regions, allowing for more precise masking during data processing. The changes also update the flag enumeration and refactor tests to use the new method.

Flagging improvements:

  • Added the flag_uv_and_excluded method to HistogramL1B, which returns two boolean masks: one for bins close to UV sources and one for bins inside excluded sky regions, replacing the previous flag_uv_source method. [1] [2]
  • Updated _compute_histogram_flag_array to use the new flag_uv_and_excluded method, now correctly populating the "inside excluded region" flag row. [1] [2]

Flag definition updates:

  • Added the IS_INSIDE_EXCLUDED_REGION flag to the GLOWSL1bFlags enum in imap_processing/quality_flags.py for marking bins inside excluded regions.

Test refactoring:

  • Refactored all relevant tests to patch and use flag_uv_and_excluded instead of flag_uv_source, ensuring test coverage for both UV source proximity and excluded region masking. [1] [2] [3] [4] [5] [6] [7] [8]
  • Improved assertions in tests to validate the shapes and counts of flagged bins for both UV sources and excluded regions. [1] [2]

Mock data improvements:

  • Updated mock ancillary exclusions in conftest.py to provide deterministic longitude and latitude values for excluded regions, improving test reliability.

@laspsandoval laspsandoval self-assigned this Feb 27, 2026
@laspsandoval laspsandoval added the Ins: GLOWS Related to the GLOWS instrument label Feb 27, 2026
@laspsandoval laspsandoval added this to the February 2026 milestone Feb 27, 2026
Copy link
Contributor

@maxinelasp maxinelasp left a comment

Choose a reason for hiding this comment

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

Looks good - just one suggestion!

@maxinelasp
Copy link
Contributor

Addresses part of ticket #2721

@laspsandoval laspsandoval merged commit 3af8d2b into IMAP-Science-Operations-Center:dev Feb 27, 2026
14 checks passed
@github-project-automation github-project-automation bot moved this to Done in IMAP Feb 27, 2026
@laspsandoval laspsandoval deleted the glows_second_flag branch February 27, 2026 21:44
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.

2 participants