imap-processing 0.18.0__py3-none-any.whl → 0.19.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.

Potentially problematic release.


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

Files changed (122) hide show
  1. imap_processing/_version.py +2 -2
  2. imap_processing/ancillary/ancillary_dataset_combiner.py +161 -1
  3. imap_processing/cdf/config/imap_codice_global_cdf_attrs.yaml +6 -0
  4. imap_processing/cdf/config/imap_codice_l1a_variable_attrs.yaml +221 -1057
  5. imap_processing/cdf/config/imap_codice_l1b_variable_attrs.yaml +307 -283
  6. imap_processing/cdf/config/imap_codice_l2_variable_attrs.yaml +1044 -203
  7. imap_processing/cdf/config/imap_constant_attrs.yaml +4 -2
  8. imap_processing/cdf/config/imap_enamaps_l2-common_variable_attrs.yaml +11 -0
  9. imap_processing/cdf/config/imap_glows_l1b_variable_attrs.yaml +15 -1
  10. imap_processing/cdf/config/imap_hi_global_cdf_attrs.yaml +5 -0
  11. imap_processing/cdf/config/imap_hit_global_cdf_attrs.yaml +10 -4
  12. imap_processing/cdf/config/imap_idex_l2a_variable_attrs.yaml +33 -4
  13. imap_processing/cdf/config/imap_idex_l2b_variable_attrs.yaml +8 -91
  14. imap_processing/cdf/config/imap_idex_l2c_variable_attrs.yaml +106 -16
  15. imap_processing/cdf/config/imap_lo_global_cdf_attrs.yaml +5 -4
  16. imap_processing/cdf/config/imap_lo_l1a_variable_attrs.yaml +4 -15
  17. imap_processing/cdf/config/imap_lo_l1c_variable_attrs.yaml +189 -98
  18. imap_processing/cdf/config/imap_mag_global_cdf_attrs.yaml +85 -2
  19. imap_processing/cdf/config/imap_mag_l1c_variable_attrs.yaml +24 -1
  20. imap_processing/cdf/config/imap_ultra_global_cdf_attrs.yaml +20 -8
  21. imap_processing/cdf/config/imap_ultra_l1b_variable_attrs.yaml +45 -35
  22. imap_processing/cdf/config/imap_ultra_l1c_variable_attrs.yaml +110 -7
  23. imap_processing/cli.py +138 -93
  24. imap_processing/codice/codice_l0.py +2 -1
  25. imap_processing/codice/codice_l1a.py +167 -69
  26. imap_processing/codice/codice_l1b.py +42 -32
  27. imap_processing/codice/codice_l2.py +215 -9
  28. imap_processing/codice/constants.py +790 -603
  29. imap_processing/codice/data/lo_stepping_values.csv +1 -1
  30. imap_processing/decom.py +1 -4
  31. imap_processing/ena_maps/ena_maps.py +71 -43
  32. imap_processing/ena_maps/utils/corrections.py +291 -0
  33. imap_processing/ena_maps/utils/map_utils.py +20 -4
  34. imap_processing/ena_maps/utils/naming.py +8 -2
  35. imap_processing/glows/ancillary/imap_glows_exclusions-by-instr-team_20250923_v002.dat +10 -0
  36. imap_processing/glows/ancillary/imap_glows_map-of-excluded-regions_20250923_v002.dat +393 -0
  37. imap_processing/glows/ancillary/imap_glows_map-of-uv-sources_20250923_v002.dat +593 -0
  38. imap_processing/glows/ancillary/imap_glows_pipeline-settings_20250923_v002.json +54 -0
  39. imap_processing/glows/ancillary/imap_glows_suspected-transients_20250923_v002.dat +10 -0
  40. imap_processing/glows/l1b/glows_l1b.py +123 -18
  41. imap_processing/glows/l1b/glows_l1b_data.py +358 -47
  42. imap_processing/glows/l2/glows_l2.py +11 -0
  43. imap_processing/hi/hi_l1a.py +124 -3
  44. imap_processing/hi/hi_l1b.py +154 -71
  45. imap_processing/hi/hi_l1c.py +4 -109
  46. imap_processing/hi/hi_l2.py +104 -60
  47. imap_processing/hi/utils.py +262 -8
  48. imap_processing/hit/l0/constants.py +3 -0
  49. imap_processing/hit/l0/decom_hit.py +3 -6
  50. imap_processing/hit/l1a/hit_l1a.py +311 -21
  51. imap_processing/hit/l1b/hit_l1b.py +54 -126
  52. imap_processing/hit/l2/hit_l2.py +6 -6
  53. imap_processing/ialirt/calculate_ingest.py +219 -0
  54. imap_processing/ialirt/constants.py +12 -2
  55. imap_processing/ialirt/generate_coverage.py +15 -2
  56. imap_processing/ialirt/l0/ialirt_spice.py +6 -2
  57. imap_processing/ialirt/l0/parse_mag.py +293 -42
  58. imap_processing/ialirt/l0/process_hit.py +5 -3
  59. imap_processing/ialirt/l0/process_swapi.py +41 -25
  60. imap_processing/ialirt/process_ephemeris.py +70 -14
  61. imap_processing/ialirt/utils/create_xarray.py +1 -1
  62. imap_processing/idex/idex_l0.py +2 -2
  63. imap_processing/idex/idex_l1a.py +2 -3
  64. imap_processing/idex/idex_l1b.py +2 -3
  65. imap_processing/idex/idex_l2a.py +130 -4
  66. imap_processing/idex/idex_l2b.py +158 -143
  67. imap_processing/idex/idex_utils.py +1 -3
  68. imap_processing/lo/ancillary_data/imap_lo_hydrogen-geometric-factor_v001.csv +75 -0
  69. imap_processing/lo/ancillary_data/imap_lo_oxygen-geometric-factor_v001.csv +75 -0
  70. imap_processing/lo/l0/lo_science.py +25 -24
  71. imap_processing/lo/l1b/lo_l1b.py +93 -19
  72. imap_processing/lo/l1c/lo_l1c.py +273 -93
  73. imap_processing/lo/l2/lo_l2.py +949 -135
  74. imap_processing/lo/lo_ancillary.py +55 -0
  75. imap_processing/mag/l1a/mag_l1a.py +1 -0
  76. imap_processing/mag/l1a/mag_l1a_data.py +26 -0
  77. imap_processing/mag/l1b/mag_l1b.py +3 -2
  78. imap_processing/mag/l1c/interpolation_methods.py +14 -15
  79. imap_processing/mag/l1c/mag_l1c.py +23 -6
  80. imap_processing/mag/l1d/mag_l1d.py +57 -14
  81. imap_processing/mag/l1d/mag_l1d_data.py +202 -32
  82. imap_processing/mag/l2/mag_l2.py +2 -0
  83. imap_processing/mag/l2/mag_l2_data.py +14 -5
  84. imap_processing/quality_flags.py +23 -1
  85. imap_processing/spice/geometry.py +89 -39
  86. imap_processing/spice/pointing_frame.py +4 -8
  87. imap_processing/spice/repoint.py +78 -2
  88. imap_processing/spice/spin.py +28 -8
  89. imap_processing/spice/time.py +12 -22
  90. imap_processing/swapi/l1/swapi_l1.py +10 -4
  91. imap_processing/swapi/l2/swapi_l2.py +15 -17
  92. imap_processing/swe/l1b/swe_l1b.py +1 -2
  93. imap_processing/ultra/constants.py +30 -24
  94. imap_processing/ultra/l0/ultra_utils.py +9 -11
  95. imap_processing/ultra/l1a/ultra_l1a.py +1 -2
  96. imap_processing/ultra/l1b/badtimes.py +35 -11
  97. imap_processing/ultra/l1b/de.py +95 -31
  98. imap_processing/ultra/l1b/extendedspin.py +31 -16
  99. imap_processing/ultra/l1b/goodtimes.py +112 -0
  100. imap_processing/ultra/l1b/lookup_utils.py +281 -28
  101. imap_processing/ultra/l1b/quality_flag_filters.py +10 -1
  102. imap_processing/ultra/l1b/ultra_l1b.py +7 -7
  103. imap_processing/ultra/l1b/ultra_l1b_culling.py +169 -7
  104. imap_processing/ultra/l1b/ultra_l1b_extended.py +311 -69
  105. imap_processing/ultra/l1c/helio_pset.py +139 -37
  106. imap_processing/ultra/l1c/l1c_lookup_utils.py +289 -0
  107. imap_processing/ultra/l1c/spacecraft_pset.py +140 -29
  108. imap_processing/ultra/l1c/ultra_l1c.py +33 -24
  109. imap_processing/ultra/l1c/ultra_l1c_culling.py +92 -0
  110. imap_processing/ultra/l1c/ultra_l1c_pset_bins.py +400 -292
  111. imap_processing/ultra/l2/ultra_l2.py +54 -11
  112. imap_processing/ultra/utils/ultra_l1_utils.py +37 -7
  113. imap_processing/utils.py +3 -4
  114. {imap_processing-0.18.0.dist-info → imap_processing-0.19.2.dist-info}/METADATA +2 -2
  115. {imap_processing-0.18.0.dist-info → imap_processing-0.19.2.dist-info}/RECORD +118 -109
  116. imap_processing/idex/idex_l2c.py +0 -84
  117. imap_processing/spice/kernels.py +0 -187
  118. imap_processing/ultra/l1b/cullingmask.py +0 -87
  119. imap_processing/ultra/l1c/histogram.py +0 -36
  120. {imap_processing-0.18.0.dist-info → imap_processing-0.19.2.dist-info}/LICENSE +0 -0
  121. {imap_processing-0.18.0.dist-info → imap_processing-0.19.2.dist-info}/WHEEL +0 -0
  122. {imap_processing-0.18.0.dist-info → imap_processing-0.19.2.dist-info}/entry_points.txt +0 -0
