Skip to content

Glows time flags#2819

Open
laspsandoval wants to merge 11 commits intoIMAP-Science-Operations-Center:devfrom
laspsandoval:glows_flags
Open

Glows time flags#2819
laspsandoval wants to merge 11 commits intoIMAP-Science-Operations-Center:devfrom
laspsandoval:glows_flags

Conversation

@laspsandoval
Copy link
Contributor

This pull request introduces significant improvements to the GLOWS L1B data processing pipeline, focusing on more accurate computation and testing of histogram bad-time flags. The main changes include implementing a new compute_flags method for HistogramL1B, updating test data and test cases to align with the new flag logic, and adding utility functions for threshold extraction.

Enhancements to flag computation and logic:

  • Added the compute_flags method to the HistogramL1B class to compute the 17 bad-time flags based on onboard and ground processing logic, using thresholds from PipelineSettings. This replaces the previous approach of setting all flags to 1 and introduces more granular checks for temperature, voltage, spin period, and pulse length standard deviations.
  • Updated the __post_init__ method of HistogramL1B to use the new compute_flags method for initializing the flags attribute, ensuring flags are computed correctly at object creation.

Utility and helper functions:

  • Added a standalone get_threshold function to extract threshold values from nested dictionaries based on suffix matching, used in flag computation.

Testing improvements:

  • Updated the mock_pipeline_settings fixture to provide realistic flag values, reflecting the new flag computation logic.
  • Enhanced the test_process_histogram and added a new test_compute_flags test to validate the new flag computation, including cases where threshold values are exceeded and flags are set to bad. [1] [2]
  • Added a unit test for the get_threshold function to ensure correct extraction of threshold values from the settings dictionary.

These changes collectively improve the accuracy, maintainability, and test coverage of the GLOWS L1B data processing pipeline.

@laspsandoval laspsandoval added this to the March 2026 milestone Mar 6, 2026
@laspsandoval laspsandoval self-assigned this Mar 6, 2026
@laspsandoval laspsandoval added Ins: GLOWS Related to the GLOWS instrument Level: L1 Level 1 processing labels Mar 6, 2026
@laspsandoval laspsandoval added this to IMAP Mar 6, 2026
@laspsandoval laspsandoval requested a review from maxinelasp March 6, 2026 21:45
@laspsandoval
Copy link
Contributor Author

There are two flags that we not well-defined in the Algorithm Document that I will need to come back to:

flag based on comparison of the total numbers of counts in a given block-accumulated histogram with the
daily average (deviations by n-sigma and more are interpreted as beyond daily statistical error), see the end of Sec. 10.2

external information on exceeding a background threshold (TBC)

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 Level: L1 Level 1 processing

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant