imap-processing 0.16.2__py3-none-any.whl → 0.18.0__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 (110) hide show
  1. imap_processing/_version.py +2 -2
  2. imap_processing/ccsds/excel_to_xtce.py +12 -0
  3. imap_processing/cdf/config/imap_codice_global_cdf_attrs.yaml +6 -6
  4. imap_processing/cdf/config/imap_codice_l1a_variable_attrs.yaml +35 -0
  5. imap_processing/cdf/config/imap_codice_l1b_variable_attrs.yaml +35 -0
  6. imap_processing/cdf/config/imap_codice_l2_variable_attrs.yaml +24 -0
  7. imap_processing/cdf/config/imap_hi_variable_attrs.yaml +8 -8
  8. imap_processing/cdf/config/imap_hit_global_cdf_attrs.yaml +1 -1
  9. imap_processing/cdf/config/imap_hit_l1a_variable_attrs.yaml +163 -100
  10. imap_processing/cdf/config/imap_hit_l2_variable_attrs.yaml +398 -415
  11. imap_processing/cdf/config/imap_ialirt_l1_variable_attrs.yaml +97 -54
  12. imap_processing/cdf/config/imap_idex_global_cdf_attrs.yaml +9 -9
  13. imap_processing/cdf/config/imap_idex_l2b_variable_attrs.yaml +233 -57
  14. imap_processing/cdf/config/imap_idex_l2c_variable_attrs.yaml +16 -90
  15. imap_processing/cdf/config/imap_lo_global_cdf_attrs.yaml +30 -0
  16. imap_processing/cdf/config/imap_mag_global_cdf_attrs.yaml +15 -1
  17. imap_processing/cdf/config/imap_swapi_variable_attrs.yaml +19 -0
  18. imap_processing/cdf/config/imap_swe_l1b_variable_attrs.yaml +20 -0
  19. imap_processing/cdf/config/imap_swe_l2_variable_attrs.yaml +39 -0
  20. imap_processing/cdf/config/imap_ultra_global_cdf_attrs.yaml +168 -0
  21. imap_processing/cdf/config/imap_ultra_l1a_variable_attrs.yaml +103 -2
  22. imap_processing/cdf/config/imap_ultra_l1b_variable_attrs.yaml +91 -11
  23. imap_processing/cdf/utils.py +7 -1
  24. imap_processing/cli.py +42 -13
  25. imap_processing/codice/codice_l1a.py +125 -78
  26. imap_processing/codice/codice_l1b.py +1 -1
  27. imap_processing/codice/codice_l2.py +0 -9
  28. imap_processing/codice/constants.py +481 -498
  29. imap_processing/hi/hi_l1a.py +4 -4
  30. imap_processing/hi/hi_l1b.py +2 -2
  31. imap_processing/hi/packet_definitions/TLM_HI_COMBINED_SCI.xml +218 -38
  32. imap_processing/hit/hit_utils.py +2 -2
  33. imap_processing/hit/l0/decom_hit.py +4 -3
  34. imap_processing/hit/l1a/hit_l1a.py +64 -24
  35. imap_processing/hit/l1b/constants.py +5 -0
  36. imap_processing/hit/l1b/hit_l1b.py +18 -16
  37. imap_processing/hit/l2/constants.py +1 -1
  38. imap_processing/hit/l2/hit_l2.py +4 -4
  39. imap_processing/ialirt/constants.py +21 -0
  40. imap_processing/ialirt/generate_coverage.py +188 -0
  41. imap_processing/ialirt/l0/parse_mag.py +62 -5
  42. imap_processing/ialirt/l0/process_swapi.py +1 -1
  43. imap_processing/ialirt/l0/process_swe.py +23 -7
  44. imap_processing/ialirt/utils/constants.py +22 -16
  45. imap_processing/ialirt/utils/create_xarray.py +42 -19
  46. imap_processing/idex/idex_constants.py +8 -5
  47. imap_processing/idex/idex_l2b.py +554 -58
  48. imap_processing/idex/idex_l2c.py +30 -196
  49. imap_processing/lo/l0/lo_apid.py +1 -0
  50. imap_processing/lo/l0/lo_star_sensor.py +48 -0
  51. imap_processing/lo/l1a/lo_l1a.py +74 -30
  52. imap_processing/lo/packet_definitions/lo_xtce.xml +5359 -106
  53. imap_processing/mag/constants.py +1 -0
  54. imap_processing/mag/l0/decom_mag.py +9 -6
  55. imap_processing/mag/l0/mag_l0_data.py +46 -0
  56. imap_processing/mag/l1d/__init__.py +0 -0
  57. imap_processing/mag/l1d/mag_l1d.py +133 -0
  58. imap_processing/mag/l1d/mag_l1d_data.py +588 -0
  59. imap_processing/mag/l2/__init__.py +0 -0
  60. imap_processing/mag/l2/mag_l2.py +25 -20
  61. imap_processing/mag/l2/mag_l2_data.py +191 -130
  62. imap_processing/quality_flags.py +20 -2
  63. imap_processing/spice/geometry.py +25 -3
  64. imap_processing/spice/pointing_frame.py +1 -1
  65. imap_processing/spice/spin.py +4 -0
  66. imap_processing/spice/time.py +51 -0
  67. imap_processing/swapi/l1/swapi_l1.py +12 -2
  68. imap_processing/swapi/l2/swapi_l2.py +59 -14
  69. imap_processing/swapi/swapi_utils.py +1 -1
  70. imap_processing/swe/l1b/swe_l1b.py +11 -4
  71. imap_processing/swe/l2/swe_l2.py +111 -17
  72. imap_processing/ultra/constants.py +49 -1
  73. imap_processing/ultra/l0/decom_tools.py +28 -14
  74. imap_processing/ultra/l0/decom_ultra.py +225 -15
  75. imap_processing/ultra/l0/ultra_utils.py +281 -8
  76. imap_processing/ultra/l1a/ultra_l1a.py +77 -8
  77. imap_processing/ultra/l1b/cullingmask.py +3 -3
  78. imap_processing/ultra/l1b/de.py +53 -15
  79. imap_processing/ultra/l1b/extendedspin.py +26 -2
  80. imap_processing/ultra/l1b/lookup_utils.py +171 -50
  81. imap_processing/ultra/l1b/quality_flag_filters.py +14 -0
  82. imap_processing/ultra/l1b/ultra_l1b_culling.py +198 -5
  83. imap_processing/ultra/l1b/ultra_l1b_extended.py +304 -66
  84. imap_processing/ultra/l1c/helio_pset.py +54 -7
  85. imap_processing/ultra/l1c/spacecraft_pset.py +9 -1
  86. imap_processing/ultra/l1c/ultra_l1c.py +2 -0
  87. imap_processing/ultra/l1c/ultra_l1c_pset_bins.py +106 -109
  88. imap_processing/ultra/packet_definitions/ULTRA_SCI_COMBINED.xml +3 -3
  89. imap_processing/ultra/utils/ultra_l1_utils.py +13 -1
  90. imap_processing/utils.py +20 -42
  91. {imap_processing-0.16.2.dist-info → imap_processing-0.18.0.dist-info}/METADATA +2 -2
  92. {imap_processing-0.16.2.dist-info → imap_processing-0.18.0.dist-info}/RECORD +95 -103
  93. imap_processing/lo/l0/data_classes/star_sensor.py +0 -98
  94. imap_processing/lo/l0/utils/lo_base.py +0 -57
  95. imap_processing/ultra/lookup_tables/Angular_Profiles_FM45_LeftSlit.csv +0 -526
  96. imap_processing/ultra/lookup_tables/Angular_Profiles_FM45_RightSlit.csv +0 -526
  97. imap_processing/ultra/lookup_tables/Angular_Profiles_FM90_LeftSlit.csv +0 -526
  98. imap_processing/ultra/lookup_tables/Angular_Profiles_FM90_RightSlit.csv +0 -524
  99. imap_processing/ultra/lookup_tables/EgyNorm.mem.csv +0 -32769
  100. imap_processing/ultra/lookup_tables/FM45_Startup1_ULTRA_IMGPARAMS_20240719.csv +0 -2
  101. imap_processing/ultra/lookup_tables/FM90_Startup1_ULTRA_IMGPARAMS_20240719.csv +0 -2
  102. imap_processing/ultra/lookup_tables/dps_grid45_compressed.cdf +0 -0
  103. imap_processing/ultra/lookup_tables/ultra45_back-pos-luts.csv +0 -4097
  104. imap_processing/ultra/lookup_tables/ultra45_tdc_norm.csv +0 -2050
  105. imap_processing/ultra/lookup_tables/ultra90_back-pos-luts.csv +0 -4097
  106. imap_processing/ultra/lookup_tables/ultra90_tdc_norm.csv +0 -2050
  107. imap_processing/ultra/lookup_tables/yadjust.csv +0 -257
  108. {imap_processing-0.16.2.dist-info → imap_processing-0.18.0.dist-info}/LICENSE +0 -0
  109. {imap_processing-0.16.2.dist-info → imap_processing-0.18.0.dist-info}/WHEEL +0 -0
  110. {imap_processing-0.16.2.dist-info → imap_processing-0.18.0.dist-info}/entry_points.txt +0 -0