@@ -72,6 +72,22 @@ default_float64_attrs: &default_float64
72
72
  VALIDMAX: 1.7976931348623157e+308
73
73
  dtype: float64
74
74
 
75
+ computed_ebin:
76
+ <<: *default_uint8
77
+ CATDESC: Computed event bin index
78
+ FIELDNAM: Computed ebin
79
+ LABLAXIS: computed_ebin
80
+ UNITS: " "
81
+ DEPEND_0: epoch
82
+
83
+ ebin:
84
+ <<: *default_uint8
85
+ CATDESC: Event bin index
86
+ FIELDNAM: Ebin
87
+ LABLAXIS: ebin
88
+ UNITS: " "
89
+ DEPEND_0: epoch
90
+
75
91
  x_front:
76
92
  <<: *default_float32
77
93
  CATDESC: x front position
@@ -223,7 +239,7 @@ energy_heliosphere:
223
239
  species:
224
240
  <<: *default_uint8
225
241
  DISPLAY_TYPE: no_plot
226
- CATDESC: Label species type.
242
+ CATDESC: Label species type. Non-proton (heavy ion) = 0, proton = 1, misc = 3
227
243
  FIELDNAM: Label species type.
228
244
  LABLAXIS: species
229
245
  UNITS: " "
@@ -348,8 +364,7 @@ spin_start_time:
348
364
  LABLAXIS: spin start time
