Skip to content

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

Open
maxinelasp wants to merge 2 commits intoIMAP-Science-Operations-Center:devfrom
maxinelasp:glows_l1b_fix_bins
Open

Update L1B to inherit the number of bins from L1A#2780
maxinelasp wants to merge 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
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.

1 participant