@@ -29,6 +29,24 @@ imap_lo_l1a_spin:
29
29
  Logical_source: imap_lo_l1a_spin
30
30
  Logical_source_description: IMAP Mission IMAP-Lo Instrument Level-1A Data
31
31
 
32
+ imap_lo_l1a_nhk:
33
+ <<: *instrument_base
34
+ Data_type: L1A_star>Level-1A Nominal Housekeeping
35
+ Logical_source: imap_lo_l1a_nhk
36
+ Logical_source_description: IMAP Mission IMAP-Lo Instrument Level-1A Data
37
+
38
+ imap_lo_l1a_shk:
39
+ <<: *instrument_base
40
+ Data_type: L1A_star>Level-1A Static Housekeeping
41
+ Logical_source: imap_lo_l1a_shk
42
+ Logical_source_description: IMAP Mission IMAP-Lo Instrument Level-1A Data
43
+
44
+ imap_lo_l1a_pcc:
45
+ <<: *instrument_base
46
+ Data_type: L1A_star>Level-1A Pivot Platform
47
+ Logical_source: imap_lo_l1a_pcc
48
+ Logical_source_description: IMAP Mission IMAP-Lo Instrument Level-1A Data
49
+
32
50
  imap_lo_l1b_badtimes:
33
51
  <<: *instrument_base
34
52
  Data_type: L1B_badtimes>Level-1B Badtimes
@@ -65,6 +83,18 @@ imap_lo_l1b_prostar:
65
83
  Logical_source: imap_lo_l1b_prostar
66
84
  Logical_source_description: IMAP Mission IMAP-Lo Instrument Level-1B Data
67
85
 
86
+ imap_lo_l1b_nhk:
87
+ <<: *instrument_base
88
+ Data_type: L1B_star>Level-1B Nominal Housekeeping
89
+ Logical_source: imap_lo_l1b_nhk
90
+ Logical_source_description: IMAP Mission IMAP-Lo Instrument Level-1B Data
91
+
92
+ imap_lo_l1b_shk:
93
+ <<: *instrument_base
94
+ Data_type: L1B_star>Level-1B Static Housekeeping
95
+ Logical_source: imap_lo_l1b_shk
96
+ Logical_source_description: IMAP Mission IMAP-Lo Instrument Level-1B Data
97
+
68
98
  imap_lo_l1c_goodtimes:
69
99
  <<: *instrument_base
70
100
  Data_type: L1C_goodtimes>Level-1C Goodtimes List
@@ -97,4 +97,18 @@ imap_mag_l2_burst-dsrf:
97
97
  Data_type: L2_burst-dsrf>Level 2 burst rate data in DSRF
98
98
  Logical_source: imap_mag_l2_burst-dsrf
99
99
  Logical_source_description: IMAP Mission Burst Rate Instrument Level-2 Data in
100
- Despun Spacecraft Reference Frame.
100
+ Despun Spacecraft Reference Frame.
101
+
102
+ imap_mag_l2_norm-srf:
103
+ <<: *default
104
+ Data_type: L2_norm-srf>Level 2 normal rate data in SRF
105
+ Logical_source: imap_mag_l2_norm-srf
106
+ Logical_source_description: IMAP Mission Normal Rate Instrument Level-2 Data in
107
+ Spacecraft Reference Frame.
108
+
109
+ imap_mag_l2_burst-srf:
110
+ <<: *default
111
+ Data_type: L2_burst-srf>Level 2 burst rate data in SRF
112
+ Logical_source: imap_mag_l2_burst-srf
113
+ Logical_source_description: IMAP Mission Burst Rate Instrument Level-2 Data in
114
+ Spacecraft Reference Frame.
@@ -128,6 +128,25 @@ metadata_default: &metadata_default
128
128
  SCALETYP: linear
129
129
  DICT_KEY: SPASE>Support>SupportQuantity:Other
130
130
 
131
+ sci_start_time:
132
+ CATDESC: Start time of sweep
133
+ DEPEND_0: epoch
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
141
+ 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
+ DICT_KEY: "SPASE>Support>SupportQantity:Temporal"
149
+
131
150
  # Minimum attrs setting for HK data
132
151
  hk_attrs: &hk_attrs
133
152
  CATDESC: Housekeeping data
@@ -110,6 +110,26 @@ science_data:
110
110
  Metadata field acq_duration is 17 uint. Max value of uint17 is 131071.
111
111
  Dividing max counts by acq_duration gave validmax
112
112
 
113
+ counts_stat_uncert:
114
+ CATDESC: Counts statistical uncertainty
115
+ FIELDNAM: Counts Stats Uncertainty
116
+ DEPEND_0: epoch
117
+ DEPEND_1: esa_step
118
+ DEPEND_2: spin_sector
119
+ DEPEND_3: cem_id
120
+ LABL_PTR_1: esa_step_label
121
+ LABL_PTR_2: spin_sector_label
122
+ LABL_PTR_3: cem_id_label
123
+ DISPLAY_TYPE: spectrogram
124
+ FILLVAL: -1.0000000E+31
125
+ FORMAT: E19.5
126
+ UNITS: counts
127
+ VALIDMIN: 0.0
128
+ VALIDMAX: 1.7976931348623157e+308 # TODO: find actual value
129
+ VAR_TYPE: data
130
+ SCALETYP: linear
131
+ DICT_KEY: SPASE>Particle>ParticleType:Electron,ParticleQuantity:Counts,Qualifier:Uncertainty
132
+
113
133
  acquisition_time:
114
134
  CATDESC: Acquisition time organized by voltage step and spin sector
115
135
  DEPEND_0: epoch
@@ -221,6 +221,45 @@ flux:
221
221
  VAR_TYPE: data
222
222
  DICT_KEY: SPASE>Particle>ParticleType:Electron,ParticleQuantity:NumberFlux,Qualifier:Array
223
223
 
224
+ psd_stat_uncert:
225
+ CATDESC: Phase space density statistical uncertainty
226
+ FIELDNAM: Phase Space Density Stats Uncertainty
227
+ DEPEND_0: epoch
228
+ DEPEND_1: esa_step
229
+ DEPEND_2: spin_sector
230
+ DEPEND_3: cem_id
231
+ LABL_PTR_1: esa_step_label
232
+ LABL_PTR_2: spin_sector_label
233
+ LABL_PTR_3: cem_id_label
234
+ DISPLAY_TYPE: spectrogram
235
+ FILLVAL: -1.0000000E+31
236
+ FORMAT: E19.5
237
+ UNITS: counts
238
+ VALIDMIN: 0.0
239
+ VALIDMAX: 1.7976931348623157e+308 # TODO: find actual value
240
+ VAR_TYPE: data
241
+ SCALETYP: linear
242
+ DICT_KEY: SPASE>Particle>ParticleType:Electron,ParticleQuantity:Counts,Qualifier:Uncertainty
243
+
244
+ flux_stat_uncert:
245
+ CATDESC: Flux statistical uncertainty
246
+ FIELDNAM: Flux Stats Uncertainty
247
+ DEPEND_0: epoch
248
+ DEPEND_1: esa_step
249
+ DEPEND_2: spin_sector
250
+ DEPEND_3: cem_id
251
+ LABL_PTR_1: esa_step_label
252
+ LABL_PTR_2: spin_sector_label
253
+ LABL_PTR_3: cem_id_label
254
+ DISPLAY_TYPE: spectrogram
255
+ FILLVAL: -1.0000000E+31
256
+ FORMAT: E19.5
257
+ UNITS: counts
258
+ VALIDMIN: 0.0
259
+ VALIDMAX: 1.7976931348623157e+308 # TODO: find actual value
260
+ VAR_TYPE: data
261
+ SCALETYP: linear
262
+ DICT_KEY: SPASE>Particle>ParticleType:Electron,ParticleQuantity:Counts,Qualifier:Uncertainty
224
263
 
225
264
  acquisition_time:
226
265
  CATDESC: Acquisition time organized by ESA step and spin sector
@@ -32,6 +32,66 @@ imap_ultra_l1a_90sensor-histogram-ena-phxtof-hi-ang:
32
32
  Logical_source: imap_ultra_l1a_90sensor-histogram-ena-phxtof-hi-ang
33
33
  Logical_source_description: IMAP-Ultra Instrument Level-1A PHxTOF Hi Angular Data.
34
34
 
35
+ imap_ultra_l1a_45sensor-histogram-ena-phxtof-hi-nrg:
36
+ <<: *instrument_base
37
+ Data_type: L1A_Histogram>Level-1A TOF
38
+ Logical_source: imap_ultra_l1a_45sensor-histogram-ena-phxtof-hi-nrg
39
+ Logical_source_description: IMAP-Ultra Instrument Level-1A PHxTOF Hi Energy Data.
40
+
41
+ imap_ultra_l1a_90sensor-histogram-ena-phxtof-hi-nrg:
42
+ <<: *instrument_base
43
+ Data_type: L1A_Histogram>Level-1A TOF
44
+ Logical_source: imap_ultra_l1a_90sensor-histogram-ena-phxtof-hi-nrg
45
+ Logical_source_description: IMAP-Ultra Instrument Level-1A PHxTOF Hi Energy Data.
46
+
47
+ imap_ultra_l1a_45sensor-histogram-ena-phxtof-hi-time:
48
+ <<: *instrument_base
49
+ Data_type: L1A_Histogram>Level-1A TOF
50
+ Logical_source: imap_ultra_l1a_45sensor-histogram-ena-phxtof-hi-time
51
+ Logical_source_description: IMAP-Ultra Instrument Level-1A PHxTOF Hi Time Data.
52
+
53
+ imap_ultra_l1a_90sensor-histogram-ena-phxtof-hi-time:
54
+ <<: *instrument_base
55
+ Data_type: L1A_Histogram>Level-1A TOF
56
+ Logical_source: imap_ultra_l1a_90sensor-histogram-ena-phxtof-hi-time
57
+ Logical_source_description: IMAP-Ultra Instrument Level-1A PHxTOF Hi Time Data.
58
+
59
+ imap_ultra_l1a_45sensor-histogram-ena-extof-hi-ang:
60
+ <<: *instrument_base
61
+ Data_type: L1A_Histogram>Level-1A TOF
62
+ Logical_source: imap_ultra_l1a_45sensor-histogram-ena-extof-hi-ang
63
+ Logical_source_description: IMAP-Ultra Instrument Level-1A ExTOF Hi Angular Data.
64
+
65
+ imap_ultra_l1a_90sensor-histogram-ena-extof-hi-ang:
66
+ <<: *instrument_base
67
+ Data_type: L1A_Histogram>Level-1A TOF
68
+ Logical_source: imap_ultra_l1a_90sensor-histogram-ena-extof-hi-ang
69
+ Logical_source_description: IMAP-Ultra Instrument Level-1A ExTOF Hi Angular Data.
70
+
71
+ imap_ultra_l1a_45sensor-histogram-ena-extof-hi-time:
72
+ <<: *instrument_base
73
+ Data_type: L1A_Histogram>Level-1A ExTOF
74
+ Logical_source: imap_ultra_l1a_45sensor-histogram-ena-extof-hi-time
75
+ Logical_source_description: IMAP-Ultra Instrument Level-1A ExTOF Hi Time Data.
76
+
77
+ imap_ultra_l1a_90sensor-histogram-ena-extof-hi-time:
78
+ <<: *instrument_base
79
+ Data_type: L1A_Histogram>Level-1A ExTOF
80
+ Logical_source: imap_ultra_l1a_90sensor-histogram-ena-extof-hi-time
81
+ Logical_source_description: IMAP-Ultra Instrument Level-1A ExTOF Hi Time Data.
82
+
83
+ imap_ultra_l1a_45sensor-histogram-ena-extof-hi-nrg:
84
+ <<: *instrument_base
85
+ Data_type: L1A_Histogram>Level-1A ExTOF
86
+ Logical_source: imap_ultra_l1a_45sensor-histogram-ena-extof-hi-nrg
87
+ Logical_source_description: IMAP-Ultra Instrument Level-1A ExTOF Hi Energy Data.
88
+
89
+ imap_ultra_l1a_90sensor-histogram-ena-extof-hi-nrg:
90
+ <<: *instrument_base
91
+ Data_type: L1A_Histogram>Level-1A ExTOF
92
+ Logical_source: imap_ultra_l1a_90sensor-histogram-ena-extof-hi-nrg
93
+ Logical_source_description: IMAP-Ultra Instrument Level-1A ExTOF Hi Energy Data.
94
+
35
95
  imap_ultra_l1a_45sensor-rates:
36
96
  <<: *instrument_base
37
97
  Data_type: L1A_Rates>Level-1A Rates
@@ -44,6 +104,30 @@ imap_ultra_l1a_90sensor-rates:
44
104
  Logical_source: imap_ultra_l1a_90sensor-rates
45
105
  Logical_source_description: IMAP-Ultra Instrument Level-1A Rates Data.
46
106
 
107
+ imap_ultra_l1a_45sensor-energy-rates:
108
+ <<: *instrument_base
109
+ Data_type: L1A_Energy_Rates>Level-1A Energy Rates
110
+ Logical_source: imap_ultra_l1a_45sensor-energy-rates
111
+ Logical_source_description: IMAP-Ultra Instrument Level-1A Energy Rates Data.
112
+
113
+ imap_ultra_l1a_90sensor-energy-rates:
114
+ <<: *instrument_base
115
+ Data_type: L1A_Energy_Rates>Level-1A Energy Rates
116
+ Logical_source: imap_ultra_l1a_90sensor-energy-rates
117
+ Logical_source_description: IMAP-Ultra Instrument Level-1A Energy Rates Data.
118
+
119
+ imap_ultra_l1a_45sensor-energy-spectra:
120
+ <<: *instrument_base
121
+ Data_type: L1A_Energy_Spectra>Level-1A Energy Spectra
122
+ Logical_source: imap_ultra_l1a_45sensor-energy-spectra
123
+ Logical_source_description: IMAP-Ultra Instrument Level-1A Energy Spectra Data.
124
+
125
+ imap_ultra_l1a_90sensor-energy-spectra:
126
+ <<: *instrument_base
127
+ Data_type: L1A_Energy_Spectra>Level-1A Energy Spectra
128
+ Logical_source: imap_ultra_l1a_90sensor-energy-spectra
129
+ Logical_source_description: IMAP-Ultra Instrument Level-1A Energy Spectra Data.
130
+
47
131
  imap_ultra_l1a_45sensor-de:
48
132
  <<: *instrument_base
49
133
  Data_type: L1A_DE>Level-1A Direct Event
@@ -56,6 +140,66 @@ imap_ultra_l1a_90sensor-de:
56
140
  Logical_source: imap_ultra_l1a_90sensor-de
57
141
  Logical_source_description: IMAP-Ultra Instrument Level-1A Direct Event Data.
58
142
 
143
+ imap_ultra_l1a_45sensor-energy-de:
144
+ <<: *instrument_base
145
+ Data_type: L1A_ENERGY_DE>Level-1A Energy Direct Event
146
+ Logical_source: imap_ultra_l1a_45sensor-energy-de
147
+ Logical_source_description: IMAP-Ultra Instrument Level-1A Energy Direct Event Data.
148
+
149
+ imap_ultra_l1a_90sensor-energy-de:
150
+ <<: *instrument_base
151
+ Data_type: L1A_ENERGY_DE>Level-1A EnergyDirect Event
152
+ Logical_source: imap_ultra_l1a_90sensor-energy-de
153
+ Logical_source_description: IMAP-Ultra Instrument Level-1A Energy Direct Event Data.
154
+
155
+ imap_ultra_l1a_45sensor-priority-1-de:
156
+ <<: *instrument_base
157
+ Data_type: L1A_PRIORITY_1_DE>Level-1A Priority 1 Direct Event
158
+ Logical_source: imap_ultra_l1a_45sensor-priority-1-de
159
+ Logical_source_description: IMAP-Ultra Instrument Level-1A Priority 1 Direct Event Data.
160
+
161
+ imap_ultra_l1a_90sensor-priority-1-de:
162
+ <<: *instrument_base
163
+ Data_type: L1A_PRIORITY_1_DE>Level-1A Priority 1 Direct Event
164
+ Logical_source: imap_ultra_l1a_90sensor-priority-1-de
165
+ Logical_source_description: IMAP-Ultra Instrument Level-1A Priority 1 Direct Event Data.
166
+
167
+ imap_ultra_l1a_45sensor-priority-2-de:
168
+ <<: *instrument_base
169
+ Data_type: L1A_PRIORITY_2_DE>Level-1A Priority 2 Direct Event
170
+ Logical_source: imap_ultra_l1a_45sensor-priority-2-de
171
+ Logical_source_description: IMAP-Ultra Instrument Level-1A Priority 2 Direct Event Data.
172
+
173
+ imap_ultra_l1a_90sensor-priority-2-de:
174
+ <<: *instrument_base
175
+ Data_type: L1A_PRIORITY_2_DE>Level-1A Priority 2 Direct Event
176
+ Logical_source: imap_ultra_l1a_90sensor-priority-2-de
177
+ Logical_source_description: IMAP-Ultra Instrument Level-1A Priority 2 Direct Event Data.
178
+
179
+ imap_ultra_l1a_45sensor-priority-3-de:
180
+ <<: *instrument_base
181
+ Data_type: L1A_PRIORITY_3_DE>Level-1A Priority 3 Direct Event
182
+ Logical_source: imap_ultra_l1a_45sensor-priority-3-de
183
+ Logical_source_description: IMAP-Ultra Instrument Level-1A Priority 3 Direct Event Data.
184
+
185
+ imap_ultra_l1a_90sensor-priority-3-de:
186
+ <<: *instrument_base
187
+ Data_type: L1A_PRIORITY_3_DE>Level-1A Priority 3 Direct Event
188
+ Logical_source: imap_ultra_l1a_90sensor-priority-3-de
189
+ Logical_source_description: IMAP-Ultra Instrument Level-1A Priority 3 Direct Event Data.
190
+
191
+ imap_ultra_l1a_45sensor-priority-4-de:
192
+ <<: *instrument_base
193
+ Data_type: L1A_PRIORITY_4_DE>Level-1A Priority 4 Direct Event
194
+ Logical_source: imap_ultra_l1a_45sensor-priority-4-de
195
+ Logical_source_description: IMAP-Ultra Instrument Level-1A Priority 4 Direct Event Data.
196
+
197
+ imap_ultra_l1a_90sensor-priority-4-de:
198
+ <<: *instrument_base
199
+ Data_type: L1A_PRIORITY_4_DE>Level-1A Priority 4 Direct Event
200
+ Logical_source: imap_ultra_l1a_90sensor-priority-4-de
201
+ Logical_source_description: IMAP-Ultra Instrument Level-1A Priority 4 Direct Event Data.
202
+
59
203
  imap_ultra_l1b_45sensor-de:
60
204
  <<: *instrument_base
61
205
  Data_type: L1B_45Sensor-DE>Level-1B Direct Events for Ultra45
@@ -152,6 +296,18 @@ imap_ultra_l1a_90sensor-alarm:
152
296
  Logical_source: imap_ultra_l1a_90sensor-alarm
153
297
  Logical_source_description: IMAP-Ultra Instrument Level-1A Alarm Data for Ultra90.
154
298
 
299
+ imap_ultra_l1a_45sensor-cmdecho:
300
+ <<: *instrument_base
301
+ Data_type: L1A_CMDECHO>Level-1A Command Echo
302
+ Logical_source: imap_ultra_l1a_45sensor-cmdecho
303
+ Logical_source_description: IMAP-Ultra Instrument Level-1A Command Echo Data.
304
+
305
+ imap_ultra_l1a_90sensor-cmdecho:
306
+ <<: *instrument_base
307
+ Data_type: L1A_CMDECHO>Level-1A Command Echo
308
+ Logical_source: imap_ultra_l1a_90sensor-cmdecho
309
+ Logical_source_description: IMAP-Ultra Instrument Level-1A Command Echo Data.
310
+
155
311
  imap_ultra_l1a_45sensor-memchecksum:
156
312
  <<: *instrument_base
157
313
  Data_type: L1A_45Sensor-MemChecksum>Level-1A Memory Checksum for Ultra45
@@ -200,6 +356,18 @@ imap_ultra_l1a_90sensor-bootstatus:
200
356
  Logical_source: imap_ultra_l1a_90sensor-bootstatus
201
357
  Logical_source_description: IMAP-Ultra Instrument Level-1A Boot Status Data for Ultra90.
202
358
 
359
+ imap_ultra_l1a_45sensor-macroschecksum:
360
+ <<: *instrument_base
361
+ Data_type: L1A_45Sensor-MacroChecksum>Level-1A Macro Checksum for Ultra45
362
+ Logical_source: imap_ultra_l1a_45sensor-macroschecksum
363
+ Logical_source_description: IMAP-Ultra Instrument Level-1A Macro Checksum Data for Ultra45.
364
+
365
+ imap_ultra_l1a_90sensor-macroschecksum:
366
+ <<: *instrument_base
367
+ Data_type: L1A_90Sensor-MacroChecksum>Level-1A Macro Checksum for Ultra90
368
+ Logical_source: imap_ultra_l1a_90sensor-macroschecksum
369
+ Logical_source_description: IMAP-Ultra Instrument Level-1A Macro Checksum Data for Ultra90.
370
+
203
371
  imap_ultra_l1a_45sensor-macrodump:
204
372
  <<: *instrument_base
205
373
  Data_type: L1A_45Sensor-MacroDump>Level-1A Macro Dump for Ultra45
@@ -83,6 +83,86 @@ sid:
83
83
  UNITS: " "
84
84
  DEPEND_0: epoch
85
85
 
86
+ ssd_sum:
87
+ <<: *default_uint32
88
+ CATDESC: SSD Energy Sum.
89
+ FIELDNAM: ssd_sum
90
+ LABLAXIS: ssd energy sum
91
+ UNITS: " "
92
+ DEPEND_0: epoch
93
+
94
+ ssd0_energy_led:
95
+ <<: *default_uint32
96
+ CATDESC: SSD0 Energy LED.
97
+ FIELDNAM: ssd0_energy_led
98
+ LABLAXIS: ssd0 energy led
99
+ UNITS: " "
100
+ DEPEND_0: epoch
101
+
102
+ ssd1_energy_led:
103
+ <<: *default_uint32
104
+ CATDESC: SSD1 Energy LED.
105
+ FIELDNAM: ssd1_energy_led
106
+ LABLAXIS: ssd1 energy led
107
+ UNITS: " "
108
+ DEPEND_0: epoch
109
+
110
+ ssd2_energy_led:
111
+ <<: *default_uint32
112
+ CATDESC: SSD2 Energy LED.
113
+ FIELDNAM: ssd2_energy_led
114
+ LABLAXIS: ssd2 energy led
115
+ UNITS: " "
116
+ DEPEND_0: epoch
117
+
118
+ ssd3_energy_led:
119
+ <<: *default_uint32
120
+ CATDESC: SSD3 Energy LED.
121
+ FIELDNAM: ssd3_energy_led
122
+ LABLAXIS: ssd3 energy led
123
+ UNITS: " "
124
+ DEPEND_0: epoch
125
+
126
+ ssd4_energy_led:
127
+ <<: *default_uint32
128
+ CATDESC: SSD4 Energy LED.
129
+ FIELDNAM: ssd4_energy_led
130
+ LABLAXIS: ssd4 energy led
131
+ UNITS: " "
132
+ DEPEND_0: epoch
133
+
134
+ ssd5_energy_led:
135
+ <<: *default_uint32
136
+ CATDESC: SSD5 Energy LED.
137
+ FIELDNAM: ssd5_energy_led
138
+ LABLAXIS: ssd5 energy led
139
+ UNITS: " "
140
+ DEPEND_0: epoch
141
+
142
+ ssd6_energy_led:
143
+ <<: *default_uint32
144
+ CATDESC: SSD6 Energy LED.
145
+ FIELDNAM: ssd6_energy_led
146
+ LABLAXIS: ssd6 energy led
147
+ UNITS: " "
148
+ DEPEND_0: epoch
149
+
150
+ ssd7_energy_led:
151
+ <<: *default_uint32
152
+ CATDESC: SSD7 Energy LED.
153
+ FIELDNAM: ssd7_energy_led
154
+ LABLAXIS: ssd7 energy led
155
+ UNITS: " "
156
+ DEPEND_0: epoch
157
+
158
+ processed_events:
159
+ <<: *default_uint32
160
+ CATDESC: Processed Events.
161
+ FIELDNAM: processed_events
162
+ LABLAXIS: processed events
163
+ UNITS: " "
164
+ DEPEND_0: epoch
165
+
86
166
  spin:
