Fix GLOWS L3a and L3b variable dimension sizing with fill padding - #167
Fix GLOWS L3a and L3b variable dimension sizing with fill padding#167leowerneck wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes GLOWS CDF dimension consistency by padding L3a and L3b variable-length arrays while trimming L3a padding during downstream reads.
Changes:
- Pads L3a lightcurve arrays to 90 bins with type-appropriate fill values.
- Pads L3b
used_l3ato 50 entries. - Updates tests for fixed dimensions and padding values.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
imap_l3_processing/glows/l3a/utils.py |
Adds L3a padding and downstream trimming. |
imap_l3_processing/glows/l3bc/models.py |
Pads and bounds L3b used_l3a. |
tests/glows/l3a/test_utils.py |
Verifies L3a dimensions and fill values. |
tests/glows/l3bc/test_models.py |
Verifies L3b filename padding. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| RAW_HISTOGRAM_FILL_VALUE = np.iinfo(np.uint32).max | ||
|
|
||
|
|
||
| def _pad_lightcurve(values, fill_value=FLOAT_FILL_VALUE) -> np.ndarray: |
There was a problem hiding this comment.
There is logic downstream that converts np.nan and masked arrays to the correct fill value. Can this function be rewritten to utilize masked arrays for integer type data and np.nans for float type data?
- Sebastian and Karn
There was a problem hiding this comment.
@pleasant-menlo Good catch, thank you for pointing this out! Could you please review the latest commit?
Change Summary
Closes #158
Overview
Fixes inconsistent GLOWS L3a and L3b CDF dimensions by padding L3a spin-angle variables to 90 bins and L3b used_l3a to 50 entries. Padding is removed when L3a files are read for downstream processing.
File Changes
Testing
Ran 15 focused GLOWS L3a/L3b tests successfully, including model creation, CDF conversion, and processor behavior.