Update L1B to inherit the number of bins from L1A#2780
Open
maxinelasp wants to merge 2 commits intoIMAP-Science-Operations-Center:devfrom
Open
Update L1B to inherit the number of bins from L1A#2780maxinelasp wants to merge 2 commits intoIMAP-Science-Operations-Center:devfrom
maxinelasp wants to merge 2 commits intoIMAP-Science-Operations-Center:devfrom
Conversation
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.
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_DATAis a fixed 3600-element field. However,NBINSis a separate raw telemetry field propagated asnumber_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_histogramwithlen(self.histogram)wherever it sizes output arrays inglows_l1b_data.py. The field is retained in the dataclass output as a passthrough of the raw telemetry value.