Skip to content

Glows - final flags#2787

Merged
laspsandoval merged 3 commits intoIMAP-Science-Operations-Center:devfrom
laspsandoval:glows_final_flags
Mar 4, 2026
Merged

Glows - final flags#2787
laspsandoval merged 3 commits intoIMAP-Science-Operations-Center:devfrom
laspsandoval:glows_final_flags

Conversation

@laspsandoval
Copy link
Contributor

This pull request enhances the GLOWS L1b data processing by implementing new per-bin quality flags for instrument team exclusions and suspected transients, improves the flagging logic, and updates tests and supporting data structures accordingly. The changes make the flagging system more robust and allow for more granular data quality tracking.

Enhancements to flagging logic and data structures:

  • Added new per-bin flags IS_EXCLUDED_BY_INSTR_TEAM and IS_SUSPECTED_TRANSIENT to the GLOWSL1bFlags enum in imap_processing/quality_flags.py, enabling more detailed quality tracking.
  • Implemented the flag_from_mask_dataset method in GLOWSL1bData to retrieve per-bin boolean masks from xarray datasets, supporting the new exclusion and transient flags.
  • Updated _compute_histogram_flag_array to populate the new flags using the mask datasets, and removed outdated TODOs now that the logic is implemented. [1] [2]

Test and fixture improvements:

  • Updated the mock_ancillary_exclusions fixture to provide realistic l1b_unique_block_identifier and histogram_mask_array values for both instrument team exclusions and suspected transients, enabling more accurate testing. [1] [2]
  • Expanded tests in test_glows_l1b.py to verify the correct operation of flag_from_mask_dataset, including shape and count checks for the exclusion mask.

Minor code organization:

  • Moved the generation of the unique_block_identifier in __post_init__ for clarity and to ensure correct initialization order.

@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
@laspsandoval laspsandoval linked an issue Feb 27, 2026 that may be closed by this pull request
@laspsandoval
Copy link
Contributor Author

@maxinelasp does this close this ticket too? #2688

Or is there more to do?

@laspsandoval laspsandoval moved this to PR Open in IMAP Feb 27, 2026
@tech3371 tech3371 modified the milestones: February 2026, March 2026 Mar 2, 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 great! This does complete #2721 , but does not complete #2688 (You can see that self.flags is still set to np.ones - filling in this variable is what #2688 covers).

Have you checked this by running the GLOWS CLI? There might be some changes required in glows_l1b.py. If that was validated, I am happy to approve.

@laspsandoval
Copy link
Contributor Author

Looks great! This does complete #2721 , but does not complete #2688 (You can see that self.flags is still set to np.ones - filling in this variable is what #2688 covers).

Have you checked this by running the GLOWS CLI? There might be some changes required in glows_l1b.py. If that was validated, I am happy to approve.

Just tested an it produces the data products:
imap_cli --instrument glows --data-level l1b --descriptor hist --start-date 20251230 --version v008 --dependency imap_glows_l1b_hist-45a6bc0a_20251230-repoint00094_v008.json --repointing repoint00094

@laspsandoval laspsandoval requested a review from maxinelasp March 3, 2026 21:54
@laspsandoval laspsandoval merged commit 94f7d72 into IMAP-Science-Operations-Center:dev Mar 4, 2026
14 checks passed
@github-project-automation github-project-automation bot moved this from PR Open to Done in IMAP Mar 4, 2026
@laspsandoval laspsandoval deleted the glows_final_flags branch March 4, 2026 00:15
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 - Implement bad-angle flag calculation in GLOWS L1B Histogram

3 participants