imap-processing 1.0.1__py3-none-any.whl → 1.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. imap_processing/_version.py +2 -2
  2. imap_processing/cdf/config/imap_codice_l1a_variable_attrs.yaml +97 -254
  3. imap_processing/cdf/config/imap_enamaps_l2-common_variable_attrs.yaml +1 -1
  4. imap_processing/cdf/config/imap_swapi_variable_attrs.yaml +2 -13
  5. imap_processing/cdf/utils.py +2 -2
  6. imap_processing/cli.py +4 -16
  7. imap_processing/codice/codice_l1a_lo_angular.py +362 -0
  8. imap_processing/codice/codice_l1a_lo_species.py +282 -0
  9. imap_processing/codice/codice_l1b.py +62 -97
  10. imap_processing/codice/codice_l2.py +210 -96
  11. imap_processing/codice/codice_new_l1a.py +64 -0
  12. imap_processing/codice/constants.py +37 -2
  13. imap_processing/codice/utils.py +270 -0
  14. imap_processing/ena_maps/ena_maps.py +50 -39
  15. imap_processing/ena_maps/utils/corrections.py +196 -14
  16. imap_processing/ena_maps/utils/naming.py +3 -1
  17. imap_processing/hi/hi_l1c.py +34 -12
  18. imap_processing/hi/hi_l2.py +79 -36
  19. imap_processing/ialirt/generate_coverage.py +3 -1
  20. imap_processing/ialirt/l0/parse_mag.py +1 -0
  21. imap_processing/ialirt/l0/process_hit.py +1 -0
  22. imap_processing/ialirt/l0/process_swapi.py +1 -0
  23. imap_processing/ialirt/l0/process_swe.py +2 -0
  24. imap_processing/ialirt/process_ephemeris.py +6 -2
  25. imap_processing/ialirt/utils/create_xarray.py +3 -2
  26. imap_processing/lo/l1c/lo_l1c.py +1 -1
  27. imap_processing/lo/l2/lo_l2.py +6 -4
  28. imap_processing/quality_flags.py +1 -0
  29. imap_processing/swapi/constants.py +4 -0
  30. imap_processing/swapi/l1/swapi_l1.py +47 -20
  31. imap_processing/swapi/l2/swapi_l2.py +17 -3
  32. imap_processing/ultra/l1a/ultra_l1a.py +121 -72
  33. imap_processing/ultra/l1b/de.py +57 -1
  34. imap_processing/ultra/l1b/ultra_l1b_annotated.py +0 -1
  35. imap_processing/ultra/l1b/ultra_l1b_extended.py +24 -11
  36. imap_processing/ultra/l1c/helio_pset.py +28 -5
  37. imap_processing/ultra/l1c/l1c_lookup_utils.py +4 -2
  38. imap_processing/ultra/l1c/spacecraft_pset.py +9 -5
  39. imap_processing/ultra/l1c/ultra_l1c.py +6 -6
  40. imap_processing/ultra/l1c/ultra_l1c_pset_bins.py +82 -20
  41. imap_processing/ultra/l2/ultra_l2.py +2 -2
  42. {imap_processing-1.0.1.dist-info → imap_processing-1.0.2.dist-info}/METADATA +1 -1
  43. {imap_processing-1.0.1.dist-info → imap_processing-1.0.2.dist-info}/RECORD +46 -42
  44. {imap_processing-1.0.1.dist-info → imap_processing-1.0.2.dist-info}/LICENSE +0 -0
  45. {imap_processing-1.0.1.dist-info → imap_processing-1.0.2.dist-info}/WHEEL +0 -0
  46. {imap_processing-1.0.1.dist-info → imap_processing-1.0.2.dist-info}/entry_points.txt +0 -0
@@ -1,3 +1,3 @@
1
1
  # These version placeholders will be replaced later during substitution.
2
- __version__ = "1.0.1"
3
- __version_tuple__ = (1, 0, 1)
2
+ __version__ = "1.0.2"
3
+ __version_tuple__ = (1, 0, 2)
@@ -63,8 +63,8 @@ hi_priorities_attrs: &hi_priorities_default
63
63
  epoch_delta_minus:
