Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ num_events:
FIELDNAM: Number of Events
FILLVAL: *uint16_fillval
FORMAT: I5
LABLAXIS: Number of Events
LABL_PTR_1: priority_label
Comment thread
leowerneck marked this conversation as resolved.
SCALETYP: linear
UNITS: " "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: " "
Expand Down
13 changes: 13 additions & 0 deletions imap_processing/tests/cdf/test_imap_cdf_manager.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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"
10 changes: 5 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]

Expand Down
Loading