imap-processing 0.12.0__py3-none-any.whl → 0.13.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 -0
- imap_processing/_version.py +2 -2
- imap_processing/ccsds/ccsds_data.py +1 -2
- imap_processing/ccsds/excel_to_xtce.py +1 -2
- imap_processing/cdf/config/imap_codice_global_cdf_attrs.yaml +18 -12
- imap_processing/cdf/config/imap_codice_l1a_variable_attrs.yaml +569 -0
- imap_processing/cdf/config/imap_codice_l1b_variable_attrs.yaml +1846 -128
- imap_processing/cdf/config/imap_hit_global_cdf_attrs.yaml +5 -5
- imap_processing/cdf/config/imap_idex_global_cdf_attrs.yaml +20 -1
- imap_processing/cdf/config/imap_idex_l1a_variable_attrs.yaml +6 -4
- imap_processing/cdf/config/imap_idex_l1b_variable_attrs.yaml +3 -3
- imap_processing/cdf/config/imap_mag_global_cdf_attrs.yaml +15 -0
- imap_processing/cdf/config/imap_swapi_variable_attrs.yaml +22 -0
- imap_processing/cdf/config/imap_swe_l1b_variable_attrs.yaml +16 -0
- imap_processing/cdf/config/imap_ultra_global_cdf_attrs.yaml +178 -5
- imap_processing/cdf/config/imap_ultra_l1a_variable_attrs.yaml +5045 -41
- imap_processing/cdf/config/imap_ultra_l1b_variable_attrs.yaml +33 -19
- imap_processing/cdf/config/imap_ultra_l1c_variable_attrs.yaml +8 -48
- imap_processing/cdf/utils.py +41 -33
- imap_processing/cli.py +463 -234
- imap_processing/codice/codice_l1a.py +260 -47
- imap_processing/codice/codice_l1b.py +51 -152
- imap_processing/codice/constants.py +38 -1
- imap_processing/ena_maps/ena_maps.py +658 -65
- imap_processing/ena_maps/utils/coordinates.py +1 -1
- imap_processing/ena_maps/utils/spatial_utils.py +10 -5
- imap_processing/glows/l1a/glows_l1a.py +28 -99
- imap_processing/glows/l1a/glows_l1a_data.py +2 -2
- imap_processing/glows/l1b/glows_l1b.py +1 -4
- imap_processing/glows/l1b/glows_l1b_data.py +1 -3
- imap_processing/glows/l2/glows_l2.py +2 -5
- imap_processing/hi/l1a/hi_l1a.py +31 -12
- imap_processing/hi/l1b/hi_l1b.py +80 -43
- imap_processing/hi/l1c/hi_l1c.py +12 -16
- imap_processing/hit/ancillary/imap_hit_l1b-to-l2-sector-dt0-factors_20250219_v002.csv +81 -0
- imap_processing/hit/hit_utils.py +93 -35
- imap_processing/hit/l0/decom_hit.py +3 -1
- imap_processing/hit/l1a/hit_l1a.py +30 -25
- imap_processing/hit/l1b/constants.py +6 -2
- imap_processing/hit/l1b/hit_l1b.py +279 -318
- imap_processing/hit/l2/constants.py +37 -0
- imap_processing/hit/l2/hit_l2.py +373 -264
- imap_processing/ialirt/l0/parse_mag.py +138 -10
- imap_processing/ialirt/l0/process_swapi.py +69 -0
- imap_processing/ialirt/l0/process_swe.py +318 -22
- imap_processing/ialirt/packet_definitions/ialirt.xml +216 -212
- imap_processing/ialirt/packet_definitions/ialirt_codicehi.xml +1 -1
- imap_processing/ialirt/packet_definitions/ialirt_codicelo.xml +1 -1
- imap_processing/ialirt/packet_definitions/ialirt_swapi.xml +14 -14
- imap_processing/ialirt/utils/grouping.py +1 -1
- imap_processing/idex/idex_constants.py +9 -1
- imap_processing/idex/idex_l0.py +22 -8
- imap_processing/idex/idex_l1a.py +75 -44
- imap_processing/idex/idex_l1b.py +9 -8
- imap_processing/idex/idex_l2a.py +79 -45
- imap_processing/idex/idex_l2b.py +120 -0
- imap_processing/idex/idex_variable_unpacking_and_eu_conversion.csv +33 -39
- imap_processing/idex/packet_definitions/idex_housekeeping_packet_definition.xml +9130 -0
- imap_processing/lo/l0/lo_science.py +1 -2
- imap_processing/lo/l1a/lo_l1a.py +1 -4
- imap_processing/lo/l1b/lo_l1b.py +527 -6
- imap_processing/lo/l1b/tof_conversions.py +11 -0
- imap_processing/lo/l1c/lo_l1c.py +1 -4
- imap_processing/mag/constants.py +43 -0
- imap_processing/mag/imap_mag_sdc_configuration_v001.py +8 -0
- imap_processing/mag/l1a/mag_l1a.py +2 -9
- imap_processing/mag/l1a/mag_l1a_data.py +10 -10
- imap_processing/mag/l1b/mag_l1b.py +84 -17
- imap_processing/mag/l1c/interpolation_methods.py +180 -3
- imap_processing/mag/l1c/mag_l1c.py +236 -70
- imap_processing/mag/l2/mag_l2.py +140 -0
- imap_processing/mag/l2/mag_l2_data.py +288 -0
- imap_processing/spacecraft/quaternions.py +1 -3
- imap_processing/spice/geometry.py +3 -3
- imap_processing/spice/kernels.py +0 -276
- imap_processing/spice/pointing_frame.py +257 -0
- imap_processing/spice/repoint.py +48 -19
- imap_processing/spice/spin.py +38 -33
- imap_processing/spice/time.py +24 -0
- imap_processing/swapi/l1/swapi_l1.py +16 -12
- imap_processing/swapi/l2/swapi_l2.py +116 -4
- imap_processing/swapi/swapi_utils.py +32 -0
- imap_processing/swe/l1a/swe_l1a.py +2 -9
- imap_processing/swe/l1a/swe_science.py +8 -11
- imap_processing/swe/l1b/swe_l1b.py +898 -23
- imap_processing/swe/l2/swe_l2.py +21 -77
- imap_processing/swe/utils/swe_constants.py +1 -0
- imap_processing/tests/ccsds/test_excel_to_xtce.py +1 -1
- imap_processing/tests/cdf/test_utils.py +14 -16
- imap_processing/tests/codice/conftest.py +44 -33
- imap_processing/tests/codice/data/validation/imap_codice_l1a_hi-pha_20241110193700_v0.0.0.cdf +0 -0
- imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-pha_20241110193700_v0.0.0.cdf +0 -0
- imap_processing/tests/codice/test_codice_l1a.py +20 -11
- imap_processing/tests/codice/test_codice_l1b.py +6 -7
- imap_processing/tests/conftest.py +78 -22
- imap_processing/tests/ena_maps/test_ena_maps.py +462 -33
- imap_processing/tests/ena_maps/test_spatial_utils.py +1 -1
- imap_processing/tests/glows/conftest.py +10 -14
- imap_processing/tests/glows/test_glows_decom.py +4 -4
- imap_processing/tests/glows/test_glows_l1a_cdf.py +6 -27
- imap_processing/tests/glows/test_glows_l1a_data.py +6 -8
- imap_processing/tests/glows/test_glows_l1b.py +11 -11
- imap_processing/tests/glows/test_glows_l1b_data.py +5 -5
- imap_processing/tests/glows/test_glows_l2.py +2 -8
- imap_processing/tests/hi/conftest.py +1 -1
- imap_processing/tests/hi/test_hi_l1b.py +10 -12
- imap_processing/tests/hi/test_hi_l1c.py +27 -24
- imap_processing/tests/hi/test_l1a.py +7 -9
- imap_processing/tests/hi/test_science_direct_event.py +2 -2
- imap_processing/tests/hit/helpers/l1_validation.py +44 -43
- imap_processing/tests/hit/test_decom_hit.py +1 -1
- imap_processing/tests/hit/test_hit_l1a.py +9 -9
- imap_processing/tests/hit/test_hit_l1b.py +172 -217
- imap_processing/tests/hit/test_hit_l2.py +380 -118
- imap_processing/tests/hit/test_hit_utils.py +122 -55
- imap_processing/tests/hit/validation_data/hit_l1b_standard_sample2_nsrl_v4_3decimals.csv +62 -62
- imap_processing/tests/hit/validation_data/sci_sample_raw.csv +1 -1
- imap_processing/tests/ialirt/unit/test_decom_ialirt.py +16 -81
- imap_processing/tests/ialirt/unit/test_grouping.py +2 -2
- imap_processing/tests/ialirt/unit/test_parse_mag.py +71 -16
- imap_processing/tests/ialirt/unit/test_process_codicehi.py +3 -3
- imap_processing/tests/ialirt/unit/test_process_codicelo.py +3 -10
- imap_processing/tests/ialirt/unit/test_process_ephemeris.py +4 -4
- imap_processing/tests/ialirt/unit/test_process_hit.py +3 -3
- imap_processing/tests/ialirt/unit/test_process_swapi.py +24 -16
- imap_processing/tests/ialirt/unit/test_process_swe.py +115 -7
- imap_processing/tests/idex/conftest.py +72 -7
- imap_processing/tests/idex/test_data/imap_idex_l0_raw_20241206_v001.pkts +0 -0
- imap_processing/tests/idex/test_data/imap_idex_l0_raw_20250108_v001.pkts +0 -0
- imap_processing/tests/idex/test_idex_l0.py +33 -11
- imap_processing/tests/idex/test_idex_l1a.py +50 -23
- imap_processing/tests/idex/test_idex_l1b.py +104 -25
- imap_processing/tests/idex/test_idex_l2a.py +48 -32
- imap_processing/tests/idex/test_idex_l2b.py +93 -0
- imap_processing/tests/lo/test_lo_l1a.py +3 -3
- imap_processing/tests/lo/test_lo_l1b.py +371 -6
- imap_processing/tests/lo/test_lo_l1c.py +1 -1
- imap_processing/tests/lo/test_lo_science.py +6 -7
- imap_processing/tests/lo/test_star_sensor.py +1 -1
- imap_processing/tests/mag/conftest.py +58 -9
- imap_processing/tests/mag/test_mag_decom.py +4 -3
- imap_processing/tests/mag/test_mag_l1a.py +13 -7
- imap_processing/tests/mag/test_mag_l1b.py +9 -9
- imap_processing/tests/mag/test_mag_l1c.py +151 -47
- imap_processing/tests/mag/test_mag_l2.py +130 -0
- imap_processing/tests/mag/test_mag_validation.py +144 -7
- imap_processing/tests/mag/validation/L1c/T013/mag-l1b-l1c-t013-magi-normal-in.csv +1217 -0
- imap_processing/tests/mag/validation/L1c/T013/mag-l1b-l1c-t013-magi-normal-out.csv +1857 -0
- imap_processing/tests/mag/validation/L1c/T013/mag-l1b-l1c-t013-mago-normal-in.csv +1217 -0
- imap_processing/tests/mag/validation/L1c/T013/mag-l1b-l1c-t013-mago-normal-out.csv +1857 -0
- imap_processing/tests/mag/validation/L1c/T014/mag-l1b-l1c-t014-magi-normal-in.csv +1217 -0
- imap_processing/tests/mag/validation/L1c/T014/mag-l1b-l1c-t014-magi-normal-out.csv +1793 -0
- imap_processing/tests/mag/validation/L1c/T014/mag-l1b-l1c-t014-mago-normal-in.csv +1217 -0
- imap_processing/tests/mag/validation/L1c/T014/mag-l1b-l1c-t014-mago-normal-out.csv +1793 -0
- imap_processing/tests/mag/validation/L1c/T015/mag-l1b-l1c-t015-magi-burst-in.csv +2561 -0
- imap_processing/tests/mag/validation/L1c/T015/mag-l1b-l1c-t015-magi-normal-in.csv +961 -0
- imap_processing/tests/mag/validation/L1c/T015/mag-l1b-l1c-t015-magi-normal-out.csv +1539 -0
- imap_processing/tests/mag/validation/L1c/T015/mag-l1b-l1c-t015-mago-normal-in.csv +1921 -0
- imap_processing/tests/mag/validation/L1c/T015/mag-l1b-l1c-t015-mago-normal-out.csv +2499 -0
- imap_processing/tests/mag/validation/L1c/T016/mag-l1b-l1c-t016-magi-normal-in.csv +865 -0
- imap_processing/tests/mag/validation/L1c/T016/mag-l1b-l1c-t016-magi-normal-out.csv +1196 -0
- imap_processing/tests/mag/validation/L1c/T016/mag-l1b-l1c-t016-mago-normal-in.csv +1729 -0
- imap_processing/tests/mag/validation/L1c/T016/mag-l1b-l1c-t016-mago-normal-out.csv +3053 -0
- imap_processing/tests/mag/validation/L2/imap_mag_l1b_norm-mago_20251017_v002.cdf +0 -0
- imap_processing/tests/mag/validation/calibration/imap_mag_l2-calibration-matrices_20251017_v004.cdf +0 -0
- imap_processing/tests/mag/validation/calibration/imap_mag_l2-offsets-norm_20251017_20251017_v001.cdf +0 -0
- imap_processing/tests/spacecraft/test_quaternions.py +1 -1
- imap_processing/tests/spice/test_data/fake_repoint_data.csv +4 -4
- imap_processing/tests/spice/test_data/fake_spin_data.csv +11 -11
- imap_processing/tests/spice/test_geometry.py +3 -3
- imap_processing/tests/spice/test_kernels.py +1 -200
- imap_processing/tests/spice/test_pointing_frame.py +185 -0
- imap_processing/tests/spice/test_repoint.py +20 -10
- imap_processing/tests/spice/test_spin.py +50 -9
- imap_processing/tests/spice/test_time.py +14 -0
- imap_processing/tests/swapi/lut/imap_swapi_esa-unit-conversion_20250211_v000.csv +73 -0
- imap_processing/tests/swapi/lut/imap_swapi_lut-notes_20250211_v000.csv +1025 -0
- imap_processing/tests/swapi/test_swapi_l1.py +7 -9
- imap_processing/tests/swapi/test_swapi_l2.py +180 -8
- imap_processing/tests/swe/lut/checker-board-indices.csv +24 -0
- imap_processing/tests/swe/lut/imap_swe_esa-lut_20250301_v000.csv +385 -0
- imap_processing/tests/swe/lut/imap_swe_l1b-in-flight-cal_20240510_20260716_v000.csv +3 -0
- imap_processing/tests/swe/test_swe_l1a.py +6 -6
- imap_processing/tests/swe/test_swe_l1a_science.py +3 -3
- imap_processing/tests/swe/test_swe_l1b.py +162 -24
- imap_processing/tests/swe/test_swe_l2.py +82 -102
- imap_processing/tests/test_cli.py +171 -88
- imap_processing/tests/test_utils.py +2 -1
- imap_processing/tests/ultra/data/mock_data.py +49 -21
- imap_processing/tests/ultra/unit/conftest.py +53 -70
- imap_processing/tests/ultra/unit/test_badtimes.py +2 -4
- imap_processing/tests/ultra/unit/test_cullingmask.py +4 -6
- imap_processing/tests/ultra/unit/test_de.py +3 -10
- imap_processing/tests/ultra/unit/test_decom_apid_880.py +27 -76
- imap_processing/tests/ultra/unit/test_decom_apid_881.py +15 -16
- imap_processing/tests/ultra/unit/test_decom_apid_883.py +12 -10
- imap_processing/tests/ultra/unit/test_decom_apid_896.py +202 -55
- imap_processing/tests/ultra/unit/test_lookup_utils.py +23 -1
- imap_processing/tests/ultra/unit/test_spacecraft_pset.py +3 -4
- imap_processing/tests/ultra/unit/test_ultra_l1a.py +84 -307
- imap_processing/tests/ultra/unit/test_ultra_l1b.py +30 -12
- imap_processing/tests/ultra/unit/test_ultra_l1b_annotated.py +2 -2
- imap_processing/tests/ultra/unit/test_ultra_l1b_culling.py +4 -1
- imap_processing/tests/ultra/unit/test_ultra_l1b_extended.py +163 -29
- imap_processing/tests/ultra/unit/test_ultra_l1c.py +5 -5
- imap_processing/tests/ultra/unit/test_ultra_l1c_pset_bins.py +32 -43
- imap_processing/tests/ultra/unit/test_ultra_l2.py +230 -0
- imap_processing/ultra/constants.py +1 -1
- imap_processing/ultra/l0/decom_tools.py +21 -34
- imap_processing/ultra/l0/decom_ultra.py +168 -204
- imap_processing/ultra/l0/ultra_utils.py +152 -136
- imap_processing/ultra/l1a/ultra_l1a.py +55 -243
- imap_processing/ultra/l1b/badtimes.py +1 -4
- imap_processing/ultra/l1b/cullingmask.py +2 -6
- imap_processing/ultra/l1b/de.py +62 -47
- imap_processing/ultra/l1b/extendedspin.py +8 -4
- imap_processing/ultra/l1b/lookup_utils.py +72 -9
- imap_processing/ultra/l1b/ultra_l1b.py +3 -8
- imap_processing/ultra/l1b/ultra_l1b_culling.py +4 -4
- imap_processing/ultra/l1b/ultra_l1b_extended.py +236 -78
- imap_processing/ultra/l1c/histogram.py +2 -6
- imap_processing/ultra/l1c/spacecraft_pset.py +2 -4
- imap_processing/ultra/l1c/ultra_l1c.py +1 -5
- imap_processing/ultra/l1c/ultra_l1c_pset_bins.py +107 -60
- imap_processing/ultra/l2/ultra_l2.py +299 -0
- imap_processing/ultra/lookup_tables/Angular_Profiles_FM45_LeftSlit.csv +526 -0
- imap_processing/ultra/lookup_tables/Angular_Profiles_FM45_RightSlit.csv +526 -0
- imap_processing/ultra/lookup_tables/Angular_Profiles_FM90_LeftSlit.csv +526 -0
- imap_processing/ultra/lookup_tables/Angular_Profiles_FM90_RightSlit.csv +526 -0
- imap_processing/ultra/lookup_tables/FM45_Startup1_ULTRA_IMGPARAMS_20240719.csv +2 -2
- imap_processing/ultra/lookup_tables/FM90_Startup1_ULTRA_IMGPARAMS_20240719.csv +2 -0
- imap_processing/ultra/packet_definitions/README.md +38 -0
- imap_processing/ultra/packet_definitions/ULTRA_SCI_COMBINED.xml +15302 -482
- imap_processing/ultra/utils/ultra_l1_utils.py +13 -12
- imap_processing/utils.py +1 -1
- {imap_processing-0.12.0.dist-info → imap_processing-0.13.0.dist-info}/METADATA +3 -2
- {imap_processing-0.12.0.dist-info → imap_processing-0.13.0.dist-info}/RECORD +264 -225
- imap_processing/hi/l1b/hi_eng_unit_convert_table.csv +0 -154
- imap_processing/mag/imap_mag_sdc-configuration_v001.yaml +0 -6
- imap_processing/mag/l1b/__init__.py +0 -0
- imap_processing/swe/l1b/swe_esa_lookup_table.csv +0 -1441
- imap_processing/swe/l1b/swe_l1b_science.py +0 -699
- imap_processing/tests/swe/test_swe_l1b_science.py +0 -103
- imap_processing/ultra/lookup_tables/dps_sensitivity45.cdf +0 -0
- imap_processing/ultra/lookup_tables/ultra_90_dps_exposure_compressed.cdf +0 -0
- /imap_processing/idex/packet_definitions/{idex_packet_definition.xml → idex_science_packet_definition.xml} +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/20240827095047_SWE_IALIRT_packet.bin +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/461971383-404.bin +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/461971384-405.bin +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/461971385-406.bin +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/461971386-407.bin +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/461971387-408.bin +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/461971388-409.bin +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/461971389-410.bin +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/461971390-411.bin +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/461971391-412.bin +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/BinLog CCSDS_FRAG_TLM_20240826_152323Z_IALIRT_data_for_SDC.bin +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/IALiRT Raw Packet Telemetry.txt +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/apid01152.tlm +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/eu_SWP_IAL_20240826_152033.csv +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/hi_fsw_view_1_ccsds.bin +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/hit_ialirt_sample.ccsds +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/hit_ialirt_sample.csv +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/idle_export_eu.SWE_IALIRT_20240827_093852.csv +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/imap_codice_l1a_hi-ialirt_20240523200000_v0.0.0.cdf +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/imap_codice_l1a_lo-ialirt_20241110193700_v0.0.0.cdf +0 -0
- /imap_processing/tests/ialirt/{test_data → data}/l0/sample_decoded_i-alirt_data.csv +0 -0
- /imap_processing/tests/mag/validation/{imap_calibration_mag_20240229_v01.cdf → calibration/imap_mag_l1b-calibration_20240229_v001.cdf} +0 -0
- /imap_processing/{swe/l1b/engineering_unit_convert_table.csv → tests/swe/lut/imap_swe_eu-conversion_20240510_v000.csv} +0 -0
- {imap_processing-0.12.0.dist-info → imap_processing-0.13.0.dist-info}/LICENSE +0 -0
- {imap_processing-0.12.0.dist-info → imap_processing-0.13.0.dist-info}/WHEEL +0 -0
- {imap_processing-0.12.0.dist-info → imap_processing-0.13.0.dist-info}/entry_points.txt +0 -0
|
@@ -144,7 +144,7 @@ def test_process_swapi_science(decom_test_data):
|
|
|
144
144
|
assert hk_ds["epoch"].shape == (17,)
|
|
145
145
|
hk_duplicate_ds = xr.concat([hk_ds, hk_ds], dim="epoch")
|
|
146
146
|
assert hk_duplicate_ds["epoch"].shape == (34,)
|
|
147
|
-
processed_data = process_swapi_science(ds_data, hk_duplicate_ds
|
|
147
|
+
processed_data = process_swapi_science(ds_data, hk_duplicate_ds)
|
|
148
148
|
|
|
149
149
|
# Test dataset dimensions
|
|
150
150
|
assert processed_data.sizes == {
|
|
@@ -162,9 +162,7 @@ def test_process_swapi_science(decom_test_data):
|
|
|
162
162
|
|
|
163
163
|
# make PLAN_ID data incorrect. Now processed data should have less sweeps
|
|
164
164
|
ds_data["plan_id"].data[:24] = np.arange(24)
|
|
165
|
-
processed_data = process_swapi_science(
|
|
166
|
-
ds_data, decom_test_data[SWAPIAPID.SWP_HK], data_version="001"
|
|
167
|
-
)
|
|
165
|
+
processed_data = process_swapi_science(ds_data, decom_test_data[SWAPIAPID.SWP_HK])
|
|
168
166
|
assert processed_data.sizes == {
|
|
169
167
|
"epoch": 10,
|
|
170
168
|
"energy": 72,
|
|
@@ -172,7 +170,7 @@ def test_process_swapi_science(decom_test_data):
|
|
|
172
170
|
}
|
|
173
171
|
|
|
174
172
|
# Test CDF File
|
|
175
|
-
cdf_filename = "
|
|
173
|
+
cdf_filename = "imap_swapi_l1_sci_20240924_v999.cdf"
|
|
176
174
|
cdf_path = write_cdf(processed_data)
|
|
177
175
|
assert cdf_path.name == cdf_filename
|
|
178
176
|
|
|
@@ -180,18 +178,18 @@ def test_process_swapi_science(decom_test_data):
|
|
|
180
178
|
def test_swapi_l1_cdf(swapi_l0_test_data_path):
|
|
181
179
|
"""Test housekeeping processing and CDF file creation"""
|
|
182
180
|
test_packet_file = swapi_l0_test_data_path / "imap_swapi_l0_raw_20240924_v001.pkts"
|
|
183
|
-
processed_data = swapi_l1([test_packet_file]
|
|
181
|
+
processed_data = swapi_l1([test_packet_file])
|
|
184
182
|
# hk cdf file
|
|
185
|
-
hk_cdf_filename = "
|
|
183
|
+
hk_cdf_filename = "imap_swapi_l1_hk_20240924_v999.cdf"
|
|
186
184
|
# TODO: how to add ignore ISTP checks for HK data to cli.py
|
|
187
185
|
hk_cdf_path = write_cdf(processed_data[0])
|
|
188
186
|
assert hk_cdf_path.name == hk_cdf_filename
|
|
189
187
|
|
|
190
|
-
processed_data = swapi_l1([test_packet_file, hk_cdf_path]
|
|
188
|
+
processed_data = swapi_l1([test_packet_file, hk_cdf_path])
|
|
191
189
|
|
|
192
190
|
assert processed_data[0].attrs["Apid"] == f"{SWAPIAPID.SWP_SCI}"
|
|
193
191
|
|
|
194
192
|
# Test CDF File
|
|
195
|
-
cdf_filename = "
|
|
193
|
+
cdf_filename = "imap_swapi_l1_sci_20240924_v999.cdf"
|
|
196
194
|
cdf_path = write_cdf(processed_data[0])
|
|
197
195
|
assert cdf_path.name == cdf_filename
|
|
@@ -1,32 +1,204 @@
|
|
|
1
1
|
import numpy as np
|
|
2
|
+
import pandas as pd
|
|
3
|
+
import pytest
|
|
2
4
|
|
|
5
|
+
from imap_processing import imap_module_directory
|
|
3
6
|
from imap_processing.cdf.utils import write_cdf
|
|
4
7
|
from imap_processing.swapi.l1.swapi_l1 import swapi_l1
|
|
5
|
-
from imap_processing.swapi.l2.swapi_l2 import
|
|
8
|
+
from imap_processing.swapi.l2.swapi_l2 import (
|
|
9
|
+
TIME_PER_BIN,
|
|
10
|
+
solve_full_sweep_energy,
|
|
11
|
+
swapi_l2,
|
|
12
|
+
)
|
|
13
|
+
from imap_processing.swapi.swapi_utils import read_swapi_lut_table
|
|
6
14
|
|
|
7
15
|
|
|
8
|
-
|
|
16
|
+
@pytest.fixture(scope="session")
|
|
17
|
+
def esa_unit_conversion_table() -> pd.DataFrame:
|
|
18
|
+
"""
|
|
19
|
+
Read the ESA unit conversion table.
|
|
20
|
+
|
|
21
|
+
Returns
|
|
22
|
+
-------
|
|
23
|
+
esa_unit_conversion_table : pandas.DataFrame
|
|
24
|
+
The ESA unit conversion table.
|
|
25
|
+
"""
|
|
26
|
+
esa_file_path = (
|
|
27
|
+
imap_module_directory
|
|
28
|
+
/ "tests/swapi/lut/imap_swapi_esa-unit-conversion_20250211_v000.csv"
|
|
29
|
+
)
|
|
30
|
+
df = read_swapi_lut_table(esa_file_path)
|
|
31
|
+
return df
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@pytest.fixture(scope="session")
|
|
35
|
+
def lut_notes_table() -> pd.DataFrame:
|
|
36
|
+
"""
|
|
37
|
+
Read the LUT notes table.
|
|
38
|
+
|
|
39
|
+
Returns
|
|
40
|
+
-------
|
|
41
|
+
lut_notes_table : pandas.DataFrame
|
|
42
|
+
The LUT notes table.
|
|
43
|
+
"""
|
|
44
|
+
lut_notes_file_path = (
|
|
45
|
+
imap_module_directory / "tests/swapi/lut/imap_swapi_lut-notes_20250211_v000.csv"
|
|
46
|
+
)
|
|
47
|
+
df = read_swapi_lut_table(lut_notes_file_path)
|
|
48
|
+
|
|
49
|
+
return df
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def test_swapi_l2_cdf(
|
|
53
|
+
swapi_l0_test_data_path, esa_unit_conversion_table, lut_notes_table
|
|
54
|
+
):
|
|
9
55
|
"""Test housekeeping processing and CDF file creation"""
|
|
10
56
|
test_packet_file = swapi_l0_test_data_path / "imap_swapi_l0_raw_20240924_v001.pkts"
|
|
11
57
|
# Create HK CDF File
|
|
12
|
-
processed_hk_data = swapi_l1([test_packet_file]
|
|
13
|
-
hk_cdf_filename = "
|
|
58
|
+
processed_hk_data = swapi_l1([test_packet_file])
|
|
59
|
+
hk_cdf_filename = "imap_swapi_l1_hk_20240924_v999.cdf"
|
|
14
60
|
hk_cdf_path = write_cdf(processed_hk_data[0])
|
|
15
61
|
assert hk_cdf_path.name == hk_cdf_filename
|
|
16
62
|
|
|
17
63
|
# Create L1 CDF File
|
|
18
|
-
processed_sci_data = swapi_l1([test_packet_file, hk_cdf_path]
|
|
19
|
-
cdf_filename = "
|
|
64
|
+
processed_sci_data = swapi_l1([test_packet_file, hk_cdf_path])
|
|
65
|
+
cdf_filename = "imap_swapi_l1_sci_20240924_v999.cdf"
|
|
20
66
|
cdf_path = write_cdf(processed_sci_data[0])
|
|
21
67
|
assert cdf_path.name == cdf_filename
|
|
22
68
|
|
|
23
69
|
l1_dataset = processed_sci_data[0]
|
|
24
|
-
l2_dataset = swapi_l2(
|
|
70
|
+
l2_dataset = swapi_l2(
|
|
71
|
+
l1_dataset,
|
|
72
|
+
esa_table_df=esa_unit_conversion_table,
|
|
73
|
+
lut_notes_df=lut_notes_table,
|
|
74
|
+
)
|
|
25
75
|
l2_cdf = write_cdf(l2_dataset)
|
|
26
|
-
assert l2_cdf.name == "
|
|
76
|
+
assert l2_cdf.name == "imap_swapi_l2_sci_20240924_v999.cdf"
|
|
27
77
|
|
|
28
78
|
# Test uncertainty variables are as expected
|
|
29
79
|
np.testing.assert_array_equal(
|
|
30
80
|
l2_dataset["swp_pcem_rate_err_plus"],
|
|
31
81
|
l1_dataset["swp_pcem_counts_err_plus"] / TIME_PER_BIN,
|
|
32
82
|
)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def test_solve_full_sweep_energy(esa_unit_conversion_table, lut_notes_table):
|
|
86
|
+
"""Test the solve_full_sweep_energy function"""
|
|
87
|
+
# Find 9 fine energies for unique ESA_LVL5 values
|
|
88
|
+
esa_lvl5_arr = [7778, 5673, 4973, 4311]
|
|
89
|
+
esa_lvl5_hex = np.vectorize(lambda x: format(x, "X"))(esa_lvl5_arr)
|
|
90
|
+
sweeps_energy_value = solve_full_sweep_energy(
|
|
91
|
+
esa_lvl5_hex, esa_unit_conversion_table, lut_notes_table
|
|
92
|
+
)
|
|
93
|
+
assert sweeps_energy_value.shape == (4, 72)
|
|
94
|
+
|
|
95
|
+
# First check that first 63 values are same as the fixed energy values.
|
|
96
|
+
fixed_energy_values = np.array(
|
|
97
|
+
[
|
|
98
|
+
1163,
|
|
99
|
+
1163,
|
|
100
|
+
1163,
|
|
101
|
+
1163,
|
|
102
|
+
1163,
|
|
103
|
+
1163,
|
|
104
|
+
1163,
|
|
105
|
+
1163,
|
|
106
|
+
1163,
|
|
107
|
+
1163,
|
|
108
|
+
1163,
|
|
109
|
+
1163,
|
|
110
|
+
1163,
|
|
111
|
+
1163,
|
|
112
|
+
1163,
|
|
113
|
+
1163,
|
|
114
|
+
1163,
|
|
115
|
+
1163,
|
|
116
|
+
1163,
|
|
117
|
+
1163,
|
|
118
|
+
1163,
|
|
119
|
+
1163,
|
|
120
|
+
1163,
|
|
121
|
+
1163,
|
|
122
|
+
1163,
|
|
123
|
+
1163,
|
|
124
|
+
1163,
|
|
125
|
+
1163,
|
|
126
|
+
1163,
|
|
127
|
+
1163,
|
|
128
|
+
1163,
|
|
129
|
+
1163,
|
|
130
|
+
1163,
|
|
131
|
+
1163,
|
|
132
|
+
1163,
|
|
133
|
+
1068,
|
|
134
|
+
981,
|
|
135
|
+
901,
|
|
136
|
+
828,
|
|
137
|
+
760,
|
|
138
|
+
698,
|
|
139
|
+
641,
|
|
140
|
+
589,
|
|
141
|
+
544,
|
|
142
|
+
497,
|
|
143
|
+
459,
|
|
144
|
+
421,
|
|
145
|
+
389,
|
|
146
|
+
355,
|
|
147
|
+
326,
|
|
148
|
+
298,
|
|
149
|
+
275,
|
|
150
|
+
252,
|
|
151
|
+
234,
|
|
152
|
+
214,
|
|
153
|
+
195,
|
|
154
|
+
181,
|
|
155
|
+
167,
|
|
156
|
+
153,
|
|
157
|
+
139,
|
|
158
|
+
129,
|
|
159
|
+
120,
|
|
160
|
+
107,
|
|
161
|
+
]
|
|
162
|
+
)
|
|
163
|
+
assert np.all(sweeps_energy_value[:, :63] == fixed_energy_values)
|
|
164
|
+
|
|
165
|
+
# Now, test that the last 9 fine energy values are as expected for first sweep.
|
|
166
|
+
# I manually picked those values from LUT table.
|
|
167
|
+
expected_energy_values = np.array(
|
|
168
|
+
[17310, 17682, 18062, 18450, 18846, 19251, 19251, 19251, 19251]
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
assert np.all(sweeps_energy_value[0, -9:] == expected_energy_values)
|
|
172
|
+
|
|
173
|
+
# Test mismatch values for 9 fine steps x 4 steps.
|
|
174
|
+
mismatch_value = [1]
|
|
175
|
+
with pytest.raises(
|
|
176
|
+
ValueError, match="These ESA_LVL5 values not found in lut-notes table"
|
|
177
|
+
):
|
|
178
|
+
solve_full_sweep_energy(
|
|
179
|
+
np.array(mismatch_value), esa_unit_conversion_table, lut_notes_table
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
# Check for value that should return 0 index's energy value.
|
|
183
|
+
# Same as before, I picked values from lut notes table that would
|
|
184
|
+
# result in 0 index.
|
|
185
|
+
esa_lvl5_arr = np.array([format(8168, "X")])
|
|
186
|
+
sweeps_energy_value = solve_full_sweep_energy(
|
|
187
|
+
esa_lvl5_arr, esa_unit_conversion_table, lut_notes_table
|
|
188
|
+
)
|
|
189
|
+
assert sweeps_energy_value.shape == (1, 72)
|
|
190
|
+
assert sweeps_energy_value[0][63] == 19149
|
|
191
|
+
expected_energy_values = np.array(
|
|
192
|
+
[
|
|
193
|
+
19149,
|
|
194
|
+
19251,
|
|
195
|
+
19251,
|
|
196
|
+
19251,
|
|
197
|
+
19251,
|
|
198
|
+
19251,
|
|
199
|
+
19251,
|
|
200
|
+
19251,
|
|
201
|
+
19251,
|
|
202
|
+
]
|
|
203
|
+
)
|
|
204
|
+
assert np.all(sweeps_energy_value[0, -9:] == expected_energy_values)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
0,371,12,383,24,395,36,407,48,419,60,431,72,443,84,455,96,467,108,479,120,491,132,503,144,515,156,527,168,539
|
|
2
|
+
180,551,192,563,204,575,216,587,228,599,240,611,252,623,264,635,276,647,288,659,300,671,312,683,324,695,336,707,348,719
|
|
3
|
+
360,11,372,23,384,35,396,47,408,59,420,71,432,83,444,95,456,107,468,119,480,131,492,143,504,155,516,167,528,179
|
|
4
|
+
540,191,552,203,564,215,576,227,588,239,600,251,612,263,624,275,636,287,648,299,660,311,672,323,684,335,696,347,708,359
|
|
5
|
+
1,370,13,382,25,394,37,406,49,418,61,430,73,442,85,454,97,466,109,478,121,490,133,502,145,514,157,526,169,538
|
|
6
|
+
181,550,193,562,205,574,217,586,229,598,241,610,253,622,265,634,277,646,289,658,301,670,313,682,325,694,337,706,349,718
|
|
7
|
+
361,10,373,22,385,34,397,46,409,58,421,70,433,82,445,94,457,106,469,118,481,130,493,142,505,154,517,166,529,178
|
|
8
|
+
541,190,553,202,565,214,577,226,589,238,601,250,613,262,625,274,637,286,649,298,661,310,673,322,685,334,697,346,709,358
|
|
9
|
+
2,369,14,381,26,393,38,405,50,417,62,429,74,441,86,453,98,465,110,477,122,489,134,501,146,513,158,525,170,537
|
|
10
|
+
182,549,194,561,206,573,218,585,230,597,242,609,254,621,266,633,278,645,290,657,302,669,314,681,326,693,338,705,350,717
|
|
11
|
+
362,9,374,21,386,33,398,45,410,57,422,69,434,81,446,93,458,105,470,117,482,129,494,141,506,153,518,165,530,177
|
|
12
|
+
542,189,554,201,566,213,578,225,590,237,602,249,614,261,626,273,638,285,650,297,662,309,674,321,686,333,698,345,710,357
|
|
13
|
+
3,368,15,380,27,392,39,404,51,416,63,428,75,440,87,452,99,464,111,476,123,488,135,500,147,512,159,524,171,536
|
|
14
|
+
183,548,195,560,207,572,219,584,231,596,243,608,255,620,267,632,279,644,291,656,303,668,315,680,327,692,339,704,351,716
|
|
15
|
+
363,8,375,20,387,32,399,44,411,56,423,68,435,80,447,92,459,104,471,116,483,128,495,140,507,152,519,164,531,176
|
|
16
|
+
543,188,555,200,567,212,579,224,591,236,603,248,615,260,627,272,639,284,651,296,663,308,675,320,687,332,699,344,711,356
|
|
17
|
+
4,367,16,379,28,391,40,403,52,415,64,427,76,439,88,451,100,463,112,475,124,487,136,499,148,511,160,523,172,535
|
|
18
|
+
184,547,196,559,208,571,220,583,232,595,244,607,256,619,268,631,280,643,292,655,304,667,316,679,328,691,340,703,352,715
|
|
19
|
+
364,7,376,19,388,31,400,43,412,55,424,67,436,79,448,91,460,103,472,115,484,127,496,139,508,151,520,163,532,175
|
|
20
|
+
544,187,556,199,568,211,580,223,592,235,604,247,616,259,628,271,640,283,652,295,664,307,676,319,688,331,700,343,712,355
|
|
21
|
+
5,366,17,378,29,390,41,402,53,414,65,426,77,438,89,450,101,462,113,474,125,486,137,498,149,510,161,522,173,534
|
|
22
|
+
185,546,197,558,209,570,221,582,233,594,245,606,257,618,269,630,281,642,293,654,305,666,317,678,329,690,341,702,353,714
|
|
23
|
+
365,6,377,18,389,30,401,42,413,54,425,66,437,78,449,90,461,102,473,114,485,126,497,138,509,150,521,162,533,174
|
|
24
|
+
545,186,557,198,569,210,581,222,593,234,605,246,617,258,629,270,641,282,653,294,665,306,677,318,689,330,701,342,713,354
|
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
table_idx,esa_step,esa_v,v_index,ialirt
|
|
2
|
+
0,0,0.56,1,0
|
|
3
|
+
0,1,2.1,5,0
|
|
4
|
+
0,2,7.85,9,0
|
|
5
|
+
0,3,29.39,13,1
|
|
6
|
+
0,4,110.03,17,1
|
|
7
|
+
0,5,411.93,21,0
|
|
8
|
+
0,6,797.03,23,0
|
|
9
|
+
0,7,212.89,19,1
|
|
10
|
+
0,8,56.87,15,1
|
|
11
|
+
0,9,15.19,11,0
|
|
12
|
+
0,10,4.06,7,0
|
|
13
|
+
0,11,1.08,3,0
|
|
14
|
+
0,180,0.78,2,0
|
|
15
|
+
0,181,2.92,6,0
|
|
16
|
+
0,182,10.92,10,0
|
|
17
|
+
0,183,40.88,14,1
|
|
18
|
+
0,184,153.05,18,1
|
|
19
|
+
0,185,572.99,22,0
|
|
20
|
+
0,186,1108.66,24,0
|
|
21
|
+
0,187,296.14,20,0
|
|
22
|
+
0,188,79.1,16,1
|
|
23
|
+
0,189,21.13,12,1
|
|
24
|
+
0,190,5.64,8,0
|
|
25
|
+
0,191,1.51,4,0
|
|
26
|
+
0,360,1.08,3,0
|
|
27
|
+
0,361,4.06,7,0
|
|
28
|
+
0,362,15.19,11,0
|
|
29
|
+
0,363,56.87,15,1
|
|
30
|
+
0,364,212.89,19,1
|
|
31
|
+
0,365,797.03,23,0
|
|
32
|
+
0,366,411.93,21,0
|
|
33
|
+
0,367,110.03,17,1
|
|
34
|
+
0,368,29.39,13,1
|
|
35
|
+
0,369,7.85,9,0
|
|
36
|
+
0,370,2.1,5,0
|
|
37
|
+
0,371,0.56,1,0
|
|
38
|
+
0,540,1.51,4,0
|
|
39
|
+
0,541,5.64,8,0
|
|
40
|
+
0,542,21.13,12,1
|
|
41
|
+
0,543,79.1,16,1
|
|
42
|
+
0,544,296.14,20,0
|
|
43
|
+
0,545,1108.66,24,0
|
|
44
|
+
0,546,572.99,22,0
|
|
45
|
+
0,547,153.05,18,1
|
|
46
|
+
0,548,40.88,14,1
|
|
47
|
+
0,549,10.92,10,0
|
|
48
|
+
0,550,2.92,6,0
|
|
49
|
+
0,551,0.78,2,0
|
|
50
|
+
1,0,5.64,8,0
|
|
51
|
+
1,1,5.64,8,0
|
|
52
|
+
1,2,5.64,8,0
|
|
53
|
+
1,3,5.64,8,0
|
|
54
|
+
1,4,5.64,8,0
|
|
55
|
+
1,5,5.64,8,0
|
|
56
|
+
1,6,5.64,8,0
|
|
57
|
+
1,7,5.64,8,0
|
|
58
|
+
1,8,5.64,8,0
|
|
59
|
+
1,9,5.64,8,0
|
|
60
|
+
1,10,5.64,8,0
|
|
61
|
+
1,11,5.64,8,0
|
|
62
|
+
1,180,5.64,8,0
|
|
63
|
+
1,181,5.64,8,0
|
|
64
|
+
1,182,5.64,8,0
|
|
65
|
+
1,183,5.64,8,0
|
|
66
|
+
1,184,5.64,8,0
|
|
67
|
+
1,185,5.64,8,0
|
|
68
|
+
1,186,5.64,8,0
|
|
69
|
+
1,187,5.64,8,0
|
|
70
|
+
1,188,5.64,8,0
|
|
71
|
+
1,189,5.64,8,0
|
|
72
|
+
1,190,5.64,8,0
|
|
73
|
+
1,191,5.64,8,0
|
|
74
|
+
1,360,5.64,8,0
|
|
75
|
+
1,361,5.64,8,0
|
|
76
|
+
1,362,5.64,8,0
|
|
77
|
+
1,363,5.64,8,0
|
|
78
|
+
1,364,5.64,8,0
|
|
79
|
+
1,365,5.64,8,0
|
|
80
|
+
1,366,5.64,8,0
|
|
81
|
+
1,367,5.64,8,0
|
|
82
|
+
1,368,5.64,8,0
|
|
83
|
+
1,369,5.64,8,0
|
|
84
|
+
1,370,5.64,8,0
|
|
85
|
+
1,371,5.64,8,0
|
|
86
|
+
1,540,5.64,8,0
|
|
87
|
+
1,541,5.64,8,0
|
|
88
|
+
1,542,5.64,8,0
|
|
89
|
+
1,543,5.64,8,0
|
|
90
|
+
1,544,5.64,8,0
|
|
91
|
+
1,545,5.64,8,0
|
|
92
|
+
1,546,5.64,8,0
|
|
93
|
+
1,547,5.64,8,0
|
|
94
|
+
1,548,5.64,8,0
|
|
95
|
+
1,549,5.64,8,0
|
|
96
|
+
1,550,5.64,8,0
|
|
97
|
+
1,551,5.64,8,0
|
|
98
|
+
2,0,0.56,1,0
|
|
99
|
+
2,1,0.78,2,0
|
|
100
|
+
2,2,1.08,3,0
|
|
101
|
+
2,3,1.51,4,0
|
|
102
|
+
2,4,2.1,5,0
|
|
103
|
+
2,5,2.92,6,0
|
|
104
|
+
2,6,2.92,6,0
|
|
105
|
+
2,7,2.1,5,0
|
|
106
|
+
2,8,1.51,4,0
|
|
107
|
+
2,9,1.08,3,0
|
|
108
|
+
2,10,0.78,2,0
|
|
109
|
+
2,11,0.56,1,0
|
|
110
|
+
2,180,4.06,7,0
|
|
111
|
+
2,181,5.64,8,0
|
|
112
|
+
2,182,7.85,9,0
|
|
113
|
+
2,183,10.92,10,0
|
|
114
|
+
2,184,15.19,11,0
|
|
115
|
+
2,185,21.13,12,0
|
|
116
|
+
2,186,21.13,12,0
|
|
117
|
+
2,187,15.19,11,0
|
|
118
|
+
2,188,10.92,10,0
|
|
119
|
+
2,189,7.85,9,0
|
|
120
|
+
2,190,5.64,8,0
|
|
121
|
+
2,191,4.06,7,0
|
|
122
|
+
2,360,29.39,13,0
|
|
123
|
+
2,361,40.88,14,0
|
|
124
|
+
2,362,56.87,15,0
|
|
125
|
+
2,363,79.1,16,0
|
|
126
|
+
2,364,110.03,17,0
|
|
127
|
+
2,365,153.05,18,0
|
|
128
|
+
2,366,153.05,18,0
|
|
129
|
+
2,367,110.03,17,0
|
|
130
|
+
2,368,79.1,16,0
|
|
131
|
+
2,369,56.87,15,0
|
|
132
|
+
2,370,40.88,14,0
|
|
133
|
+
2,371,29.39,13,0
|
|
134
|
+
2,540,212.89,19,0
|
|
135
|
+
2,541,296.14,20,0
|
|
136
|
+
2,542,411.93,21,0
|
|
137
|
+
2,543,572.99,22,0
|
|
138
|
+
2,544,797.03,23,0
|
|
139
|
+
2,545,1108.66,24,0
|
|
140
|
+
2,546,1108.66,24,0
|
|
141
|
+
2,547,797.03,23,0
|
|
142
|
+
2,548,572.99,22,0
|
|
143
|
+
2,549,411.93,21,0
|
|
144
|
+
2,550,296.14,20,0
|
|
145
|
+
2,551,212.89,19,0
|
|
146
|
+
3,0,10.92,10,0
|
|
147
|
+
3,1,21.13,12,0
|
|
148
|
+
3,2,40.88,14,0
|
|
149
|
+
3,3,79.1,16,0
|
|
150
|
+
3,4,153.05,18,0
|
|
151
|
+
3,5,296.14,20,0
|
|
152
|
+
3,6,411.93,21,0
|
|
153
|
+
3,7,212.89,19,0
|
|
154
|
+
3,8,110.03,17,0
|
|
155
|
+
3,9,56.87,15,0
|
|
156
|
+
3,10,29.39,13,0
|
|
157
|
+
3,11,15.19,11,0
|
|
158
|
+
3,180,15.19,11,0
|
|
159
|
+
3,181,29.39,13,0
|
|
160
|
+
3,182,56.87,15,0
|
|
161
|
+
3,183,110.03,17,0
|
|
162
|
+
3,184,212.89,19,0
|
|
163
|
+
3,185,411.93,21,0
|
|
164
|
+
3,186,296.14,20,0
|
|
165
|
+
3,187,153.05,18,0
|
|
166
|
+
3,188,79.1,16,0
|
|
167
|
+
3,189,40.88,14,0
|
|
168
|
+
3,190,21.13,12,0
|
|
169
|
+
3,191,10.92,10,0
|
|
170
|
+
3,360,10.92,10,0
|
|
171
|
+
3,361,21.13,12,0
|
|
172
|
+
3,362,40.88,14,0
|
|
173
|
+
3,363,79.1,16,0
|
|
174
|
+
3,364,153.05,18,0
|
|
175
|
+
3,365,296.14,20,0
|
|
176
|
+
3,366,411.93,21,0
|
|
177
|
+
3,367,212.89,19,0
|
|
178
|
+
3,368,110.03,17,0
|
|
179
|
+
3,369,56.87,15,0
|
|
180
|
+
3,370,29.39,13,0
|
|
181
|
+
3,371,15.19,11,0
|
|
182
|
+
3,540,15.19,11,0
|
|
183
|
+
3,541,29.39,13,0
|
|
184
|
+
3,542,56.87,15,0
|
|
185
|
+
3,543,110.03,17,0
|
|
186
|
+
3,544,212.89,19,0
|
|
187
|
+
3,545,411.93,21,0
|
|
188
|
+
3,546,296.14,20,0
|
|
189
|
+
3,547,153.05,18,0
|
|
190
|
+
3,548,79.1,16,0
|
|
191
|
+
3,549,40.88,14,0
|
|
192
|
+
3,550,21.13,12,0
|
|
193
|
+
3,551,10.92,10,0
|
|
194
|
+
4,0,0.56,1,0
|
|
195
|
+
4,1,1.08,3,0
|
|
196
|
+
4,2,2.1,5,0
|
|
197
|
+
4,3,4.06,7,0
|
|
198
|
+
4,4,7.85,9,0
|
|
199
|
+
4,5,15.19,11,0
|
|
200
|
+
4,6,21.13,12,0
|
|
201
|
+
4,7,10.92,10,0
|
|
202
|
+
4,8,5.64,8,0
|
|
203
|
+
4,9,2.92,6,0
|
|
204
|
+
4,10,1.51,4,0
|
|
205
|
+
4,11,0.78,2,0
|
|
206
|
+
4,180,0.78,2,0
|
|
207
|
+
4,181,1.51,4,0
|
|
208
|
+
4,182,2.92,6,0
|
|
209
|
+
4,183,5.64,8,0
|
|
210
|
+
4,184,10.92,10,0
|
|
211
|
+
4,185,21.13,12,0
|
|
212
|
+
4,186,15.19,11,0
|
|
213
|
+
4,187,7.85,9,0
|
|
214
|
+
4,188,4.06,7,0
|
|
215
|
+
4,189,2.1,5,0
|
|
216
|
+
4,190,1.08,3,0
|
|
217
|
+
4,191,0.56,1,0
|
|
218
|
+
4,360,29.39,13,0
|
|
219
|
+
4,361,56.87,15,0
|
|
220
|
+
4,362,110.03,17,0
|
|
221
|
+
4,363,212.89,19,0
|
|
222
|
+
4,364,411.93,21,0
|
|
223
|
+
4,365,797.03,23,0
|
|
224
|
+
4,366,1108.66,24,0
|
|
225
|
+
4,367,572.99,22,0
|
|
226
|
+
4,368,296.14,20,0
|
|
227
|
+
4,369,153.05,18,0
|
|
228
|
+
4,370,79.1,16,0
|
|
229
|
+
4,371,40.88,14,0
|
|
230
|
+
4,540,40.88,14,0
|
|
231
|
+
4,541,79.1,16,0
|
|
232
|
+
4,542,153.05,18,0
|
|
233
|
+
4,543,296.14,20,0
|
|
234
|
+
4,544,572.99,22,0
|
|
235
|
+
4,545,1108.66,24,0
|
|
236
|
+
4,546,797.03,23,0
|
|
237
|
+
4,547,411.93,21,0
|
|
238
|
+
4,548,212.89,19,0
|
|
239
|
+
4,549,110.03,17,0
|
|
240
|
+
4,550,56.87,15,0
|
|
241
|
+
4,551,29.39,13,0
|
|
242
|
+
5,0,0.56,1,0
|
|
243
|
+
5,1,0.56,1,0
|
|
244
|
+
5,2,0.56,1,0
|
|
245
|
+
5,3,0.56,1,0
|
|
246
|
+
5,4,0.56,1,0
|
|
247
|
+
5,5,0.56,1,0
|
|
248
|
+
5,6,0.56,1,0
|
|
249
|
+
5,7,0.56,1,0
|
|
250
|
+
5,8,0.56,1,0
|
|
251
|
+
5,9,0.56,1,0
|
|
252
|
+
5,10,0.56,1,0
|
|
253
|
+
5,11,0.56,1,0
|
|
254
|
+
5,180,0.56,1,0
|
|
255
|
+
5,181,0.56,1,0
|
|
256
|
+
5,182,0.56,1,0
|
|
257
|
+
5,183,0.56,1,0
|
|
258
|
+
5,184,0.56,1,0
|
|
259
|
+
5,185,0.56,1,0
|
|
260
|
+
5,186,0.56,1,0
|
|
261
|
+
5,187,0.56,1,0
|
|
262
|
+
5,188,0.56,1,0
|
|
263
|
+
5,189,0.56,1,0
|
|
264
|
+
5,190,0.56,1,0
|
|
265
|
+
5,191,0.56,1,0
|
|
266
|
+
5,360,0.56,1,0
|
|
267
|
+
5,361,0.56,1,0
|
|
268
|
+
5,362,0.56,1,0
|
|
269
|
+
5,363,0.56,1,0
|
|
270
|
+
5,364,0.56,1,0
|
|
271
|
+
5,365,0.56,1,0
|
|
272
|
+
5,366,0.56,1,0
|
|
273
|
+
5,367,0.56,1,0
|
|
274
|
+
5,368,0.56,1,0
|
|
275
|
+
5,369,0.56,1,0
|
|
276
|
+
5,370,0.56,1,0
|
|
277
|
+
5,371,0.56,1,0
|
|
278
|
+
5,540,0.56,1,0
|
|
279
|
+
5,541,0.56,1,0
|
|
280
|
+
5,542,0.56,1,0
|
|
281
|
+
5,543,0.56,1,0
|
|
282
|
+
5,544,0.56,1,0
|
|
283
|
+
5,545,0.56,1,0
|
|
284
|
+
5,546,0.56,1,0
|
|
285
|
+
5,547,0.56,1,0
|
|
286
|
+
5,548,0.56,1,0
|
|
287
|
+
5,549,0.56,1,0
|
|
288
|
+
5,550,0.56,1,0
|
|
289
|
+
5,551,0.56,1,0
|
|
290
|
+
6,0,0.56,1,0
|
|
291
|
+
6,1,0.56,1,0
|
|
292
|
+
6,2,0.56,1,0
|
|
293
|
+
6,3,0.56,1,0
|
|
294
|
+
6,4,0.56,1,0
|
|
295
|
+
6,5,0.56,1,0
|
|
296
|
+
6,6,0.56,1,0
|
|
297
|
+
6,7,0.56,1,0
|
|
298
|
+
6,8,0.56,1,0
|
|
299
|
+
6,9,0.56,1,0
|
|
300
|
+
6,10,0.56,1,0
|
|
301
|
+
6,11,0.56,1,0
|
|
302
|
+
6,180,0.56,1,0
|
|
303
|
+
6,181,0.56,1,0
|
|
304
|
+
6,182,0.56,1,0
|
|
305
|
+
6,183,0.56,1,0
|
|
306
|
+
6,184,0.56,1,0
|
|
307
|
+
6,185,0.56,1,0
|
|
308
|
+
6,186,0.56,1,0
|
|
309
|
+
6,187,0.56,1,0
|
|
310
|
+
6,188,0.56,1,0
|
|
311
|
+
6,189,0.56,1,0
|
|
312
|
+
6,190,0.56,1,0
|
|
313
|
+
6,191,0.56,1,0
|
|
314
|
+
6,360,0.56,1,0
|
|
315
|
+
6,361,0.56,1,0
|
|
316
|
+
6,362,0.56,1,0
|
|
317
|
+
6,363,0.56,1,0
|
|
318
|
+
6,364,0.56,1,0
|
|
319
|
+
6,365,0.56,1,0
|
|
320
|
+
6,366,0.56,1,0
|
|
321
|
+
6,367,0.56,1,0
|
|
322
|
+
6,368,0.56,1,0
|
|
323
|
+
6,369,0.56,1,0
|
|
324
|
+
6,370,0.56,1,0
|
|
325
|
+
6,371,0.56,1,0
|
|
326
|
+
6,540,0.56,1,0
|
|
327
|
+
6,541,0.56,1,0
|
|
328
|
+
6,542,0.56,1,0
|
|
329
|
+
6,543,0.56,1,0
|
|
330
|
+
6,544,0.56,1,0
|
|
331
|
+
6,545,0.56,1,0
|
|
332
|
+
6,546,0.56,1,0
|
|
333
|
+
6,547,0.56,1,0
|
|
334
|
+
6,548,0.56,1,0
|
|
335
|
+
6,549,0.56,1,0
|
|
336
|
+
6,550,0.56,1,0
|
|
337
|
+
6,551,0.56,1,0
|
|
338
|
+
7,0,0.56,1,0
|
|
339
|
+
7,1,0.56,1,0
|
|
340
|
+
7,2,0.56,1,0
|
|
341
|
+
7,3,0.56,1,0
|
|
342
|
+
7,4,0.56,1,0
|
|
343
|
+
7,5,0.56,1,0
|
|
344
|
+
7,6,0.56,1,0
|
|
345
|
+
7,7,0.56,1,0
|
|
346
|
+
7,8,0.56,1,0
|
|
347
|
+
7,9,0.56,1,0
|
|
348
|
+
7,10,0.56,1,0
|
|
349
|
+
7,11,0.56,1,0
|
|
350
|
+
7,180,0.56,1,0
|
|
351
|
+
7,181,0.56,1,0
|
|
352
|
+
7,182,0.56,1,0
|
|
353
|
+
7,183,0.56,1,0
|
|
354
|
+
7,184,0.56,1,0
|
|
355
|
+
7,185,0.56,1,0
|
|
356
|
+
7,186,0.56,1,0
|
|
357
|
+
7,187,0.56,1,0
|
|
358
|
+
7,188,0.56,1,0
|
|
359
|
+
7,189,0.56,1,0
|
|
360
|
+
7,190,0.56,1,0
|
|
361
|
+
7,191,0.56,1,0
|
|
362
|
+
7,360,0.56,1,0
|
|
363
|
+
7,361,0.56,1,0
|
|
364
|
+
7,362,0.56,1,0
|
|
365
|
+
7,363,0.56,1,0
|
|
366
|
+
7,364,0.56,1,0
|
|
367
|
+
7,365,0.56,1,0
|
|
368
|
+
7,366,0.56,1,0
|
|
369
|
+
7,367,0.56,1,0
|
|
370
|
+
7,368,0.56,1,0
|
|
371
|
+
7,369,0.56,1,0
|
|
372
|
+
7,370,0.56,1,0
|
|
373
|
+
7,371,0.56,1,0
|
|
374
|
+
7,540,0.56,1,0
|
|
375
|
+
7,541,0.56,1,0
|
|
376
|
+
7,542,0.56,1,0
|
|
377
|
+
7,543,0.56,1,0
|
|
378
|
+
7,544,0.56,1,0
|
|
379
|
+
7,545,0.56,1,0
|
|
380
|
+
7,546,0.56,1,0
|
|
381
|
+
7,547,0.56,1,0
|
|
382
|
+
7,548,0.56,1,0
|
|
383
|
+
7,549,0.56,1,0
|
|
384
|
+
7,550,0.56,1,0
|
|
385
|
+
7,551,0.56,1,0
|
|
@@ -5,26 +5,26 @@ from imap_processing.swe.l1a.swe_l1a import swe_l1a
|
|
|
5
5
|
|
|
6
6
|
def test_cdf_creation():
|
|
7
7
|
test_data_path = "tests/swe/l0_data/2024051010_SWE_SCIENCE_packet.bin"
|
|
8
|
-
processed_data = swe_l1a(imap_module_directory / test_data_path
|
|
8
|
+
processed_data = swe_l1a(imap_module_directory / test_data_path)
|
|
9
9
|
|
|
10
10
|
cem_raw_cdf_filepath = write_cdf(processed_data[0])
|
|
11
11
|
|
|
12
|
-
assert cem_raw_cdf_filepath.name == "
|
|
12
|
+
assert cem_raw_cdf_filepath.name == "imap_swe_l1a_sci_20240510_v999.cdf"
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
def test_cdf_creation_hk():
|
|
16
16
|
test_data_path = "tests/swe/l0_data/2024051010_SWE_HK_packet.bin"
|
|
17
|
-
processed_data = swe_l1a(imap_module_directory / test_data_path
|
|
17
|
+
processed_data = swe_l1a(imap_module_directory / test_data_path)
|
|
18
18
|
|
|
19
19
|
hk_cdf_filepath = write_cdf(processed_data[0])
|
|
20
20
|
|
|
21
|
-
assert hk_cdf_filepath.name == "
|
|
21
|
+
assert hk_cdf_filepath.name == "imap_swe_l1a_hk_20240510_v999.cdf"
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
def test_cdf_creation_cem_raw():
|
|
25
25
|
test_data_path = "tests/swe/l0_data/2024051011_SWE_CEM_RAW_packet.bin"
|
|
26
|
-
processed_data = swe_l1a(imap_module_directory / test_data_path
|
|
26
|
+
processed_data = swe_l1a(imap_module_directory / test_data_path)
|
|
27
27
|
|
|
28
28
|
cem_raw_cdf_filepath = write_cdf(processed_data[0])
|
|
29
29
|
|
|
30
|
-
assert cem_raw_cdf_filepath.name == "imap_swe_l1a_cem-
|
|
30
|
+
assert cem_raw_cdf_filepath.name == "imap_swe_l1a_cem-raw_20240510_v999.cdf"
|