diff --git a/imap_processing/cdf/config/imap_codice_l2-hi-direct-events_variable_attrs.yaml b/imap_processing/cdf/config/imap_codice_l2-hi-direct-events_variable_attrs.yaml index eadc5c20c..2c1eec847 100644 --- a/imap_processing/cdf/config/imap_codice_l2-hi-direct-events_variable_attrs.yaml +++ b/imap_processing/cdf/config/imap_codice_l2-hi-direct-events_variable_attrs.yaml @@ -78,6 +78,7 @@ num_events: FIELDNAM: Number of Events FILLVAL: *uint16_fillval FORMAT: I5 + LABLAXIS: Number of Events LABL_PTR_1: priority_label SCALETYP: linear UNITS: " " diff --git a/imap_processing/cdf/config/imap_codice_l2-lo-direct-events_variable_attrs.yaml b/imap_processing/cdf/config/imap_codice_l2-lo-direct-events_variable_attrs.yaml index 863709568..8fabd2196 100644 --- a/imap_processing/cdf/config/imap_codice_l2-lo-direct-events_variable_attrs.yaml +++ b/imap_processing/cdf/config/imap_codice_l2-lo-direct-events_variable_attrs.yaml @@ -77,6 +77,7 @@ num_events: FIELDNAM: Number of Events FILLVAL: *uint16_fillval FORMAT: I5 + LABLAXIS: Number of Events LABL_PTR_1: priority_label SCALETYP: linear UNITS: " " diff --git a/imap_processing/tests/cdf/test_imap_cdf_manager.py b/imap_processing/tests/cdf/test_imap_cdf_manager.py index 86985a8c7..1b5a6f741 100644 --- a/imap_processing/tests/cdf/test_imap_cdf_manager.py +++ b/imap_processing/tests/cdf/test_imap_cdf_manager.py @@ -1,5 +1,7 @@ from pathlib import Path +import pytest + # from imap_processing.cdf.cdf_attribute_manager import CdfAttributeManager from imap_processing.cdf.imap_cdf_manager import ImapCdfAttributes @@ -50,3 +52,14 @@ def test_add_instrument_variable_attrs(): == "Time, number of nanoseconds since J2000 with leap seconds included" ) assert instrument2_instrument["UNITS"] == "ns" + + +@pytest.mark.parametrize("level", ["l2-lo-direct-events", "l2-hi-direct-events"]) +def test_codice_direct_events_num_events_axis_label(level): + """Ensure the one-dimensional num_events spectrogram uses an axis label.""" + attributes = ImapCdfAttributes() + attributes.add_instrument_variable_attrs("codice", level) + + num_events_attrs = attributes.get_variable_attributes("num_events") + + assert num_events_attrs["LABLAXIS"] == "Number of Events" diff --git a/poetry.lock b/poetry.lock index bba858f46..2bdaea299 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.3.4 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.4.1 and should not be changed by hand. [[package]] name = "accessible-pygments" @@ -1898,13 +1898,13 @@ files = [ [[package]] name = "sammi-cdf" -version = "1.0.0" -description = "A Python package to support metadata attriubte management for Space Weather data processing pipelines." +version = "1.1.0" +description = "A Python package to support metadata attribute management for Space Weather data processing pipelines." optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "sammi_cdf-1.0.0.tar.gz", hash = "sha256:dec77b2d2ae45dae32540f7db7b74b4444d22e73ce3e0e346342f36360f02f89"}, + {file = "sammi_cdf-1.1.0.tar.gz", hash = "sha256:bca307d08fe734235bafcdecae70288c3384a20f0e906eba1cf561cfd18e1d03"}, ] [package.dependencies] @@ -2428,4 +2428,4 @@ tools = ["openpyxl", "pandas"] [metadata] lock-version = "2.1" python-versions = ">=3.10,<3.13" -content-hash = "dc258d9186f0ec542145c7ed4509781ad87b789cc23a5e8cb0acf2e3ee811d18" +content-hash = "3eb041e4ac28d41a31428549d80f8c2bc2961877588d80a443396d72827957c2" diff --git a/pyproject.toml b/pyproject.toml index c2522d9f8..a199329f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ dependencies = [ "spiceypy>=6.0.0", "xarray>=2024.10.0,<2026", "numpy>=2,<3", - "sammi-cdf>=1.0,<2", + "sammi-cdf>=1.0.2,<2", "scipy>=1.13,<2" ]