Skip to content

Conversation

@lacoak21
Copy link
Contributor

Change Summary

L1b validation for counters singles. Tenzin already had code in place for counters processing.

Overview

closes #2165
closes #2147

Updated Files

  • imap_processing/codice/codice_l1b.py
    • Do not calculate uncertainties for counters products
  • imap_processing/codice/constants.py
    • Add variables to constants

Testing

Validation test

@lacoak21 lacoak21 added this to the December 2025 milestone Dec 16, 2025
@lacoak21 lacoak21 self-assigned this Dec 16, 2025
@lacoak21 lacoak21 added this to IMAP Dec 16, 2025
Comment on lines +457 to +463
for variable in val_data.data_vars:
np.testing.assert_allclose(
processed_data[variable].values,
val_data[variable].values,
rtol=1.2e-5,
err_msg=f"Mismatch in variable '{variable}'",
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am curious whether the xarray testing function could assert on everything in the dataset for you instead of this loop? I'm good with this approach since that follows what we've done for everything, but curious nonetheless.

https://docs.xarray.dev/en/stable/generated/xarray.testing.assert_allclose.html#xarray.testing.assert_allclose

@lacoak21 lacoak21 merged commit a8a8a79 into IMAP-Science-Operations-Center:dev Dec 17, 2025
14 checks passed
@github-project-automation github-project-automation bot moved this to Done in IMAP Dec 17, 2025
@lacoak21 lacoak21 deleted the codice_l1b_counters_single branch December 17, 2025 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

CoDICE: L1B Hi instrument dianostic counts singles CoDICE: L1B Lo instrument dianostic counts singles

2 participants