Skip to content

Commit 12cebdb

Browse files
committed
spase
1 parent 982f21f commit 12cebdb

File tree

3 files changed

+42
-4
lines changed

3 files changed

+42
-4
lines changed

imap_processing/cdf/config/imap_codice_l2-hi-direct-events_variable_attrs.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ priority:
1616
VALIDMIN: 0
1717
VALIDMAX: 7
1818
VAR_TYPE: support_data
19+
DICT_KEY: SPASE>Support>SupportQuantity:Other
1920

2021
event_num:
2122
CATDESC: Event Number
@@ -28,6 +29,7 @@ event_num:
2829
VALIDMIN: 0
2930
VALIDMAX: 10000
3031
VAR_TYPE: support_data
32+
DICT_KEY: SPASE>Support>SupportQuantity:Other
3133

3234
epoch_delta_minus:
3335
CATDESC: Time from acquisition start to acquisition center
@@ -74,6 +76,7 @@ num_events:
7476
VALIDMAX: 10000
7577
VALIDMIN: 0
7678
VAR_TYPE: data
79+
DICT_KEY: SPASE>Support>SupportQuantity:Other
7780

7881
data_quality:
7982
CATDESC: Data Quality Flag per Priority
@@ -89,6 +92,7 @@ data_quality:
8992
VALIDMAX: 255
9093
VALIDMIN: 0
9194
VAR_TYPE: data
95+
DICT_KEY: SPASE>Support>SupportQuantity:DataQuality
9296

9397
energy_step:
9498
CATDESC: Energy Step Index
@@ -106,6 +110,7 @@ energy_step:
106110
VALIDMAX: 127
107111
VALIDMIN: 0
108112
VAR_TYPE: data
113+
DICT_KEY: SPASE>Support>SupportQuantity:Other
109114

110115
energy_per_charge:
111116
CATDESC: Energy per Charge
@@ -123,6 +128,7 @@ energy_per_charge:
123128
VALIDMAX: 200.0
124129
VALIDMIN: 0.0
125130
VAR_TYPE: data
131+
DICT_KEY: SPASE>Particle>ParticleType:Ion,ParticleQuantity:EnergyPerCharge
126132

127133
gain:
128134
CATDESC: Gain Setting
@@ -140,6 +146,7 @@ gain:
140146
VALIDMAX: 1
141147
VALIDMIN: 0
142148
VAR_TYPE: data
149+
DICT_KEY: SPASE>Support>SupportQuantity:Other
143150

144151
multi_flag:
145152
CATDESC: Multiple Event Flag
@@ -157,6 +164,7 @@ multi_flag:
157164
VALIDMAX: 1
158165
VALIDMIN: 0
159166
VAR_TYPE: data
167+
DICT_KEY: SPASE>Support>SupportQuantity:DataQuality
160168

161169
type:
162170
CATDESC: Event Type
@@ -174,6 +182,7 @@ type:
174182
VALIDMAX: 4
175183
VALIDMIN: 0
176184
VAR_TYPE: data
185+
DICT_KEY: SPASE>Support>SupportQuantity:Other
177186

178187
tof:
179188
CATDESC: Time of Flight
@@ -191,6 +200,7 @@ tof:
191200
VALIDMAX: 1024.0
192201
VALIDMIN: 0.0
193202
VAR_TYPE: data
203+
DICT_KEY: SPASE>Particle>ParticleType:Ion,ParticleQuantity:TimeOfFlight
194204

195205
spin_sector:
196206
CATDESC: Spin Sector Index
@@ -208,6 +218,7 @@ spin_sector:
208218
VALIDMIN: 0
209219
VALIDMAX: 23
210220
VAR_TYPE: support_data
221+
DICT_KEY: SPASE>Support>SupportQuantity:Positional
211222

