imap-processing 0.19.4__py3-none-any.whl → 1.0.1__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.

Potentially problematic release.


This version of imap-processing might be problematic. Click here for more details.

Files changed (50) hide show
  1. imap_processing/_version.py +2 -2
  2. imap_processing/cdf/config/imap_codice_global_cdf_attrs.yaml +13 -1
  3. imap_processing/cdf/config/imap_codice_l1a_variable_attrs.yaml +44 -44
  4. imap_processing/cdf/config/imap_codice_l1b_variable_attrs.yaml +127 -126
  5. imap_processing/cdf/config/imap_codice_l2-hi-omni_variable_attrs.yaml +635 -0
  6. imap_processing/cdf/config/imap_codice_l2-hi-sectored_variable_attrs.yaml +422 -0
  7. imap_processing/cdf/config/imap_constant_attrs.yaml +1 -1
  8. imap_processing/cdf/config/imap_enamaps_l2-common_variable_attrs.yaml +61 -55
  9. imap_processing/cdf/config/imap_enamaps_l2-healpix_variable_attrs.yaml +3 -2
  10. imap_processing/cdf/config/imap_enamaps_l2-rectangular_variable_attrs.yaml +17 -5
  11. imap_processing/cli.py +6 -11
  12. imap_processing/codice/codice_l1a.py +42 -21
  13. imap_processing/codice/codice_l2.py +640 -127
  14. imap_processing/codice/constants.py +224 -129
  15. imap_processing/ena_maps/ena_maps.py +124 -70
  16. imap_processing/ena_maps/utils/coordinates.py +5 -0
  17. imap_processing/ena_maps/utils/corrections.py +268 -0
  18. imap_processing/ena_maps/utils/map_utils.py +143 -42
  19. imap_processing/hi/hi_l2.py +10 -15
  20. imap_processing/ialirt/constants.py +7 -1
  21. imap_processing/ialirt/generate_coverage.py +1 -1
  22. imap_processing/ialirt/l0/ialirt_spice.py +1 -1
  23. imap_processing/ialirt/l0/parse_mag.py +33 -0
  24. imap_processing/ialirt/l0/process_codice.py +66 -0
  25. imap_processing/ialirt/utils/create_xarray.py +2 -0
  26. imap_processing/idex/idex_l2a.py +2 -2
  27. imap_processing/idex/idex_l2b.py +1 -1
  28. imap_processing/lo/l1c/lo_l1c.py +61 -3
  29. imap_processing/lo/l2/lo_l2.py +79 -11
  30. imap_processing/mag/l1a/mag_l1a.py +2 -2
  31. imap_processing/mag/l1a/mag_l1a_data.py +71 -13
  32. imap_processing/mag/l1c/interpolation_methods.py +34 -13
  33. imap_processing/mag/l1c/mag_l1c.py +117 -67
  34. imap_processing/mag/l1d/mag_l1d_data.py +3 -1
  35. imap_processing/spice/geometry.py +39 -28
  36. imap_processing/spice/pointing_frame.py +77 -50
  37. imap_processing/swapi/l1/swapi_l1.py +12 -4
  38. imap_processing/swe/utils/swe_constants.py +7 -7
  39. imap_processing/ultra/l1b/extendedspin.py +1 -1
  40. imap_processing/ultra/l1b/ultra_l1b_culling.py +2 -2
  41. imap_processing/ultra/l1b/ultra_l1b_extended.py +1 -1
  42. imap_processing/ultra/l1c/helio_pset.py +1 -1
  43. imap_processing/ultra/l1c/spacecraft_pset.py +2 -2
  44. imap_processing/ultra/l2/ultra_l2.py +3 -3
  45. imap_processing-1.0.1.dist-info/METADATA +121 -0
  46. {imap_processing-0.19.4.dist-info → imap_processing-1.0.1.dist-info}/RECORD +49 -47
  47. imap_processing-0.19.4.dist-info/METADATA +0 -120
  48. {imap_processing-0.19.4.dist-info → imap_processing-1.0.1.dist-info}/LICENSE +0 -0
  49. {imap_processing-0.19.4.dist-info → imap_processing-1.0.1.dist-info}/WHEEL +0 -0
  50. {imap_processing-0.19.4.dist-info → imap_processing-1.0.1.dist-info}/entry_points.txt +0 -0
@@ -92,6 +92,26 @@ LO_SW_SPECIES_VARIABLE_NAMES = [
92
92
  "heplus",
93
93
  "cnoplus",
94
94
  ]
