HIT L2 - Fix delta var attrs#3086
HIT L2 - Fix delta var attrs#3086vmartinez-cu merged 1 commit intoIMAP-Science-Operations-Center:devfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes HIT L2 CDF metadata in the variable-attributes YAML where DELTA_MINUS_VAR and DELTA_PLUS_VAR were previously assigned to the wrong uncertainty variables, aligning the DELTA links with the intended “minus” vs “plus” total-uncertainty fields (Issue #2729).
Changes:
- Swap
DELTA_MINUS_VARto reference*_total_uncert_minus(instead of*_total_uncert_plus) for HIT L2 intensity variables. - Swap
DELTA_PLUS_VARto reference*_total_uncert_plus(instead of*_total_uncert_minus) for HIT L2 intensity variables. - Apply the correction consistently across standard, summed, and macropixel intensity variable blocks.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| DELTA_MINUS_VAR: h_total_uncert_minus | ||
| DELTA_PLUS_VAR: h_total_uncert_plus |
There was a problem hiding this comment.
This YAML change fixes a metadata mapping bug, but there doesn’t appear to be a regression test asserting that HIT L2 intensity variables’ DELTA_MINUS_VAR/DELTA_PLUS_VAR attrs point to the expected *_total_uncert_minus/*_total_uncert_plus variables. Consider adding a small unit test (e.g., in imap_processing/tests/hit/test_hit_l2.py) that runs hit_l2 (or add_cdf_attributes) and asserts the corrected DELTA attrs for at least one representative variable (standard, summed, macropixel) to prevent this from silently regressing again.
There was a problem hiding this comment.
Unit tests don't currently validate CDF attribute values. This could be considered in the future
b5fd291
into
IMAP-Science-Operations-Center:dev
Fixes error in HIT L2 metadata where delta var attributes had reversed values assigned (minus and plus values assigned to the opposite delta attrs)
Closes Issue #2729