imap-processing 0.7.0__py3-none-any.whl → 0.8.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.
- imap_processing/__init__.py +1 -1
- imap_processing/_version.py +2 -2
- imap_processing/ccsds/excel_to_xtce.py +34 -2
- imap_processing/cdf/config/imap_codice_global_cdf_attrs.yaml +1 -1
- imap_processing/cdf/config/imap_codice_l1a_variable_attrs.yaml +145 -30
- imap_processing/cdf/config/imap_glows_l1b_variable_attrs.yaml +36 -36
- imap_processing/cdf/config/imap_hi_variable_attrs.yaml +36 -8
- imap_processing/cdf/config/imap_hit_l1b_variable_attrs.yaml +9 -0
- imap_processing/cdf/config/imap_idex_global_cdf_attrs.yaml +7 -7
- imap_processing/cdf/config/imap_idex_l1a_variable_attrs.yaml +32 -33
- imap_processing/cdf/config/imap_mag_l1_variable_attrs.yaml +24 -28
- imap_processing/cdf/config/imap_ultra_l1a_variable_attrs.yaml +1 -0
- imap_processing/cdf/config/imap_ultra_l1b_variable_attrs.yaml +133 -78
- imap_processing/cdf/config/imap_variable_schema.yaml +13 -0
- imap_processing/cdf/imap_cdf_manager.py +31 -27
- imap_processing/cli.py +12 -10
- imap_processing/codice/codice_l1a.py +151 -61
- imap_processing/codice/constants.py +1 -1
- imap_processing/codice/decompress.py +4 -9
- imap_processing/codice/utils.py +1 -0
- imap_processing/glows/l1b/glows_l1b.py +3 -3
- imap_processing/glows/l1b/glows_l1b_data.py +59 -37
- imap_processing/glows/l2/glows_l2_data.py +123 -0
- imap_processing/hi/l1a/histogram.py +1 -1
- imap_processing/hi/l1a/science_direct_event.py +1 -1
- imap_processing/hi/l1b/hi_l1b.py +85 -11
- imap_processing/hi/l1c/hi_l1c.py +23 -1
- imap_processing/hi/utils.py +1 -1
- imap_processing/hit/hit_utils.py +221 -0
- imap_processing/hit/l0/constants.py +118 -0
- imap_processing/hit/l0/decom_hit.py +186 -153
- imap_processing/hit/l1a/hit_l1a.py +20 -175
- imap_processing/hit/l1b/hit_l1b.py +33 -153
- imap_processing/idex/idex_l1a.py +10 -9
- imap_processing/lo/l0/decompression_tables/decompression_tables.py +1 -1
- imap_processing/lo/l0/lo_science.py +1 -1
- imap_processing/lo/packet_definitions/lo_xtce.xml +1 -3296
- imap_processing/mag/l0/decom_mag.py +4 -3
- imap_processing/mag/l1a/mag_l1a.py +11 -11
- imap_processing/mag/l1b/mag_l1b.py +89 -7
- imap_processing/spice/geometry.py +126 -4
- imap_processing/swapi/l1/swapi_l1.py +1 -1
- imap_processing/swapi/l2/swapi_l2.py +1 -1
- imap_processing/swe/l1b/swe_l1b_science.py +8 -8
- imap_processing/tests/ccsds/test_data/expected_output.xml +1 -0
- imap_processing/tests/ccsds/test_excel_to_xtce.py +4 -4
- imap_processing/tests/cdf/test_imap_cdf_manager.py +0 -10
- imap_processing/tests/codice/conftest.py +1 -17
- imap_processing/tests/codice/data/imap_codice_l0_raw_20241110_v001.pkts +0 -0
- imap_processing/tests/codice/test_codice_l0.py +8 -2
- imap_processing/tests/codice/test_codice_l1a.py +127 -107
- imap_processing/tests/codice/test_codice_l1b.py +1 -0
- imap_processing/tests/codice/test_decompress.py +7 -7
- imap_processing/tests/conftest.py +54 -15
- imap_processing/tests/glows/conftest.py +6 -0
- imap_processing/tests/glows/test_glows_l1b.py +9 -9
- imap_processing/tests/glows/test_glows_l1b_data.py +9 -9
- imap_processing/tests/glows/test_glows_l2_data.py +0 -0
- imap_processing/tests/hi/test_data/l1a/imap_hi_l1a_45sensor-de_20250415_v000.cdf +0 -0
- imap_processing/tests/hi/test_hi_l1b.py +71 -1
- imap_processing/tests/hi/test_hi_l1c.py +10 -2
- imap_processing/tests/hi/test_utils.py +4 -3
- imap_processing/tests/hit/{test_hit_decom.py → test_decom_hit.py} +84 -35
- imap_processing/tests/hit/test_hit_l1a.py +2 -197
- imap_processing/tests/hit/test_hit_l1b.py +156 -25
- imap_processing/tests/hit/test_hit_utils.py +218 -0
- imap_processing/tests/idex/conftest.py +1 -1
- imap_processing/tests/idex/imap_idex_l0_raw_20231214_v001.pkts +0 -0
- imap_processing/tests/idex/impact_14_tof_high_data.txt +4444 -4444
- imap_processing/tests/idex/test_idex_l0.py +3 -3
- imap_processing/tests/idex/test_idex_l1a.py +1 -1
- imap_processing/tests/lo/test_lo_science.py +2 -2
- imap_processing/tests/mag/imap_mag_l1a_norm-magi_20251017_v001.cdf +0 -0
- imap_processing/tests/mag/test_mag_l1b.py +59 -3
- imap_processing/tests/spice/test_data/imap_ena_sim_metakernel.template +3 -1
- imap_processing/tests/spice/test_geometry.py +84 -4
- imap_processing/tests/swe/conftest.py +33 -0
- imap_processing/tests/swe/l1_validation/swe_l0_unpacked-data_20240510_v001_VALIDATION_L1B_v3.dat +4332 -0
- imap_processing/tests/swe/test_swe_l1b.py +29 -8
- imap_processing/tests/test_utils.py +1 -1
- imap_processing/tests/ultra/test_data/l1/dps_exposure_helio_45_E12.cdf +0 -0
- imap_processing/tests/ultra/test_data/l1/dps_exposure_helio_45_E24.cdf +0 -0
- imap_processing/tests/ultra/unit/test_de.py +108 -0
- imap_processing/tests/ultra/unit/test_ultra_l1b.py +27 -3
- imap_processing/tests/ultra/unit/test_ultra_l1b_annotated.py +31 -10
- imap_processing/tests/ultra/unit/test_ultra_l1b_extended.py +21 -11
- imap_processing/tests/ultra/unit/test_ultra_l1c_pset_bins.py +9 -44
- imap_processing/ultra/constants.py +8 -3
- imap_processing/ultra/l1b/de.py +174 -30
- imap_processing/ultra/l1b/ultra_l1b_annotated.py +24 -10
- imap_processing/ultra/l1b/ultra_l1b_extended.py +21 -14
- imap_processing/ultra/l1c/ultra_l1c_pset_bins.py +70 -119
- {imap_processing-0.7.0.dist-info → imap_processing-0.8.0.dist-info}/METADATA +15 -14
- {imap_processing-0.7.0.dist-info → imap_processing-0.8.0.dist-info}/RECORD +98 -113
- imap_processing/cdf/cdf_attribute_manager.py +0 -322
- imap_processing/cdf/config/shared/default_global_cdf_attrs_schema.yaml +0 -246
- imap_processing/cdf/config/shared/default_variable_cdf_attrs_schema.yaml +0 -466
- imap_processing/hit/l0/data_classes/housekeeping.py +0 -240
- imap_processing/hit/l0/data_classes/science_packet.py +0 -259
- imap_processing/hit/l0/utils/hit_base.py +0 -57
- imap_processing/tests/cdf/shared/default_global_cdf_attrs_schema.yaml +0 -246
- imap_processing/tests/cdf/shared/default_variable_cdf_attrs_schema.yaml +0 -466
- imap_processing/tests/cdf/test_cdf_attribute_manager.py +0 -353
- imap_processing/tests/codice/data/imap_codice_l0_hi-counters-aggregated_20240429_v001.pkts +0 -0
- imap_processing/tests/codice/data/imap_codice_l0_hi-counters-singles_20240429_v001.pkts +0 -0
- imap_processing/tests/codice/data/imap_codice_l0_hi-omni_20240429_v001.pkts +0 -0
- imap_processing/tests/codice/data/imap_codice_l0_hi-pha_20240429_v001.pkts +0 -0
- imap_processing/tests/codice/data/imap_codice_l0_hi-sectored_20240429_v001.pkts +0 -0
- imap_processing/tests/codice/data/imap_codice_l0_hskp_20100101_v001.pkts +0 -0
- imap_processing/tests/codice/data/imap_codice_l0_lo-counters-aggregated_20240429_v001.pkts +0 -0
- imap_processing/tests/codice/data/imap_codice_l0_lo-counters-singles_20240429_v001.pkts +0 -0
- imap_processing/tests/codice/data/imap_codice_l0_lo-nsw-angular_20240429_v001.pkts +0 -0
- imap_processing/tests/codice/data/imap_codice_l0_lo-nsw-priority_20240429_v001.pkts +0 -0
- imap_processing/tests/codice/data/imap_codice_l0_lo-nsw-species_20240429_v001.pkts +0 -0
- imap_processing/tests/codice/data/imap_codice_l0_lo-pha_20240429_v001.pkts +0 -0
- imap_processing/tests/codice/data/imap_codice_l0_lo-sw-angular_20240429_v001.pkts +0 -0
- imap_processing/tests/codice/data/imap_codice_l0_lo-sw-priority_20240429_v001.pkts +0 -0
- imap_processing/tests/codice/data/imap_codice_l0_lo-sw-species_20240429_v001.pkts +0 -0
- imap_processing/tests/idex/imap_idex_l0_raw_20230725_v001.pkts +0 -0
- imap_processing/tests/mag/imap_mag_l1a_burst-magi_20231025_v001.cdf +0 -0
- /imap_processing/tests/hit/test_data/{imap_hit_l0_hk_20100105_v001.pkts → imap_hit_l0_raw_20100105_v001.pkts} +0 -0
- {imap_processing-0.7.0.dist-info → imap_processing-0.8.0.dist-info}/LICENSE +0 -0
- {imap_processing-0.7.0.dist-info → imap_processing-0.8.0.dist-info}/WHEEL +0 -0
- {imap_processing-0.7.0.dist-info → imap_processing-0.8.0.dist-info}/entry_points.txt +0 -0
|
@@ -3,210 +3,265 @@ default_attrs: &default
|
|
|
3
3
|
DEPEND_0: epoch
|
|
4
4
|
DISPLAY_TYPE: time_series
|
|
5
5
|
FILLVAL: -9223372036854775808
|
|
6
|
-
FORMAT:
|
|
7
|
-
VALIDMIN:
|
|
6
|
+
FORMAT: I12
|
|
7
|
+
VALIDMIN: -9223372036854775808
|
|
8
8
|
VALIDMAX: 9223372036854775807
|
|
9
9
|
VAR_TYPE: data
|
|
10
|
+
UNITS: " "
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
default_uint8_attrs: &default_uint8
|
|
13
|
+
<<: *default
|
|
14
|
+
FILLVAL: 255
|
|
15
|
+
FORMAT: I3
|
|
16
|
+
VALIDMIN: 0
|
|
17
|
+
VALIDMAX: 255
|
|
18
|
+
dtype: uint8
|
|
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
|
+
default_uint32_attrs: &default_uint32
|
|
29
|
+
<<: *default
|
|
30
|
+
FILLVAL: 4294967295
|
|
31
|
+
FORMAT: I10
|
|
32
|
+
VALIDMIN: 0
|
|
33
|
+
VALIDMAX: 4294967295
|
|
34
|
+
dtype: uint32
|
|
35
|
+
|
|
36
|
+
default_int64_attrs: &default_int64
|
|
37
|
+
<<: *default
|
|
38
|
+
FILLVAL: -9223372036854775808
|
|
39
|
+
FORMAT: I20
|
|
40
|
+
VALIDMIN: -9223372036854775808
|
|
41
|
+
VALIDMAX: 9223372036854775807
|
|
42
|
+
dtype: int64
|
|
43
|
+
|
|
44
|
+
default_int32_attrs: &default_int32
|
|
45
|
+
<<: *default
|
|
46
|
+
FILLVAL: -2147483648
|
|
47
|
+
FORMAT: I10
|
|
48
|
+
VALIDMIN: -2147483648
|
|
49
|
+
VALIDMAX: 2147483647
|
|
50
|
+
dtype: int32
|
|
51
|
+
|
|
52
|
+
default_float32_attrs: &default_float32
|
|
12
53
|
<<: *default
|
|
54
|
+
FILLVAL: .NAN
|
|
55
|
+
FORMAT: F12.6
|
|
56
|
+
VALIDMIN: -3.4028235e+38
|
|
57
|
+
VALIDMAX: 3.4028235e+38
|
|
58
|
+
dtype: float32
|
|
59
|
+
|
|
60
|
+
x_front:
|
|
61
|
+
<<: *default_float32
|
|
13
62
|
CATDESC: x front position
|
|
14
63
|
FIELDNAM: Event x-position on front foil
|
|
15
64
|
LABLAXIS: x front position
|
|
16
|
-
|
|
17
|
-
UNITS: mm
|
|
65
|
+
UNITS: mm / 100
|
|
18
66
|
|
|
19
67
|
y_front:
|
|
20
|
-
<<: *
|
|
68
|
+
<<: *default_float32
|
|
21
69
|
CATDESC: y front position
|
|
22
70
|
FIELDNAM: Event y-position on front foil
|
|
23
71
|
LABLAXIS: y front position
|
|
24
|
-
|
|
25
|
-
UNITS: mm
|
|
72
|
+
UNITS: mm / 100
|
|
26
73
|
|
|
27
74
|
x_back:
|
|
28
|
-
<<: *
|
|
75
|
+
<<: *default_float32
|
|
29
76
|
CATDESC: x back position
|
|
30
77
|
FIELDNAM: x_back
|
|
31
78
|
LABLAXIS: x back position
|
|
32
|
-
|
|
33
|
-
UNITS: mm
|
|
79
|
+
UNITS: mm / 100
|
|
34
80
|
|
|
35
81
|
y_back:
|
|
36
|
-
<<: *
|
|
82
|
+
<<: *default_float32
|
|
37
83
|
CATDESC: y back position
|
|
38
84
|
FIELDNAM: y_back
|
|
39
85
|
LABLAXIS: y back position
|
|
40
|
-
|
|
41
|
-
UNITS: mm
|
|
86
|
+
UNITS: mm / 100
|
|
42
87
|
|
|
43
88
|
x_coin:
|
|
44
|
-
<<: *
|
|
89
|
+
<<: *default_float32
|
|
45
90
|
CATDESC: x coincidence position
|
|
46
91
|
FIELDNAM: x_coin
|
|
47
92
|
LABLAXIS: x coincidence position
|
|
48
|
-
|
|
49
|
-
UNITS: mm
|
|
93
|
+
UNITS: mm / 100
|
|
50
94
|
|
|
51
95
|
tof_start_stop:
|
|
52
|
-
<<: *
|
|
96
|
+
<<: *default_float32
|
|
53
97
|
CATDESC: Particle time of flight from start to stop
|
|
54
98
|
FIELDNAM: tof_start_stop
|
|
55
99
|
LABLAXIS: tof start stop
|
|
56
|
-
|
|
57
|
-
UNITS: ns
|
|
100
|
+
UNITS: nanosecond / 10
|
|
58
101
|
|
|
59
102
|
tof_stop_coin:
|
|
60
|
-
<<: *
|
|
103
|
+
<<: *default_float32
|
|
61
104
|
CATDESC: Particle time of flight from stop to coincidence
|
|
62
105
|
FIELDNAM: tof_stop_coin
|
|
63
106
|
LABLAXIS: tof stop coin
|
|
64
|
-
|
|
65
|
-
UNITS: ns
|
|
107
|
+
UNITS: nanosecond / 10
|
|
66
108
|
|
|
67
109
|
tof_corrected:
|
|
68
|
-
<<: *
|
|
110
|
+
<<: *default_float32
|
|
69
111
|
CATDESC: Corrected time of flight
|
|
70
112
|
FIELDNAM: tof_corrected
|
|
71
113
|
LABLAXIS: tof corrected
|
|
72
|
-
|
|
73
|
-
UNITS: ns
|
|
114
|
+
UNITS: nanosecond / 10
|
|
74
115
|
|
|
75
|
-
|
|
76
|
-
<<: *
|
|
116
|
+
event_type:
|
|
117
|
+
<<: *default_uint8
|
|
77
118
|
CATDESC: Eventtype (1-2 top and bottom stop types; 8-15 ssd stop types)
|
|
78
|
-
FIELDNAM:
|
|
79
|
-
LABLAXIS:
|
|
80
|
-
|
|
119
|
+
FIELDNAM: Event type
|
|
120
|
+
LABLAXIS: event type
|
|
121
|
+
UNITS: " "
|
|
122
|
+
|
|
123
|
+
coincidence_type:
|
|
124
|
+
<<: *default_uint8
|
|
125
|
+
CATDESC: Coincidence type for the direct event (1-2 top and bottom)
|
|
126
|
+
FIELDNAM: Coincidence type
|
|
127
|
+
LABLAXIS: coincidence type
|
|
128
|
+
UNITS: " "
|
|
129
|
+
|
|
130
|
+
start_type:
|
|
131
|
+
<<: *default_uint8
|
|
132
|
+
CATDESC: Start type for the direct event (1-2 left and right)
|
|
133
|
+
FIELDNAM: Start type
|
|
134
|
+
LABLAXIS: start type
|
|
81
135
|
UNITS: " "
|
|
82
136
|
|
|
83
137
|
vx_ultra:
|
|
84
|
-
<<: *
|
|
138
|
+
<<: *default_float32
|
|
85
139
|
CATDESC: Normalized component of the velocity vector in x direction in the instrument frame.
|
|
86
140
|
FIELDNAM: vx_ultra
|
|
87
141
|
LABLAXIS: vx ultra
|
|
88
|
-
# TODO: come back to format
|
|
89
142
|
UNITS: " "
|
|
90
143
|
|
|
91
144
|
vy_ultra:
|
|
92
|
-
<<: *
|
|
145
|
+
<<: *default_float32
|
|
93
146
|
CATDESC: Normalized component of the velocity vector in y direction in the instrument frame.
|
|
94
147
|
FIELDNAM: vy_ultra
|
|
95
148
|
LABLAXIS: vy ultra
|
|
96
|
-
# TODO: come back to format
|
|
97
149
|
UNITS: " "
|
|
98
150
|
|
|
99
151
|
vz_ultra:
|
|
100
|
-
<<: *
|
|
152
|
+
<<: *default_float32
|
|
101
153
|
CATDESC: Normalized component of the velocity vector in z direction in the instrument frame.
|
|
102
154
|
FIELDNAM: vz_ultra
|
|
103
155
|
LABLAXIS: vz ultra
|
|
104
|
-
# TODO: come back to format
|
|
105
156
|
UNITS: " "
|
|
106
157
|
|
|
107
158
|
energy:
|
|
108
|
-
<<: *
|
|
159
|
+
<<: *default_float32
|
|
109
160
|
CATDESC: Energy measured using the pulse height from the stop anode (DN) or Energy measured using the SSD (keV) depending on eventtype.
|
|
110
161
|
FIELDNAM: energy
|
|
111
162
|
LABLAXIS: energy
|
|
112
|
-
# TODO: come back to format
|
|
113
163
|
UNITS: keV
|
|
114
164
|
|
|
115
165
|
species:
|
|
116
|
-
<<: *
|
|
117
|
-
CATDESC: Species bin.
|
|
166
|
+
<<: *default_uint8
|
|
167
|
+
CATDESC: Species bin (0-255).
|
|
118
168
|
FIELDNAM: species
|
|
119
169
|
LABLAXIS: species
|
|
120
|
-
# TODO: come back to format
|
|
121
170
|
UNITS: " "
|
|
122
171
|
|
|
172
|
+
front_back_distance:
|
|
173
|
+
<<: *default_float32
|
|
174
|
+
CATDESC: Distance front to back.
|
|
175
|
+
FIELDNAM: front_back_distance
|
|
176
|
+
LABLAXIS: front_back_distance
|
|
177
|
+
UNITS: mm / 100
|
|
178
|
+
|
|
179
|
+
path_length:
|
|
180
|
+
<<: *default_float32
|
|
181
|
+
CATDESC: Path length.
|
|
182
|
+
FIELDNAM: path_length
|
|
183
|
+
LABLAXIS: path_length
|
|
184
|
+
UNITS: mm / 100
|
|
185
|
+
|
|
123
186
|
event_efficiency:
|
|
124
|
-
<<: *
|
|
187
|
+
<<: *default_float32
|
|
125
188
|
CATDESC: Estimated event efficiency for this path through the instrument.
|
|
126
189
|
FIELDNAM: event_efficiency
|
|
127
190
|
LABLAXIS: event efficiency
|
|
128
|
-
# TODO: come back to format
|
|
129
191
|
UNITS: " "
|
|
130
192
|
|
|
131
193
|
vx_sc:
|
|
132
|
-
<<: *
|
|
133
|
-
CATDESC:
|
|
194
|
+
<<: *default_float32
|
|
195
|
+
CATDESC: x-component of the velocity vector of the ena in the spacecraft frame.
|
|
134
196
|
FIELDNAM: vx_sc
|
|
135
197
|
LABLAXIS: vx sc
|
|
136
|
-
# TODO: come back to format
|
|
137
198
|
UNITS: " "
|
|
138
199
|
|
|
139
200
|
vy_sc:
|
|
140
|
-
<<: *
|
|
141
|
-
CATDESC:
|
|
201
|
+
<<: *default_float32
|
|
202
|
+
CATDESC: y-component of the velocity vector of the ena in the spacecraft frame.
|
|
142
203
|
FIELDNAM: vy_sc
|
|
143
204
|
LABLAXIS: vy sc
|
|
144
|
-
# TODO: come back to format
|
|
145
205
|
UNITS: " "
|
|
146
206
|
|
|
147
207
|
vz_sc:
|
|
148
|
-
<<: *
|
|
149
|
-
CATDESC:
|
|
208
|
+
<<: *default_float32
|
|
209
|
+
CATDESC: z-component of the velocity vector of the ena in the spacecraft frame.
|
|
150
210
|
FIELDNAM: vz_sc
|
|
151
211
|
LABLAXIS: vz sc
|
|
152
|
-
# TODO: come back to format
|
|
153
212
|
UNITS: " "
|
|
154
213
|
|
|
155
214
|
vx_dps_sc:
|
|
156
|
-
<<: *
|
|
157
|
-
CATDESC:
|
|
215
|
+
<<: *default_float32
|
|
216
|
+
CATDESC: x-component of the velocity vector of the ena in the DPS frame at rest WRT spacecraft.
|
|
158
217
|
FIELDNAM: vx_dps_sc
|
|
159
218
|
LABLAXIS: vx dps sc
|
|
160
|
-
# TODO: come back to format
|
|
161
219
|
UNITS: " "
|
|
162
220
|
|
|
163
221
|
vy_dps_sc:
|
|
164
|
-
<<: *
|
|
165
|
-
CATDESC:
|
|
222
|
+
<<: *default_float32
|
|
223
|
+
CATDESC: y-component of the velocity vector of the ena in the DPS frame at rest WRT spacecraft.
|
|
166
224
|
FIELDNAM: vy_dps_sc
|
|
167
225
|
LABLAXIS: vy dps sc
|
|
168
|
-
# TODO: come back to format
|
|
169
226
|
UNITS: " "
|
|
170
227
|
|
|
171
228
|
vz_dps_sc:
|
|
172
|
-
<<: *
|
|
173
|
-
CATDESC:
|
|
229
|
+
<<: *default_float32
|
|
230
|
+
CATDESC: z-component of the velocity vector of the ena in the DPS frame at rest WRT spacecraft.
|
|
174
231
|
FIELDNAM: vz_dps_sc
|
|
175
232
|
LABLAXIS: vz dps sc
|
|
176
|
-
# TODO: come back to format
|
|
177
233
|
UNITS: " "
|
|
178
234
|
|
|
179
235
|
vx_dps_helio:
|
|
180
|
-
<<: *
|
|
181
|
-
CATDESC:
|
|
236
|
+
<<: *default_float32
|
|
237
|
+
CATDESC: x-component of the velocity vector of the ena in the DPS frame at rest WRT heliosphere.
|
|
182
238
|
FIELDNAM: vx_dps_helio
|
|
183
239
|
LABLAXIS: vx dps helio
|
|
184
|
-
# TODO: come back to format
|
|
185
240
|
UNITS: " "
|
|
186
241
|
|
|
187
242
|
vy_dps_helio:
|
|
188
|
-
<<: *
|
|
189
|
-
CATDESC:
|
|
243
|
+
<<: *default_float32
|
|
244
|
+
CATDESC: y-component of the velocity vector of the ena in the DPS frame at rest WRT heliosphere.
|
|
190
245
|
FIELDNAM: vy_dps_helio
|
|
191
246
|
LABLAXIS: vy dps helio
|
|
192
|
-
# TODO: come back to format
|
|
193
247
|
UNITS: " "
|
|
194
248
|
|
|
195
249
|
vz_dps_helio:
|
|
196
|
-
<<: *
|
|
197
|
-
CATDESC:
|
|
250
|
+
<<: *default_float32
|
|
251
|
+
CATDESC: z-component of the velocity vector of the ena in the DPS frame at rest WRT heliosphere.
|
|
198
252
|
FIELDNAM: vz_dps_helio
|
|
199
253
|
LABLAXIS: vz dps helio
|
|
200
|
-
# TODO: come back to format
|
|
201
254
|
UNITS: " "
|
|
202
255
|
|
|
203
|
-
|
|
204
|
-
<<: *
|
|
205
|
-
CATDESC:
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
UNITS:
|
|
256
|
+
de_event_met:
|
|
257
|
+
<<: *default_int64
|
|
258
|
+
CATDESC: Mission Elapsed Time (MET) of Direct Event
|
|
259
|
+
DISPLAY_TYPE: no_plot
|
|
260
|
+
FIELDNAM: Mission Elapsed Time
|
|
261
|
+
LABLAXIS: DE MET
|
|
262
|
+
UNITS: ns
|
|
263
|
+
VAR_TYPE: support_data
|
|
264
|
+
SCALE_TYP: linear
|
|
210
265
|
|
|
211
266
|
spin_number:
|
|
212
267
|
<<: *default
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# This file acts as an overwrite option for the variable schema described by SAMMI.
|
|
2
|
+
# SAMMI generally has good defaults and its schema should be used, but this is a place
|
|
3
|
+
# to override those defaults if necessary.
|
|
4
|
+
|
|
5
|
+
# This is only required while issue #7 is incomplete.
|
|
6
|
+
attribute_key:
|
|
7
|
+
LABLAXIS:
|
|
8
|
+
description: >
|
|
9
|
+
should be a short character string (approximately 10 characters, but preferably 6 characters - more only if absolutely required for clarity) which can be used to label a y-axis for a plot or to provide a heading for a data listing.
|
|
10
|
+
Only one of LABLAXIS or LABL_PTR_i should be present.
|
|
11
|
+
required: false # not required if using LABL_PTR_i
|
|
12
|
+
valid_values: null
|
|
13
|
+
alternate: LABL_PTR_1
|
|
@@ -5,38 +5,31 @@ This class should be used in all cases, and should contain any IMAP specific ass
|
|
|
5
5
|
or code.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
from
|
|
9
|
-
from typing import Optional
|
|
8
|
+
from __future__ import annotations
|
|
10
9
|
|
|
11
|
-
from
|
|
10
|
+
from pathlib import Path
|
|
12
11
|
|
|
12
|
+
from sammi.cdf_attribute_manager import CdfAttributeManager
|
|
13
13
|
|
|
14
|
-
class ImapCdfAttributes(CdfAttributeManager):
|
|
15
|
-
"""
|
|
16
|
-
Contains IMAP specific tools and settings for CDF management.
|
|
17
14
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
source_dir : pathlib.Path or None
|
|
21
|
-
Source directory.
|
|
22
|
-
"""
|
|
15
|
+
class ImapCdfAttributes(CdfAttributeManager): # type: ignore [misc]
|
|
16
|
+
"""Contains IMAP specific tools and settings for CDF management."""
|
|
23
17
|
|
|
24
|
-
def __init__(self
|
|
25
|
-
"""
|
|
26
|
-
|
|
18
|
+
def __init__(self) -> None:
|
|
19
|
+
"""Set the path to the config directory."""
|
|
20
|
+
self.source_dir = Path(__file__).parent / "config"
|
|
27
21
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if source_dir is None:
|
|
34
|
-
super().__init__(Path(__file__).parent / "config")
|
|
35
|
-
else:
|
|
36
|
-
super().__init__(source_dir)
|
|
22
|
+
# TODO: Overwriting schema is not working.
|
|
23
|
+
super().__init__(
|
|
24
|
+
variable_schema_layers=[self.source_dir / "imap_variable_schema.yaml"],
|
|
25
|
+
use_defaults=True,
|
|
26
|
+
)
|
|
37
27
|
|
|
38
28
|
# Load constants attrs that everyone uses
|
|
39
|
-
self.load_variable_attributes("imap_constant_attrs.yaml")
|
|
29
|
+
self.load_variable_attributes(self.source_dir / "imap_constant_attrs.yaml")
|
|
30
|
+
self.load_global_attributes(
|
|
31
|
+
self.source_dir / "imap_default_global_cdf_attrs.yaml"
|
|
32
|
+
)
|
|
40
33
|
|
|
41
34
|
def add_instrument_global_attrs(self, instrument: str) -> None:
|
|
42
35
|
"""
|
|
@@ -48,9 +41,13 @@ class ImapCdfAttributes(CdfAttributeManager):
|
|
|
48
41
|
Instrument name.
|
|
49
42
|
"""
|
|
50
43
|
# Looks for file named "imap_{instrument}_global_cdf_attrs.yaml"
|
|
51
|
-
self.load_global_attributes(
|
|
44
|
+
self.load_global_attributes(
|
|
45
|
+
self.source_dir / f"imap_{instrument}_global_cdf_attrs.yaml"
|
|
46
|
+
)
|
|
52
47
|
|
|
53
|
-
def add_instrument_variable_attrs(
|
|
48
|
+
def add_instrument_variable_attrs(
|
|
49
|
+
self, instrument: str, level: str | None = None
|
|
50
|
+
) -> None:
|
|
54
51
|
"""
|
|
55
52
|
Add instrument specific variable attributes.
|
|
56
53
|
|
|
@@ -61,4 +58,11 @@ class ImapCdfAttributes(CdfAttributeManager):
|
|
|
61
58
|
level : str
|
|
62
59
|
Data level.
|
|
63
60
|
"""
|
|
64
|
-
|
|
61
|
+
if level is None:
|
|
62
|
+
self.load_variable_attributes(
|
|
63
|
+
self.source_dir / f"imap_{instrument}_variable_attrs.yaml"
|
|
64
|
+
)
|
|
65
|
+
else:
|
|
66
|
+
self.load_variable_attributes(
|
|
67
|
+
self.source_dir / f"imap_{instrument}_{level}_variable_attrs.yaml"
|
|
68
|
+
)
|
imap_processing/cli.py
CHANGED
|
@@ -551,19 +551,21 @@ class Hit(ProcessInstrument):
|
|
|
551
551
|
f"Unexpected dependencies found for HIT L1A:"
|
|
552
552
|
f"{dependencies}. Expected only one dependency."
|
|
553
553
|
)
|
|
554
|
-
# process data
|
|
554
|
+
# process data to L1A products
|
|
555
555
|
datasets = hit_l1a(dependencies[0], self.version)
|
|
556
556
|
|
|
557
557
|
elif self.data_level == "l1b":
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
558
|
+
data_dict = {}
|
|
559
|
+
for i, dependency in enumerate(dependencies):
|
|
560
|
+
if self.dependencies[i]["data_level"] == "l0":
|
|
561
|
+
# Add path to CCSDS file to process housekeeping
|
|
562
|
+
data_dict["imap_hit_l0_raw"] = dependency
|
|
563
|
+
else:
|
|
564
|
+
# Add L1A datasets to process science data
|
|
565
|
+
dataset = load_cdf(dependency)
|
|
566
|
+
data_dict[dataset.attrs["Logical_source"]] = dataset
|
|
567
|
+
# process data to L1B products
|
|
568
|
+
datasets = hit_l1b(data_dict, self.version)
|
|
567
569
|
|
|
568
570
|
return datasets
|
|
569
571
|
|