95
+ LO_SW_SOLAR_WIND_SPECIES_VARIABLE_NAMES = [
96
+ "hplus",
97
+ "heplusplus",
98
+ "cplus4",
99
+ "cplus5",
100
+ "cplus6",
101
+ "oplus5",
102
+ "oplus6",
103
+ "oplus7",
104
+ "oplus8",
105
+ "ne",
106
+ "mg",
107
+ "si",
108
+ "fe_loq",
109
+ "fe_hiq",
110
+ ]
111
+ LO_SW_PICKUP_ION_SPECIES_VARIABLE_NAMES = [
112
+ "heplus",
113
+ "cnoplus",
114
+ ]
95
115
  LO_NSW_SPECIES_VARIABLE_NAMES = [
96
116
  "hplus",
97
117
  "heplusplus",
@@ -236,8 +256,9 @@ HI_COUNTERS_AGGREGATED_VARIABLE_NAMES = [
236
256
  REQUIRES_DESPINNING = [
237
257
  "imap_codice_l1a_lo-sw-angular",
238
258
  "imap_codice_l1a_lo-nsw-angular",
239
- "imap_codice_l1a_lo-sw-priority",
240
- "imap_codice_l1a_lo-nsw-priority",
259
+ # TBD if this requires despinning
260
+ # "imap_codice_l1a_lo-sw-priority",
261
+ # "imap_codice_l1a_lo-nsw-priority",
241
262
  ]
242
263
 
243
264
  # Energy tables for CoDICE-Hi data products. These values represent the edges
@@ -268,149 +289,158 @@ IALIRT_ENERGY_TABLE = {
268
289
 
269
290
  OMNI_ENERGY_TABLE = {
270
291
  "h": [
271
- 0.05,
272
- 0.070710678,
273
- 0.1,
274
- 0.141421356,
275
- 0.2,
276
- 0.282842712,
277
- 0.4,
278
- 0.565685425,
279
- 0.8,
280
- 1.13137085,
281
- 1.6,
282
- 2.2627417,
283
- 3.2,
284
- 4.5254834,
285
- 6.4,
286
- 9.050966799,
292
+ 0.0200000000,
293
+ 0.0282842712,
294
+ 0.0400000000,
295
+ 0.0565685425,
296
+ 0.0800000000,
297
+ 0.1131370850,
298
+ 0.1600000000,
299
+ 0.2262741700,
300
+ 0.3200000000,
301
+ 0.4525483400,
302
+ 0.6400000000,
303
+ 0.9050966799,
304
+ 1.2800000000,
305
+ 1.8101933598,
306
+ 2.5600000000,
307
+ 3.6203867197,
287
308
  ],
288
309
  "he3": [
289
- 0.035355339,
290
- 0.05,
291
- 0.070710678,
292
- 0.1,
293
- 0.141421356,
294
- 0.2,
295
- 0.282842712,
296
- 0.4,
297
- 0.565685425,
298
- 0.8,
299
- 1.13137085,
300
- 1.6,
301
- 2.2627417,
302
- 3.2,
303
- 4.5254834,
304
- 6.4,
310
+ 0.0200000000,
311
+ 0.0282842712,
312
+ 0.0400000000,
313
+ 0.0565685425,
314
+ 0.0800000000,
315
+ 0.1131370850,
316
+ 0.1600000000,
317
+ 0.2262741700,
318
+ 0.3200000000,
319
+ 0.4525483400,
320
+ 0.6400000000,
321
+ 0.9050966799,
322
+ 1.2800000000,
323
+ 1.8101933598,
324
+ 2.5600000000,
325
+ 3.6203867197,
305
326
  ],
306
327
  "he4": [
307
- 0.035355339,
308
- 0.05,
309
- 0.070710678,
310
- 0.1,
311
- 0.141421356,
312
- 0.2,
313
- 0.282842712,
314
- 0.4,
315
- 0.565685425,
316
- 0.8,
317
- 1.13137085,
318
- 1.6,
319
- 2.2627417,
320
- 3.2,
321
- 4.5254834,
322
- 6.4,
328
+ 0.0200000000,
329
+ 0.0282842712,
330
+ 0.0400000000,
331
+ 0.0565685425,
332
+ 0.0800000000,
333
+ 0.1131370850,
334
+ 0.1600000000,
335
+ 0.2262741700,
336
+ 0.3200000000,
337
+ 0.4525483400,
338
+ 0.6400000000,
339
+ 0.9050966799,
340
+ 1.2800000000,
341
+ 1.8101933598,
342
+ 2.5600000000,
343
+ 3.6203867197,
323
344
  ],
324
345
  "c": [
325
- 0.025,
326
- 0.035355339,
327
- 0.05,
328
- 0.070710678,
329
- 0.1,
330
- 0.141421356,
331
- 0.2,
332
- 0.282842712,
333
- 0.4,
334
- 0.565685425,
335
- 0.8,
336
- 1.13137085,
337
- 1.6,
338
- 2.2627417,
339
- 3.2,
340
- 4.5254834,
341
- 6.4,
342
- 9.050966799,
343
- 12.8,
346
+ 0.0200000000,
347
+ 0.0282842712,
348
+ 0.0400000000,
349
+ 0.0565685425,
350
+ 0.0800000000,
351
+ 0.1131370850,
352
+ 0.1600000000,
353
+ 0.2262741700,
354
+ 0.3200000000,
355
+ 0.4525483400,
356
+ 0.6400000000,
357
+ 0.9050966799,
358
+ 1.2800000000,
359
+ 1.8101933598,
360
+ 2.5600000000,
361
+ 3.6203867197,
362
+ 5.1200000000,
363
+ 7.2407734394,
364
+ 10.2400000000,
344
365
  ],
345
366
  "o": [
346
- 0.025,
347
- 0.035355339,
348
- 0.05,
349
- 0.070710678,
350
- 0.1,
351
- 0.141421356,
352
- 0.2,
353
- 0.282842712,
354
- 0.4,
355
- 0.565685425,
356
- 0.8,
357
- 1.13137085,
358
- 1.6,
359
- 2.2627417,
360
- 3.2,
361
- 4.5254834,
362
- 6.4,
363
- 9.050966799,
364
- 12.8,
367
+ 0.0200000000,
368
+ 0.0282842712,
369
+ 0.0400000000,
370
+ 0.0565685425,
371
+ 0.0800000000,
372
+ 0.1131370850,
373
+ 0.1600000000,
374
+ 0.2262741700,
375
+ 0.3200000000,
376
+ 0.4525483400,
377
+ 0.6400000000,
378
+ 0.9050966799,
379
+ 1.2800000000,
380
+ 1.8101933598,
381
+ 2.5600000000,
382
+ 3.6203867197,
383
+ 5.1200000000,
384
+ 7.2407734394,
385
+ 10.2400000000,
365
386
  ],
366
387
  "ne_mg_si": [
367
- 0.01767767,
368
- 0.025,
369
- 0.035355339,
370
- 0.05,
371
- 0.070710678,
372
- 0.1,
373
- 0.141421356,
374
- 0.2,
375
- 0.282842712,
376
- 0.4,
377
- 0.565685425,
378
- 0.8,
379
- 1.13137085,
380
- 1.6,
381
- 2.2627417,
382
- 3.2,
388
+ 0.0200000000,
389
+ 0.0282842712,
390
+ 0.0400000000,
391
+ 0.0565685425,
392
+ 0.0800000000,
393
+ 0.1131370850,
394
+ 0.1600000000,
395
+ 0.2262741700,
396
+ 0.3200000000,
397
+ 0.4525483400,
398
+ 0.6400000000,
399
+ 0.9050966799,
400
+ 1.2800000000,
401
+ 1.8101933598,
402
+ 2.5600000000,
403
+ 3.6203867197,
383
404
  ],
384
405
  "fe": [
385
- 0.01767767,
386
- 0.025,
387
- 0.035355339,
388
- 0.05,
389
- 0.070710678,
390
- 0.1,
391
- 0.141421356,
392
- 0.2,
393
- 0.282842712,
394
- 0.4,
395
- 0.565685425,
396
- 0.8,
397
- 1.13137085,
398
- 1.6,
399
- 2.2627417,
400
- 3.2,
401
- 4.5254834,
402
- 6.4,
403
- 9.050966799,
406
+ 0.0200000000,
407
+ 0.0282842712,
408
+ 0.0400000000,
409
+ 0.0565685425,
410
+ 0.0800000000,
411
+ 0.1131370850,
412
+ 0.1600000000,
413
+ 0.2262741700,
414
+ 0.3200000000,
415
+ 0.4525483400,
416
+ 0.6400000000,
417
+ 0.9050966799,
418
+ 1.2800000000,
419
+ 1.8101933598,
420
+ 2.5600000000,
421
+ 3.6203867197,
422
+ 5.1200000000,
423
+ 7.2407734394,
424
+ 10.2400000000,
425
+ ],
426
+ "uh": [
427
+ 0.0200000000,
428
+ 0.0282842712,
429
+ 0.0400000000,
430
+ 0.0565685425,
431
+ 0.0800000000,
432
+ 0.1131370850,
404
433
  ],
405
- "uh": [0.01767767, 0.025, 0.035355339, 0.05, 0.070710678, 0.1],
406
- "junk": [0.05, 0.070710678],
434
+ "junk": [0.0200000000, 0.0282842712],
407
435
  }
408
436
 
437
+ # In the future, we get csv file with these column:
438
+ # species, min_energy, max_energy, product (descriptor of the product)
409
439
  SECTORED_ENERGY_TABLE = {
410
- "h": [0.05, 0.1, 0.2, 0.4, 0.8, 1.6, 3.2, 6.4, 12.8],
411
- "he3he4": [0.025, 0.05, 0.1, 0.2, 0.4, 0.8, 1.6, 3.2, 6.4],
412
- "cno": [0.025, 0.05, 0.1, 0.2, 0.4, 0.8, 1.6, 3.2, 6.4],
413
- "fe": [0.0125, 0.025, 0.05, 0.1, 0.2, 0.4, 0.8, 1.6, 3.2],
440
+ "h": [0.020, 0.040, 0.080, 0.160, 0.320, 0.640, 1.280, 2.560, 5.120],
441
+ "he3he4": [0.020, 0.040, 0.080, 0.160, 0.320, 0.640, 1.280, 2.560, 5.120],
442
+ "cno": [0.020, 0.040, 0.080, 0.160, 0.320, 0.640, 1.280, 2.560, 5.120],
443
+ "fe": [0.020, 0.040, 0.080, 0.160, 0.320, 0.640, 1.280, 2.560, 5.120],
414
444
  }
415
445
 
416
446
  # Various configurations to support processing of individual data products
@@ -2185,6 +2215,30 @@ ACQUISITION_TIMES = {
2185
2215
  ],
2186
2216
  }
2187
2217
 
2218
+ # These are for product that requires despinning in l1b.
2219
+ SW_INDEX_TO_POSITION = [1, 2, 3, 23, 24]
2220
+ NSW_INDEX_TO_POSITION = [
2221
+ 4,
2222
+ 5,
2223
+ 6,
2224
+ 7,
2225
+ 8,
2226
+ 9,
2227
+ 10,
2228
+ 11,
2229
+ 12,
2230
+ 13,
2231
+ 14,
2232
+ 15,
2233
+ 16,
2234
+ 17,
2235
+ 18,
2236
+ 19,
2237
+ 20,
2238
+ 21,
2239
+ 22,
2240
+ ]
2241
+
2188
2242
  # TODO: Update EFFICIENCY value when better information is available.
2189
2243
  # Constant for CoDICE Intensity calculations.
2190
2244
  EFFICIENCY = 1
@@ -2225,3 +2279,44 @@ HALF_SPIN_LUT = {
2225
2279
  30: [116, 117, 118, 119, 120, 121],
2226
2280
  31: [122, 123, 124, 125, 126, 127],
2227
2281
  }
2282
+
2283
+ NSW_POSITIONS = [x for x in range(3, 22)]
2284
+ SW_POSITIONS = [0]
2285
+ PUI_POSITIONS = [0, 1, 2, 22, 23]
2286
+ L2_GEOMETRIC_FACTOR = 0.013
2287
+ L2_HI_NUMBER_OF_SSD = 12.0
2288
+
2289
+ L2_HI_SECTORED_ANGLE = np.array(
2290
+ [
2291
+ 285.00,
2292
+ 244.11,
2293
+ 228.69,
2294
+ 225.00,
2295
+ 228.69,
2296
+ 244.11,
2297
+ 285.00,
2298
+ 325.89,
2299
+ 341.31,
2300
+ 345.00,
2301
+ 341.31,
2302
+ 325.89,
2303
+ ]
2304
+ )
2305
+
2306
+ HI_L2_ELEVATION_ANGLE = np.array(
2307
+ [
2308
+ 150.0,
2309
+ 138.6,
2310
+ 115.7,
2311
+ 90.0,
2312
+ 64.3,
2313
+ 41.4,
2314
+ 30.0,
2315
+ 41.4,
2316
+ 64.3,
2317
+ 90.0,
2318
+ 115.7,
2319
+ 138.6,
2320
+ ],
2321
+ dtype=float,
2322
+ )