Skip to content

Commit e51c648

Browse files
committed
fix: layers have cdf file and not json in metadata
1 parent f7af30b commit e51c648

5 files changed

Lines changed: 8 additions & 6 deletions

File tree

src/mag_toolkit/calibration/ScienceLayer.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ def _from_cdf(cls, path: Path, load_contents=False):
184184
CONSTANTS.CSV_VARS.RANGE: data[:, 3],
185185
}
186186
)
187-
187+
logger.debug(
188+
f"Loaded contents from CDF at {path!s} with {len(contents) if contents is not None else 'no'} rows."
189+
)
188190
science_layer = cls(
189191
id=dataset.attrs[CONSTANTS.CDF_ATTRS.LOGICAL_FILE_ID][0],
190192
mission=dataset.attrs[CONSTANTS.CDF_ATTRS.MISSION_GROUP][0],
@@ -193,7 +195,7 @@ def _from_cdf(cls, path: Path, load_contents=False):
193195
version=version,
194196
metadata=metadata,
195197
value_type=ValueType.VECTOR,
196-
science_file=str(path),
198+
science_file=path.name,
197199
)
198200
science_layer._set_content_date_from_filepath(path)
199201
science_layer._set_data_path(path)

tests/datastore/calibration/layers/2025/10/imap_mag_noop-layer_20251017_v001.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"data_filename": "imap_mag_noop-layer-data_20251017_v001.csv",
77
"dependencies": [],
88
"science": [
9-
".work/imap_mag_l1b_norm-mago_20251017_v002.json"
9+
"imap_mag_l1b_norm-mago_20251017_v002.cdf"
1010
]
1111
},
1212
"method": "noop",

tests/datastore/calibration/layers/2026/01/imap_mag_noop-norm-layer_20260116_v001.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"data_filename": "imap_mag_noop-norm-layer-data_20260116_v001.csv",
77
"dependencies": [],
88
"science": [
9-
".work/imap_mag_l1b_norm-mago_20260116_v002.json"
9+
"imap_mag_l1b_norm-mago_20260116_v002.cdf"
1010
]
1111
},
1212
"method": "noop",

tests/test_data/imap_mag_four-vector-offsets-norm-layer_20251017_v001.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"data_filename": "imap_mag_four-vector-offsets-norm-layer-data_20251017_v001.csv",
77
"dependencies": [],
88
"science": [
9-
".work/imap_mag_l1b_norm-mago_20251017_v002.json"
9+
"imap_mag_l1b_norm-mago_20251017_v002.cdf"
1010
]
1111
},
1212
"method": "noop",

tests/test_data/imap_mag_misaligned-timestamps-norm-layer_20251017_v001.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"data_filename": "imap_mag_misaligned-timestamps-norm-layer-data_20251017_v001.csv",
77
"dependencies": [],
88
"science": [
9-
".work/imap_mag_l1b_norm-mago_20251017_v002.json"
9+
"imap_mag_l1b_norm-mago_20251017_v002.cdf"
1010
]
1111
},
1212
"method": "noop",

0 commit comments

Comments
 (0)