Skip to content

GLOWS - fix empty issue#3180

Draft
laspsandoval wants to merge 1 commit into
IMAP-Science-Operations-Center:devfrom
laspsandoval:glows_empty
Draft

GLOWS - fix empty issue#3180
laspsandoval wants to merge 1 commit into
IMAP-Science-Operations-Center:devfrom
laspsandoval:glows_empty

Conversation

@laspsandoval
Copy link
Copy Markdown
Contributor

This pull request improves the robustness of the generate_histogram_dataset function by filtering out invalid histogram data and adds a corresponding unit test to ensure this behavior. The main focus is on ignoring histograms with zero recorded events, which prevents them from affecting downstream data processing.

Data filtering improvements:

  • Updated generate_histogram_dataset in glows_l1a.py to filter out HistogramL1A objects where number_of_events == 0, and added a warning log when such histograms are excluded.

Testing enhancements:

  • Added a new test test_generate_histogram_dataset_filters_zero_events in test_glows_l1a_cdf.py to verify that histograms with zero events are filtered out and do not appear in the resulting dataset.

@laspsandoval laspsandoval self-assigned this May 11, 2026
@laspsandoval laspsandoval added the Ins: GLOWS Related to the GLOWS instrument label May 11, 2026
@laspsandoval laspsandoval added this to the May 2026 milestone May 11, 2026
@laspsandoval laspsandoval linked an issue May 11, 2026 that may be closed by this pull request
1 task
@laspsandoval laspsandoval marked this pull request as draft May 11, 2026 21:23
Copy link
Copy Markdown
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.

This update looks good besides one minor comment

hist_l1a_list = valid_hists

# Filter out histograms with no recorded events (all-zero histogram data).
valid_hists = [hist for hist in hist_l1a_list if hist.number_of_events > 0]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I did same in the past for GLOWS and feel like it didn't catch all cases of invalid histogram. I hope checking hist.number_of_events > 0 is enough to filter out valid histogram. @maxinelasp may be better help here.

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 - Filter GLOWS L1A Histogram data points which are empty.

2 participants