Skip to content

Glows badtime flag#2760

Open
laspsandoval wants to merge 17 commits intoIMAP-Science-Operations-Center:devfrom
laspsandoval:GLOWS_badtime_flag
Open

Glows badtime flag#2760
laspsandoval wants to merge 17 commits intoIMAP-Science-Operations-Center:devfrom
laspsandoval:GLOWS_badtime_flag

Conversation

@laspsandoval
Copy link
Contributor

This pull request introduces a new mechanism for flagging histogram bins that are close to UV sources in the GLOWS L1b data processing pipeline. The most important changes are the addition of the flag_uv_source method, integration of this flag into the histogram flag array, and updates to testing and mock data to support and validate this feature.

UV Source Masking Enhancements

  • Added the flag_uv_source method to glows_l1b_data.py, which computes a boolean mask identifying bins that are within the angular radius of any UV source, using SPICE geometry and ancillary exclusions data.
  • Updated _compute_histogram_flag_array to set the new UV source proximity flag in the histogram flags array, utilizing the flag_uv_source method.
  • Introduced the IS_CLOSE_TO_UV_SOURCE flag in GLOWSL1bFlags to represent bins close to UV sources.

Testing and Mock Data Improvements

  • Enhanced the mock_ancillary_exclusions fixture to provide deterministic UV source coordinates and masking radii, ensuring reproducible test results.
  • Updated test_hist_spice_output to validate the shape and count of bins flagged as close to UV sources, confirming the new masking logic works as expected. [1] [2]

Imports and Code Organization

  • Extended imports in glows_l1b_data.py to include SPICE geometry functions used for UV source masking calculations.

These changes collectively improve the accuracy and reliability of UV source masking in GLOWS L1b data processing.# Change Summary

Overview

File changes

Testing

@laspsandoval laspsandoval self-assigned this Feb 24, 2026
@laspsandoval laspsandoval added the Ins: GLOWS Related to the GLOWS instrument label Feb 24, 2026
@laspsandoval laspsandoval added this to the February 2026 milestone Feb 24, 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.

This also completes ticket #2759 - nice! Looks good to me, although I'll admit I'm lost on most of the SPICE work - it might be worth getting a check from Tim on this too. Looks like the test is failing due to a type error, but once that's fixed I'm good with merging!

Copy link
Contributor

@subagonsouth subagonsouth left a comment

Choose a reason for hiding this comment

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

A couple of suggestions for improvement.

@laspsandoval laspsandoval linked an issue Feb 25, 2026 that may be closed by this pull request
3 tasks
@laspsandoval
Copy link
Contributor Author

pre-commit.ci autofix

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 - Compute imap_spin_angle_bin_cntr in GLOWS L1B Histogram

3 participants