64
64
  CATDESC: Time from acquisition start to acquisition center
65
65
  FIELDNAM: epoch_delta_minus
66
- FILLVAL: *int_fillval
67
- FORMAT: I18
66
+ FILLVAL: *real_fillval
67
+ FORMAT: F30.9
68
68
  LABLAXIS: epoch_delta_minus
69
69
  SCALETYP: linear
70
70
  UNITS: ns
@@ -75,13 +75,13 @@ epoch_delta_minus:
75
75
  epoch_delta_plus:
76
76
  CATDESC: Time from acquisition center to acquisition end
77
77
  FIELDNAM: epoch_delta_plus
78
- FILLVAL: *int_fillval
79
- FORMAT: I18
78
+ FILLVAL: *real_fillval
79
+ FORMAT: F30.9
80
80
  LABLAXIS: epoch_delta_plus
81
81
  SCALETYP: linear
82
82
  UNITS: ns
83
- VALIDMIN: *min_int
84
- VALIDMAX: *max_int
83
+ VALIDMIN: *min_epoch
84
+ VALIDMAX: *max_epoch
85
85
  VAR_TYPE: support_data
86
86
 
87
87
  esa_step:
@@ -168,6 +168,18 @@ ssd_index:
168
168
  VALIDMAX: 12
169
169
  VAR_TYPE: support_data
170
170
 
171
+ k_factor_attrs:
172
+ CATDESC: K Factor constant that is used to convert voltages to energies
173
+ DEPEND_1: k_factor
174
+ FIELDNAM: K Factor
175
+ FORMAT: F6.2
176
+ LABLAXIS: K Factor
177
+ SCALETYP: linear
178
+ UNITS: " "
179
+ VALIDMIN: 1.0
180
+ VALIDMAX: 100.0
181
+ VAR_TYPE: support_data
182
+
171
183
  # <=== Labels ===>
172
184
  esa_step_label:
173
185
  CATDESC: ESA Step
@@ -284,7 +296,7 @@ direct_events_attrs: &direct_events
284
296
  VALIDMIN: 0
285
297
  VALIDMAX: 10000
286
298
 
287
- energy_table:
299
+ voltage_table:
288
300
  CATDESC: ElectroStatic Analyzer Energy Values
289
301
  DEPEND_1: esa_step
290
302
  FIELDNAM: Energy Table
@@ -298,8 +310,9 @@ energy_table:
298
310
 
299
311
  k_factor:
300
312
  CATDESC: K Factor constant that is used to convert voltages to energies
313
+ DEPEND_1: k_factor
301
314
  FIELDNAM: K Factor
302
- FORMAT: F5.2
315
+ FORMAT: F6.2
303
316
  LABLAXIS: K Factor
304
317
  SCALETYP: linear
305
318
  UNITS: " "
@@ -1142,61 +1155,42 @@ lo-counters-singles-apd_singles:
1142
1155
  LABL_PTR_2: spin_sector_pairs_label
1143
1156
  LABL_PTR_3: esa_step_label
1144
1157
 
1145
- # lo-sw-angular
1146
- lo-sw-angular-hplus:
1147
- <<: *counters
1148
- CATDESC: Sunward H+ Species
1149
- FIELDNAM: SW - H+
1150
- DEPEND_1: esa_step
1151
- DEPEND_2: inst_az
1152
- DEPEND_3: spin_sector
1153
- LABL_PTR_1: esa_step_label
1154
- LABL_PTR_2: inst_az_label
1155
- LABL_PTR_3: spin_sector_label
1156
-
1157
- lo-sw-angular-heplusplus:
1158
- <<: *counters
1159
- CATDESC: Sunward He++ Species
1160
- FIELDNAM: SW - He++
1161
- DEPEND_1: esa_step
1162
- DEPEND_2: inst_az
1163
- DEPEND_3: spin_sector
1164
- LABL_PTR_1: esa_step_label
1165
- LABL_PTR_2: inst_az_label
1166
- LABL_PTR_3: spin_sector_label
1167
-
1168
- lo-sw-angular-oplus6:
1169
- <<: *counters
1170
- CATDESC: Sunward O+6 Species
1171
- FIELDNAM: SW - O+6
1172
- DEPEND_1: esa_step
1173
- DEPEND_2: inst_az
1174
- DEPEND_3: spin_sector
1175
- LABL_PTR_1: esa_step_label
1176
- LABL_PTR_2: inst_az_label
1177
- LABL_PTR_3: spin_sector_label
1178
-
1179
- lo-sw-angular-fe_loq:
1180
- <<: *counters
1181
- CATDESC: Sunward Fe lowQ Species
1182
- FIELDNAM: SW - Fe lowQ
1158
+ # lo-angular attribute templates (combined versions of the previous entries)
1159
+ lo-angular-attrs:
1160
+ CATDESC: "{species} Sunward {direction} species"
1161
+ DEPEND_0: epoch
1183
1162
  DEPEND_1: esa_step
1184
- DEPEND_2: inst_az
1185
- DEPEND_3: spin_sector
1163
+ DEPEND_2: spin_sector
1164
+ DEPEND_3: inst_az
1165
+ DISPLAY_TYPE: time_series
1166
+ FIELDNAM: "SW - {species}"
1167
+ FILLVAL: *int_fillval
1168
+ FORMAT: I7
1186
1169
  LABL_PTR_1: esa_step_label
1187
- LABL_PTR_2: inst_az_label
1188
- LABL_PTR_3: spin_sector_label
1170
+ LABL_PTR_2: spin_sector_label
1171
+ LABL_PTR_3: inst_az_label
1172
+ UNITS: counts
1173
+ VALIDMIN: 0
1174
+ VALIDMAX: *max_uint32
1175
+ VAR_TYPE: data
1189
1176
 
1190
- lo-nsw-angular-heplusplus:
1191
- <<: *counters
1192
- CATDESC: Non-sunward He++ Species
1193
- FIELDNAM: NSW - He++
1177
+ lo-angular-unc-attrs:
1178
+ CATDESC: "{species} Non-sunward {direction} species uncertainty"
1179
+ DEPEND_0: epoch
1194
1180
  DEPEND_1: esa_step
1195
- DEPEND_2: inst_az
1196
- DEPEND_3: spin_sector
1181
+ DEPEND_2: spin_sector
1182
+ DEPEND_3: inst_az
1183
+ DISPLAY_TYPE: time_series
1184
+ FIELDNAM: "NSW - {species}"
1185
+ FILLVAL: *int_fillval
1186
+ FORMAT: I7
1197
1187
  LABL_PTR_1: esa_step_label
1198
- LABL_PTR_2: inst_az_label
1199
- LABL_PTR_3: spin_sector_label
1188
+ LABL_PTR_2: spin_sector_label
1189
+ LABL_PTR_3: inst_az_label
1190
+ UNITS: counts
1191
+ VALIDMIN: 0
1192
+ VALIDMAX: *max_uint32
1193
+ VAR_TYPE: data
1200
1194
 
1201
1195
  # lo-sw-priority
1202
1196
  lo-sw-priority-p0_tcrs:
@@ -1263,221 +1257,70 @@ lo-nsw-priority-p6_hplus_heplusplus:
1263
1257
  LABL_PTR_1: spin_sector_label
1264
1258
  LABL_PTR_2: esa_step_label
1265
1259
 
1266
- # lo-sw-species
1267
- lo-sw-species-hplus:
1268
- <<: *counters
1269
- CATDESC: H+ Sunward Species
1270
- FIELDNAM: SW - H+
1271
- DEPEND_1: esa_step
1272
- DEPEND_2: spin_sector
1273
- LABL_PTR_1: esa_step_label
1274
- LABL_PTR_2: spin_sector_label
1275
-
1276
- lo-sw-species-heplusplus:
1277
- <<: *counters
1278
- CATDESC: He++ Sunward Species
1279
- FIELDNAM: SW - He++
1280
- DEPEND_1: esa_step
1281
- DEPEND_2: spin_sector
1282
- LABL_PTR_1: esa_step_label
1283
- LABL_PTR_2: spin_sector_label
1284
-
1285
- lo-sw-species-cplus4:
1286
- <<: *counters
1287
- CATDESC: C+4 Sunward Species
1288
- FIELDNAM: SW - C+4
1289
- DEPEND_1: esa_step
1290
- DEPEND_2: spin_sector
1291
- LABL_PTR_1: esa_step_label
1292
- LABL_PTR_2: spin_sector_label
1293
-
1294
- lo-sw-species-cplus5:
1295
- <<: *counters
1296
- CATDESC: C+5 Sunward Species
1297
- FIELDNAM: SW - C+5
1298
- DEPEND_1: esa_step
1299
- DEPEND_2: spin_sector
1300
- LABL_PTR_1: esa_step_label
1301
- LABL_PTR_2: spin_sector_label
1302
-
1303
- lo-sw-species-cplus6:
1304
- <<: *counters
1305
- CATDESC: C+6 Sunward Species
1306
- FIELDNAM: SW - C+6
1307
- DEPEND_1: esa_step
1308
- DEPEND_2: spin_sector
1309
- LABL_PTR_1: esa_step_label
1310
- LABL_PTR_2: spin_sector_label
1311
-
1312
- lo-sw-species-oplus5:
1313
- <<: *counters
1314
- CATDESC: O+5 Sunward Species
1315
- FIELDNAM: SW - O+5
1316
- DEPEND_1: esa_step
1317
- DEPEND_2: spin_sector
1318
- LABL_PTR_1: esa_step_label
1319
- LABL_PTR_2: spin_sector_label
1320
-
1321
- lo-sw-species-oplus6:
1322
- <<: *counters
1323
- CATDESC: O+6 Sunward Species
1324
- FIELDNAM: SW - O+6
1325
- DEPEND_1: esa_step
1326
- DEPEND_2: spin_sector
1327
- LABL_PTR_1: esa_step_label
1328
- LABL_PTR_2: spin_sector_label
1329
-
1330
- lo-sw-species-oplus7:
1331
- <<: *counters
1332
- CATDESC: O+7 Sunward Species
1333
- FIELDNAM: SW - O+7
1334
- DEPEND_1: esa_step
1335
- DEPEND_2: spin_sector
1336
- LABL_PTR_1: esa_step_label
1337
- LABL_PTR_2: spin_sector_label
1338
-
1339
- lo-sw-species-oplus8:
1340
- <<: *counters
1341
- CATDESC: O+8 Sunward Species
1342
- FIELDNAM: SW - O+8
1343
- DEPEND_1: esa_step
1344
- DEPEND_2: spin_sector
1345
- LABL_PTR_1: esa_step_label
1346
- LABL_PTR_2: spin_sector_label
1347
-
1348
- lo-sw-species-ne:
1349
- <<: *counters
1350
- CATDESC: Ne Sunward Species
1351
- FIELDNAM: SW - Ne
1352
- DEPEND_1: esa_step
1353
- DEPEND_2: spin_sector
1354
- LABL_PTR_1: esa_step_label
1355
- LABL_PTR_2: spin_sector_label
1356
- lo-sw-species-mg:
1357
- <<: *counters
1358
- CATDESC: Mg Sunward Species
1359
- FIELDNAM: SW - Mg
1360
- DEPEND_1: esa_step
1361
- DEPEND_2: spin_sector
1362
- LABL_PTR_1: esa_step_label
1363
- LABL_PTR_2: spin_sector_label
1364
-
1365
- lo-sw-species-si:
1366
- <<: *counters
1367
- CATDESC: Si Sunward Species
1368
- FIELDNAM: SW - Si
1369
- DEPEND_1: esa_step
1370
- DEPEND_2: spin_sector
1371
- LABL_PTR_1: esa_step_label
1372
- LABL_PTR_2: spin_sector_label
1373
- lo-sw-species-fe_loq:
1374
- <<: *counters
1375
- CATDESC: Fe lowQ Sunward Species
1376
- FIELDNAM: SW - Fe lowQ
1377
- DEPEND_1: esa_step
1378
- DEPEND_2: spin_sector
1379
- LABL_PTR_1: esa_step_label
1380
- LABL_PTR_2: spin_sector_label
1381
-
1382
- lo-sw-species-fe_hiq:
1383
- <<: *counters
1384
- CATDESC: Fe highQ Sunward Species
1385
- FIELDNAM: SW - Fe highQ
1386
- DEPEND_1: esa_step
1387
- DEPEND_2: spin_sector
1388
- LABL_PTR_1: esa_step_label
1389
- LABL_PTR_2: spin_sector_label
1390
-
1391
- lo-sw-species-heplus:
1392
- <<: *counters
1393
- CATDESC: He+ Pickup Ion Sunward Species
1394
- FIELDNAM: SW - He+ (PUI)
1395
- DEPEND_1: esa_step
1396
- DEPEND_2: spin_sector
1397
- LABL_PTR_1: esa_step_label
1398
- LABL_PTR_2: spin_sector_label
1399
-
1400
- lo-sw-species-cnoplus:
1401
- <<: *counters
1402
- CATDESC: CNO+ Pickup Ion Sunward Species
1403
- FIELDNAM: SW - CNO+ (PUI)
1404
- DEPEND_1: esa_step
1405
- DEPEND_2: spin_sector
1406
- LABL_PTR_1: esa_step_label
1407
- LABL_PTR_2: spin_sector_label
1408
-
1409
- # lo-nsw-species
1410
- lo-nsw-species-hplus:
1411
- <<: *counters
1412
- CATDESC: H+ Non-sunward Species
1413
- FIELDNAM: NSW - H+
1414
- DEPEND_1: esa_step
1415
- DEPEND_2: spin_sector
1416
- LABL_PTR_1: esa_step_label
1417
- LABL_PTR_2: spin_sector_label
1418
-
1419
- lo-nsw-species-heplusplus:
1420
- <<: *counters
1421
- CATDESC: He++ Non-sunward Species
1422
- FIELDNAM: NSW - He++
1423
- DEPEND_1: esa_step
1424
- DEPEND_2: spin_sector
1425
- LABL_PTR_1: esa_step_label
1426
- LABL_PTR_2: spin_sector_label
1427
-
1428
- lo-nsw-species-c:
1429
- <<: *counters
1430
- CATDESC: C Non-sunward Species
1431
- FIELDNAM: NSW - C
1432
- DEPEND_1: esa_step
1433
- DEPEND_2: spin_sector
1434
- LABL_PTR_1: esa_step_label
1435
- LABL_PTR_2: spin_sector_label
1436
-
1437
- lo-nsw-species-o:
1438
- <<: *counters
1439
- CATDESC: O Non-sunward Species
1440
- FIELDNAM: NSW - O
1441
- DEPEND_1: esa_step
1442
- DEPEND_2: spin_sector
1443
- LABL_PTR_1: esa_step_label
1444
- LABL_PTR_2: spin_sector_label
1445
-
1446
- lo-nsw-species-ne_si_mg:
1447
- <<: *counters
1448
- CATDESC: Ne-Si-Mg Non-sunward Species
1449
- FIELDNAM: NSW - Ne_Si_Mg
1260
+ # lo species attrs
1261
+ lo-species-attrs:
1262
+ CATDESC: "{species} {direction} Species"
1263
+ DEPEND_0: epoch
1450
1264
  DEPEND_1: esa_step
