Skip to content

GLOWS - Add packet file name to L1B data#2761

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

GLOWS - Add packet file name to L1B data#2761
sdhoyt wants to merge 14 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.

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do they know that it's an option?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'll ask.

ahotasu added 2 commits March 4, 2026 12:13
AI to help re-order all attributes in the GLOWS
YAML files.
pkts_file_name and ground_software_version
variables in both the
imap_glows_l1a_variable_attrs.yaml and
imap_glows_l1b_variable_attrs.yaml files,
as these variables are not meant to be plotted
and the DISPLAY_TYPE attribute is not necessary.
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 would still check with GLOWS if they like those to be global attrs but if they don't, then current changes looks good to me. Only minor comments for now.

fields[index].name
)

# TODO: Not sure if this is requested in this product...
Copy link
Contributor

Choose a reason for hiding this comment

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

This is also a good idea for getting input files. Is there ticket for this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not that I know of...yet. We've been focused on the Histograms and will tackle DE after L2 Histograms are done (or people have time to focus on DE).

direct_event_glows_times: np.ndarray | None = field(init=False, default=None)
# 3rd value is pulse length
direct_event_pulse_lengths: np.ndarray | None = field(init=False, default=None)
# pkts_file_name: str = ""
Copy link
Contributor

Choose a reason for hiding this comment

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

remove?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Absolutely.

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