Skip to content

GLOWS - Add packet file name to L1B data#2761

Open
sdhoyt wants to merge 12 commits intoIMAP-Science-Operations-Center:devfrom
sdhoyt:add-support-data
Open

GLOWS - Add packet file name to L1B data#2761
sdhoyt wants to merge 12 commits intoIMAP-Science-Operations-Center:devfrom
sdhoyt:add-support-data

Conversation

@sdhoyt
Copy link
Contributor

@sdhoyt sdhoyt commented Feb 24, 2026

Change Summary

Overview

This PR has not been tested yet, but has code to pull the packet file name from the L1B Parent global attribute and create a variable in the L1B datasets. It also contains the metadata for the missing fields in L1B and L2. I'm dropping this ticket since the rest is not metadata related.

This partially implements ticket #2340

@sdhoyt sdhoyt requested a review from ahotasu February 24, 2026 23:20
@ahotasu ahotasu self-assigned this Feb 25, 2026
to the L1B products.
All pytests pass, but still need to look at the
actual CDF files to verify the new variables are
correct.
for L1a string/single element attributes:
ground_software_version, pkts_file_name, and
flight_software_version.
with new variables. Need to refactor tests after
validating CDFs.
product. Still need to refactor test code.
Validated CDF file output with Matlab using this
code to generate L1a and L1b Histogram data from
20260125.
Re-validated good CDF files with the updated code
using MATLAB and flight 20260125 data.
Successfully generated new l1a and l1b histogram
products (CDFs) and validated with MATLAB.
Passing all existing GLOWS l1a and L1b tests.
@ahotasu ahotasu marked this pull request as ready for review March 3, 2026 00:33
Copy link
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.

I have one major suggestion which might change remaining changes in this PR.

Sean, it might be helpful to add Maxine or few others besides David to get you quicker review in the future.

FILLVAL: # TBD: what is fillval for strings?
FORMAT: S256 # TBC
LABLAXIS: File name
FILLVAL: " "
Copy link
Contributor

Choose a reason for hiding this comment

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

My first response was that we shouldn't have empty fillval but then saw above comment. Can you add this note for future reader?

Suggested change
FILLVAL: " "
FILLVAL: " " # fillval for strings

Copy link
Collaborator

Choose a reason for hiding this comment

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

Certainly

CATDESC: Version of ground software used for processing
DISPLAY_TYPE: no_plot
FIELDNAM: Ground Software Version
FILLVAL: " "
Copy link
Contributor

Choose a reason for hiding this comment

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

same here and other places

Copy link
Collaborator

Choose a reason for hiding this comment

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

Done.

pkts_file_name:
<<: *support_data_defaults
CATDESC: Name of input file with CCSDS packets data
DISPLAY_TYPE: no_plot
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment on lines +142 to +146
VAR_TYPE: metadata
CATDESC: Name of L0 packets file data originated
FIELDNAM: Packets File Name
FILLVAL: ' '
FORMAT: A49
Copy link
Contributor

Choose a reason for hiding this comment

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

can you make keys in alphabetic order?

Comment on lines +436 to +444
output["flight_software_version"] = xr.DataArray(
np.array([hist_l1a_list[0].flight_software_version], dtype=np.uint32),
coords={"scalar": [0]},
name="flight_software_version",
dims=["scalar"],
attrs=glows_cdf_attributes.get_variable_attributes(
"flight_software_version", check_schema=False
),
)
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like we should make these kinds of one element array into global attrs, similar to our ground_software_version global attrs here. What do you think?

If we make these into global_attrs, we don't need to add CDF attrs in yaml file too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Personally, I think that makes a lot of sense, however, that is not what the GLOWS team is asking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants