GLOWS - Add packet file name to L1B data#2761
GLOWS - Add packet file name to L1B data#2761sdhoyt wants to merge 14 commits intoIMAP-Science-Operations-Center:devfrom
Conversation
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.
tech3371
left a comment
There was a problem hiding this comment.
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.
| 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 | ||
| ), | ||
| ) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Personally, I think that makes a lot of sense, however, that is not what the GLOWS team is asking for.
There was a problem hiding this comment.
Do they know that it's an option?
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.
tech3371
left a comment
There was a problem hiding this comment.
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... |
There was a problem hiding this comment.
This is also a good idea for getting input files. Is there ticket for this?
There was a problem hiding this comment.
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 = "" |
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