File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -459,7 +459,9 @@ def is_valid_cr(input_cr: str) -> bool:
459
459
"ah.bc" : "attitude_history" ,
460
460
"ap.bc" : "attitude_predict" ,
461
461
"spin.csv" : "spin" ,
462
+ "spin" : "spin" ,
462
463
"repoint.csv" : "repoint" ,
464
+ "repoint" : "repoint" ,
463
465
"recon" : "ephemeris_reconstructed" ,
464
466
"nom" : "ephemeris_nominal" ,
465
467
"pred" : "ephemeris_predicted" ,
@@ -534,7 +536,7 @@ class SPICEFilePath(ImapFilePath):
534
536
r"(?P<start_year_doy>[\d]{4}_[\d]{3})_"
535
537
r"(?P<end_year_doy>[\d]{4}_[\d]{3})_"
536
538
r"(?P<version>[\d]+)\."
537
- r"(?P<type>ah.bc|ap.bc|spin.csv)"
539
+ r"(?P<type>ah.bc|ap.bc|spin.csv|spin )"
538
540
)
539
541
# Covers:
540
542
# DPS kernel (type: ah.bc)
@@ -546,12 +548,12 @@ class SPICEFilePath(ImapFilePath):
546
548
r"(?P<extension>ah\.bc)"
547
549
)
548
550
# Covers:
549
- # Repoint Files (type: repoint.csv)
551
+ # Repoint Files (type: repoint.csv, or repoint )
550
552
repoint_file_pattern = (
551
553
r"(imap)_"
552
554
r"(?P<end_year_doy>[\d]{4}_[\d]{3})_"
553
555
r"(?P<version>[\d]+)\."
554
- r"(?P<type>repoint.csv)"
556
+ r"(?P<type>repoint.csv|repoint )"
555
557
)
556
558
# Covers:
557
559
# Reconstructed (type: recon)
Original file line number Diff line number Diff line change @@ -219,6 +219,11 @@ def test_spice_file_path():
219
219
"DATA_DIR"
220
220
] / Path ("imap/spice/repoint/imap_2025_122_01.repoint.csv" )
221
221
222
+ repoint_file_path = SPICEFilePath ("imap_2025_122_01.repoint" )
223
+ assert repoint_file_path .construct_path () == imap_data_access .config [
224
+ "DATA_DIR"
225
+ ] / Path ("imap/spice/repoint/imap_2025_122_01.repoint" )
226
+
222
227
metakernel_file = SPICEFilePath ("imap_sdc_metakernel_1000_v000.tm" )
223
228
assert metakernel_file .construct_path () == imap_data_access .config [
224
229
"DATA_DIR"
@@ -279,9 +284,10 @@ def test_spice_extract_dps_pointing_parts():
279
284
print (file_path .spice_metadata )
280
285
281
286
282
- def test_spice_extract_spin_parts ():
287
+ @pytest .mark .parametrize ("suffix" , ["spin" , "spin.csv" ])
288
+ def test_spice_extract_spin_parts (suffix ):
283
289
# Test spin
284
- file_path = SPICEFilePath ("imap_2025_122_2025_122_01.spin.csv " )
290
+ file_path = SPICEFilePath (f "imap_2025_122_2025_122_01.{ suffix } " )
285
291
assert file_path .spice_metadata ["version" ] == "01"
286
292
assert file_path .spice_metadata ["type" ] == "spin"
287
293
assert file_path .spice_metadata ["start_date" ] == datetime .strptime (
You can’t perform that action at this time.
0 commit comments