349
365
  # TODO: come back to format
350
366
  UNITS: s
351
- DEPEND_0: epoch
352
- DEPEND_1: spin_number
367
+ DEPEND_0: spin_number
353
368
 
354
369
  spin_period:
355
370
  <<: *default
@@ -357,8 +372,7 @@ spin_period:
357
372
  FIELDNAM: spin_period
358
373
  LABLAXIS: spin_period
359
374
  UNITS: s
360
- DEPEND_0: epoch
361
- DEPEND_1: spin_number
375
+ DEPEND_0: spin_number
362
376
 
363
377
  spin_rate:
364
378
  <<: *default
@@ -366,8 +380,7 @@ spin_rate:
366
380
  FIELDNAM: spin_rate
367
381
  LABLAXIS: spin_rate
368
382
  UNITS: rpm
369
- DEPEND_0: epoch
370
- DEPEND_1: spin_number
383
+ DEPEND_0: spin_number
371
384
 
372
385
  rate_start_pulses:
373
386
  <<: *default
@@ -415,9 +428,8 @@ ena_rates:
415
428
  CATDESC: Rates calculated from de packet.
416
429
  FIELDNAM: ena_rates
417
430
  LABLAXIS: ena rates
418
- DEPEND_0: epoch
431
+ DEPEND_0: energy_bin_geometric_mean
419
432
  DEPEND_1: spin_number