212223
spin_angle:
213224
VAR_TYPE: data
@@ -242,6 +253,8 @@ elevation_angle:
242253
VALIDMAX: 180.0
243254
VALIDMIN: 0.0
244255
VAR_TYPE: data
256+
DICT_KEY: SPASE>Particle>ParticleType:Ion,ParticleQuantity:ArrivalDirection,Qualifier:DirectionAngle.ElevationAngle
257+
245258
ssd_energy:
246259
CATDESC: SSD Energy
247260
DEPEND_0: epoch
@@ -258,6 +271,7 @@ ssd_energy:
258271
VALIDMAX: 512.0
259272
VALIDMIN: 0.0
260273
VAR_TYPE: data
274+
DICT_KEY: SPASE>Particle>ParticleType:Ion,ParticleQuantity:Energy
261275

262276
energy_per_nuc:
263277
CATDESC: Energy per Nucleon
@@ -275,6 +289,7 @@ energy_per_nuc:
275289
VALIDMAX: 200.0
276290
VALIDMIN: 0.0
277291
VAR_TYPE: data
292+
DICT_KEY: SPASE>Support>SupportQuantity:Other
278293

279294
ssd_id:
280295
CATDESC: SSD Identifier
@@ -292,6 +307,7 @@ ssd_id:
292307
VALIDMAX: 15
293308
VALIDMIN: 0
294309
VAR_TYPE: data
310+
DICT_KEY: SPASE>Support>SupportQuantity:Other
295311

296312
spin_number:
297313
CATDESC: Spin Number
@@ -309,6 +325,7 @@ spin_number:
309325
VALIDMAX: 4294967295
310326
VALIDMIN: 0
311327
VAR_TYPE: support_data
328+
DICT_KEY: SPASE>Support>SupportQuantity:Other
312329
# ------------------------------- labels -------------------------------
313330

314331
event_num_label:

imap_processing/cdf/config/imap_codice_l2-lo-direct-events_variable_attrs.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ num_events:
7272
VALIDMAX: 10000
7373
VALIDMIN: 0
7474
VAR_TYPE: data
75+
DICT_KEY: SPASE>Support>SupportQuantity:Other
7576

7677
data_quality:
7778
CATDESC: Data Quality Flag per Priority
@@ -87,6 +88,7 @@ data_quality:
8788
VALIDMAX: 255
8889
VALIDMIN: 0
8990
VAR_TYPE: data
91+
DICT_KEY: SPASE>Support>SupportQuantity:DataQuality
9092

9193
energy_step:
9294
CATDESC: Energy Step Index
@@ -104,6 +106,7 @@ energy_step:
104106
VALIDMAX: 127
105107
VALIDMIN: 0
106108
VAR_TYPE: data
109+
DICT_KEY: SPASE>Support>SupportQuantity:Other
107110

108111
energy_per_charge:
109112
CATDESC: Energy per Charge
@@ -121,6 +124,7 @@ energy_per_charge:
121124
VALIDMAX: 200.0
122125
VALIDMIN: 0.0
123126
VAR_TYPE: data
127+
DICT_KEY: SPASE>Particle>ParticleType:Ion,ParticleQuantity:EnergyPerCharge
124128

125129
apd_energy:
126130
CATDESC: APD Energy
@@ -138,6 +142,7 @@ apd_energy:
138142
VALIDMAX: 512.0
139143
VALIDMIN: 0.0
140144
VAR_TYPE: data
145+
DICT_KEY: SPASE>Particle>ParticleType:Ion,ParticleQuantity:Energy
141146

142147
gain:
143148
CATDESC: Gain Setting
@@ -155,6 +160,7 @@ gain:
155160
VALIDMAX: 1
156161
VALIDMIN: 0
157162
VAR_TYPE: data
163+
DICT_KEY: SPASE>Support>SupportQuantity:Other
158164