87
167
  <<: *default_uint32
88
168
  CATDESC: Spin number.
@@ -1131,6 +1211,14 @@ alarmid:
1131
1211
  UNITS: ' '
1132
1212
  DEPEND_0: epoch
1133
1213
 
1214
+ arguments:
1215
+ <<: *default_uint8
1216
+ CATDESC: Arguments
1217
+ FIELDNAM: arguments
1218
+ LABLAXIS: arguments
1219
+ UNITS: ' '
1220
+ DEPEND_0: epoch
1221
+
1134
1222
  aux:
1135
1223
  <<: *default_float32
1136
1224
  CATDESC: Aux
@@ -1283,6 +1371,14 @@ cause:
1283
1371
  UNITS: ' '
1284
1372
  DEPEND_0: epoch
1285
1373
 
1374
+ checksum:
1375
+ <<: *default_uint16
1376
+ CATDESC: Checksums
1377
+ FIELDNAM: checksums
1378
+ LABLAXIS: checksums
1379
+ UNITS: ' '
1380
+ DEPEND_0: epoch
1381
+
1286
1382
  checksums:
1287
1383
  <<: *default_float32
1288
1384
  CATDESC: Checksums
@@ -1484,7 +1580,6 @@ diagnosticmode:
1484
1580
  DEPEND_0: epoch
1485
1581
 
1486
1582
  dumpdata:
1487
- <<: *default_float32
1488
1583
  CATDESC: Dumpdata
1489
1584
  FIELDNAM: dumpdata
1490
1585
  LABLAXIS: dumpdata
@@ -2707,7 +2802,6 @@ macroblocks:
2707
2802
  DEPEND_0: epoch
2708
2803
 
2709
2804
  macrodata:
2710
- <<: *default_float32
2711
2805
  CATDESC: Macrodata
2712
2806
  FIELDNAM: macrodata
2713
2807
  LABLAXIS: macrodata
@@ -2946,6 +3040,13 @@ result:
2946
3040
  UNITS: ' '
2947
3041
  DEPEND_0: epoch
2948
3042
 
3043
+ result_description:
3044
+ CATDESC: Result description
3045
+ FIELDNAM: result_description
3046
+ LABLAXIS: result description
3047
+ UNITS: ' '
3048
+ DEPEND_0: epoch
3049
+
2949
3050
  rightdeflection_v:
2950
3051
  <<: *default_float32
2951
3052
  CATDESC: Rightdeflection v
@@ -256,6 +256,20 @@ theta:
256
256
  LABLAXIS: theta
257
257
  UNITS: degrees
258
258
 
259
+ geometric_factor_blades:
260
+ <<: *default_float32
261
+ CATDESC: Ultra sensitive area within the field of view.
262
+ FIELDNAM: geometric_function_blades
263
+ LABLAXIS: geometric function blades
264
+ UNITS: " "
265
+
266
+ geometric_factor_noblades:
267
+ <<: *default_float32
268
+ CATDESC: Ultra sensitive area within the field of regard.
269
+ FIELDNAM: geometric_function_noblades
270
+ LABLAXIS: geometric function noblades
271
+ UNITS: " "
272
+
259
273
  phi_fwhm:
260
274
  <<: *default_float32
261
275
  CATDESC: FWHM of the phi distribution.
@@ -334,7 +348,8 @@ spin_start_time:
334
348
  LABLAXIS: spin start time
335
349
  # TODO: come back to format
336
350
  UNITS: s
337
- DEPEND_0: spin_number
351
+ DEPEND_0: epoch
352
+ DEPEND_1: spin_number
338
353
 
339
354
  spin_period:
340
355
  <<: *default
@@ -342,7 +357,8 @@ spin_period:
342
357
  FIELDNAM: spin_period
343
358
  LABLAXIS: spin_period
344
359
  UNITS: s
345
- DEPEND_0: spin_number
360
+ DEPEND_0: epoch
361
+ DEPEND_1: spin_number
346
362
 
347
363
  spin_rate:
348
364
  <<: *default
@@ -350,7 +366,8 @@ spin_rate:
350
366
  FIELDNAM: spin_rate
351
367
  LABLAXIS: spin_rate
352
368
  UNITS: rpm
353
- DEPEND_0: spin_number
369
+ DEPEND_0: epoch
370
+ DEPEND_1: spin_number
354
371
 
355
372
  rate_start_pulses:
356
373
  <<: *default
@@ -397,9 +414,46 @@ ena_rates:
397
414
  <<: *default_float32
398
415
  CATDESC: Rates calculated from de packet.
399
416
  FIELDNAM: ena_rates