420
- DEPEND_2: energy_bin_geometric_mean
421
433
  UNITS: " "
422
434
 
423
435
  start_pulses_per_spin:
@@ -425,8 +437,7 @@ start_pulses_per_spin:
425
437
  CATDESC: Total start pulses per spin.
426
438
  FIELDNAM: start_pulses_per_spin
427
439
  LABLAXIS: start pulses per spin
428
- DEPEND_0: epoch
429
- DEPEND_1: spin_number
440
+ DEPEND_0: spin_number
430
441
  UNITS: " "
431
442
 
432
443
  stop_pulses_per_spin:
@@ -434,8 +445,7 @@ stop_pulses_per_spin:
434
445
  CATDESC: Total start pulses per spin.
435
446
  FIELDNAM: stop_pulses_per_spin
436
447
  LABLAXIS: stop pulses per spin
437
- DEPEND_0: epoch
438
- DEPEND_1: spin_number
448
+ DEPEND_0: spin_number
439
449
  UNITS: " "
440
450
 
441
451
  coin_pulses_per_spin:
@@ -443,8 +453,7 @@ coin_pulses_per_spin:
443
453
  CATDESC: Total coincidence pulses per spin.
444
454
  FIELDNAM: coin_pulses_per_spin
445
455
  LABLAXIS: coin_pulses_per_spin
446
- DEPEND_0: epoch
447
- DEPEND_1: spin_number
456
+ DEPEND_0: spin_number
448
457
  UNITS: " "
449
458
 
450
459
  rejected_events_per_spin:
@@ -452,8 +461,7 @@ rejected_events_per_spin:
452
461
  CATDESC: Rejected events per spin.
453
462
  FIELDNAM: rejected_events_per_spin
454
463
  LABLAXIS: rejected events per spin
455
- DEPEND_0: epoch
456
- DEPEND_1: spin_number
464
+ DEPEND_0: spin_number
457
465
  UNITS: " "
458
466
 
459
467
  ena_rates_threshold:
@@ -461,9 +469,8 @@ ena_rates_threshold:
461
469
  CATDESC: Rates threshold used for flagging data.
462
470
  FIELDNAM: ena_rates_threshold
463
471
  LABLAXIS: ena_rates_threshold
464
- DEPEND_0: epoch
472
+ DEPEND_0: energy_bin_geometric_mean
465
473
  DEPEND_1: spin_number
466
- DEPEND_2: energy_bin_geometric_mean
467
474
  UNITS: " "
468
475
 
469
476
  quality_ena_rates:
@@ -471,9 +478,7 @@ quality_ena_rates:
471
478
  CATDESC: Spin filter derived from Ultra ena rates. Bitwise flagging used to filter the spin.
472
479
  FIELDNAM: quality_ena_rates
473
480
  LABLAXIS: quality_ena_rates
474
- DEPEND_0: epoch
475
- DEPEND_1: spin_number
476
- DEPEND_2: energy_bin_geometric_mean
481
+ DEPEND_0: spin_number
477
482
  UNITS: " "
478
483
 
479
484
  quality_attitude:
@@ -483,9 +488,8 @@ quality_attitude:
483
488
  LABLAXIS: quality attitude
484
489
  # TODO: come back to format
485
490
  UNITS: " "
486
- DEPEND_0: epoch
487
- DEPEND_1: spin_number
488
- DEPEND_2: energy_bin_geometric_mean
491
+ DEPEND_0: spin_number
492
+ DEPEND_1: energy_bin_geometric_mean
489
493
 
490
494
  quality_instruments:
491
495
  <<: *default_uint16
@@ -494,9 +498,8 @@ quality_instruments:
494
498
  LABLAXIS: quality instruments
495
499
  # TODO: come back to format
496
500
  UNITS: " "
