imap-processing 0.8.0__py3-none-any.whl → 0.9.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/_version.py +2 -2
- imap_processing/ccsds/excel_to_xtce.py +2 -0
- imap_processing/cdf/config/imap_hi_variable_attrs.yaml +100 -1
- imap_processing/cdf/config/imap_hit_global_cdf_attrs.yaml +14 -0
- imap_processing/cdf/config/imap_hit_l1a_variable_attrs.yaml +63 -1
- imap_processing/cdf/config/imap_idex_global_cdf_attrs.yaml +7 -0
- imap_processing/cdf/config/imap_idex_l1a_variable_attrs.yaml +574 -231
- imap_processing/cdf/config/imap_idex_l1b_variable_attrs.yaml +326 -0
- imap_processing/cdf/config/imap_lo_l1a_variable_attrs.yaml +33 -23
- imap_processing/cdf/config/imap_ultra_l1b_variable_attrs.yaml +7 -4
- imap_processing/cdf/utils.py +3 -5
- imap_processing/cli.py +13 -4
- imap_processing/codice/codice_l1a.py +5 -5
- imap_processing/codice/constants.py +9 -9
- imap_processing/codice/decompress.py +6 -2
- imap_processing/glows/l1a/glows_l1a.py +1 -2
- imap_processing/hi/l1a/hi_l1a.py +4 -4
- imap_processing/hi/l1a/histogram.py +106 -108
- imap_processing/hi/l1a/science_direct_event.py +91 -224
- imap_processing/hi/packet_definitions/TLM_HI_COMBINED_SCI.xml +3994 -0
- imap_processing/hit/l0/constants.py +2 -2
- imap_processing/hit/l0/decom_hit.py +12 -101
- imap_processing/hit/l1a/hit_l1a.py +164 -23
- imap_processing/ialirt/l0/process_codicelo.py +153 -0
- imap_processing/ialirt/l0/process_hit.py +5 -5
- imap_processing/ialirt/packet_definitions/ialirt_codicelo.xml +281 -0
- imap_processing/ialirt/process_ephemeris.py +212 -0
- imap_processing/idex/idex_l1a.py +55 -75
- imap_processing/idex/idex_l1b.py +192 -0
- imap_processing/idex/idex_variable_unpacking_and_eu_conversion.csv +33 -0
- imap_processing/idex/packet_definitions/idex_packet_definition.xml +97 -595
- imap_processing/lo/l0/decompression_tables/decompression_tables.py +16 -0
- imap_processing/lo/l0/lo_science.py +44 -12
- imap_processing/lo/l1a/lo_l1a.py +76 -8
- imap_processing/lo/packet_definitions/lo_xtce.xml +9877 -87
- imap_processing/mag/l1a/mag_l1a.py +1 -2
- imap_processing/mag/l1a/mag_l1a_data.py +1 -2
- imap_processing/mag/l1b/mag_l1b.py +2 -1
- imap_processing/spice/geometry.py +37 -19
- imap_processing/spice/time.py +144 -2
- imap_processing/swapi/l1/swapi_l1.py +3 -3
- imap_processing/swapi/packet_definitions/swapi_packet_definition.xml +1535 -446
- imap_processing/swe/l2/swe_l2.py +134 -17
- imap_processing/tests/ccsds/test_data/expected_output.xml +1 -1
- imap_processing/tests/codice/test_codice_l1a.py +8 -8
- imap_processing/tests/codice/test_decompress.py +4 -4
- imap_processing/tests/conftest.py +46 -43
- imap_processing/tests/hi/test_data/l0/H90_NHK_20241104.bin +0 -0
- imap_processing/tests/hi/test_data/l0/H90_sci_cnt_20241104.bin +0 -0
- imap_processing/tests/hi/test_data/l0/H90_sci_de_20241104.bin +0 -0
- imap_processing/tests/hi/test_hi_l1b.py +2 -2
- imap_processing/tests/hi/test_l1a.py +31 -58
- imap_processing/tests/hi/test_science_direct_event.py +58 -0
- imap_processing/tests/hit/test_data/sci_sample1.ccsds +0 -0
- imap_processing/tests/hit/test_decom_hit.py +60 -50
- imap_processing/tests/hit/test_hit_l1a.py +327 -12
- imap_processing/tests/hit/test_hit_l1b.py +76 -0
- imap_processing/tests/hit/validation_data/hskp_sample_eu.csv +89 -0
- imap_processing/tests/hit/validation_data/sci_sample_raw1.csv +29 -0
- imap_processing/tests/ialirt/test_data/l0/apid01152.tlm +0 -0
- imap_processing/tests/ialirt/test_data/l0/imap_codice_l1a_lo-ialirt_20241110193700_v0.0.0.cdf +0 -0
- imap_processing/tests/ialirt/unit/test_process_codicelo.py +106 -0
- imap_processing/tests/ialirt/unit/test_process_ephemeris.py +109 -0
- imap_processing/tests/ialirt/unit/test_process_hit.py +9 -6
- imap_processing/tests/idex/conftest.py +1 -1
- imap_processing/tests/idex/test_idex_l0.py +1 -1
- imap_processing/tests/idex/test_idex_l1a.py +7 -1
- imap_processing/tests/idex/test_idex_l1b.py +126 -0
- imap_processing/tests/lo/test_lo_l1a.py +7 -16
- imap_processing/tests/lo/test_lo_science.py +67 -3
- imap_processing/tests/lo/test_pkts/imap_lo_l0_raw_20240803_v002.pkts +0 -0
- imap_processing/tests/lo/validation_data/Instrument_FM1_T104_R129_20240803_ILO_SCI_DE_dec_DN_with_fills.csv +1999 -0
- imap_processing/tests/mag/test_mag_l1b.py +39 -5
- imap_processing/tests/spice/test_geometry.py +32 -6
- imap_processing/tests/spice/test_time.py +135 -6
- imap_processing/tests/swapi/test_swapi_decom.py +75 -69
- imap_processing/tests/swapi/test_swapi_l1.py +4 -4
- imap_processing/tests/swe/test_swe_l2.py +64 -8
- imap_processing/tests/test_utils.py +1 -1
- imap_processing/tests/ultra/test_data/l0/ultra45_raw_sc_ultrarawimg_withFSWcalcs_FM45_40P_Phi28p5_BeamCal_LinearScan_phi2850_theta-000_20240207T102740.csv +3314 -3314
- imap_processing/tests/ultra/unit/test_de.py +8 -3
- imap_processing/tests/ultra/unit/test_spatial_utils.py +125 -0
- imap_processing/tests/ultra/unit/test_ultra_l1b_extended.py +39 -29
- imap_processing/tests/ultra/unit/test_ultra_l1c_pset_bins.py +2 -25
- imap_processing/ultra/constants.py +4 -0
- imap_processing/ultra/l1b/de.py +8 -14
- imap_processing/ultra/l1b/ultra_l1b_extended.py +29 -70
- imap_processing/ultra/l1c/ultra_l1c_pset_bins.py +1 -36
- imap_processing/ultra/utils/spatial_utils.py +221 -0
- {imap_processing-0.8.0.dist-info → imap_processing-0.9.0.dist-info}/METADATA +1 -1
- {imap_processing-0.8.0.dist-info → imap_processing-0.9.0.dist-info}/RECORD +94 -76
- imap_processing/hi/l0/__init__.py +0 -0
- imap_processing/hi/l0/decom_hi.py +0 -24
- imap_processing/hi/packet_definitions/hi_packet_definition.xml +0 -482
- imap_processing/tests/hi/test_decom.py +0 -55
- imap_processing/tests/hi/test_l1a_sci_de.py +0 -72
- {imap_processing-0.8.0.dist-info → imap_processing-0.9.0.dist-info}/LICENSE +0 -0
- {imap_processing-0.8.0.dist-info → imap_processing-0.9.0.dist-info}/WHEEL +0 -0
- {imap_processing-0.8.0.dist-info → imap_processing-0.9.0.dist-info}/entry_points.txt +0 -0
imap_processing/_version.py
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
# These version placeholders will be replaced later during substitution.
|
|
2
|
-
__version__ = "0.
|
|
3
|
-
__version_tuple__ = (0,
|
|
2
|
+
__version__ = "0.9.0"
|
|
3
|
+
__version_tuple__ = (0, 9, 0)
|
|
@@ -78,6 +78,7 @@ class XTCEGenerator:
|
|
|
78
78
|
"""
|
|
79
79
|
|
|
80
80
|
def __init__(self, path_to_excel_file: Path):
|
|
81
|
+
self.source_file = path_to_excel_file.name
|
|
81
82
|
# Read in all sheets from the excel file
|
|
82
83
|
self.sheets = pd.read_excel(path_to_excel_file, sheet_name=None)
|
|
83
84
|
# Set up the packet mapping from packetName to Apid
|
|
@@ -123,6 +124,7 @@ class XTCEGenerator:
|
|
|
123
124
|
].values[0]
|
|
124
125
|
)
|
|
125
126
|
header.attrib["author"] = "IMAP SDC"
|
|
127
|
+
header.attrib["source_file"] = self.source_file
|
|
126
128
|
|
|
127
129
|
# Create the TelemetryMetaData element
|
|
128
130
|
self._telemetry_metadata = Et.SubElement(root, "xtce:TelemetryMetaData")
|
|
@@ -55,6 +55,54 @@ default_float32_attrs: &default_float32
|
|
|
55
55
|
VALIDMAX: 3.4028235e+38
|
|
56
56
|
dtype: float32
|
|
57
57
|
|
|
58
|
+
default_ccsds_version: &default_ccsds_version
|
|
59
|
+
<<: *default_uint8
|
|
60
|
+
CATDESC: CCSDS packet version number
|
|
61
|
+
FIELDNAM: CCSDS version
|
|
62
|
+
VAR_TYPE: support_data
|
|
63
|
+
|
|
64
|
+
default_ccsds_type: &default_ccsds_type
|
|
65
|
+
<<: *default_uint8
|
|
66
|
+
CATDESC: CCSDS packet type
|
|
67
|
+
FIELDNAM: CCSDS type
|
|
68
|
+
VAR_TYPE: support_data
|
|
69
|
+
|
|
70
|
+
default_ccsds_sec_hdr_flg: &default_ccsds_sec_hdr_flg
|
|
71
|
+
<<: *default_uint8
|
|
72
|
+
CATDESC: CCSDS secondary header flag
|
|
73
|
+
FIELDNAM: CCSDS secondary header flag
|
|
74
|
+
VAR_TYPE: support_data
|
|
75
|
+
|
|
76
|
+
default_ccsds_pkt_apid: &default_ccsds_pkt_apid
|
|
77
|
+
<<: *default_uint16
|
|
78
|
+
CATDESC: CCSDS application process ID
|
|
79
|
+
FIELDNAM: CCSDS APID
|
|
80
|
+
VAR_TYPE: support_data
|
|
81
|
+
|
|
82
|
+
default_ccsds_seq_flgs: &default_ccsds_seq_flgs
|
|
83
|
+
<<: *default_uint8
|
|
84
|
+
CATDESC: CCSDS sequence flags
|
|
85
|
+
FIELDNAM: CCSDS sequence flags
|
|
86
|
+
VAR_TYPE: support_data
|
|
87
|
+
|
|
88
|
+
default_ccsds_src_seq_ctr: &default_ccsds_src_seq_ctr
|
|
89
|
+
<<: *default_uint16
|
|
90
|
+
CATDESC: CCSDS source sequence counter
|
|
91
|
+
FIELDNAM: CCSDS sequence counter
|
|
92
|
+
VAR_TYPE: support_data
|
|
93
|
+
|
|
94
|
+
default_ccsds_pkt_len: &default_ccsds_pkt_len
|
|
95
|
+
<<: *default_uint16
|
|
96
|
+
CATDESC: CCSDS packet length
|
|
97
|
+
FIELDNAM: CCSDS packet length
|
|
98
|
+
VAR_TYPE: support_data
|
|
99
|
+
|
|
100
|
+
default_ccsds_cksum: &default_ccsds_cksum
|
|
101
|
+
<<: *default_uint16
|
|
102
|
+
CATDESC: CCSDS packet checksum
|
|
103
|
+
FIELDNAM: CCSDS packet checksum
|
|
104
|
+
VAR_TYPE: support_data
|
|
105
|
+
|
|
58
106
|
default_ccsds_met: &hi_ccsds_met
|
|
59
107
|
<<: *default_uint32
|
|
60
108
|
CATDESC: CCSDS mission elapsed time (MET). 32-bit integer value that represents the MET in seconds.
|
|
@@ -78,12 +126,33 @@ hi_esa_step: &hi_esa_step
|
|
|
78
126
|
outer ESA surfaces.
|
|
79
127
|
|
|
80
128
|
# ======= L1A DE Section =======
|
|
129
|
+
hi_de_src_seq_ctr:
|
|
130
|
+
<<: *default_ccsds_src_seq_ctr
|
|
131
|
+
|
|
132
|
+
hi_de_pkt_len:
|
|
133
|
+
<<: *default_ccsds_pkt_len
|
|
134
|
+
|
|
81
135
|
hi_de_ccsds_met:
|
|
82
136
|
<<: *hi_ccsds_met
|
|
83
137
|
|
|
138
|
+
hi_de_last_spin_num:
|
|
139
|
+
<<: *default_uint8
|
|
140
|
+
CATDESC: Spin number (1-based) for the first spin in the packet
|
|
141
|
+
FIELDNAM: last spin
|
|
142
|
+
FORMAT: I2
|
|
143
|
+
LABLAXIS: last spin
|
|
144
|
+
VALIDMAX: 15
|
|
145
|
+
|
|
146
|
+
hi_de_spin_invalids:
|
|
147
|
+
<<: *default_uint8
|
|
148
|
+
CATDESC: Binary mask where a 1-bit indicates an invalid spin for coresponding spin in packet
|
|
149
|
+
FIELDNAM: spin flags
|
|
150
|
+
FORMAT: I3
|
|
151
|
+
LABLAXIS: spin flag
|
|
152
|
+
|
|
84
153
|
hi_de_de_tag:
|
|
85
154
|
<<: *default_uint16
|
|
86
|
-
CATDESC: Ticks (nominally
|
|
155
|
+
CATDESC: Ticks (nominally 1999us) since last meta-event
|
|
87
156
|
FIELDNAM: Direct Event Time Tag
|
|
88
157
|
LABLAXIS: DE Time Tag
|
|
89
158
|
|
|
@@ -178,12 +247,39 @@ hi_hist_angle:
|
|
|
178
247
|
VAR_TYPE: support_data
|
|
179
248
|
dtype: uint16
|
|
180
249
|
|
|
250
|
+
hi_hist_version:
|
|
251
|
+
<<: *default_ccsds_version
|
|
252
|
+
|
|
253
|
+
hi_hist_type:
|
|
254
|
+
<<: *default_ccsds_type
|
|
255
|
+
|
|
256
|
+
hi_hist_sec_hdr_flg:
|
|
257
|
+
<<: *default_ccsds_sec_hdr_flg
|
|
258
|
+
|
|
259
|
+
hi_hist_pkt_apid:
|
|
260
|
+
<<: *default_ccsds_pkt_apid
|
|
261
|
+
|
|
262
|
+
hi_hist_seq_flgs:
|
|
263
|
+
<<: *default_ccsds_seq_flgs
|
|
264
|
+
|
|
265
|
+
hi_hist_src_seq_ctr:
|
|
266
|
+
<<: *default_ccsds_src_seq_ctr
|
|
267
|
+
|
|
268
|
+
hi_hist_pkt_len:
|
|
269
|
+
<<: *default_ccsds_pkt_len
|
|
270
|
+
|
|
181
271
|
hi_hist_ccsds_met:
|
|
182
272
|
<<: *hi_ccsds_met
|
|
183
273
|
|
|
184
274
|
hi_hist_esa_step:
|
|
185
275
|
<<: *hi_esa_step
|
|
186
276
|
|
|
277
|
+
hi_hist_num_of_spins:
|
|
278
|
+
<<: *default_uint8
|
|
279
|
+
CATDESC: Number of spins included in histograms for this packet
|
|
280
|
+
FIELDNAM: Number of spins
|
|
281
|
+
LABLAXIS: Num spins
|
|
282
|
+
|
|
187
283
|
hi_hist_counters:
|
|
188
284
|
<<: *default_uint16
|
|
189
285
|
CATDESC: Angular histogram of {counter_name} type events
|
|
@@ -193,6 +289,9 @@ hi_hist_counters:
|
|
|
193
289
|
LABL_PTR_1: angle_label
|
|
194
290
|
FORMAT: I4
|
|
195
291
|
|
|
292
|
+
hi_hist_cksum:
|
|
293
|
+
<<: *default_ccsds_cksum
|
|
294
|
+
|
|
196
295
|
# ======= L1B DE Section =======
|
|
197
296
|
hi_de_coincidence_type:
|
|
198
297
|
<<: *default_uint8
|
|
@@ -18,6 +18,20 @@ imap_hit_l1a_hk:
|
|
|
18
18
|
Logical_source: imap_hit_l1a_hk
|
|
19
19
|
Logical_source_description: IMAP Mission HIT Instrument Level-1A Housekeeping Data.
|
|
20
20
|
|
|
21
|
+
imap_hit_l1a_count-rates:
|
|
22
|
+
<<: *instrument_base
|
|
23
|
+
Data_level: 1A
|
|
24
|
+
Data_type: L1A_counts>Level-1A Count Rates
|
|
25
|
+
Logical_source: imap_hit_l1a_count-rates
|
|
26
|
+
Logical_source_description: IMAP Mission HIT Instrument Level-1A Count Rates Data.
|
|
27
|
+
|
|
28
|
+
imap_hit_l1a_pulse-height-events:
|
|
29
|
+
<<: *instrument_base
|
|
30
|
+
Data_level: 1A
|
|
31
|
+
Data_type: L1A_pha>Level-1A Pulse Height Events
|
|
32
|
+
Logical_source: imap_hit_l1a_pulse-height-events
|
|
33
|
+
Logical_source_description: IMAP Mission HIT Instrument Level-1A Pulse Height Events Data.
|
|
34
|
+
|
|
21
35
|
# L1b
|
|
22
36
|
imap_hit_l1b_hk:
|
|
23
37
|
<<: *instrument_base
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# TODO: update label_axis and min/max with values provided by instrument team.
|
|
3
3
|
|
|
4
4
|
# <=== Defaults ===>
|
|
5
|
-
#
|
|
5
|
+
# Default values for variable attrs unless overwritten
|
|
6
6
|
default_attrs: &default
|
|
7
7
|
DEPEND_0: epoch
|
|
8
8
|
DISPLAY_TYPE: time_series
|
|
@@ -14,6 +14,24 @@ default_attrs: &default
|
|
|
14
14
|
UNITS: ' '
|
|
15
15
|
SCALETYP: linear
|
|
16
16
|
|
|
17
|
+
default_uint8_attrs: &default_uint8
|
|
18
|
+
<<: *default
|
|
19
|
+
FILLVAL: 255
|
|
20
|
+
FORMAT: I3
|
|
21
|
+
VALIDMIN: 0
|
|
22
|
+
VALIDMAX: 255
|
|
23
|
+
dtype: uint8
|
|
24
|
+
DEPEND_0: sc_tick
|
|
25
|
+
|
|
26
|
+
default_uint16_attrs: &default_uint16
|
|
27
|
+
<<: *default
|
|
28
|
+
FILLVAL: 65535
|
|
29
|
+
FORMAT: I5
|
|
30
|
+
VALIDMIN: 0
|
|
31
|
+
VALIDMAX: 65535
|
|
32
|
+
dtype: uint16
|
|
33
|
+
DEPEND_0: sc_tick
|
|
34
|
+
|
|
17
35
|
hk_support_attrs: &support_default
|
|
18
36
|
<<: *default
|
|
19
37
|
DISPLAY_TYPE: no_plot
|
|
@@ -46,6 +64,50 @@ adc_channels_label:
|
|
|
46
64
|
# <=== Data Variable Attributes ===>
|
|
47
65
|
#TODO is DEPEND_0 needed for no_plot variables in housekeeping?
|
|
48
66
|
|
|
67
|
+
# CCSDS header variables
|
|
68
|
+
version:
|
|
69
|
+
<<: *default_uint8
|
|
70
|
+
CATDESC: CCSDS packet version number
|
|
71
|
+
FIELDNAM: CCSDS version
|
|
72
|
+
VAR_TYPE: support_data
|
|
73
|
+
|
|
74
|
+
type:
|
|
75
|
+
<<: *default_uint8
|
|
76
|
+
CATDESC: CCSDS packet type
|
|
77
|
+
FIELDNAM: CCSDS type
|
|
78
|
+
VAR_TYPE: support_data
|
|
79
|
+
|
|
80
|
+
sec_hdr_flg:
|
|
81
|
+
<<: *default_uint8
|
|
82
|
+
CATDESC: CCSDS secondary header flag
|
|
83
|
+
FIELDNAM: CCSDS secondary header flag
|
|
84
|
+
VAR_TYPE: support_data
|
|
85
|
+
|
|
86
|
+
pkt_apid:
|
|
87
|
+
<<: *default_uint16
|
|
88
|
+
CATDESC: CCSDS application process ID
|
|
89
|
+
FIELDNAM: CCSDS APID
|
|
90
|
+
VAR_TYPE: support_data
|
|
91
|
+
|
|
92
|
+
seq_flgs:
|
|
93
|
+
<<: *default_uint8
|
|
94
|
+
CATDESC: CCSDS sequence flags
|
|
95
|
+
FIELDNAM: CCSDS sequence flags
|
|
96
|
+
VAR_TYPE: support_data
|
|
97
|
+
|
|
98
|
+
src_seq_ctr:
|
|
99
|
+
<<: *default_uint16
|
|
100
|
+
CATDESC: CCSDS source sequence counter
|
|
101
|
+
FIELDNAM: CCSDS sequence counter
|
|
102
|
+
VAR_TYPE: support_data
|
|
103
|
+
|
|
104
|
+
pkt_len:
|
|
105
|
+
<<: *default_uint16
|
|
106
|
+
CATDESC: CCSDS packet length
|
|
107
|
+
FIELDNAM: CCSDS packet length
|
|
108
|
+
VAR_TYPE: support_data
|
|
109
|
+
|
|
110
|
+
# Housekeeping variables
|
|
49
111
|
fsw_version_a:
|
|
50
112
|
<<: *support_default
|
|
51
113
|
VALIDMAX: 3
|
|
@@ -16,6 +16,13 @@ imap_idex_l1a_sci:
|
|
|
16
16
|
Logical_source: imap_idex_l1a_sci
|
|
17
17
|
Logical_source_description: IMAP Mission IDEX Instrument Level-1A Data.
|
|
18
18
|
|
|
19
|
+
imap_idex_l1b_sci:
|
|
20
|
+
<<: *instrument_base
|
|
21
|
+
Data_level: 1B
|
|
22
|
+
Data_type: L1B_SCI>Level-1B Science Data
|
|
23
|
+
Logical_source: imap_idex_l1b_sci
|
|
24
|
+
Logical_source_description: IMAP Mission IDEX Instrument Level-1B Data.
|
|
25
|
+
|
|
19
26
|
imap_idex_l2_sci:
|
|
20
27
|
<<: *instrument_base
|
|
21
28
|
Data_level: 2
|