159165
apd_id:
160166
CATDESC: APD Identifier
@@ -172,6 +178,7 @@ apd_id:
172178
VALIDMAX: 31
173179
VALIDMIN: 0
174180
VAR_TYPE: data
181+
DICT_KEY: SPASE>Support>SupportQuantity:Other
175182

176183
position:
177184
CATDESC: Position Index
@@ -189,6 +196,7 @@ position:
189196
VALIDMAX: 31
190197
VALIDMIN: 0
191198
VAR_TYPE: data
199+
DICT_KEY: SPASE>Support>SupportQuantity:Other
192200

193201
multi_flag:
194202
CATDESC: Multiple Event Flag
@@ -206,6 +214,7 @@ multi_flag:
206214
VALIDMAX: 1
207215
VALIDMIN: 0
208216
VAR_TYPE: data
217+
DICT_KEY: SPASE>Support>SupportQuantity:DataQuality
209218

210219
type:
211220
CATDESC: Event Type
@@ -223,6 +232,7 @@ type:
223232
VALIDMAX: 4
224233
VALIDMIN: 0
225234
VAR_TYPE: data
235+
DICT_KEY: SPASE>Support>SupportQuantity:Other
226236

227237
tof:
228238
CATDESC: Time of Flight
@@ -240,6 +250,7 @@ tof:
240250
VALIDMAX: 1024.0
241251
VALIDMIN: 0.0
242252
VAR_TYPE: data
253+
DICT_KEY: SPASE>Particle>ParticleType:Ion,ParticleQuantity:TimeOfFlight
243254

244255
spin_sector:
245256
CATDESC: Spin Sector Index
@@ -257,6 +268,7 @@ spin_sector:
257268
VALIDMIN: 0
258269
VALIDMAX: 23
259270
VAR_TYPE: support_data
271+
DICT_KEY: SPASE>Support>SupportQuantity:Positional
260272

261273
spin_angle:
262274
VAR_TYPE: data
@@ -291,6 +303,7 @@ elevation_angle:
291303
VALIDMAX: 180.0
292304
VALIDMIN: 0.0
293305
VAR_TYPE: data
306+
DICT_KEY: SPASE>Particle>ParticleType:Ion,ParticleQuantity:ArrivalDirection,Qualifier:DirectionAngle.ElevationAngle
294307

295308
esa_step:
296309
CATDESC: Energy per charge (E/q) sweeping step
@@ -308,6 +321,7 @@ esa_step:
308321
VALIDMIN: 0
309322
VALIDMAX: 127
310323
VAR_TYPE: data
324+
DICT_KEY: SPASE>Support>SupportQuantity:Other
311325
# ------------------------------- labels -------------------------------
312326

313327
event_num_label:

imap_processing/codice/codice_l2.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,10 +1234,17 @@ def process_hi_direct_events(dependencies: ProcessingInputCollection) -> xr.Data
12341234
for var in l2_dataset.data_vars:
12351235
l2_dataset[var].attrs.update(cdf_attrs.get_variable_attributes(var))
12361236
# Update coord attributes
1237-
for coord in l2_dataset.coords:
1238-
l2_dataset[coord].attrs.update(
1239-
cdf_attrs.get_variable_attributes(coord), check_schema=False
1240-
)
1237+
l2_dataset["priority"].attrs.update(
1238+
cdf_attrs.get_variable_attributes("priority", check_schema=False)
1239+
)
1240+
l2_dataset["event_num"].attrs.update(
1241+
cdf_attrs.get_variable_attributes("event_num", check_schema=False)
1242+
)
1243+
l2_dataset["epoch"] = xr.DataArray(
1244+
l2_dataset["epoch"].data,
1245+
dims="epoch",
1246+
attrs=cdf_attrs.get_variable_attributes("epoch", check_schema=False),
1247+
)
12411248
# Add labels
12421249
l2_dataset["event_num_label"] = xr.DataArray(
12431250
l2_dataset["event_num"].values.astype(str).astype("<U5"),

0 commit comments

Comments
 (0)