imap-processing 0.11.0__py3-none-any.whl → 0.12.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 (288) hide show
  1. imap_processing/__init__.py +10 -11
  2. imap_processing/_version.py +2 -2
  3. imap_processing/ccsds/excel_to_xtce.py +65 -16
  4. imap_processing/cdf/config/imap_codice_global_cdf_attrs.yaml +6 -28
  5. imap_processing/cdf/config/imap_codice_l1a_variable_attrs.yaml +365 -42
  6. imap_processing/cdf/config/imap_glows_global_cdf_attrs.yaml +0 -5
  7. imap_processing/cdf/config/imap_hi_global_cdf_attrs.yaml +10 -11
  8. imap_processing/cdf/config/imap_hi_variable_attrs.yaml +17 -19
  9. imap_processing/cdf/config/imap_hit_global_cdf_attrs.yaml +26 -13
  10. imap_processing/cdf/config/imap_hit_l1a_variable_attrs.yaml +106 -116
  11. imap_processing/cdf/config/imap_hit_l1b_variable_attrs.yaml +120 -145
  12. imap_processing/cdf/config/imap_hit_l2_variable_attrs.yaml +14 -0
  13. imap_processing/cdf/config/imap_idex_global_cdf_attrs.yaml +6 -9
  14. imap_processing/cdf/config/imap_idex_l1a_variable_attrs.yaml +1 -1
  15. imap_processing/cdf/config/imap_lo_global_cdf_attrs.yaml +0 -12
  16. imap_processing/cdf/config/imap_lo_l1a_variable_attrs.yaml +1 -1
  17. imap_processing/cdf/config/imap_mag_global_cdf_attrs.yaml +9 -21
  18. imap_processing/cdf/config/imap_mag_l1a_variable_attrs.yaml +361 -0
  19. imap_processing/cdf/config/imap_mag_l1b_variable_attrs.yaml +160 -0
  20. imap_processing/cdf/config/imap_mag_l1c_variable_attrs.yaml +160 -0
  21. imap_processing/cdf/config/imap_spacecraft_global_cdf_attrs.yaml +18 -0
  22. imap_processing/cdf/config/imap_spacecraft_variable_attrs.yaml +40 -0
  23. imap_processing/cdf/config/imap_swapi_global_cdf_attrs.yaml +1 -5
  24. imap_processing/cdf/config/imap_swe_global_cdf_attrs.yaml +12 -4
  25. imap_processing/cdf/config/imap_swe_l1a_variable_attrs.yaml +16 -2
  26. imap_processing/cdf/config/imap_swe_l1b_variable_attrs.yaml +48 -52
  27. imap_processing/cdf/config/imap_swe_l2_variable_attrs.yaml +71 -47
  28. imap_processing/cdf/config/imap_ultra_global_cdf_attrs.yaml +2 -14
  29. imap_processing/cdf/config/imap_ultra_l1b_variable_attrs.yaml +51 -2
  30. imap_processing/cdf/config/imap_ultra_l1c_variable_attrs.yaml +29 -14
  31. imap_processing/cdf/utils.py +13 -7
  32. imap_processing/cli.py +23 -8
  33. imap_processing/codice/codice_l1a.py +207 -85
  34. imap_processing/codice/constants.py +1322 -568
  35. imap_processing/codice/decompress.py +2 -6
  36. imap_processing/ena_maps/ena_maps.py +480 -116
  37. imap_processing/ena_maps/utils/coordinates.py +19 -0
  38. imap_processing/ena_maps/utils/map_utils.py +14 -17
  39. imap_processing/ena_maps/utils/spatial_utils.py +45 -47
  40. imap_processing/hi/l1a/hi_l1a.py +24 -18
  41. imap_processing/hi/l1a/histogram.py +0 -1
  42. imap_processing/hi/l1a/science_direct_event.py +6 -8
  43. imap_processing/hi/l1b/hi_l1b.py +31 -39
  44. imap_processing/hi/l1c/hi_l1c.py +405 -17
  45. imap_processing/hi/utils.py +58 -12
  46. imap_processing/hit/ancillary/imap_hit_l1b-to-l2-standard-dt0-factors_20250219_v002.csv +205 -0
  47. imap_processing/hit/ancillary/imap_hit_l1b-to-l2-standard-dt1-factors_20250219_v002.csv +205 -0
  48. imap_processing/hit/ancillary/imap_hit_l1b-to-l2-standard-dt2-factors_20250219_v002.csv +205 -0
  49. imap_processing/hit/ancillary/imap_hit_l1b-to-l2-standard-dt3-factors_20250219_v002.csv +205 -0
  50. imap_processing/hit/ancillary/imap_hit_l1b-to-l2-summed-dt0-factors_20250219_v002.csv +68 -0
  51. imap_processing/hit/hit_utils.py +173 -1
  52. imap_processing/hit/l0/constants.py +20 -11
  53. imap_processing/hit/l0/decom_hit.py +18 -4
  54. imap_processing/hit/l1a/hit_l1a.py +45 -54
  55. imap_processing/hit/l1b/constants.py +317 -0
  56. imap_processing/hit/l1b/hit_l1b.py +367 -18
  57. imap_processing/hit/l2/constants.py +281 -0
  58. imap_processing/hit/l2/hit_l2.py +614 -0
  59. imap_processing/hit/packet_definitions/hit_packet_definitions.xml +1323 -71
  60. imap_processing/ialirt/l0/mag_l0_ialirt_data.py +155 -0
  61. imap_processing/ialirt/l0/parse_mag.py +246 -0
  62. imap_processing/ialirt/l0/process_swe.py +252 -0
  63. imap_processing/ialirt/packet_definitions/ialirt.xml +7 -3
  64. imap_processing/ialirt/packet_definitions/ialirt_mag.xml +115 -0
  65. imap_processing/ialirt/utils/grouping.py +114 -0
  66. imap_processing/ialirt/utils/time.py +29 -0
  67. imap_processing/idex/atomic_masses.csv +22 -0
  68. imap_processing/idex/decode.py +2 -2
  69. imap_processing/idex/idex_constants.py +25 -0
  70. imap_processing/idex/idex_l1a.py +6 -7
  71. imap_processing/idex/idex_l1b.py +4 -31
  72. imap_processing/idex/idex_l2a.py +789 -0
  73. imap_processing/idex/idex_variable_unpacking_and_eu_conversion.csv +39 -33
  74. imap_processing/lo/l0/lo_science.py +6 -0
  75. imap_processing/lo/l1a/lo_l1a.py +0 -1
  76. imap_processing/lo/l1b/lo_l1b.py +177 -25
  77. imap_processing/mag/constants.py +8 -0
  78. imap_processing/mag/imap_mag_sdc-configuration_v001.yaml +6 -0
  79. imap_processing/mag/l0/decom_mag.py +10 -3
  80. imap_processing/mag/l1a/mag_l1a.py +22 -11
  81. imap_processing/mag/l1a/mag_l1a_data.py +28 -3
  82. imap_processing/mag/l1b/mag_l1b.py +190 -48
  83. imap_processing/mag/l1c/interpolation_methods.py +211 -0
  84. imap_processing/mag/l1c/mag_l1c.py +447 -9
  85. imap_processing/quality_flags.py +1 -0
  86. imap_processing/spacecraft/packet_definitions/scid_x252.xml +538 -0
  87. imap_processing/spacecraft/quaternions.py +123 -0
  88. imap_processing/spice/geometry.py +16 -19
  89. imap_processing/spice/repoint.py +120 -0
  90. imap_processing/swapi/l1/swapi_l1.py +4 -0
  91. imap_processing/swapi/l2/swapi_l2.py +0 -1
  92. imap_processing/swe/l1a/swe_l1a.py +47 -8
  93. imap_processing/swe/l1a/swe_science.py +5 -2
  94. imap_processing/swe/l1b/swe_l1b_science.py +103 -56
  95. imap_processing/swe/l2/swe_l2.py +60 -65
  96. imap_processing/swe/packet_definitions/swe_packet_definition.xml +1121 -1
  97. imap_processing/swe/utils/swe_constants.py +63 -0
  98. imap_processing/swe/utils/swe_utils.py +85 -28
  99. imap_processing/tests/ccsds/test_data/expected_output.xml +40 -1
  100. imap_processing/tests/ccsds/test_excel_to_xtce.py +23 -20
  101. imap_processing/tests/cdf/test_data/imap_instrument2_global_cdf_attrs.yaml +0 -2
  102. imap_processing/tests/codice/conftest.py +1 -1
  103. imap_processing/tests/codice/data/validation/imap_codice_l1a_hi-counters-aggregated_20241110193700_v0.0.0.cdf +0 -0
  104. imap_processing/tests/codice/data/validation/imap_codice_l1a_hi-counters-singles_20241110193700_v0.0.0.cdf +0 -0
  105. imap_processing/tests/codice/data/validation/imap_codice_l1a_hi-ialirt_20241110193700_v0.0.0.cdf +0 -0
  106. imap_processing/tests/codice/data/validation/imap_codice_l1a_hi-omni_20241110193700_v0.0.0.cdf +0 -0
  107. imap_processing/tests/codice/data/validation/imap_codice_l1a_hi-pha_20241110193700_v0.0.0.cdf +0 -0
  108. imap_processing/tests/codice/data/validation/imap_codice_l1a_hi-priorities_20241110193700_v0.0.0.cdf +0 -0
  109. imap_processing/tests/codice/data/validation/imap_codice_l1a_hi-sectored_20241110193700_v0.0.0.cdf +0 -0
  110. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-counters-aggregated_20241110193700_v0.0.0.cdf +0 -0
  111. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-counters-singles_20241110193700_v0.0.0.cdf +0 -0
  112. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-ialirt_20241110193700_v0.0.0.cdf +0 -0
  113. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-nsw-angular_20241110193700_v0.0.0.cdf +0 -0
  114. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-nsw-priority_20241110193700_v0.0.0.cdf +0 -0
  115. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-nsw-species_20241110193700_v0.0.0.cdf +0 -0
  116. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-pha_20241110193700_v0.0.0.cdf +0 -0
  117. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-sw-angular_20241110193700_v0.0.0.cdf +0 -0
  118. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-sw-priority_20241110193700_v0.0.0.cdf +0 -0
  119. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-sw-species_20241110193700_v0.0.0.cdf +0 -0
  120. imap_processing/tests/codice/test_codice_l1a.py +110 -46
  121. imap_processing/tests/codice/test_decompress.py +4 -4
  122. imap_processing/tests/conftest.py +166 -10
  123. imap_processing/tests/ena_maps/conftest.py +51 -0
  124. imap_processing/tests/ena_maps/test_ena_maps.py +638 -109
  125. imap_processing/tests/ena_maps/test_map_utils.py +66 -43
  126. imap_processing/tests/ena_maps/test_spatial_utils.py +16 -20
  127. imap_processing/tests/hi/data/l0/H45_diag_fee_20250208.bin +0 -0
  128. imap_processing/tests/hi/data/l0/H45_diag_fee_20250208_verify.csv +205 -0
  129. imap_processing/tests/hi/test_hi_l1b.py +12 -15
  130. imap_processing/tests/hi/test_hi_l1c.py +234 -6
  131. imap_processing/tests/hi/test_l1a.py +30 -0
  132. imap_processing/tests/hi/test_science_direct_event.py +1 -1
  133. imap_processing/tests/hi/test_utils.py +24 -2
  134. imap_processing/tests/hit/helpers/l1_validation.py +39 -39
  135. imap_processing/tests/hit/test_data/hskp_sample.ccsds +0 -0
  136. imap_processing/tests/hit/test_data/imap_hit_l0_raw_20100105_v001.pkts +0 -0
  137. imap_processing/tests/hit/test_decom_hit.py +4 -0
  138. imap_processing/tests/hit/test_hit_l1a.py +24 -28
  139. imap_processing/tests/hit/test_hit_l1b.py +304 -40
  140. imap_processing/tests/hit/test_hit_l2.py +454 -0
  141. imap_processing/tests/hit/test_hit_utils.py +112 -2
  142. imap_processing/tests/hit/validation_data/hskp_sample_eu_3_6_2025.csv +89 -0
  143. imap_processing/tests/hit/validation_data/hskp_sample_raw.csv +89 -88
  144. imap_processing/tests/ialirt/test_data/l0/461971383-404.bin +0 -0
  145. imap_processing/tests/ialirt/test_data/l0/461971384-405.bin +0 -0
  146. imap_processing/tests/ialirt/test_data/l0/461971385-406.bin +0 -0
  147. imap_processing/tests/ialirt/test_data/l0/461971386-407.bin +0 -0
  148. imap_processing/tests/ialirt/test_data/l0/461971387-408.bin +0 -0
  149. imap_processing/tests/ialirt/test_data/l0/461971388-409.bin +0 -0
  150. imap_processing/tests/ialirt/test_data/l0/461971389-410.bin +0 -0
  151. imap_processing/tests/ialirt/test_data/l0/461971390-411.bin +0 -0
  152. imap_processing/tests/ialirt/test_data/l0/461971391-412.bin +0 -0
  153. imap_processing/tests/ialirt/test_data/l0/sample_decoded_i-alirt_data.csv +383 -0
  154. imap_processing/tests/ialirt/unit/test_grouping.py +81 -0
  155. imap_processing/tests/ialirt/unit/test_parse_mag.py +168 -0
  156. imap_processing/tests/ialirt/unit/test_process_swe.py +208 -3
  157. imap_processing/tests/ialirt/unit/test_time.py +16 -0
  158. imap_processing/tests/idex/conftest.py +62 -6
  159. imap_processing/tests/idex/test_data/imap_idex_l0_raw_20231218_v001.pkts +0 -0
  160. imap_processing/tests/idex/test_data/impact_14_tof_high_data.txt +4508 -4508
  161. imap_processing/tests/idex/test_idex_l1a.py +48 -4
  162. imap_processing/tests/idex/test_idex_l1b.py +3 -3
  163. imap_processing/tests/idex/test_idex_l2a.py +383 -0
  164. imap_processing/tests/lo/test_cdfs/imap_lo_l1a_de_20241022_v002.cdf +0 -0
  165. imap_processing/tests/lo/test_cdfs/imap_lo_l1a_spin_20241022_v002.cdf +0 -0
  166. imap_processing/tests/lo/test_lo_l1b.py +148 -4
  167. imap_processing/tests/lo/test_lo_science.py +1 -0
  168. imap_processing/tests/mag/conftest.py +69 -0
  169. imap_processing/tests/mag/test_mag_decom.py +1 -1
  170. imap_processing/tests/mag/test_mag_l1a.py +38 -0
  171. imap_processing/tests/mag/test_mag_l1b.py +34 -53
  172. imap_processing/tests/mag/test_mag_l1c.py +251 -20
  173. imap_processing/tests/mag/test_mag_validation.py +109 -25
  174. imap_processing/tests/mag/validation/L1b/T009/MAGScience-normal-(2,2)-8s-20250204-16h39.csv +17 -0
  175. imap_processing/tests/mag/validation/L1b/T009/mag-l1a-l1b-t009-magi-out.csv +16 -16
  176. imap_processing/tests/mag/validation/L1b/T009/mag-l1a-l1b-t009-mago-out.csv +16 -16
  177. imap_processing/tests/mag/validation/L1b/T010/MAGScience-normal-(2,2)-8s-20250206-12h05.csv +17 -0
  178. imap_processing/tests/mag/validation/L1b/T011/MAGScience-normal-(2,2)-8s-20250204-16h08.csv +17 -0
  179. imap_processing/tests/mag/validation/L1b/T011/mag-l1a-l1b-t011-magi-out.csv +16 -16
  180. imap_processing/tests/mag/validation/L1b/T011/mag-l1a-l1b-t011-mago-out.csv +16 -16
  181. imap_processing/tests/mag/validation/L1b/T012/MAGScience-normal-(2,2)-8s-20250204-16h08.csv +17 -0
  182. imap_processing/tests/mag/validation/L1b/T012/data.bin +0 -0
  183. imap_processing/tests/mag/validation/L1b/T012/field_like_all_ranges.txt +19200 -0
  184. imap_processing/tests/mag/validation/L1b/T012/mag-l1a-l1b-t012-cal.cdf +0 -0
  185. imap_processing/tests/mag/validation/L1b/T012/mag-l1a-l1b-t012-in.csv +17 -0
  186. imap_processing/tests/mag/validation/L1b/T012/mag-l1a-l1b-t012-magi-out.csv +17 -0
  187. imap_processing/tests/mag/validation/L1b/T012/mag-l1a-l1b-t012-mago-out.csv +17 -0
  188. imap_processing/tests/mag/validation/imap_calibration_mag_20240229_v01.cdf +0 -0
  189. imap_processing/tests/spacecraft/__init__.py +0 -0
  190. imap_processing/tests/spacecraft/data/SSR_2024_190_20_08_12_0483851794_2_DA_apid0594_1packet.pkts +0 -0
  191. imap_processing/tests/spacecraft/test_quaternions.py +71 -0
  192. imap_processing/tests/spice/test_data/fake_repoint_data.csv +5 -0
  193. imap_processing/tests/spice/test_geometry.py +6 -9
  194. imap_processing/tests/spice/test_repoint.py +111 -0
  195. imap_processing/tests/swapi/test_swapi_l1.py +7 -3
  196. imap_processing/tests/swe/l0_data/2024051010_SWE_HK_packet.bin +0 -0
  197. imap_processing/tests/swe/l0_data/2024051011_SWE_CEM_RAW_packet.bin +0 -0
  198. imap_processing/tests/swe/l0_validation_data/idle_export_eu.SWE_APP_HK_20240510_092742.csv +49 -0
  199. imap_processing/tests/swe/l0_validation_data/idle_export_eu.SWE_CEM_RAW_20240510_092742.csv +593 -0
  200. imap_processing/tests/swe/test_swe_l1a.py +18 -0
  201. imap_processing/tests/swe/test_swe_l1a_cem_raw.py +52 -0
  202. imap_processing/tests/swe/test_swe_l1a_hk.py +68 -0
  203. imap_processing/tests/swe/test_swe_l1b_science.py +23 -4
  204. imap_processing/tests/swe/test_swe_l2.py +112 -30
  205. imap_processing/tests/test_cli.py +2 -2
  206. imap_processing/tests/test_utils.py +138 -16
  207. imap_processing/tests/ultra/data/l0/FM45_UltraFM45_Functional_2024-01-22T0105_20240122T010548.CCSDS +0 -0
  208. imap_processing/tests/ultra/data/l0/ultra45_raw_sc_ultraimgrates_20220530_00.csv +164 -0
  209. imap_processing/tests/ultra/{test_data → data}/l0/ultra45_raw_sc_ultrarawimg_withFSWcalcs_FM45_40P_Phi28p5_BeamCal_LinearScan_phi2850_theta-000_20240207T102740.csv +3243 -3243
  210. imap_processing/tests/ultra/data/mock_data.py +341 -0
  211. imap_processing/tests/ultra/unit/conftest.py +69 -26
  212. imap_processing/tests/ultra/unit/test_badtimes.py +2 -0
  213. imap_processing/tests/ultra/unit/test_cullingmask.py +4 -0
  214. imap_processing/tests/ultra/unit/test_de.py +12 -4
  215. imap_processing/tests/ultra/unit/test_decom_apid_881.py +44 -0
  216. imap_processing/tests/ultra/unit/test_spacecraft_pset.py +78 -0
  217. imap_processing/tests/ultra/unit/test_ultra_l1a.py +28 -12
  218. imap_processing/tests/ultra/unit/test_ultra_l1b.py +34 -6
  219. imap_processing/tests/ultra/unit/test_ultra_l1b_culling.py +22 -26
  220. imap_processing/tests/ultra/unit/test_ultra_l1b_extended.py +86 -51
  221. imap_processing/tests/ultra/unit/test_ultra_l1c_pset_bins.py +94 -52
  222. imap_processing/ultra/l0/decom_tools.py +6 -5
  223. imap_processing/ultra/l1a/ultra_l1a.py +28 -56
  224. imap_processing/ultra/l1b/de.py +72 -28
  225. imap_processing/ultra/l1b/extendedspin.py +12 -14
  226. imap_processing/ultra/l1b/ultra_l1b.py +34 -9
  227. imap_processing/ultra/l1b/ultra_l1b_culling.py +65 -29
  228. imap_processing/ultra/l1b/ultra_l1b_extended.py +64 -19
  229. imap_processing/ultra/l1c/spacecraft_pset.py +86 -0
  230. imap_processing/ultra/l1c/ultra_l1c.py +7 -4
  231. imap_processing/ultra/l1c/ultra_l1c_pset_bins.py +112 -61
  232. imap_processing/ultra/lookup_tables/ultra_90_dps_exposure_compressed.cdf +0 -0
  233. imap_processing/ultra/utils/ultra_l1_utils.py +20 -2
  234. imap_processing/utils.py +68 -28
  235. {imap_processing-0.11.0.dist-info → imap_processing-0.12.0.dist-info}/METADATA +8 -5
  236. {imap_processing-0.11.0.dist-info → imap_processing-0.12.0.dist-info}/RECORD +250 -199
  237. imap_processing/cdf/config/imap_mag_l1_variable_attrs.yaml +0 -237
  238. imap_processing/hi/l1a/housekeeping.py +0 -27
  239. imap_processing/tests/codice/data/imap_codice_l1a_hi-counters-aggregated_20240429_v001.cdf +0 -0
  240. imap_processing/tests/codice/data/imap_codice_l1a_hi-counters-singles_20240429_v001.cdf +0 -0
  241. imap_processing/tests/codice/data/imap_codice_l1a_hi-omni_20240429_v001.cdf +0 -0
  242. imap_processing/tests/codice/data/imap_codice_l1a_hi-sectored_20240429_v001.cdf +0 -0
  243. imap_processing/tests/codice/data/imap_codice_l1a_hskp_20100101_v001.cdf +0 -0
  244. imap_processing/tests/codice/data/imap_codice_l1a_lo-counters-aggregated_20240429_v001.cdf +0 -0
  245. imap_processing/tests/codice/data/imap_codice_l1a_lo-counters-singles_20240429_v001.cdf +0 -0
  246. imap_processing/tests/codice/data/imap_codice_l1a_lo-nsw-angular_20240429_v001.cdf +0 -0
  247. imap_processing/tests/codice/data/imap_codice_l1a_lo-nsw-priority_20240429_v001.cdf +0 -0
  248. imap_processing/tests/codice/data/imap_codice_l1a_lo-nsw-species_20240429_v001.cdf +0 -0
  249. imap_processing/tests/codice/data/imap_codice_l1a_lo-sw-angular_20240429_v001.cdf +0 -0
  250. imap_processing/tests/codice/data/imap_codice_l1a_lo-sw-priority_20240429_v001.cdf +0 -0
  251. imap_processing/tests/codice/data/imap_codice_l1a_lo-sw-species_20240429_v001.cdf +0 -0
  252. imap_processing/tests/codice/data/imap_codice_l1b_hi-counters-aggregated_20240429_v001.cdf +0 -0
  253. imap_processing/tests/codice/data/imap_codice_l1b_hi-counters-singles_20240429_v001.cdf +0 -0
  254. imap_processing/tests/codice/data/imap_codice_l1b_hi-omni_20240429_v001.cdf +0 -0
  255. imap_processing/tests/codice/data/imap_codice_l1b_hi-sectored_20240429_v001.cdf +0 -0
  256. imap_processing/tests/codice/data/imap_codice_l1b_hskp_20100101_v001.cdf +0 -0
  257. imap_processing/tests/codice/data/imap_codice_l1b_lo-counters-aggregated_20240429_v001.cdf +0 -0
  258. imap_processing/tests/codice/data/imap_codice_l1b_lo-counters-singles_20240429_v001.cdf +0 -0
  259. imap_processing/tests/codice/data/imap_codice_l1b_lo-nsw-angular_20240429_v001.cdf +0 -0
  260. imap_processing/tests/codice/data/imap_codice_l1b_lo-nsw-priority_20240429_v001.cdf +0 -0
  261. imap_processing/tests/codice/data/imap_codice_l1b_lo-nsw-species_20240429_v001.cdf +0 -0
  262. imap_processing/tests/codice/data/imap_codice_l1b_lo-sw-angular_20240429_v001.cdf +0 -0
  263. imap_processing/tests/codice/data/imap_codice_l1b_lo-sw-priority_20240429_v001.cdf +0 -0
  264. imap_processing/tests/codice/data/imap_codice_l1b_lo-sw-species_20240429_v001.cdf +0 -0
  265. imap_processing/tests/hi/data/l1/imap_hi_l1b_45sensor-de_20250415_v999.cdf +0 -0
  266. imap_processing/tests/hit/PREFLIGHT_raw_record_2023_256_15_59_04_apid1251.pkts +0 -0
  267. imap_processing/tests/hit/PREFLIGHT_raw_record_2023_256_15_59_04_apid1252.pkts +0 -0
  268. imap_processing/tests/hit/validation_data/hskp_sample_eu.csv +0 -89
  269. imap_processing/tests/hit/validation_data/sci_sample_raw1.csv +0 -29
  270. imap_processing/tests/idex/test_data/imap_idex_l0_raw_20231214_v001.pkts +0 -0
  271. imap_processing/tests/lo/test_cdfs/imap_lo_l1a_de_20100101_v001.cdf +0 -0
  272. imap_processing/tests/lo/test_cdfs/imap_lo_l1a_spin_20100101_v001.cdf +0 -0
  273. imap_processing/tests/ultra/test_data/mock_data.py +0 -161
  274. imap_processing/ultra/l1c/pset.py +0 -40
  275. /imap_processing/tests/ultra/{test_data → data}/l0/FM45_40P_Phi28p5_BeamCal_LinearScan_phi28.50_theta-0.00_20240207T102740.CCSDS +0 -0
  276. /imap_processing/tests/ultra/{test_data → data}/l0/FM45_7P_Phi0.0_BeamCal_LinearScan_phi0.04_theta-0.01_20230821T121304.CCSDS +0 -0
  277. /imap_processing/tests/ultra/{test_data → data}/l0/FM45_TV_Cycle6_Hot_Ops_Front212_20240124T063837.CCSDS +0 -0
  278. /imap_processing/tests/ultra/{test_data → data}/l0/Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.CCSDS +0 -0
  279. /imap_processing/tests/ultra/{test_data → data}/l0/ultra45_raw_sc_auxdata_Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.csv +0 -0
  280. /imap_processing/tests/ultra/{test_data → data}/l0/ultra45_raw_sc_enaphxtofhangimg_FM45_TV_Cycle6_Hot_Ops_Front212_20240124T063837.csv +0 -0
  281. /imap_processing/tests/ultra/{test_data → data}/l0/ultra45_raw_sc_ultraimgrates_Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.csv +0 -0
  282. /imap_processing/tests/ultra/{test_data → data}/l0/ultra45_raw_sc_ultrarawimgevent_FM45_7P_Phi00_BeamCal_LinearScan_phi004_theta-001_20230821T121304.csv +0 -0
  283. /imap_processing/tests/ultra/{test_data → data}/l1/dps_exposure_helio_45_E1.cdf +0 -0
  284. /imap_processing/tests/ultra/{test_data → data}/l1/dps_exposure_helio_45_E12.cdf +0 -0
  285. /imap_processing/tests/ultra/{test_data → data}/l1/dps_exposure_helio_45_E24.cdf +0 -0
  286. {imap_processing-0.11.0.dist-info → imap_processing-0.12.0.dist-info}/LICENSE +0 -0
  287. {imap_processing-0.11.0.dist-info → imap_processing-0.12.0.dist-info}/WHEEL +0 -0
  288. {imap_processing-0.11.0.dist-info → imap_processing-0.12.0.dist-info}/entry_points.txt +0 -0