400
- LABLAXIS: ena_rates
401
- DEPEND_0: spin_number
402
- DEPEND_1: energy_bin_geometric_mean
417
+ LABLAXIS: ena rates
418
+ DEPEND_0: epoch
419
+ DEPEND_1: spin_number
420
+ DEPEND_2: energy_bin_geometric_mean
421
+ UNITS: " "
422
+
423
+ start_pulses_per_spin:
424
+ <<: *default_float32
425
+ CATDESC: Total start pulses per spin.
426
+ FIELDNAM: start_pulses_per_spin
427
+ LABLAXIS: start pulses per spin
428
+ DEPEND_0: epoch
429
+ DEPEND_1: spin_number
430
+ UNITS: " "
431
+
432
+ stop_pulses_per_spin:
433
+ <<: *default_float32
434
+ CATDESC: Total start pulses per spin.
435
+ FIELDNAM: stop_pulses_per_spin
436
+ LABLAXIS: stop pulses per spin
437
+ DEPEND_0: epoch
438
+ DEPEND_1: spin_number
439
+ UNITS: " "
440
+
441
+ coin_pulses_per_spin:
442
+ <<: *default_float32
443
+ CATDESC: Total coincidence pulses per spin.
444
+ FIELDNAM: coin_pulses_per_spin
445
+ LABLAXIS: coin_pulses_per_spin
446
+ DEPEND_0: epoch
447
+ DEPEND_1: spin_number
448
+ UNITS: " "
449
+
450
+ rejected_events_per_spin:
451
+ <<: *default_uint16
452
+ CATDESC: Rejected events per spin.
453
+ FIELDNAM: rejected_events_per_spin
454
+ LABLAXIS: rejected events per spin
455
+ DEPEND_0: epoch
456
+ DEPEND_1: spin_number
403
457
  UNITS: " "
404
458
 
405
459
  ena_rates_threshold:
@@ -407,8 +461,9 @@ ena_rates_threshold:
407
461
  CATDESC: Rates threshold used for flagging data.
408
462
  FIELDNAM: ena_rates_threshold
409
463
  LABLAXIS: ena_rates_threshold
410
- DEPEND_0: spin_number
411
- DEPEND_1: energy_bin_geometric_mean
464
+ DEPEND_0: epoch
465
+ DEPEND_1: spin_number
466
+ DEPEND_2: energy_bin_geometric_mean
412
467
  UNITS: " "
413
468
 
414
469
  quality_ena_rates:
@@ -416,8 +471,9 @@ quality_ena_rates:
416
471
  CATDESC: Spin filter derived from Ultra ena rates. Bitwise flagging used to filter the spin.
417
472
  FIELDNAM: quality_ena_rates
418
473
  LABLAXIS: quality_ena_rates
419
- DEPEND_0: spin_number
420
- DEPEND_1: energy_bin_geometric_mean
474
+ DEPEND_0: epoch
475
+ DEPEND_1: spin_number
476
+ DEPEND_2: energy_bin_geometric_mean
421
477
  UNITS: " "
422
478
 
423
479
  quality_attitude:
@@ -427,7 +483,9 @@ quality_attitude:
427
483
  LABLAXIS: quality attitude
428
484
  # TODO: come back to format
429
485
  UNITS: " "
430
- DEPEND_0: spin_number
486
+ DEPEND_0: epoch
487
+ DEPEND_1: spin_number
488
+ DEPEND_2: energy_bin_geometric_mean
431
489
 
432
490
  quality_instruments:
433
491
  <<: *default_uint16
@@ -436,3 +494,25 @@ quality_instruments:
436
494
  LABLAXIS: quality instruments
437
495
  # TODO: come back to format
438
496
  UNITS: " "
497
+ DEPEND_0: epoch
498
+ DEPEND_1: spin_number
499
+ DEPEND_2: energy_bin_geometric_mean
500
+
501
+ quality_hk:
502
+ <<: *default_uint16
503
+ CATDESC: Spin filter derived from housekeeping data. Bitwise flagging used to filter the spin.
504
+ FIELDNAM: quality_hk
505
+ LABLAXIS: quality hk
506
+ # TODO: come back to format
507
+ UNITS: " "
508
+ DEPEND_0: epoch
509
+ DEPEND_1: spin_number
510
+ DEPEND_2: energy_bin_geometric_mean
511
+
512
+ quality_fov:
513
+ <<: *default_uint16
514
+ CATDESC: Quality flag for direct event for events outside of the FOV.
515
+ FIELDNAM: quality_fov
516
+ LABLAXIS: quality fov
517
+ # TODO: come back to format
518
+ UNITS: " "
@@ -44,7 +44,11 @@ def load_cdf(
44
44
  if isinstance(file_path, imap_data_access.ImapFilePath):
45
45
  file_path = file_path.construct_path()
46
46
 
47
- dataset = cdf_to_xarray(file_path, kwargs)
47
+ # By default, do not convert epoch to datetime64. This ensures that the
48
+ # round-trip of writing and then loading a cdf keeps the dataset the same.
49
+ if "to_datetime" not in kwargs:
50
+ kwargs["to_datetime"] = False # type: ignore
51
+ dataset = cdf_to_xarray(file_path, **kwargs)
48
52
 
49
53
  # cdf_to_xarray converts single-value attributes to lists
50
54
  # convert these back to single values where applicable
@@ -154,6 +158,8 @@ def write_cdf(
154
158
  extra_cdf_kwargs["terminate_on_warning"] = True # type: ignore
155
159
  if "istp" not in extra_cdf_kwargs:
156
160
  extra_cdf_kwargs["istp"] = True # type: ignore
161
+ if "compression" not in extra_cdf_kwargs:
162
+ extra_cdf_kwargs["compression"] = 6 # type: ignore
157
163
 
158
164
  xarray_to_cdf(dataset, str(file_path), **extra_cdf_kwargs)
159
165
  return file_path