497
- DEPEND_0: epoch
498
- DEPEND_1: spin_number
499
- DEPEND_2: energy_bin_geometric_mean
501
+ DEPEND_0: spin_number
502
+ DEPEND_1: energy_bin_geometric_mean
500
503
 
501
504
  quality_hk:
502
505
  <<: *default_uint16
@@ -505,14 +508,21 @@ quality_hk:
505
508
  LABLAXIS: quality hk
506
509
  # TODO: come back to format
507
510
  UNITS: " "
508
- DEPEND_0: epoch
509
- DEPEND_1: spin_number
510
- DEPEND_2: energy_bin_geometric_mean
511
+ DEPEND_0: spin_number
512
+ DEPEND_1: energy_bin_geometric_mean
513
+
514
+ quality_outliers:
515
+ <<: *default_uint16
516
+ CATDESC: Quality flag for direct event for events outliers.
517
+ FIELDNAM: quality_outliers
518
+ LABLAXIS: quality_outliers
519
+ # TODO: come back to format
520
+ UNITS: " "
511
521
 
512
- quality_fov:
522
+ quality_scattering:
513
523
  <<: *default_uint16
514
- CATDESC: Quality flag for direct event for events outside of the FOV.
515
- FIELDNAM: quality_fov
516
- LABLAXIS: quality fov
524
+ CATDESC: Quality flag for direct event scattering.
525
+ FIELDNAM: quality_scattering
526
+ LABLAXIS: quality_scattering
517
527
  # TODO: come back to format
518
528
  UNITS: " "
@@ -17,9 +17,23 @@ default_float32_attrs: &default_float32
17
17
  VALIDMAX: 3.4028235e+38
18
18
  dtype: float32
19
19
 
20
+ default_uint16_attrs: &default_uint16
21
+ <<: *default
22
+ FILLVAL: 65535
23
+ FORMAT: I5
24
+ VALIDMIN: 0
25
+ VALIDMAX: 65535
26
+ dtype: uint16
27
+
28
+ energy_dependent_attrs: &energy_dependent
29
+ <<: *default_float32
30
+ DEPEND_1: energy_bin_geometric_mean
31
+ DEPEND_2: pixel_index
32
+
20
33
  latitude:
21
34
  <<: *default_float32
22
35
  CATDESC: Latitude bin center corresponding to healpix index with range [-90, 90].
36
+ DEPEND_1: pixel_index
23
37
  FIELDNAM: latitude
24
38
  LABLAXIS: latitude
25
39
  UNITS: degrees
@@ -27,6 +41,7 @@ latitude:
27
41
  longitude:
28
42
  <<: *default_float32
29
43
  CATDESC: Longitude bin center corresponding to healpix index with range [0, 360].
44
+ DEPEND_1: pixel_index
30
45
  FIELDNAM: longitude
31
46
  LABLAXIS: longitude
32
47
  UNITS: degrees
@@ -39,30 +54,98 @@ species_bin:
39
54
  # TODO: come back to format
40
55
  UNITS: " "
41
56
 
42
- exposure_factor:
57
+ dead_time_ratio:
43
58
  <<: *default_float32
44
- CATDESC: Exposure time for a pointing.
45
- FIELDNAM: exposure_factor
46
- LABLAXIS: exposure factor
47
- # TODO: come back to format
48
- UNITS: seconds
59
+ CATDESC: Dead time correction ratios for each spin phase step (1ms resolution).
60
+ DEPEND_1: spin_phase_step
61
+ FIELDNAM: dead_time_ratios
62
+ LABLAXIS: Dead Time Ratio
63
+ UNITS: " "
64
+ VALIDMIN: 0.0
49
65
 
50
66
  sensitivity:
51
- <<: *default_float32
67
+ <<: *energy_dependent
52
68
  CATDESC: Calibration/sensitivity factor.
53
69
  FIELDNAM: sensitivity
54
70
  LABLAXIS: sensitivity
55
71
  # TODO: come back to format
56
72
  UNITS: counts/second
57
73
 