1451
1265
  DEPEND_2: spin_sector
1266
+ DISPLAY_TYPE: time_series
1267
+ FIELDNAM: "{direction} - {species}"
1268
+ FILLVAL: *int_fillval
1269
+ FORMAT: I7
1452
1270
  LABL_PTR_1: esa_step_label
1453
1271
  LABL_PTR_2: spin_sector_label
1272
+ UNITS: counts
1273
+ VALIDMIN: 0
1274
+ VALIDMAX: *max_uint32
1275
+ VAR_TYPE: data
1454
1276
 
1455
- lo-nsw-species-fe:
1456
- <<: *counters
1457
- CATDESC: Fe Non-sunward Species
1458
- FIELDNAM: NSW - Fe
1277
+ lo-pui-species-attrs:
1278
+ CATDESC: "{species} Pickup Ion {direction} Species"
1279
+ DEPEND_0: epoch
1459
1280
  DEPEND_1: esa_step
1460
1281
  DEPEND_2: spin_sector
1282
+ DISPLAY_TYPE: time_series
1283
+ FIELDNAM: "{direction} - {species}"
1284
+ FILLVAL: *int_fillval
1285
+ FORMAT: I7
1461
1286
  LABL_PTR_1: esa_step_label
1462
1287
  LABL_PTR_2: spin_sector_label
