GLOWS - fix empty issue#3180
Draft
laspsandoval wants to merge 1 commit into
Draft
Conversation
1 task
tech3371
approved these changes
May 12, 2026
Contributor
tech3371
left a comment
There was a problem hiding this comment.
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] |
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves the robustness of the
generate_histogram_datasetfunction 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:
generate_histogram_datasetinglows_l1a.pyto filter outHistogramL1Aobjects wherenumber_of_events == 0, and added a warning log when such histograms are excluded.Testing enhancements:
test_generate_histogram_dataset_filters_zero_eventsintest_glows_l1a_cdf.pyto verify that histograms with zero events are filtered out and do not appear in the resulting dataset.