74
+ geometric_function:
75
+ <<: *energy_dependent
76
+ CATDESC: The effective sensitive area as a function of theta and phi in instrument frame (energy independent).
77
+ FIELDNAM: geometric_function
78
+ LABLAXIS: Geometric Factor
79
+ UNITS: cm^2
80
+ VALIDMIN: 0.0
81
+
82
+ efficiency:
83
+ <<: *energy_dependent
84
+ CATDESC: Estimated event efficiency for particles path through the instrument.
85
+ FIELDNAM: efficiency
86
+ LABLAXIS: Efficiency
87
+ UNITS: " "
88
+ VALIDMIN: 0.0
89
+ VALIDMAX: 1.0
90
+
91
+ exposure_factor:
92
+ <<: *energy_dependent
93
+ CATDESC: Exposure time with the deadtime correction applied for a pointing.
94
+ FIELDNAM: exposure_factor
95
+ LABLAXIS: exposure factor
96
+ # TODO: come back to format
97
+ UNITS: seconds
98
+
99
+ helio_exposure_factor:
100
+ <<: *energy_dependent
101
+ CATDESC: Exposure time with the deadtime correction applied for a pointing.
102
+ FIELDNAM: exposure_factor
103
+ LABLAXIS: exposure factor
104
+ # TODO: come back to format
105
+ UNITS: seconds
106
+
107
+ scatter_theta:
108
+ <<: *energy_dependent
109
+ CATDESC: Scattering theta values for a pointing.
110
+ FIELDNAM: scatter_theta
111
+ LABLAXIS: scatter theta
112
+ UNITS: degrees
113
+
114
+ scatter_phi:
115
+ <<: *energy_dependent
116
+ CATDESC: Scattering phi values for a pointing.
117
+ FIELDNAM: scatter_phi
118
+ LABLAXIS: scatter phi
119
+ UNITS: degrees
120
+
121
+ scatter_threshold:
122
+ <<: *energy_dependent
123
+ CATDESC: Scattering threshold values for each energy bin for a pointing.
124
+ FIELDNAM: scatter_threshold
125
+ LABLAXIS: scatter threshold
126
+ UNITS: degrees
127
+
58
128
  counts:
59
129
  <<: *default
60
130
  CATDESC: Counts for a spin.
131
+ DEPEND_1: energy_bin_geometric_mean
132
+ DEPEND_2: pixel_index
61
133
  FIELDNAM: counts
62
134
  LABLAXIS: counts
63
135
  # TODO: come back to format
64
136
  UNITS: counts
65
137
 
138
+
139
+ quality_flags:
140
+ <<: *default_uint16
141
+ CATDESC: Spin filter derived from Ultra ena rates. Bitwise flagging used to filter the spin.
142
+ FIELDNAM: quality_ena_rates
143
+ LABLAXIS: quality_ena_rates
144
+ DEPEND_0: epoch
145
+ DEPEND_1: spin_number
146
+ DEPEND_2: energy_bin_geometric_mean
147
+ UNITS: " "
148
+
66
149
  background_rates:
67
150
  <<: *default_float32
68
151
  CATDESC: Background rates. Background dominated by accidentals caused by a combination of UV light and misregistered low energy ENA events.
@@ -94,3 +177,23 @@ energy_bin_delta:
94
177
  FIELDNAM: energy_bin_delta
95
178
  LABLAXIS: energy bin delta
96
179
  UNITS: keV
180
+
181
+ energy_delta_minus:
182
+ <<: *default_float32
183
+ VAR_TYPE: support_data
184
+ CATDESC: Difference between the energy bin center and lower edge.
185
+ LABLAXIS: energy
186
+ UNITS: KeV
187
+ FIELDNAM: energy_bin_delta_minus
188
+ DISPLAY_TYPE: no_plot
189
+ DEPEND_1: energy_bin_geometric_mean
190
+
191
+ energy_delta_plus:
192
+ <<: *default_float32
193
+ VAR_TYPE: support_data
194
+ CATDESC: Difference between the energy bin center and upper edge.
195
+ LABLAXIS: energy
196
+ UNITS: KeV
197
+ FIELDNAM: energy_bin_delta_plus
198
+ DISPLAY_TYPE: no_plot
199
+ DEPEND_1: energy_bin_geometric_mean