@@ -1,11 +1,12 @@
1
1
  """
2
2
  Contains constants variables to support CoDICE processing.
3
3
 
4
+ Notes
5
+ -----
4
6
  The ``plan_id``, ``plan_step``, and ``view_id`` mentioned in this module are
5
7
  derived from the packet data.
6
8
 
7
- Notes
8
- -----
9
+ Some notable acronyms:
9
10
  SW = SunWard
10
11
  NSW = Non-SunWard
11
12
  PUI = PickUp Ion
@@ -14,8 +15,10 @@ ESA = ElectroStatic Analyzer
14
15
 
15
16
  from imap_processing.codice.utils import CODICEAPID, CoDICECompression
16
17
 
18
+ # Grouping of APIDs used to signify similar L1a processing
17
19
  APIDS_FOR_SCIENCE_PROCESSING = [
18
20
  CODICEAPID.COD_HI_INST_COUNTS_AGGREGATED,
21
+ CODICEAPID.COD_HI_INST_COUNTS_PRIORITIES,
19
22
  CODICEAPID.COD_HI_INST_COUNTS_SINGLES,
20
23
  CODICEAPID.COD_HI_OMNI_SPECIES_COUNTS,
21
24
  CODICEAPID.COD_HI_SECT_SPECIES_COUNTS,
@@ -29,8 +32,10 @@ APIDS_FOR_SCIENCE_PROCESSING = [
29
32
  CODICEAPID.COD_LO_NSW_SPECIES_COUNTS,
30
33
  ]
31
34
 
35
+ # Numerical constants
36
+ SPIN_PERIOD_CONVERSION = 0.00032
32
37
 
33
- # CDF-friendly names for lo data products
38
+ # CDF variable names used for lo data products
34
39
  LO_COUNTERS_SINGLES_VARIABLE_NAMES = ["apd_singles"]
35
40
  LO_SW_ANGULAR_VARIABLE_NAMES = ["hplus", "heplusplus", "oplus6", "fe_loq"]
36
41
  LO_NSW_ANGULAR_VARIABLE_NAMES = ["heplusplus"]
@@ -71,14 +76,21 @@ LO_NSW_SPECIES_VARIABLE_NAMES = [
71
76
  "cnoplus",
72
77
  ]
73
78
 
74
- # CDF-friendly names for hi data products
75
- HI_INST_COUNTS_AGGREGATED_VARIABLE_NAMES = ["aggregated"]
76
- HI_INST_COUNTS_SINGLES_VARIABLE_NAMES = ["tcr", "ssdo", "stssd"]
77
- HI_OMNI_SPECIES_VARIABLE_NAMES = ["h", "he3", "he4", "c", "o", "ne_mg_si", "fe", "uh"]
78
- HI_SECT_SPECIES_VARIABLE_NAMES = ["h", "he3he4", "cno", "fe"]
79
+ # CDF variable names used for hi data products
80
+ HI_COUNTERS_SINGLES_VARIABLE_NAMES = ["tcr", "ssdo", "stssd"]
81
+ HI_OMNI_VARIABLE_NAMES = ["h", "he3", "he4", "c", "o", "ne_mg_si", "fe", "uh"]
82
+ HI_PRIORITY_VARIABLE_NAMES = [
83
+ "Priority0",
84
+ "Priority1",
85
+ "Priority2",
86
+ "Priority3",
87
+ "Priority4",
88
+ "Priority5",
89
+ ]
90
+ HI_SECTORED_VARIABLE_NAMES = ["h", "he3he4", "cno", "fe"]
79
91
 
80
- # lo-counters-aggregated data product variables are dynamically determined
81
- # based on the number of active counters
92
+ # lo- and hi-counters-aggregated data product variables are dynamically
93
+ # determined based on the number of active counters
82
94
  # TODO: Try to convince Joey to move to lower case variable names with
83
95
  # underscores?
84
96
  LO_COUNTERS_AGGREGATED_ACTIVE_VARIABLES = {
@@ -116,65 +128,122 @@ LO_COUNTERS_AGGREGATED_VARIABLE_NAMES = [
116
128
  for name, is_active in LO_COUNTERS_AGGREGATED_ACTIVE_VARIABLES.items()
117
129
  if is_active
118
130
  ]
131
+ HI_COUNTERS_AGGREGATED_ACTIVE_VARIABLES = {
132
+ "DCR": True,
133
+ "STO": True,
134
+ "SPO": True,
135
+ "Reserved1": False,
136
+ "MST": True,
137
+ "Reserved2": False,
138
+ "Reserved3": False,
139
+ "Reserved4": False,
140
+ "Reserved5": False,
141
+ "LowTOFCutoff": False,
142
+ "Reserved6": False,
143
+ "Reserved7": False,
144
+ "ASIC1FlagInvalid": True,
145
+ "ASIC2FlagInvalid": True,
146
+ "ASIC1ChannelInvalid": False,
147
+ "ASIC2ChannelInvalid": False,
148
+ }
149
+ HI_COUNTERS_AGGREGATED_VARIABLE_NAMES = [
150
+ name
151
+ for name, is_active in HI_COUNTERS_AGGREGATED_ACTIVE_VARIABLES.items()
152
+ if is_active
153
+ ]
119
154
 
120
155
  # TODO: Possibly move to consistent order of dimensions with other instruments
121
156
  # TBD after discussion with Joey and at the Science Team Meeting in Feb
157
+ # Various configurations to support processing of individual data products
158
+ # Much of these are described in the algorithm document in chapter 10 ("Data
159
+ # Level 1A")
122
160
  DATA_PRODUCT_CONFIGURATIONS = {
123
161
  CODICEAPID.COD_HI_INST_COUNTS_AGGREGATED: {
124
162
  "dataset_name": "imap_codice_l1a_hi-counters-aggregated",
125
- "dims": {
126
- "esa_step": 1,
127
- "inst_az": 6,
128
- "spin_sector": 1,
129
- }, # TODO: Double check with Joey
163
+ "input_dims": {},
130
164
  "instrument": "hi",
131
- "num_counters": 1,
132
- "support_variables": [], # TODO: Double check with Joey
133
- "variable_names": HI_INST_COUNTS_AGGREGATED_VARIABLE_NAMES,
165
+ "num_counters": len(
166
+ HI_COUNTERS_AGGREGATED_VARIABLE_NAMES
167
+ ), # The number of counters depends on the number of active counters
168
+ "output_dims": {},
169
+ "support_variables": ["data_quality", "spin_period"],
170
+ "variable_names": HI_COUNTERS_AGGREGATED_VARIABLE_NAMES,
134
171
  },
135
172
  CODICEAPID.COD_HI_INST_COUNTS_SINGLES: {
136
173
  "dataset_name": "imap_codice_l1a_hi-counters-singles",
137
- "dims": {
138
- "esa_step": 1,
139
- "inst_az": 12,
140
- "spin_sector": 1,
141
- }, # TODO: Double check with Joey
174
+ "input_dims": {
175
+ "ssd_index": 12,
176
+ },
142
177
  "instrument": "hi",
143
178
  "num_counters": 3,
144
- "support_variables": [], # No support variables for this one
145
- "variable_names": HI_INST_COUNTS_SINGLES_VARIABLE_NAMES,
179
+ "output_dims": {
180
+ "ssd_index": 12,
181
+ },
182
+ "support_variables": ["data_quality", "spin_period"],
183
+ "variable_names": HI_COUNTERS_SINGLES_VARIABLE_NAMES,
184
+ },
185
+ CODICEAPID.COD_HI_INST_COUNTS_PRIORITIES: {
186
+ "dataset_name": "imap_codice_l1a_hi-priority",
187
+ "input_dims": {},
188
+ "instrument": "hi",
189
+ "num_counters": 6,
190
+ "output_dims": {},
191
+ "support_variables": ["data_quality", "spin_period"],
192
+ "variable_names": HI_PRIORITY_VARIABLE_NAMES,
146
193
  },
147
194
  CODICEAPID.COD_HI_OMNI_SPECIES_COUNTS: {
148
195
  "dataset_name": "imap_codice_l1a_hi-omni",
149
- "dims": {
150
- "esa_step": 15,
151
- "inst_az": 4,
152
- "spin_sector": 1,
153
- }, # TODO: Double check with Joey
196
+ "input_dims": {"esa_step": 15, "inst_az": 4},
154
197
  "instrument": "hi",
155
198
  "num_counters": 8,
156
- "support_variables": ["data_quality", "spin_period"],
157
- "variable_names": HI_OMNI_SPECIES_VARIABLE_NAMES,
199
+ "output_dims": {"esa_step": 15, "inst_az": 4},
200
+ "support_variables": [
201
+ "data_quality",
202
+ "spin_period",
203
+ "energy_h",
204
+ "energy_he3",
205
+ "energy_he4",
206
+ "energy_c",
207
+ "energy_o",
208
+ "energy_ne_mg_si",
209
+ "energy_fe",
210
+ "energy_uh",
211
+ "energy_junk",
212
+ ],
213
+ "variable_names": HI_OMNI_VARIABLE_NAMES,
158
214
  },
159
215
  CODICEAPID.COD_HI_SECT_SPECIES_COUNTS: {
160
216
  "dataset_name": "imap_codice_l1a_hi-sectored",
161
- "dims": {
217
+ "input_dims": {
162
218
  "esa_step": 8,
163
- "inst_az": 12,
164
- "spin_sector": 12,
165
- }, # TODO: Double check with Joey
219
+ "ssd_index": 12,
220
+ "spin_sector_index": 12,
221
+ },
166
222
  "instrument": "hi",
167
223
  "num_counters": 4,
168
- "support_variables": ["data_quality", "spin_period"],
169
- "variable_names": HI_SECT_SPECIES_VARIABLE_NAMES,
224
+ "output_dims": {
225
+ "esa_step": 8,
226
+ "ssd_index": 12,
227
+ "spin_sector_index": 12,
228
+ },
229
+ "support_variables": [
230
+ "data_quality",
231
+ "spin_period",
232
+ "energy_h",
233
+ "energy_he3he4",
234
+ "energy_cno",
235
+ "energy_fe",
236
+ ],
237
+ "variable_names": HI_SECTORED_VARIABLE_NAMES,
170
238
  },
171
239
  CODICEAPID.COD_LO_INST_COUNTS_AGGREGATED: {
172
240
  "dataset_name": "imap_codice_l1a_lo-counters-aggregated",
173
- "dims": {"spin_sector_pairs": 6, "esa_step": 128},
241
+ "input_dims": {"esa_step": 128, "spin_sector_pairs": 6},
174
242
  "instrument": "lo",
175
243
  "num_counters": len(
176
244
  LO_COUNTERS_AGGREGATED_VARIABLE_NAMES
177
- ), # The number of counters depencds on the number of active counters
245
+ ), # The number of counters depends on the number of active counters
246
+ "output_dims": {"spin_sector_pairs": 6, "esa_step": 128},
178
247
  "support_variables": [
179
248
  "energy_table",
180
249
  "acquisition_time_per_step",
@@ -189,9 +258,10 @@ DATA_PRODUCT_CONFIGURATIONS = {
189
258
  },
190
259
  CODICEAPID.COD_LO_INST_COUNTS_SINGLES: {
191
260
  "dataset_name": "imap_codice_l1a_lo-counters-singles",
192
- "dims": {"inst_az": 24, "spin_sector_pairs": 6, "esa_step": 128},
261
+ "input_dims": {"esa_step": 128, "inst_az": 24, "spin_sector_pairs": 6},
193
262
  "instrument": "lo",
194
263
  "num_counters": 1,
264
+ "output_dims": {"inst_az": 24, "spin_sector_pairs": 6, "esa_step": 128},
195
265
  "support_variables": [
196
266
  "energy_table",
197
267
  "acquisition_time_per_step",
@@ -206,9 +276,10 @@ DATA_PRODUCT_CONFIGURATIONS = {
206
276
  },
207
277
  CODICEAPID.COD_LO_SW_ANGULAR_COUNTS: {
208
278
  "dataset_name": "imap_codice_l1a_lo-sw-angular",
209
- "dims": {"inst_az": 5, "spin_sector": 12, "esa_step": 128},
279
+ "input_dims": {"esa_step": 128, "inst_az": 5, "spin_sector": 12},
210
280
  "instrument": "lo",
211
281
  "num_counters": 4,
282
+ "output_dims": {"inst_az": 5, "spin_sector": 12, "esa_step": 128},
212
283
  "support_variables": [
213
284
  "energy_table",
214
285
  "acquisition_time_per_step",
@@ -223,9 +294,10 @@ DATA_PRODUCT_CONFIGURATIONS = {
223
294
  },
224
295
  CODICEAPID.COD_LO_NSW_ANGULAR_COUNTS: {
225
296
  "dataset_name": "imap_codice_l1a_lo-nsw-angular",
226
- "dims": {"inst_az": 19, "spin_sector": 12, "esa_step": 128},
297
+ "input_dims": {"esa_step": 128, "inst_az": 19, "spin_sector": 12},
227
298
  "instrument": "lo",
228
299
  "num_counters": 1,
300
+ "output_dims": {"inst_az": 19, "spin_sector": 12, "esa_step": 128},
229
301
  "support_variables": [
230
302
  "energy_table",
231
303
  "acquisition_time_per_step",
@@ -240,9 +312,10 @@ DATA_PRODUCT_CONFIGURATIONS = {
240
312
  },
241
313
  CODICEAPID.COD_LO_SW_PRIORITY_COUNTS: {
242
314
  "dataset_name": "imap_codice_l1a_lo-sw-priority",
243
- "dims": {"spin_sector": 12, "esa_step": 128},
315
+ "input_dims": {"esa_step": 128, "spin_sector": 12},
244
316
  "instrument": "lo",
245
317
  "num_counters": 5,
318
+ "output_dims": {"spin_sector": 12, "esa_step": 128},
246
319
  "support_variables": [
247
320
  "energy_table",
248
321
  "acquisition_time_per_step",
@@ -257,9 +330,10 @@ DATA_PRODUCT_CONFIGURATIONS = {
257
330
  },
258
331
  CODICEAPID.COD_LO_NSW_PRIORITY_COUNTS: {
259
332
  "dataset_name": "imap_codice_l1a_lo-nsw-priority",
260
- "dims": {"spin_sector": 12, "esa_step": 128},
333
+ "input_dims": {"esa_step": 128, "spin_sector": 12},
261
334
  "instrument": "lo",
262
335
  "num_counters": 2,
336
+ "output_dims": {"spin_sector": 12, "esa_step": 128},
263
337
  "support_variables": [
264
338
  "energy_table",
265
339
  "acquisition_time_per_step",
@@ -274,9 +348,10 @@ DATA_PRODUCT_CONFIGURATIONS = {
274
348
  },
275
349
  CODICEAPID.COD_LO_SW_SPECIES_COUNTS: {
276
350
  "dataset_name": "imap_codice_l1a_lo-sw-species",
277
- "dims": {"spin_sector": 1, "esa_step": 128},
351
+ "input_dims": {"esa_step": 128, "spin_sector": 1},
278
352
  "instrument": "lo",
279
353
  "num_counters": 16,
354
+ "output_dims": {"spin_sector": 1, "esa_step": 128},
280
355
  "support_variables": [
281
356
  "energy_table",
282
357
  "acquisition_time_per_step",
@@ -291,9 +366,10 @@ DATA_PRODUCT_CONFIGURATIONS = {
291
366
  },
292
367
  CODICEAPID.COD_LO_NSW_SPECIES_COUNTS: {
293
368
  "dataset_name": "imap_codice_l1a_lo-nsw-species",
294
- "dims": {"spin_sector": 1, "esa_step": 128},
369
+ "input_dims": {"esa_step": 128, "spin_sector": 1},
295
370
  "instrument": "lo",
296
371
  "num_counters": 8,
372
+ "output_dims": {"spin_sector": 1, "esa_step": 128},
297
373
  "support_variables": [
298
374
  "energy_table",
299
375
  "acquisition_time_per_step",
@@ -308,9 +384,11 @@ DATA_PRODUCT_CONFIGURATIONS = {
308
384
  },
309
385
  }
310
386
 
311
- # Compression ID lookup table for Lo data products
387
+ # Compression ID lookup tables
312
388
  # The key is the view_id and the value is the ID for the compression algorithm
313
389
  # (see utils.CoDICECompression to see how the values correspond)
390
+ # These are defined in the "Views" tab of the "*-SCI-LUT-*.xml" spreadsheet that
391
+ # largely defines CoDICE processing.
314
392
  LO_COMPRESSION_ID_LOOKUP = {
315
393
  0: CoDICECompression.LOSSY_A_LOSSLESS,
316
394
  1: CoDICECompression.LOSSY_B_LOSSLESS,
@@ -322,10 +400,6 @@ LO_COMPRESSION_ID_LOOKUP = {
322
400
  7: CoDICECompression.LOSSY_A_LOSSLESS,
323
401
  8: CoDICECompression.LOSSY_A_LOSSLESS,
324
402
  }
325
-
326
- # Compression ID lookup table for Hi data products
327
- # The key is the view_id and the value is the ID for the compression algorithm
328
- # (see utils.CoDICECompression to see how the values correspond)
329
403
  HI_COMPRESSION_ID_LOOKUP = {
330
404
  0: CoDICECompression.LOSSY_A,
331
405
  1: CoDICECompression.LOSSY_A,
@@ -342,8 +416,8 @@ HI_COMPRESSION_ID_LOOKUP = {
342
416
  # ESA Sweep table ID lookup table
343
417
  # The combination of plan_id and plan_step determine the ESA sweep Table to use
344
418
  # Currently, ESA sweep table 0 is used for every plan_id/plan_step combination,
345
- # but may change in the future. These values are provided in the SCI-LUT excel
346
- # spreadsheet
419
+ # but may change in the future. These are defined in the "ESA Sweep" tab of the
420
+ # "*-SCI-LUT-*.xml" spreadsheet that largely defines CoDICE processing.
347
421
  ESA_SWEEP_TABLE_ID_LOOKUP = {
348
422
  (0, 0): 0,
349
423
  (0, 1): 0,
@@ -382,8 +456,9 @@ ESA_SWEEP_TABLE_ID_LOOKUP = {
382
456
  # Lo Stepping table ID lookup table
383
457
  # The combination of plan_id and plan_step determine the Lo Stepping Table to
384
458
  # use. Currently, LO Stepping table 0 is used for every plan_id/plan_step
385
- # combination, but may change in the future. These values are provided in the
386
- # SCI-LUT excel spreadsheet
459
+ # combination, but may change in the future. These are defined in the "Lo
460
+ # Stepping" tab of the "*-SCI-LUT-*.xml" spreadsheet that largely defines CoDICE
461
+ # processing.
387
462
  LO_STEPPING_TABLE_ID_LOOKUP = {
388
463
  (0, 0): 0,
389
464
  (0, 1): 0,
@@ -424,519 +499,1198 @@ LO_STEPPING_TABLE_ID_LOOKUP = {
424
499
  # transformed into python dictionaries. The values in these tables are subject
425
500
  # to change, but the format is expected to stay the same.
426
501
  LOSSY_A_TABLE = {
427
- 0: 1,
428
- 1: 2,
429
- 2: 3,
430
- 3: 4,
431
- 4: 5,
432
- 5: 6,
433
- 6: 7,
434
- 7: 8,
435
- 8: 9,
436
- 9: 10,
437
- 10: 11,
438
- 11: 12,
439
- 12: 13,
440
- 13: 14,
441
- 14: 15,
442
- 15: 16,
443
- 16: 17,
444
- 17: 18,
445
- 18: 19,
446
- 19: 20,
447
- 20: 21,
448
- 21: 22,
449
- 22: 23,
450
- 23: 24,
451
- 24: 25,
452
- 25: 26,
453
- 26: 27,
454
- 27: 28,
455
- 28: 29,
456
- 29: 30,
457
- 30: 31,
458
- 31: 32,
459
- 32: 34,
460
- 33: 36,
461
- 34: 38,
462
- 35: 40,
463
- 36: 42,
464
- 37: 44,
465
- 38: 46,
466
- 39: 48,
467
- 40: 50,
468
- 41: 52,
469
- 42: 54,
470
- 43: 56,
471
- 44: 58,
472
- 45: 60,
473
- 46: 62,
474
- 47: 64,
475
- 48: 68,
476
- 49: 72,
477
- 50: 76,
478
- 51: 80,
479
- 52: 84,
480
- 53: 88,
481
- 54: 92,
482
- 55: 96,
483
- 56: 100,
484
- 57: 104,
485
- 58: 108,
486
- 59: 112,
487
- 60: 116,
488
- 61: 120,
489
- 62: 124,
490
- 63: 128,
491
- 64: 136,
492
- 65: 144,
493
- 66: 152,
494
- 67: 160,
495
- 68: 168,
496
- 69: 176,
497
- 70: 184,
498
- 71: 192,
499
- 72: 200,
500
- 73: 208,
501
- 74: 216,
502
- 75: 224,
503
- 76: 232,
504
- 77: 240,
505
- 78: 248,
506
- 79: 256,
507
- 80: 272,
508
- 81: 288,
509
- 82: 304,
510
- 83: 320,
511
- 84: 336,
512
- 85: 352,
513
- 86: 368,
514
- 87: 384,
515
- 88: 400,
516
- 89: 416,
517
- 90: 432,
518
- 91: 448,
519
- 92: 464,
520
- 93: 480,
521
- 94: 496,
522
- 95: 512,
523
- 96: 544,
524
- 97: 576,
525
- 98: 608,
526
- 99: 640,
527
- 100: 672,
528
- 101: 704,
529
- 102: 736,
530
- 103: 768,
531
- 104: 800,
532
- 105: 832,
533
- 106: 864,
534
- 107: 896,
535
- 108: 928,
536
- 109: 960,
537
- 110: 992,
538
- 111: 1024,
539
- 112: 1088,
540
- 113: 1152,
541
- 114: 1216,
542
- 115: 1280,
543
- 116: 1344,
544
- 117: 1408,
545
- 118: 1472,
546
- 119: 1536,
547
- 120: 1600,
548
- 121: 1664,
549
- 122: 1728,
550
- 123: 1792,
551
- 124: 1856,
552
- 125: 1920,
553
- 126: 1984,
554
- 127: 2048,
555
- 128: 2176,
556
- 129: 2304,
557
- 130: 2432,
558
- 131: 2560,
559
- 132: 2688,
560
- 133: 2816,
561
- 134: 2944,
562
- 135: 3072,
563
- 136: 3200,
564
- 137: 3328,
565
- 138: 3456,
566
- 139: 3584,
567
- 140: 3712,
568
- 141: 3840,
569
- 142: 3968,
570
- 143: 4096,
571
- 144: 4352,
572
- 145: 4608,
573
- 146: 4864,
574
- 147: 5120,
575
- 148: 5376,
576
- 149: 5632,
577
- 150: 5888,
578
- 151: 6144,
579
- 152: 6400,
580
- 153: 6656,
581
- 154: 6912,
582
- 155: 7168,
583
- 156: 7424,
584
- 157: 7680,
585
- 158: 7936,
586
- 159: 8192,
587
- 160: 8704,
588
- 161: 9216,
589
- 162: 9728,
590
- 163: 10240,
591
- 164: 10752,
592
- 165: 11264,
593
- 166: 11776,
594
- 167: 12288,
595
- 168: 12800,
596
- 169: 13312,
597
- 170: 13824,
598
- 171: 14336,
599
- 172: 14848,
600
- 173: 15360,
601
- 174: 15872,
602
- 175: 16384,
603
- 176: 17408,
604
- 177: 18432,
605
- 178: 19456,
606
- 179: 20480,
607
- 180: 21504,
608
- 181: 22528,
609
- 182: 23552,
610
- 183: 24576,
611
- 184: 25600,
612
- 185: 26624,
613
- 186: 27648,
614
- 187: 28672,
615
- 188: 29696,
616
- 189: 30720,
617
- 190: 31744,
618
- 191: 32768,
619
- 192: 34816,
620
- 193: 36864,
621
- 194: 38912,
622
- 195: 40960,
623
- 196: 43008,
624
- 197: 45056,
625
- 198: 47104,
626
- 199: 49152,
627
- 200: 51200,
628
- 201: 53248,
629
- 202: 55296,
630
- 203: 57344,
631
- 204: 59392,
632
- 205: 61440,
633
- 206: 63488,
634
- 207: 65536,
635
- 208: 69632,
636
- 209: 73728,
637
- 210: 77824,
638
- 211: 81920,
639
- 212: 86016,
640
- 213: 90112,
641
- 214: 94208,
642
- 215: 98304,
643
- 216: 102400,
644
- 217: 106496,
645
- 218: 110592,
646
- 219: 114688,
647
- 220: 118784,
648
- 221: 122880,
649
- 222: 126976,
650
- 223: 131072,
651
- 224: 139264,
652
- 225: 147456,
653
- 226: 155648,
654
- 227: 163840,
655
- 228: 172032,
656
- 229: 180224,
657
- 230: 188416,
658
- 231: 196608,
659
- 232: 204800,
660
- 233: 212992,
661
- 234: 221184,
662
- 235: 229376,
663
- 236: 237568,
664
- 237: 245760,
665
- 238: 253952,
666
- 239: 262144,
667
- 240: 278528,
668
- 241: 294912,
669
- 242: 311296,
670
- 243: 327680,
671
- 244: 344064,
672
- 245: 360448,
673
- 246: 376832,
674
- 247: 393216,
675
- 248: 409600,
676
- 249: 425984,
677
- 250: 442368,
678
- 251: 458752,
679
- 252: 475136,
680
- 253: 491520,
681
- 254: 507904,
682
- 255: 999999,
502
+ 0: 0,
503
+ 1: 1,
504
+ 2: 2,
505
+ 3: 3,
506
+ 4: 4,
507
+ 5: 5,
508
+ 6: 6,
509
+ 7: 7,
510
+ 8: 8,
511
+ 9: 9,
512
+ 10: 10,
513
+ 11: 11,
514
+ 12: 12,
515
+ 13: 13,
516
+ 14: 14,
517
+ 15: 15,
518
+ 16: 16,
519
+ 17: 17,
520
+ 18: 18,
521
+ 19: 19,
522
+ 20: 20,
523
+ 21: 21,
524
+ 22: 22,
525
+ 23: 23,
526
+ 24: 24,
527
+ 25: 25,
528
+ 26: 26,
529
+ 27: 27,
530
+ 28: 28,
531
+ 29: 29,
532
+ 30: 30,
533
+ 31: 31,
534
+ 32: 33,
535
+ 33: 35,
536
+ 34: 37,
537
+ 35: 39,
538
+ 36: 41,
539
+ 37: 43,
540
+ 38: 45,
541
+ 39: 47,
542
+ 40: 49,
543
+ 41: 51,
544
+ 42: 53,
545
+ 43: 55,
546
+ 44: 57,
547
+ 45: 59,
548
+ 46: 61,
549
+ 47: 63,
550
+ 48: 67,
551
+ 49: 71,
552
+ 50: 75,
553
+ 51: 79,
554
+ 52: 83,
555
+ 53: 87,
556
+ 54: 91,
557
+ 55: 95,
558
+ 56: 99,
559
+ 57: 103,
560
+ 58: 107,
561
+ 59: 111,
562
+ 60: 115,
563
+ 61: 119,
564
+ 62: 123,
565
+ 63: 127,
566
+ 64: 135,
567
+ 65: 143,
568
+ 66: 151,
569
+ 67: 159,
570
+ 68: 167,
571
+ 69: 175,
572
+ 70: 183,
573
+ 71: 191,
574
+ 72: 199,
575
+ 73: 207,
576
+ 74: 215,
577
+ 75: 223,
578
+ 76: 231,
579
+ 77: 239,
580
+ 78: 247,
581
+ 79: 255,
582
+ 80: 271,
583
+ 81: 287,
584
+ 82: 303,
585
+ 83: 319,
586
+ 84: 335,
587
+ 85: 351,
588
+ 86: 367,
589
+ 87: 383,
590
+ 88: 399,
591
+ 89: 415,
592
+ 90: 431,
593
+ 91: 447,
594
+ 92: 463,
595
+ 93: 479,
596
+ 94: 495,
597
+ 95: 511,
598
+ 96: 543,
599
+ 97: 575,
600
+ 98: 607,
601
+ 99: 639,
602
+ 100: 671,
603
+ 101: 703,
604
+ 102: 735,
605
+ 103: 767,
606
+ 104: 799,
607
+ 105: 831,
608
+ 106: 863,
609
+ 107: 895,
610
+ 108: 927,
611
+ 109: 959,
612
+ 110: 991,
613
+ 111: 1023,
614
+ 112: 1087,
615
+ 113: 1151,
616
+ 114: 1215,
617
+ 115: 1279,
618
+ 116: 1343,
619
+ 117: 1407,
620
+ 118: 1471,
621
+ 119: 1535,
622
+ 120: 1599,
623
+ 121: 1663,
624
+ 122: 1727,
625
+ 123: 1791,
626
+ 124: 1855,
627
+ 125: 1919,
628
+ 126: 1983,
629
+ 127: 2047,
630
+ 128: 2175,
631
+ 129: 2303,
632
+ 130: 2431,
633
+ 131: 2559,
634
+ 132: 2687,
635
+ 133: 2815,
636
+ 134: 2943,
637
+ 135: 3071,
638
+ 136: 3199,
639
+ 137: 3327,
640
+ 138: 3455,
641
+ 139: 3583,
642
+ 140: 3711,
643
+ 141: 3839,
644
+ 142: 3967,
645
+ 143: 4095,
646
+ 144: 4351,
647
+ 145: 4607,
648
+ 146: 4863,
649
+ 147: 5119,
650
+ 148: 5375,
651
+ 149: 5631,
652
+ 150: 5887,
653
+ 151: 6143,
654
+ 152: 6399,
655
+ 153: 6655,
656
+ 154: 6911,
657
+ 155: 7167,
658
+ 156: 7423,
659
+ 157: 7679,
660
+ 158: 7935,
661
+ 159: 8191,
662
+ 160: 8703,
663
+ 161: 9215,
664
+ 162: 9727,
665
+ 163: 10239,
666
+ 164: 10751,
667
+ 165: 11263,
668
+ 166: 11775,
669
+ 167: 12287,
670
+ 168: 12799,
671
+ 169: 13311,
672
+ 170: 13823,
673
+ 171: 14335,
674
+ 172: 14847,
675
+ 173: 15359,
676
+ 174: 15871,
677
+ 175: 16383,
678
+ 176: 17407,
679
+ 177: 18431,
680
+ 178: 19455,
681
+ 179: 20479,
682
+ 180: 21503,
683
+ 181: 22527,
684
+ 182: 23551,
685
+ 183: 24575,
686
+ 184: 25599,
687
+ 185: 26623,
688
+ 186: 27647,
689
+ 187: 28671,
690
+ 188: 29695,
691
+ 189: 30719,
692
+ 190: 31743,
693
+ 191: 32767,
694
+ 192: 34815,
695
+ 193: 36863,
696
+ 194: 38911,
697
+ 195: 40959,
698
+ 196: 43007,
699
+ 197: 45055,
700
+ 198: 47103,
701
+ 199: 49151,
702
+ 200: 51199,
703
+ 201: 53247,
704
+ 202: 55295,
705
+ 203: 57343,
706
+ 204: 59391,
707
+ 205: 61439,
708
+ 206: 63487,
709
+ 207: 65535,
710
+ 208: 69631,
711
+ 209: 73727,
712
+ 210: 77823,
713
+ 211: 81919,
714
+ 212: 86015,
715
+ 213: 90111,
716
+ 214: 94207,
717
+ 215: 98303,
718
+ 216: 102399,
719
+ 217: 106495,
720
+ 218: 110591,
721
+ 219: 114687,
722
+ 220: 118783,
723
+ 221: 122879,
724
+ 222: 126975,
725
+ 223: 131071,
726
+ 224: 139263,
727
+ 225: 147455,
728
+ 226: 155647,
729
+ 227: 163839,
730
+ 228: 172031,
731
+ 229: 180223,
732
+ 230: 188415,
733
+ 231: 196607,
734
+ 232: 204799,
735
+ 233: 212991,
736
+ 234: 221183,
737
+ 235: 229375,
738
+ 236: 237567,
739
+ 237: 245759,
740
+ 238: 253951,
741
+ 239: 262143,
742
+ 240: 278527,
743
+ 241: 294911,
744
+ 242: 311295,
745
+ 243: 327679,
746
+ 244: 344063,
747
+ 245: 360447,
748
+ 246: 376831,
749
+ 247: 393215,
750
+ 248: 409599,
751
+ 249: 425983,
752
+ 250: 442367,
753
+ 251: 458751,
754
+ 252: 475135,
755
+ 253: 491519,
756
+ 254: 507903,
757
+ 255: 4294967294,
683
758
  }
684
759
 
685
760
  LOSSY_B_TABLE = {
686
- 0: 1,
687
- 1: 2,
688
- 2: 3,
689
- 3: 4,
690
- 4: 5,
691
- 5: 6,
692
- 6: 7,
693
- 7: 8,
694
- 8: 9,
695
- 9: 10,
696
- 10: 11,
697
- 11: 12,
698
- 12: 13,
699
- 13: 14,
700
- 14: 15,
701
- 15: 16,
702
- 16: 17,
703
- 17: 18,
704
- 18: 19,
705
- 19: 20,
706
- 20: 21,
707
- 21: 22,
708
- 22: 23,
709
- 23: 24,
710
- 24: 25,
711
- 25: 26,
712
- 26: 27,
713
- 27: 28,
714
- 28: 29,
715
- 29: 30,
716
- 30: 31,
717
- 31: 32,
718
- 32: 34,
719
- 33: 36,
720
- 34: 38,
721
- 35: 40,
722
- 36: 42,
723
- 37: 44,
724
- 38: 46,
725
- 39: 48,
726
- 40: 50,
727
- 41: 52,
728
- 42: 54,
729
- 43: 56,
730
- 44: 58,
731
- 45: 60,
732
- 46: 62,
733
- 47: 64,
734
- 48: 68,
735
- 49: 72,
736
- 50: 76,
737
- 51: 80,
738
- 52: 84,
739
- 53: 88,
740
- 54: 92,
741
- 55: 96,
742
- 56: 100,
743
- 57: 104,
744
- 58: 108,
745
- 59: 112,
746
- 60: 116,
747
- 61: 120,
748
- 62: 124,
749
- 63: 128,
750
- 64: 136,
751
- 65: 144,
752
- 66: 152,
753
- 67: 160,
754
- 68: 168,
755
- 69: 176,
756
- 70: 184,
757
- 71: 192,
758
- 72: 200,
759
- 73: 208,
760
- 74: 216,
761
- 75: 224,
762
- 76: 232,
763
- 77: 240,
764
- 78: 248,
765
- 79: 256,
766
- 80: 272,
767
- 81: 288,
768
- 82: 304,
769
- 83: 320,
770
- 84: 336,
771
- 85: 352,
772
- 86: 368,
773
- 87: 384,
774
- 88: 400,
775
- 89: 416,
776
- 90: 432,
777
- 91: 448,
778
- 92: 464,
779
- 93: 480,
780
- 94: 496,
781
- 95: 512,
782
- 96: 544,
783
- 97: 576,
784
- 98: 608,
785
- 99: 640,
786
- 100: 672,
787
- 101: 704,
788
- 102: 736,
789
- 103: 768,
790
- 104: 800,
791
- 105: 832,
792
- 106: 864,
793
- 107: 896,
794
- 108: 928,
795
- 109: 960,
796
- 110: 992,
797
- 111: 1024,
798
- 112: 1088,
799
- 113: 1152,
800
- 114: 1216,
801
- 115: 1280,
802
- 116: 1344,
803
- 117: 1408,
804
- 118: 1472,
805
- 119: 1536,
806
- 120: 1600,
807
- 121: 1664,
808
- 122: 1728,
809
- 123: 1792,
810
- 124: 1856,
811
- 125: 1920,
812
- 126: 1984,
813
- 127: 2048,
814
- 128: 2176,
815
- 129: 2304,
816
- 130: 2432,
817
- 131: 2560,
818
- 132: 2688,
819
- 133: 2816,
820
- 134: 2944,
821
- 135: 3072,
822
- 136: 3200,
823
- 137: 3328,
824
- 138: 3456,
825
- 139: 3584,
826
- 140: 3712,
827
- 141: 3840,
828
- 142: 3968,
829
- 143: 4096,
830
- 144: 4352,
831
- 145: 4608,
832
- 146: 4864,
833
- 147: 5120,
834
- 148: 5376,
835
- 149: 5632,
836
- 150: 5888,
837
- 151: 6144,
838
- 152: 6400,
839
- 153: 6656,
840
- 154: 6912,
841
- 155: 7168,
842
- 156: 7424,
843
- 157: 7680,
844
- 158: 7936,
845
- 159: 8192,
846
- 160: 8704,
847
- 161: 9216,
848
- 162: 9728,
849
- 163: 10240,
850
- 164: 10752,
851
- 165: 11264,
852
- 166: 11776,
853
- 167: 12288,
854
- 168: 12800,
855
- 169: 13312,
856
- 170: 13824,
857
- 171: 14336,
858
- 172: 14848,
859
- 173: 15360,
860
- 174: 15872,
861
- 175: 16384,
862
- 176: 17408,
863
- 177: 18432,
864
- 178: 19456,
865
- 179: 20480,
866
- 180: 21504,
867
- 181: 22528,
868
- 182: 23552,
869
- 183: 24576,
870
- 184: 25600,
871
- 185: 26624,
872
- 186: 27648,
873
- 187: 28672,
874
- 188: 29696,
875
- 189: 30720,
876
- 190: 31744,
877
- 191: 32768,
878
- 192: 36864,
879
- 193: 40960,
880
- 194: 45056,
881
- 195: 49152,
882
- 196: 53248,
883
- 197: 57344,
884
- 198: 61440,
885
- 199: 65536,
886
- 200: 73728,
887
- 201: 81920,
888
- 202: 90112,
889
- 203: 98304,
890
- 204: 106496,
891
- 205: 114688,
892
- 206: 122880,
893
- 207: 131072,
894
- 208: 147456,
895
- 209: 163840,
896
- 210: 180224,
897
- 211: 196608,
898
- 212: 212992,
899
- 213: 229376,
900
- 214: 245760,
901
- 215: 262144,
902
- 216: 294912,
903
- 217: 327680,
904
- 218: 360448,
905
- 219: 393216,
906
- 220: 425984,
907
- 221: 458752,
908
- 222: 491520,
909
- 223: 524288,
910
- 224: 589824,
911
- 225: 655360,
912
- 226: 720896,
913
- 227: 786432,
914
- 228: 851968,
915
- 229: 917504,
916
- 230: 983040,
917
- 231: 1048576,
918
- 232: 1179648,
919
- 233: 1310720,
920
- 234: 1441792,
921
- 235: 1572864,
922
- 236: 1703936,
923
- 237: 1835008,
924
- 238: 1966080,
925
- 239: 2097152,
926
- 240: 2359296,
927
- 241: 2621440,
928
- 242: 2883584,
929
- 243: 3145728,
930
- 244: 3407872,
931
- 245: 3670016,
932
- 246: 3932160,
933
- 247: 4194304,
934
- 248: 4718592,
935
- 249: 5242880,
936
- 250: 5767168,
937
- 251: 6291456,
938
- 252: 6815744,
939
- 253: 7340032,
940
- 254: 7864320,
941
- 255: 9999999,
761
+ 0: 0,
762
+ 1: 1,
763
+ 2: 2,
764
+ 3: 3,
765
+ 4: 4,
766
+ 5: 5,
767
+ 6: 6,
768
+ 7: 7,
769
+ 8: 8,
770
+ 9: 9,
771
+ 10: 10,
772
+ 11: 11,
773
+ 12: 12,
774
+ 13: 13,
775
+ 14: 14,
776
+ 15: 15,
777
+ 16: 16,
778
+ 17: 17,
779
+ 18: 18,
780
+ 19: 19,
781
+ 20: 20,
782
+ 21: 21,
783
+ 22: 22,
784
+ 23: 23,
785
+ 24: 24,
786
+ 25: 25,
787
+ 26: 26,
788
+ 27: 27,
789
+ 28: 28,
790
+ 29: 29,
791
+ 30: 30,
792
+ 31: 31,
793
+ 32: 33,
794
+ 33: 35,
795
+ 34: 37,
796
+ 35: 39,
797
+ 36: 41,
798
+ 37: 43,
799
+ 38: 45,
800
+ 39: 47,
801
+ 40: 49,
802
+ 41: 51,
803
+ 42: 53,
804
+ 43: 55,
805
+ 44: 57,
806
+ 45: 59,
807
+ 46: 61,
808
+ 47: 63,
809
+ 48: 67,
810
+ 49: 71,
811
+ 50: 75,
812
+ 51: 79,
813
+ 52: 83,
814
+ 53: 87,
815
+ 54: 91,
816
+ 55: 95,
817
+ 56: 99,
818
+ 57: 103,
819
+ 58: 107,
820
+ 59: 111,
821
+ 60: 115,
822
+ 61: 119,
823
+ 62: 123,
824
+ 63: 127,
825
+ 64: 135,
826
+ 65: 143,
827
+ 66: 151,
828
+ 67: 159,
829
+ 68: 167,
830
+ 69: 175,
831
+ 70: 183,
832
+ 71: 191,
833
+ 72: 199,
834
+ 73: 207,
835
+ 74: 215,
836
+ 75: 223,
837
+ 76: 231,
838
+ 77: 239,
839
+ 78: 247,
840
+ 79: 255,
841
+ 80: 271,
842
+ 81: 287,
843
+ 82: 303,
844
+ 83: 319,
845
+ 84: 335,
846
+ 85: 351,
847
+ 86: 367,
848
+ 87: 383,
849
+ 88: 399,
850
+ 89: 415,
851
+ 90: 431,
852
+ 91: 447,
853
+ 92: 463,
854
+ 93: 479,
855
+ 94: 495,
856
+ 95: 511,
857
+ 96: 543,
858
+ 97: 575,
859
+ 98: 607,
860
+ 99: 639,
861
+ 100: 671,
862
+ 101: 703,
863
+ 102: 735,
864
+ 103: 767,
865
+ 104: 799,
866
+ 105: 831,
867
+ 106: 863,
868
+ 107: 895,
869
+ 108: 927,
870
+ 109: 959,
871
+ 110: 991,
872
+ 111: 1023,
873
+ 112: 1087,
874
+ 113: 1151,
875
+ 114: 1215,
876
+ 115: 1279,
877
+ 116: 1343,
878
+ 117: 1407,
879
+ 118: 1471,
880
+ 119: 1535,
881
+ 120: 1599,
882
+ 121: 1663,
883
+ 122: 1727,
884
+ 123: 1791,
885
+ 124: 1855,
886
+ 125: 1919,
887
+ 126: 1983,
888
+ 127: 2047,
889
+ 128: 2175,
890
+ 129: 2303,
891
+ 130: 2431,
892
+ 131: 2559,
893
+ 132: 2687,
894
+ 133: 2815,
895
+ 134: 2943,
896
+ 135: 3071,
897
+ 136: 3199,
898
+ 137: 3327,
899
+ 138: 3455,
900
+ 139: 3583,
901
+ 140: 3711,
902
+ 141: 3839,
903
+ 142: 3967,
904
+ 143: 4095,
905
+ 144: 4351,
906
+ 145: 4607,
907
+ 146: 4863,
908
+ 147: 5119,
909
+ 148: 5375,
910
+ 149: 5631,
911
+ 150: 5887,
912
+ 151: 6143,
913
+ 152: 6399,
914
+ 153: 6655,
915
+ 154: 6911,
916
+ 155: 7167,
917
+ 156: 7423,
918
+ 157: 7679,
919
+ 158: 7935,
920
+ 159: 8191,
921
+ 160: 8703,
922
+ 161: 9215,
923
+ 162: 9727,
924
+ 163: 10239,
925
+ 164: 10751,
926
+ 165: 11263,
927
+ 166: 11775,
928
+ 167: 12287,
929
+ 168: 12799,
930
+ 169: 13311,
931
+ 170: 13823,
932
+ 171: 14335,
933
+ 172: 14847,
934
+ 173: 15359,
935
+ 174: 15871,
936
+ 175: 16383,
937
+ 176: 17407,
938
+ 177: 18431,
939
+ 178: 19455,
940
+ 179: 20479,
941
+ 180: 21503,
942
+ 181: 22527,
943
+ 182: 23551,
944
+ 183: 24575,
945
+ 184: 25599,
946
+ 185: 26623,
947
+ 186: 27647,
948
+ 187: 28671,
949
+ 188: 29695,
950
+ 189: 30719,
951
+ 190: 31743,
952
+ 191: 32767,
953
+ 192: 36863,
954
+ 193: 40959,
955
+ 194: 45055,
956
+ 195: 49151,
957
+ 196: 53247,
958
+ 197: 57343,
959
+ 198: 61439,
960
+ 199: 65535,
961
+ 200: 73727,
962
+ 201: 81919,
963
+ 202: 90111,
964
+ 203: 98303,
965
+ 204: 106495,
966
+ 205: 114687,
967
+ 206: 122879,
968
+ 207: 131071,
969
+ 208: 147455,
970
+ 209: 163839,
971
+ 210: 180223,
972
+ 211: 196607,
973
+ 212: 212991,
974
+ 213: 229375,
975
+ 214: 245759,
976
+ 215: 262143,
977
+ 216: 294911,
978
+ 217: 327679,
979
+ 218: 360447,
980
+ 219: 393215,
981
+ 220: 425983,
982
+ 221: 458751,
983
+ 222: 491519,
984
+ 223: 524287,
985
+ 224: 589823,
986
+ 225: 655359,
987
+ 226: 720895,
988
+ 227: 786431,
989
+ 228: 851967,
990
+ 229: 917503,
991
+ 230: 983039,
992
+ 231: 1048575,
993
+ 232: 1179647,
994
+ 233: 1310719,
995
+ 234: 1441791,
996
+ 235: 1572863,
997
+ 236: 1703935,
998
+ 237: 1835007,
999
+ 238: 1966079,
1000
+ 239: 2097151,
1001
+ 240: 2359295,
1002
+ 241: 2621439,
1003
+ 242: 2883583,
1004
+ 243: 3145727,
1005
+ 244: 3407871,
1006
+ 245: 3670015,
1007
+ 246: 3932159,
1008
+ 247: 4194303,
1009
+ 248: 4718591,
1010
+ 249: 5242879,
1011
+ 250: 5767167,
1012
+ 251: 6291455,
1013
+ 252: 6815743,
1014
+ 253: 7340031,
1015
+ 254: 7864319,
1016
+ 255: 4294967294,
1017
+ }
1018
+
1019
+ # Derived acquisition times that get stored in CDF data variables in L1a
1020
+ # processing. These are taken from the "Acq Time" column in the "Lo Stepping"
1021
+ # tab of the "*-SCI-LUT-*.xml" spreadsheet that largely defines CoDICE
1022
+ # processing.
1023
+ ACQUISITION_TIMES = {
1024
+ 0: [
1025
+ 578.7083,
1026
+ 578.7083,
1027
+ 578.7083,
1028
+ 578.7083,
1029
+ 289.35416,
1030
+ 289.35416,
1031
+ 289.35416,
1032
+ 289.35416,
1033
+ 289.35416,
1034
+ 289.35416,
1035
+ 289.35416,
1036
+ 289.35416,
1037
+ 192.90277,
1038
+ 192.90277,
1039
+ 192.90277,
1040
+ 192.90277,
1041
+ 192.90277,
1042
+ 192.90277,
1043
+ 192.90277,
1044
+ 192.90277,
1045
+ 192.90277,
1046
+ 192.90277,
1047
+ 192.90277,
1048
+ 192.90277,
1049
+ 144.67708,
1050
+ 144.67708,
1051
+ 144.67708,
1052
+ 144.67708,
1053
+ 144.67708,
1054
+ 144.67708,
1055
+ 144.67708,
1056
+ 144.67708,
1057
+ 144.67708,
1058
+ 144.67708,
1059
+ 144.67708,
1060
+ 144.67708,
1061
+ 144.67708,
1062
+ 144.67708,
1063
+ 144.67708,
1064
+ 144.67708,
1065
+ 115.74167,
1066
+ 115.74167,
1067
+ 115.74167,
1068
+ 115.74167,
1069
+ 115.74167,
1070
+ 115.74167,
1071
+ 115.74167,
1072
+ 115.74167,
1073
+ 115.74167,
1074
+ 115.74167,
1075
+ 115.74167,
1076
+ 115.74167,
1077
+ 115.74167,
1078
+ 115.74167,
1079
+ 115.74167,
1080
+ 115.74167,
1081
+ 115.74167,
1082
+ 115.74167,
1083
+ 115.74167,
1084
+ 115.74167,
1085
+ 115.74167,
1086
+ 115.74167,
1087
+ 115.74167,
1088
+ 115.74167,
1089
+ 115.74167,
1090
+ 115.74167,
1091
+ 115.74167,
1092
+ 115.74167,
1093
+ 115.74167,
1094
+ 115.74167,
1095
+ 115.74167,
1096
+ 115.74167,
1097
+ 115.74167,
1098
+ 115.74167,
1099
+ 115.74167,
1100
+ 115.74167,
1101
+ 115.74167,
1102
+ 115.74167,
1103
+ 115.74167,
1104
+ 115.74167,
1105
+ 95.69444,
1106
+ 95.69444,
1107
+ 95.69444,
1108
+ 95.69444,
1109
+ 95.69444,
1110
+ 95.69444,
1111
+ 95.69444,
1112
+ 95.69444,
1113
+ 95.69444,
1114
+ 95.69444,
1115
+ 95.69444,
1116
+ 95.69444,
1117
+ 95.69444,
1118
+ 95.69444,
1119
+ 95.69444,
1120
+ 95.69444,
1121
+ 95.69444,
1122
+ 95.69444,
1123
+ 95.69444,
1124
+ 95.69444,
1125
+ 95.69444,
1126
+ 95.69444,
1127
+ 95.69444,
1128
+ 95.69444,
1129
+ 95.69444,
1130
+ 95.69444,
1131
+ 95.69444,
1132
+ 95.69444,
1133
+ 95.69444,
1134
+ 95.69444,
1135
+ 95.69444,
1136
+ 95.69444,
1137
+ 95.69444,
1138
+ 95.69444,
1139
+ 95.69444,
1140
+ 95.69444,
1141
+ 95.69444,
1142
+ 95.69444,
1143
+ 95.69444,
1144
+ 95.69444,
1145
+ 95.69444,
1146
+ 95.69444,
1147
+ 95.69444,
1148
+ 95.69444,
1149
+ 95.69444,
1150
+ 95.69444,
1151
+ 95.69444,
1152
+ 95.69444,
1153
+ ],
1154
+ 1: [
1155
+ 578.7083,
1156
+ 578.7083,
1157
+ 578.7083,
1158
+ 578.7083,
1159
+ 289.35416,
1160
+ 289.35416,
1161
+ 289.35416,
1162
+ 289.35416,
1163
+ 289.35416,
1164
+ 289.35416,
1165
+ 289.35416,
1166
+ 289.35416,
1167
+ 192.90277,
1168
+ 192.90277,
1169
+ 192.90277,
1170
+ 192.90277,
1171
+ 192.90277,
1172
+ 192.90277,
1173
+ 192.90277,
1174
+ 192.90277,
1175
+ 192.90277,
1176
+ 192.90277,
1177
+ 192.90277,
1178
+ 192.90277,
1179
+ 144.67708,
1180
+ 144.67708,
1181
+ 144.67708,
1182
+ 144.67708,
1183
+ 144.67708,
1184
+ 144.67708,
1185
+ 144.67708,
1186
+ 144.67708,
1187
+ 144.67708,
1188
+ 144.67708,
1189
+ 144.67708,
1190
+ 144.67708,
1191
+ 144.67708,
1192
+ 144.67708,
1193
+ 144.67708,
1194
+ 144.67708,
1195
+ 115.74167,
1196
+ 115.74167,
1197
+ 115.74167,
1198
+ 115.74167,
1199
+ 115.74167,
1200
+ 115.74167,
1201
+ 115.74167,
1202
+ 115.74167,
1203
+ 115.74167,
1204
+ 115.74167,
1205
+ 115.74167,
1206
+ 115.74167,
1207
+ 115.74167,
1208
+ 115.74167,
1209
+ 115.74167,
1210
+ 115.74167,
1211
+ 115.74167,
1212
+ 115.74167,
1213
+ 115.74167,
1214
+ 115.74167,
1215
+ 115.74167,
1216
+ 115.74167,
1217
+ 115.74167,
1218
+ 115.74167,
1219
+ 115.74167,
1220
+ 115.74167,
1221
+ 115.74167,
1222
+ 115.74167,
1223
+ 115.74167,
1224
+ 115.74167,
1225
+ 115.74167,
1226
+ 115.74167,
1227
+ 115.74167,
1228
+ 115.74167,
1229
+ 115.74167,
1230
+ 115.74167,
1231
+ 115.74167,
1232
+ 115.74167,
1233
+ 115.74167,
1234
+ 115.74167,
1235
+ 95.69444,
1236
+ 95.69444,
1237
+ 95.69444,
1238
+ 95.69444,
1239
+ 95.69444,
1240
+ 95.69444,
1241
+ 95.69444,
1242
+ 95.69444,
1243
+ 95.69444,
1244
+ 95.69444,
1245
+ 95.69444,
1246
+ 95.69444,
1247
+ 95.69444,
1248
+ 95.69444,
1249
+ 95.69444,
1250
+ 95.69444,
1251
+ 95.69444,
1252
+ 95.69444,
1253
+ 95.69444,
1254
+ 95.69444,
1255
+ 95.69444,
1256
+ 95.69444,
1257
+ 95.69444,
1258
+ 95.69444,
1259
+ 95.69444,
1260
+ 95.69444,
1261
+ 95.69444,
1262
+ 95.69444,
1263
+ 95.69444,
1264
+ 95.69444,
1265
+ 95.69444,
1266
+ 95.69444,
1267
+ 95.69444,
1268
+ 95.69444,
1269
+ 95.69444,
1270
+ 95.69444,
1271
+ 95.69444,
1272
+ 95.69444,
1273
+ 95.69444,
1274
+ 95.69444,
1275
+ 95.69444,
1276
+ 95.69444,
1277
+ 95.69444,
1278
+ 95.69444,
1279
+ 95.69444,
1280
+ 95.69444,
1281
+ 95.69444,
1282
+ 95.69444,
1283
+ ],
1284
+ 2: [
1285
+ 578.7083,
1286
+ 578.7083,
1287
+ 578.7083,
1288
+ 578.7083,
1289
+ 289.35416,
1290
+ 289.35416,
1291
+ 289.35416,
1292
+ 289.35416,
1293
+ 289.35416,
1294
+ 289.35416,
1295
+ 289.35416,
1296
+ 289.35416,
1297
+ 192.90277,
1298
+ 192.90277,
1299
+ 192.90277,
1300
+ 192.90277,
1301
+ 192.90277,
1302
+ 192.90277,
1303
+ 192.90277,
1304
+ 192.90277,
1305
+ 192.90277,
1306
+ 192.90277,
1307
+ 192.90277,
1308
+ 192.90277,
1309
+ 144.67708,
1310
+ 144.67708,
1311
+ 144.67708,
1312
+ 144.67708,
1313
+ 144.67708,
1314
+ 144.67708,
1315
+ 144.67708,
1316
+ 144.67708,
1317
+ 144.67708,
1318
+ 144.67708,
1319
+ 144.67708,
1320
+ 144.67708,
1321
+ 144.67708,
1322
+ 144.67708,
1323
+ 144.67708,
1324
+ 144.67708,
1325
+ 115.74167,
1326
+ 115.74167,
1327
+ 115.74167,
1328
+ 115.74167,
1329
+ 115.74167,
1330
+ 115.74167,
1331
+ 115.74167,
1332
+ 115.74167,
1333
+ 115.74167,
1334
+ 115.74167,
1335
+ 115.74167,
1336
+ 115.74167,
1337
+ 115.74167,
1338
+ 115.74167,
1339
+ 115.74167,
1340
+ 115.74167,
1341
+ 115.74167,
1342
+ 115.74167,
1343
+ 115.74167,
1344
+ 115.74167,
1345
+ 115.74167,
1346
+ 115.74167,
1347
+ 115.74167,
1348
+ 115.74167,
1349
+ 115.74167,
1350
+ 115.74167,
1351
+ 115.74167,
1352
+ 115.74167,
1353
+ 115.74167,
1354
+ 115.74167,
1355
+ 115.74167,
1356
+ 115.74167,
1357
+ 115.74167,
1358
+ 115.74167,
1359
+ 115.74167,
1360
+ 115.74167,
1361
+ 115.74167,
1362
+ 115.74167,
1363
+ 115.74167,
1364
+ 115.74167,
1365
+ 95.69444,
1366
+ 95.69444,
1367
+ 95.69444,
1368
+ 95.69444,
1369
+ 95.69444,
1370
+ 95.69444,
1371
+ 95.69444,
1372
+ 95.69444,
1373
+ 95.69444,
1374
+ 95.69444,
1375
+ 95.69444,
1376
+ 95.69444,
1377
+ 95.69444,
1378
+ 95.69444,
1379
+ 95.69444,
1380
+ 95.69444,
1381
+ 95.69444,
1382
+ 95.69444,
1383
+ 95.69444,
1384
+ 95.69444,
1385
+ 95.69444,
1386
+ 95.69444,
1387
+ 95.69444,
1388
+ 95.69444,
1389
+ 95.69444,
1390
+ 95.69444,
1391
+ 95.69444,
1392
+ 95.69444,
1393
+ 95.69444,
1394
+ 95.69444,
1395
+ 95.69444,
1396
+ 95.69444,
1397
+ 95.69444,
1398
+ 95.69444,
1399
+ 95.69444,
1400
+ 95.69444,
1401
+ 95.69444,
1402
+ 95.69444,
1403
+ 95.69444,
1404
+ 95.69444,
1405
+ 95.69444,
1406
+ 95.69444,
1407
+ 95.69444,
1408
+ 95.69444,
1409
+ 95.69444,
1410
+ 95.69444,
1411
+ 95.69444,
1412
+ 95.69444,
1413
+ ],
1414
+ 3: [
1415
+ 578.7083,
1416
+ 578.7083,
1417
+ 578.7083,
1418
+ 578.7083,
1419
+ 289.35416,
1420
+ 289.35416,
1421
+ 289.35416,
1422
+ 289.35416,
1423
+ 289.35416,
1424
+ 289.35416,
1425
+ 289.35416,
1426
+ 289.35416,
1427
+ 192.90277,
1428
+ 192.90277,
1429
+ 192.90277,
1430
+ 192.90277,
1431
+ 192.90277,
1432
+ 192.90277,
1433
+ 192.90277,
1434
+ 192.90277,
1435
+ 192.90277,
1436
+ 192.90277,
1437
+ 192.90277,
1438
+ 192.90277,
1439
+ 144.67708,
1440
+ 144.67708,
1441
+ 144.67708,
1442
+ 144.67708,
1443
+ 144.67708,
1444
+ 144.67708,
1445
+ 144.67708,
1446
+ 144.67708,
1447
+ 144.67708,
1448
+ 144.67708,
1449
+ 144.67708,
1450
+ 144.67708,
1451
+ 144.67708,
1452
+ 144.67708,
1453
+ 144.67708,
1454
+ 144.67708,
1455
+ 115.74167,
1456
+ 115.74167,
1457
+ 115.74167,
1458
+ 115.74167,
1459
+ 115.74167,
1460
+ 115.74167,
1461
+ 115.74167,
1462
+ 115.74167,
1463
+ 115.74167,
1464
+ 115.74167,
1465
+ 115.74167,
1466
+ 115.74167,
1467
+ 115.74167,
1468
+ 115.74167,
1469
+ 115.74167,
1470
+ 115.74167,
1471
+ 115.74167,
1472
+ 115.74167,
1473
+ 115.74167,
1474
+ 115.74167,
1475
+ 115.74167,
1476
+ 115.74167,
1477
+ 115.74167,
1478
+ 115.74167,
1479
+ 115.74167,
1480
+ 115.74167,
1481
+ 115.74167,
1482
+ 115.74167,
1483
+ 115.74167,
1484
+ 115.74167,
1485
+ 115.74167,
1486
+ 115.74167,
1487
+ 115.74167,
1488
+ 115.74167,
1489
+ 115.74167,
1490
+ 115.74167,
1491
+ 115.74167,
1492
+ 115.74167,
1493
+ 115.74167,
1494
+ 115.74167,
1495
+ 95.69444,
1496
+ 95.69444,
1497
+ 95.69444,
1498
+ 95.69444,
1499
+ 95.69444,
1500
+ 95.69444,
1501
+ 95.69444,
1502
+ 95.69444,
1503
+ 95.69444,
1504
+ 95.69444,
1505
+ 95.69444,
1506
+ 95.69444,
1507
+ 95.69444,
1508
+ 95.69444,
1509
+ 95.69444,
1510
+ 95.69444,
1511
+ 95.69444,
1512
+ 95.69444,
1513
+ 95.69444,
1514
+ 95.69444,
1515
+ 95.69444,
1516
+ 95.69444,
1517
+ 95.69444,
1518
+ 95.69444,
1519
+ 95.69444,
1520
+ 95.69444,
1521
+ 95.69444,
1522
+ 95.69444,
1523
+ 95.69444,
1524
+ 95.69444,
1525
+ 95.69444,
1526
+ 95.69444,
1527
+ 95.69444,
1528
+ 95.69444,
1529
+ 95.69444,
1530
+ 95.69444,
1531
+ 95.69444,
1532
+ 95.69444,
1533
+ 95.69444,
1534
+ 95.69444,
1535
+ 95.69444,
1536
+ 95.69444,
1537
+ 95.69444,
1538
+ 95.69444,
1539
+ 95.69444,
1540
+ 95.69444,
1541
+ 95.69444,
1542
+ 95.69444,
1543
+ ],
1544
+ }
1545
+
1546
+ # Energy tables for CoDICE-Hi data products. These values represent the edges
1547
+ # of the bins, and are used in the CoDICE L1a pipeline to compute the centers
1548
+ # and deltas of the bins, which then get stored in the CDF files for future use.
1549
+ # These are defined in the "Data Products - Hi" tab of the "*-SCI-LUT-*.xml"
1550
+ # spreadsheet that largely defines CoDICE processing.
1551
+ OMNI_ENERGY_TABLE = {
1552
+ "h": [
1553
+ 0.05,
1554
+ 0.070710678,
1555
+ 0.1,
1556
+ 0.141421356,
1557
+ 0.2,
1558
+ 0.282842712,
1559
+ 0.4,
1560
+ 0.565685425,
1561
+ 0.8,
1562
+ 1.13137085,
1563
+ 1.6,
1564
+ 2.2627417,
1565
+ 3.2,
1566
+ 4.5254834,
1567
+ 6.4,
1568
+ 9.050966799,
1569
+ ],
1570
+ "he3": [
1571
+ 0.035355339,
1572
+ 0.05,
1573
+ 0.070710678,
1574
+ 0.1,
1575
+ 0.141421356,
1576
+ 0.2,
1577
+ 0.282842712,
1578
+ 0.4,
1579
+ 0.565685425,
1580
+ 0.8,
1581
+ 1.13137085,
1582
+ 1.6,
1583
+ 2.2627417,
1584
+ 3.2,
1585
+ 4.5254834,
1586
+ 6.4,
1587
+ ],
1588
+ "he4": [
1589
+ 0.035355339,
1590
+ 0.05,
1591
+ 0.070710678,
1592
+ 0.1,
1593
+ 0.141421356,
1594
+ 0.2,
1595
+ 0.282842712,
1596
+ 0.4,
1597
+ 0.565685425,
1598
+ 0.8,
1599
+ 1.13137085,
1600
+ 1.6,
1601
+ 2.2627417,
1602
+ 3.2,
1603
+ 4.5254834,
1604
+ 6.4,
1605
+ ],
1606
+ "c": [
1607
+ 0.025,
1608
+ 0.035355339,
1609
+ 0.05,
1610
+ 0.070710678,
1611
+ 0.1,
1612
+ 0.141421356,
1613
+ 0.2,
1614
+ 0.282842712,
1615
+ 0.4,
1616
+ 0.565685425,
1617
+ 0.8,
1618
+ 1.13137085,
1619
+ 1.6,
1620
+ 2.2627417,
1621
+ 3.2,
1622
+ 4.5254834,
1623
+ 6.4,
1624
+ 9.050966799,
1625
+ 12.8,
1626
+ ],
1627
+ "o": [
1628
+ 0.025,
1629
+ 0.035355339,
1630
+ 0.05,
1631
+ 0.070710678,
1632
+ 0.1,
1633
+ 0.141421356,
1634
+ 0.2,
1635
+ 0.282842712,
1636
+ 0.4,
1637
+ 0.565685425,
1638
+ 0.8,
1639
+ 1.13137085,
1640
+ 1.6,
1641
+ 2.2627417,
1642
+ 3.2,
1643
+ 4.5254834,
1644
+ 6.4,
1645
+ 9.050966799,
1646
+ 12.8,
1647
+ ],
1648
+ "ne_mg_si": [
1649
+ 0.01767767,
1650
+ 0.025,
1651
+ 0.035355339,
1652
+ 0.05,
1653
+ 0.070710678,
1654
+ 0.1,
1655
+ 0.141421356,
1656
+ 0.2,
1657
+ 0.282842712,
1658
+ 0.4,
1659
+ 0.565685425,
1660
+ 0.8,
1661
+ 1.13137085,
1662
+ 1.6,
1663
+ 2.2627417,
1664
+ 3.2,
1665
+ ],
1666
+ "fe": [
1667
+ 0.01767767,
1668
+ 0.025,
1669
+ 0.035355339,
1670
+ 0.05,
1671
+ 0.070710678,
1672
+ 0.1,
1673
+ 0.141421356,
1674
+ 0.2,
1675
+ 0.282842712,
1676
+ 0.4,
1677
+ 0.565685425,
1678
+ 0.8,
1679
+ 1.13137085,
1680
+ 1.6,
1681
+ 2.2627417,
1682
+ 3.2,
1683
+ 4.5254834,
1684
+ 6.4,
1685
+ 9.050966799,
1686
+ ],
1687
+ "uh": [0.01767767, 0.025, 0.035355339, 0.05, 0.070710678, 0.1],
1688
+ "junk": [0.05, 0.070710678],
1689
+ }
1690
+
1691
+ SECTORED_ENERGY_TABLE = {
1692
+ "h": [0.05, 0.1, 0.2, 0.4, 0.8, 1.6, 3.2, 6.4, 12.8],
1693
+ "he3he4": [0.025, 0.05, 0.1, 0.2, 0.4, 0.8, 1.6, 3.2, 6.4],
1694
+ "cno": [0.025, 0.05, 0.1, 0.2, 0.4, 0.8, 1.6, 3.2, 6.4],
1695
+ "fe": [0.0125, 0.025, 0.05, 0.1, 0.2, 0.4, 0.8, 1.6, 3.2],
942
1696
  }