1288
+ UNITS: counts
1289
+ VALIDMIN: 0
1290
+ VALIDMAX: *max_uint32
1291
+ VAR_TYPE: data
1463
1292
 
1464
- lo-nsw-species-heplus:
1465
- <<: *counters
1466
- CATDESC: He+ Non-sunward Species
1467
- FIELDNAM: NSW - He+
1293
+ lo-species-unc-attrs:
1294
+ CATDESC: "{species} {direction} Species uncertainty"
1295
+ DEPEND_0: epoch
1468
1296
  DEPEND_1: esa_step
1469
1297
  DEPEND_2: spin_sector
1298
+ DISPLAY_TYPE: time_series
1299
+ FIELDNAM: "{direction} - {species}"
1300
+ FILLVAL: *real_fillval
1301
+ FORMAT: F20.9
1470
1302
  LABL_PTR_1: esa_step_label
1471
1303
  LABL_PTR_2: spin_sector_label
1304
+ UNITS: counts
1305
+ VALIDMIN: 0
1306
+ VALIDMAX: *max_uint32
1307
+ VAR_TYPE: data
1472
1308
 
1473
- lo-nsw-species-cnoplus:
1474
- <<: *counters
1475
- CATDESC: CNO+ Non-sunward Species
1476
- FIELDNAM: NSW - CNO+
1309
+ lo-pui-species-unc-attrs:
1310
+ CATDESC: "{species} Pickup Ion {direction} Species uncertainty"
1311
+ DEPEND_0: epoch
1477
1312
  DEPEND_1: esa_step
1478
1313
  DEPEND_2: spin_sector
1314
+ DISPLAY_TYPE: time_series
1315
+ FIELDNAM: "{direction} - {species}"
1316
+ FILLVAL: *real_fillval
1317
+ FORMAT: F20.9
1479
1318
  LABL_PTR_1: esa_step_label
1480
1319
  LABL_PTR_2: spin_sector_label
1320
+ UNITS: counts
1321
+ VALIDMIN: 0
1322
+ VALIDMAX: *max_uint32
1323
+ VAR_TYPE: data
1481
1324
 
1482
1325
  # lo-ialirt
1483
1326
  lo-ialirt-heplusplus:
@@ -216,7 +216,7 @@ geometric_function:
216
216
  <<: *default_float32
217
217
  CATDESC: Averaged aperture area as seen by the backstop.
218
218
  FIELDNAM: Geometric Function
219
- UNITS: cm^2 sr
219
+ UNITS: cm^2
220
220
  VAR_TYPE: support_data
221
221
  LABLAXIS: Geometric Function
222
222
  DISPLAY_TYPE: no_plot
@@ -129,22 +129,11 @@ metadata_default: &metadata_default
129
129
  DICT_KEY: SPASE>Support>SupportQuantity:Other
130
130
 
131
131
  sci_start_time:
132
- CATDESC: Start time of sweep
132
+ CATDESC: Start time of sweep in UTC
133
133
  DEPEND_0: epoch
134
134
  FIELDNAM: Science Start time
135
- LABLAXIS: sci_start_time
136
- FILLVAL: -9223372036854775808
137
- FORMAT: " " # Supposedly not required, fails in xarray_to_cdf
138
- VALIDMIN: -9223372036854775808
139
- VALIDMAX: 9223372036854775807
140
- UNITS: ns
135
+ FORMAT: " "
141
136
  VAR_TYPE: support_data
