Skip to content

Update L1B to inherit the number of bins from L1A#2780

Merged
maxinelasp merged 2 commits intoIMAP-Science-Operations-Center:devfrom
maxinelasp:glows_l1b_fix_bins
Feb 27, 2026
Merged

Update L1B to inherit the number of bins from L1A#2780
maxinelasp merged 2 commits intoIMAP-Science-Operations-Center:devfrom
maxinelasp:glows_l1b_fix_bins

Conversation

@maxinelasp
Copy link
Contributor

Fix GLOWS L1B array sizing to use actual histogram length

Background

Per ISTP/CDF convention, all variables must be allocated to the maximum expected size (3600 bins), with unused values filled with FILLVAL. In the GLOWS packet format, HISTOGRAM_DATA is a fixed 3600-element field. However, NBINS is a separate raw telemetry field propagated as number_of_bins_per_histogram — this encoded value (e.g. 225) is not the bin array length.

If we get sent fewer bins, we still want the output variables to be of len 3600.

I found this issue when testing against validation data that is 255 bins long.

Fix

Replace self.number_of_bins_per_histogram with len(self.histogram) wherever it sizes output arrays in glows_l1b_data.py. The field is retained in the dataclass output as a passthrough of the raw telemetry value.

@maxinelasp maxinelasp self-assigned this Feb 26, 2026
@maxinelasp maxinelasp added this to IMAP Feb 26, 2026
@maxinelasp maxinelasp added the Ins: GLOWS Related to the GLOWS instrument label Feb 26, 2026
Copy link
Contributor

@laspsandoval laspsandoval left a comment

Choose a reason for hiding this comment

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

Thanks Maxine.

@maxinelasp maxinelasp merged commit 282cf4a into IMAP-Science-Operations-Center:dev Feb 27, 2026
14 checks passed
@github-project-automation github-project-automation bot moved this to Done in IMAP Feb 27, 2026
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.

2 participants