142
- SCALETYP: linear
143
- MONOTON: INCREASE
144
- TIME_BASE: J2000
145
- TIME_SCALE: Terrestrial Time
146
- REFERENCE_POSITION: Rotating Earth Geoid
147
- RESOLUTION: ' '
148
137
  DICT_KEY: "SPASE>Support>SupportQantity:Temporal"
149
138
 
150
139
  # Minimum attrs setting for HK data
@@ -29,7 +29,7 @@ def load_cdf(
29
29
 
30
30
  Parameters
31
31
  ----------
32
- file_path : Path or ImapFilePath or str
32
+ file_path : pathlib.Path or ImapFilePath or str
33
33
  The path to the CDF file or ImapFilePath object.
34
34
  remove_xarray_attrs : bool
35
35
  Whether to remove the xarray attributes that get injected by the
@@ -98,7 +98,7 @@ def write_cdf(
98
98
 
99
99
  Returns
100
100
  -------
101
- file_path : Path
101
+ file_path : pathlib.Path
102
102
  Path to the file created.
103
103
  """
104
104
  # Create the filename from the global attributes
imap_processing/cli.py CHANGED
@@ -49,7 +49,7 @@ from imap_processing.cdf.utils import load_cdf, write_cdf
49
49
  # from imap_processing import cdf
50
50
  # In code:
51
51
  # call cdf.utils.write_cdf
52
- from imap_processing.codice import codice_l1a, codice_l1b, codice_l2
52
+ from imap_processing.codice import codice_l1b, codice_l2, codice_new_l1a
53
53
  from imap_processing.glows.l1a.glows_l1a import glows_l1a
54
54
  from imap_processing.glows.l1b.glows_l1b import glows_l1b, glows_l1b_de
55
55
  from imap_processing.glows.l2.glows_l2 import glows_l2
@@ -612,14 +612,8 @@ class Codice(ProcessInstrument):
612
612
  datasets: list[xr.Dataset] = []
613
613
 
614
614
  if self.data_level == "l1a":
615
- science_files = dependencies.get_file_paths(source="codice")
616
- if len(science_files) != 1:
617
- raise ValueError(
618
- f"CoDICE L1A requires exactly one input science file, received: "
619
- f"{science_files}."
620
- )
621
615
  # process data
622
- datasets = codice_l1a.process_codice_l1a(science_files[0])
616
+ datasets = codice_new_l1a.process_l1a(dependencies)
623
617
 
624
618
  if self.data_level == "l1b":
625
619
  science_files = dependencies.get_file_paths(source="codice")
@@ -1435,7 +1429,7 @@ class Ultra(ProcessInstrument):
1435
1429
  f"Unexpected science_files found for ULTRA L1A:"
1436
1430
  f"{science_files}. Expected only one dependency."
1437
1431
  )
1438
- datasets = ultra_l1a.ultra_l1a(science_files[0])
1432
+ datasets = ultra_l1a.ultra_l1a(science_files[0], create_derived_l1b=True)
1439
1433
  elif self.data_level == "l1b":
1440
1434
  science_files = dependencies.get_file_paths(source="ultra", data_type="l1a")
1441
1435
  l1a_dict = {
@@ -1472,13 +1466,7 @@ class Ultra(ProcessInstrument):
1472
1466
  ancillary_files = {}
1473
1467
  for path in anc_paths:
1474
1468
  ancillary_files[path.stem.split("_")[2]] = path
1475
- spice_paths = dependencies.get_file_paths(data_type="spice")
1476
- # Only the helio pset needs IMAP frames
1477
- if any("imap_frames" in path.as_posix() for path in spice_paths):
1478
- imap_frames = True
1479
- else:
1480
- imap_frames = False
1481
- datasets = ultra_l1c.ultra_l1c(combined, ancillary_files, imap_frames)
1469
+ datasets = ultra_l1c.ultra_l1c(combined, ancillary_files, self.descriptor)
1482
1470
  elif self.data_level == "l2":
1483
1471
  all_pset_filepaths = dependencies.get_file_paths(
1484
1472
  source="ultra", descriptor="pset"