imap-processing 0.11.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.

Files changed (415) hide show
  1. imap_processing/__init__.py +11 -11
  2. imap_processing/_version.py +2 -2
  3. imap_processing/ccsds/ccsds_data.py +1 -2
  4. imap_processing/ccsds/excel_to_xtce.py +66 -18
  5. imap_processing/cdf/config/imap_codice_global_cdf_attrs.yaml +24 -40
  6. imap_processing/cdf/config/imap_codice_l1a_variable_attrs.yaml +934 -42
  7. imap_processing/cdf/config/imap_codice_l1b_variable_attrs.yaml +1846 -128
  8. imap_processing/cdf/config/imap_glows_global_cdf_attrs.yaml +0 -5
  9. imap_processing/cdf/config/imap_hi_global_cdf_attrs.yaml +10 -11
  10. imap_processing/cdf/config/imap_hi_variable_attrs.yaml +17 -19
  11. imap_processing/cdf/config/imap_hit_global_cdf_attrs.yaml +27 -14
  12. imap_processing/cdf/config/imap_hit_l1a_variable_attrs.yaml +106 -116
  13. imap_processing/cdf/config/imap_hit_l1b_variable_attrs.yaml +120 -145
  14. imap_processing/cdf/config/imap_hit_l2_variable_attrs.yaml +14 -0
  15. imap_processing/cdf/config/imap_idex_global_cdf_attrs.yaml +25 -9
  16. imap_processing/cdf/config/imap_idex_l1a_variable_attrs.yaml +6 -4
  17. imap_processing/cdf/config/imap_idex_l1b_variable_attrs.yaml +3 -3
  18. imap_processing/cdf/config/imap_lo_global_cdf_attrs.yaml +0 -12
  19. imap_processing/cdf/config/imap_lo_l1a_variable_attrs.yaml +1 -1
  20. imap_processing/cdf/config/imap_mag_global_cdf_attrs.yaml +23 -20
  21. imap_processing/cdf/config/imap_mag_l1a_variable_attrs.yaml +361 -0
  22. imap_processing/cdf/config/imap_mag_l1b_variable_attrs.yaml +160 -0
  23. imap_processing/cdf/config/imap_mag_l1c_variable_attrs.yaml +160 -0
  24. imap_processing/cdf/config/imap_spacecraft_global_cdf_attrs.yaml +18 -0
  25. imap_processing/cdf/config/imap_spacecraft_variable_attrs.yaml +40 -0
  26. imap_processing/cdf/config/imap_swapi_global_cdf_attrs.yaml +1 -5
  27. imap_processing/cdf/config/imap_swapi_variable_attrs.yaml +22 -0
  28. imap_processing/cdf/config/imap_swe_global_cdf_attrs.yaml +12 -4
  29. imap_processing/cdf/config/imap_swe_l1a_variable_attrs.yaml +16 -2
  30. imap_processing/cdf/config/imap_swe_l1b_variable_attrs.yaml +64 -52
  31. imap_processing/cdf/config/imap_swe_l2_variable_attrs.yaml +71 -47
  32. imap_processing/cdf/config/imap_ultra_global_cdf_attrs.yaml +180 -19
  33. imap_processing/cdf/config/imap_ultra_l1a_variable_attrs.yaml +5045 -41
  34. imap_processing/cdf/config/imap_ultra_l1b_variable_attrs.yaml +80 -17
  35. imap_processing/cdf/config/imap_ultra_l1c_variable_attrs.yaml +32 -57
  36. imap_processing/cdf/utils.py +52 -38
  37. imap_processing/cli.py +477 -233
  38. imap_processing/codice/codice_l1a.py +466 -131
  39. imap_processing/codice/codice_l1b.py +51 -152
  40. imap_processing/codice/constants.py +1360 -569
  41. imap_processing/codice/decompress.py +2 -6
  42. imap_processing/ena_maps/ena_maps.py +1103 -146
  43. imap_processing/ena_maps/utils/coordinates.py +19 -0
  44. imap_processing/ena_maps/utils/map_utils.py +14 -17
  45. imap_processing/ena_maps/utils/spatial_utils.py +55 -52
  46. imap_processing/glows/l1a/glows_l1a.py +28 -99
  47. imap_processing/glows/l1a/glows_l1a_data.py +2 -2
  48. imap_processing/glows/l1b/glows_l1b.py +1 -4
  49. imap_processing/glows/l1b/glows_l1b_data.py +1 -3
  50. imap_processing/glows/l2/glows_l2.py +2 -5
  51. imap_processing/hi/l1a/hi_l1a.py +54 -29
  52. imap_processing/hi/l1a/histogram.py +0 -1
  53. imap_processing/hi/l1a/science_direct_event.py +6 -8
  54. imap_processing/hi/l1b/hi_l1b.py +111 -82
  55. imap_processing/hi/l1c/hi_l1c.py +416 -32
  56. imap_processing/hi/utils.py +58 -12
  57. imap_processing/hit/ancillary/imap_hit_l1b-to-l2-sector-dt0-factors_20250219_v002.csv +81 -0
  58. imap_processing/hit/ancillary/imap_hit_l1b-to-l2-standard-dt0-factors_20250219_v002.csv +205 -0
  59. imap_processing/hit/ancillary/imap_hit_l1b-to-l2-standard-dt1-factors_20250219_v002.csv +205 -0
  60. imap_processing/hit/ancillary/imap_hit_l1b-to-l2-standard-dt2-factors_20250219_v002.csv +205 -0
  61. imap_processing/hit/ancillary/imap_hit_l1b-to-l2-standard-dt3-factors_20250219_v002.csv +205 -0
  62. imap_processing/hit/ancillary/imap_hit_l1b-to-l2-summed-dt0-factors_20250219_v002.csv +68 -0
  63. imap_processing/hit/hit_utils.py +235 -5
  64. imap_processing/hit/l0/constants.py +20 -11
  65. imap_processing/hit/l0/decom_hit.py +21 -5
  66. imap_processing/hit/l1a/hit_l1a.py +71 -75
  67. imap_processing/hit/l1b/constants.py +321 -0
  68. imap_processing/hit/l1b/hit_l1b.py +377 -67
  69. imap_processing/hit/l2/constants.py +318 -0
  70. imap_processing/hit/l2/hit_l2.py +723 -0
  71. imap_processing/hit/packet_definitions/hit_packet_definitions.xml +1323 -71
  72. imap_processing/ialirt/l0/mag_l0_ialirt_data.py +155 -0
  73. imap_processing/ialirt/l0/parse_mag.py +374 -0
  74. imap_processing/ialirt/l0/process_swapi.py +69 -0
  75. imap_processing/ialirt/l0/process_swe.py +548 -0
  76. imap_processing/ialirt/packet_definitions/ialirt.xml +216 -208
  77. imap_processing/ialirt/packet_definitions/ialirt_codicehi.xml +1 -1
  78. imap_processing/ialirt/packet_definitions/ialirt_codicelo.xml +1 -1
  79. imap_processing/ialirt/packet_definitions/ialirt_mag.xml +115 -0
  80. imap_processing/ialirt/packet_definitions/ialirt_swapi.xml +14 -14
  81. imap_processing/ialirt/utils/grouping.py +114 -0
  82. imap_processing/ialirt/utils/time.py +29 -0
  83. imap_processing/idex/atomic_masses.csv +22 -0
  84. imap_processing/idex/decode.py +2 -2
  85. imap_processing/idex/idex_constants.py +33 -0
  86. imap_processing/idex/idex_l0.py +22 -8
  87. imap_processing/idex/idex_l1a.py +81 -51
  88. imap_processing/idex/idex_l1b.py +13 -39
  89. imap_processing/idex/idex_l2a.py +823 -0
  90. imap_processing/idex/idex_l2b.py +120 -0
  91. imap_processing/idex/idex_variable_unpacking_and_eu_conversion.csv +11 -11
  92. imap_processing/idex/packet_definitions/idex_housekeeping_packet_definition.xml +9130 -0
  93. imap_processing/lo/l0/lo_science.py +7 -2
  94. imap_processing/lo/l1a/lo_l1a.py +1 -5
  95. imap_processing/lo/l1b/lo_l1b.py +702 -29
  96. imap_processing/lo/l1b/tof_conversions.py +11 -0
  97. imap_processing/lo/l1c/lo_l1c.py +1 -4
  98. imap_processing/mag/constants.py +51 -0
  99. imap_processing/mag/imap_mag_sdc_configuration_v001.py +8 -0
  100. imap_processing/mag/l0/decom_mag.py +10 -3
  101. imap_processing/mag/l1a/mag_l1a.py +23 -19
  102. imap_processing/mag/l1a/mag_l1a_data.py +35 -10
  103. imap_processing/mag/l1b/mag_l1b.py +259 -50
  104. imap_processing/mag/l1c/interpolation_methods.py +388 -0
  105. imap_processing/mag/l1c/mag_l1c.py +621 -17
  106. imap_processing/mag/l2/mag_l2.py +140 -0
  107. imap_processing/mag/l2/mag_l2_data.py +288 -0
  108. imap_processing/quality_flags.py +1 -0
  109. imap_processing/spacecraft/packet_definitions/scid_x252.xml +538 -0
  110. imap_processing/spacecraft/quaternions.py +121 -0
  111. imap_processing/spice/geometry.py +19 -22
  112. imap_processing/spice/kernels.py +0 -276
  113. imap_processing/spice/pointing_frame.py +257 -0
  114. imap_processing/spice/repoint.py +149 -0
  115. imap_processing/spice/spin.py +38 -33
  116. imap_processing/spice/time.py +24 -0
  117. imap_processing/swapi/l1/swapi_l1.py +20 -12
  118. imap_processing/swapi/l2/swapi_l2.py +116 -5
  119. imap_processing/swapi/swapi_utils.py +32 -0
  120. imap_processing/swe/l1a/swe_l1a.py +44 -12
  121. imap_processing/swe/l1a/swe_science.py +13 -13
  122. imap_processing/swe/l1b/swe_l1b.py +898 -23
  123. imap_processing/swe/l2/swe_l2.py +75 -136
  124. imap_processing/swe/packet_definitions/swe_packet_definition.xml +1121 -1
  125. imap_processing/swe/utils/swe_constants.py +64 -0
  126. imap_processing/swe/utils/swe_utils.py +85 -28
  127. imap_processing/tests/ccsds/test_data/expected_output.xml +40 -1
  128. imap_processing/tests/ccsds/test_excel_to_xtce.py +24 -21
  129. imap_processing/tests/cdf/test_data/imap_instrument2_global_cdf_attrs.yaml +0 -2
  130. imap_processing/tests/cdf/test_utils.py +14 -16
  131. imap_processing/tests/codice/conftest.py +44 -33
  132. imap_processing/tests/codice/data/validation/imap_codice_l1a_hi-counters-aggregated_20241110193700_v0.0.0.cdf +0 -0
  133. imap_processing/tests/codice/data/validation/imap_codice_l1a_hi-counters-singles_20241110193700_v0.0.0.cdf +0 -0
  134. imap_processing/tests/codice/data/validation/imap_codice_l1a_hi-ialirt_20241110193700_v0.0.0.cdf +0 -0
  135. imap_processing/tests/codice/data/validation/imap_codice_l1a_hi-omni_20241110193700_v0.0.0.cdf +0 -0
  136. imap_processing/tests/codice/data/validation/imap_codice_l1a_hi-pha_20241110193700_v0.0.0.cdf +0 -0
  137. imap_processing/tests/codice/data/validation/imap_codice_l1a_hi-priorities_20241110193700_v0.0.0.cdf +0 -0
  138. imap_processing/tests/codice/data/validation/imap_codice_l1a_hi-sectored_20241110193700_v0.0.0.cdf +0 -0
  139. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-counters-aggregated_20241110193700_v0.0.0.cdf +0 -0
  140. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-counters-singles_20241110193700_v0.0.0.cdf +0 -0
  141. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-ialirt_20241110193700_v0.0.0.cdf +0 -0
  142. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-nsw-angular_20241110193700_v0.0.0.cdf +0 -0
  143. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-nsw-priority_20241110193700_v0.0.0.cdf +0 -0
  144. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-nsw-species_20241110193700_v0.0.0.cdf +0 -0
  145. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-pha_20241110193700_v0.0.0.cdf +0 -0
  146. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-sw-angular_20241110193700_v0.0.0.cdf +0 -0
  147. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-sw-priority_20241110193700_v0.0.0.cdf +0 -0
  148. imap_processing/tests/codice/data/validation/imap_codice_l1a_lo-sw-species_20241110193700_v0.0.0.cdf +0 -0
  149. imap_processing/tests/codice/test_codice_l1a.py +126 -53
  150. imap_processing/tests/codice/test_codice_l1b.py +6 -7
  151. imap_processing/tests/codice/test_decompress.py +4 -4
  152. imap_processing/tests/conftest.py +239 -27
  153. imap_processing/tests/ena_maps/conftest.py +51 -0
  154. imap_processing/tests/ena_maps/test_ena_maps.py +1068 -110
  155. imap_processing/tests/ena_maps/test_map_utils.py +66 -43
  156. imap_processing/tests/ena_maps/test_spatial_utils.py +17 -21
  157. imap_processing/tests/glows/conftest.py +10 -14
  158. imap_processing/tests/glows/test_glows_decom.py +4 -4
  159. imap_processing/tests/glows/test_glows_l1a_cdf.py +6 -27
  160. imap_processing/tests/glows/test_glows_l1a_data.py +6 -8
  161. imap_processing/tests/glows/test_glows_l1b.py +11 -11
  162. imap_processing/tests/glows/test_glows_l1b_data.py +5 -5
  163. imap_processing/tests/glows/test_glows_l2.py +2 -8
  164. imap_processing/tests/hi/conftest.py +1 -1
  165. imap_processing/tests/hi/data/l0/H45_diag_fee_20250208.bin +0 -0
  166. imap_processing/tests/hi/data/l0/H45_diag_fee_20250208_verify.csv +205 -0
  167. imap_processing/tests/hi/test_hi_l1b.py +22 -27
  168. imap_processing/tests/hi/test_hi_l1c.py +249 -18
  169. imap_processing/tests/hi/test_l1a.py +35 -7
  170. imap_processing/tests/hi/test_science_direct_event.py +3 -3
  171. imap_processing/tests/hi/test_utils.py +24 -2
  172. imap_processing/tests/hit/helpers/l1_validation.py +74 -73
  173. imap_processing/tests/hit/test_data/hskp_sample.ccsds +0 -0
  174. imap_processing/tests/hit/test_data/imap_hit_l0_raw_20100105_v001.pkts +0 -0
  175. imap_processing/tests/hit/test_decom_hit.py +5 -1
  176. imap_processing/tests/hit/test_hit_l1a.py +32 -36
  177. imap_processing/tests/hit/test_hit_l1b.py +300 -81
  178. imap_processing/tests/hit/test_hit_l2.py +716 -0
  179. imap_processing/tests/hit/test_hit_utils.py +184 -7
  180. imap_processing/tests/hit/validation_data/hit_l1b_standard_sample2_nsrl_v4_3decimals.csv +62 -62
  181. imap_processing/tests/hit/validation_data/hskp_sample_eu_3_6_2025.csv +89 -0
  182. imap_processing/tests/hit/validation_data/hskp_sample_raw.csv +89 -88
  183. imap_processing/tests/hit/validation_data/sci_sample_raw.csv +1 -1
  184. imap_processing/tests/ialirt/data/l0/461971383-404.bin +0 -0
  185. imap_processing/tests/ialirt/data/l0/461971384-405.bin +0 -0
  186. imap_processing/tests/ialirt/data/l0/461971385-406.bin +0 -0
  187. imap_processing/tests/ialirt/data/l0/461971386-407.bin +0 -0
  188. imap_processing/tests/ialirt/data/l0/461971387-408.bin +0 -0
  189. imap_processing/tests/ialirt/data/l0/461971388-409.bin +0 -0
  190. imap_processing/tests/ialirt/data/l0/461971389-410.bin +0 -0
  191. imap_processing/tests/ialirt/data/l0/461971390-411.bin +0 -0
  192. imap_processing/tests/ialirt/data/l0/461971391-412.bin +0 -0
  193. imap_processing/tests/ialirt/data/l0/sample_decoded_i-alirt_data.csv +383 -0
  194. imap_processing/tests/ialirt/unit/test_decom_ialirt.py +16 -81
  195. imap_processing/tests/ialirt/unit/test_grouping.py +81 -0
  196. imap_processing/tests/ialirt/unit/test_parse_mag.py +223 -0
  197. imap_processing/tests/ialirt/unit/test_process_codicehi.py +3 -3
  198. imap_processing/tests/ialirt/unit/test_process_codicelo.py +3 -10
  199. imap_processing/tests/ialirt/unit/test_process_ephemeris.py +4 -4
  200. imap_processing/tests/ialirt/unit/test_process_hit.py +3 -3
  201. imap_processing/tests/ialirt/unit/test_process_swapi.py +24 -16
  202. imap_processing/tests/ialirt/unit/test_process_swe.py +319 -6
  203. imap_processing/tests/ialirt/unit/test_time.py +16 -0
  204. imap_processing/tests/idex/conftest.py +127 -6
  205. imap_processing/tests/idex/test_data/imap_idex_l0_raw_20231218_v001.pkts +0 -0
  206. imap_processing/tests/idex/test_data/imap_idex_l0_raw_20241206_v001.pkts +0 -0
  207. imap_processing/tests/idex/test_data/imap_idex_l0_raw_20250108_v001.pkts +0 -0
  208. imap_processing/tests/idex/test_data/impact_14_tof_high_data.txt +4508 -4508
  209. imap_processing/tests/idex/test_idex_l0.py +33 -11
  210. imap_processing/tests/idex/test_idex_l1a.py +92 -21
  211. imap_processing/tests/idex/test_idex_l1b.py +106 -27
  212. imap_processing/tests/idex/test_idex_l2a.py +399 -0
  213. imap_processing/tests/idex/test_idex_l2b.py +93 -0
  214. imap_processing/tests/lo/test_cdfs/imap_lo_l1a_de_20241022_v002.cdf +0 -0
  215. imap_processing/tests/lo/test_cdfs/imap_lo_l1a_spin_20241022_v002.cdf +0 -0
  216. imap_processing/tests/lo/test_lo_l1a.py +3 -3
  217. imap_processing/tests/lo/test_lo_l1b.py +515 -6
  218. imap_processing/tests/lo/test_lo_l1c.py +1 -1
  219. imap_processing/tests/lo/test_lo_science.py +7 -7
  220. imap_processing/tests/lo/test_star_sensor.py +1 -1
  221. imap_processing/tests/mag/conftest.py +120 -2
  222. imap_processing/tests/mag/test_mag_decom.py +5 -4
  223. imap_processing/tests/mag/test_mag_l1a.py +51 -7
  224. imap_processing/tests/mag/test_mag_l1b.py +40 -59
  225. imap_processing/tests/mag/test_mag_l1c.py +354 -19
  226. imap_processing/tests/mag/test_mag_l2.py +130 -0
  227. imap_processing/tests/mag/test_mag_validation.py +247 -26
  228. imap_processing/tests/mag/validation/L1b/T009/MAGScience-normal-(2,2)-8s-20250204-16h39.csv +17 -0
  229. imap_processing/tests/mag/validation/L1b/T009/mag-l1a-l1b-t009-magi-out.csv +16 -16
  230. imap_processing/tests/mag/validation/L1b/T009/mag-l1a-l1b-t009-mago-out.csv +16 -16
  231. imap_processing/tests/mag/validation/L1b/T010/MAGScience-normal-(2,2)-8s-20250206-12h05.csv +17 -0
  232. imap_processing/tests/mag/validation/L1b/T011/MAGScience-normal-(2,2)-8s-20250204-16h08.csv +17 -0
  233. imap_processing/tests/mag/validation/L1b/T011/mag-l1a-l1b-t011-magi-out.csv +16 -16
  234. imap_processing/tests/mag/validation/L1b/T011/mag-l1a-l1b-t011-mago-out.csv +16 -16
  235. imap_processing/tests/mag/validation/L1b/T012/MAGScience-normal-(2,2)-8s-20250204-16h08.csv +17 -0
  236. imap_processing/tests/mag/validation/L1b/T012/data.bin +0 -0
  237. imap_processing/tests/mag/validation/L1b/T012/field_like_all_ranges.txt +19200 -0
  238. imap_processing/tests/mag/validation/L1b/T012/mag-l1a-l1b-t012-cal.cdf +0 -0
  239. imap_processing/tests/mag/validation/L1b/T012/mag-l1a-l1b-t012-in.csv +17 -0
  240. imap_processing/tests/mag/validation/L1b/T012/mag-l1a-l1b-t012-magi-out.csv +17 -0
  241. imap_processing/tests/mag/validation/L1b/T012/mag-l1a-l1b-t012-mago-out.csv +17 -0
  242. imap_processing/tests/mag/validation/L1c/T013/mag-l1b-l1c-t013-magi-normal-in.csv +1217 -0
  243. imap_processing/tests/mag/validation/L1c/T013/mag-l1b-l1c-t013-magi-normal-out.csv +1857 -0
  244. imap_processing/tests/mag/validation/L1c/T013/mag-l1b-l1c-t013-mago-normal-in.csv +1217 -0
  245. imap_processing/tests/mag/validation/L1c/T013/mag-l1b-l1c-t013-mago-normal-out.csv +1857 -0
  246. imap_processing/tests/mag/validation/L1c/T014/mag-l1b-l1c-t014-magi-normal-in.csv +1217 -0
  247. imap_processing/tests/mag/validation/L1c/T014/mag-l1b-l1c-t014-magi-normal-out.csv +1793 -0
  248. imap_processing/tests/mag/validation/L1c/T014/mag-l1b-l1c-t014-mago-normal-in.csv +1217 -0
  249. imap_processing/tests/mag/validation/L1c/T014/mag-l1b-l1c-t014-mago-normal-out.csv +1793 -0
  250. imap_processing/tests/mag/validation/L1c/T015/mag-l1b-l1c-t015-magi-burst-in.csv +2561 -0
  251. imap_processing/tests/mag/validation/L1c/T015/mag-l1b-l1c-t015-magi-normal-in.csv +961 -0
  252. imap_processing/tests/mag/validation/L1c/T015/mag-l1b-l1c-t015-magi-normal-out.csv +1539 -0
  253. imap_processing/tests/mag/validation/L1c/T015/mag-l1b-l1c-t015-mago-normal-in.csv +1921 -0
  254. imap_processing/tests/mag/validation/L1c/T015/mag-l1b-l1c-t015-mago-normal-out.csv +2499 -0
  255. imap_processing/tests/mag/validation/L1c/T016/mag-l1b-l1c-t016-magi-normal-in.csv +865 -0
  256. imap_processing/tests/mag/validation/L1c/T016/mag-l1b-l1c-t016-magi-normal-out.csv +1196 -0
  257. imap_processing/tests/mag/validation/L1c/T016/mag-l1b-l1c-t016-mago-normal-in.csv +1729 -0
  258. imap_processing/tests/mag/validation/L1c/T016/mag-l1b-l1c-t016-mago-normal-out.csv +3053 -0
  259. imap_processing/tests/mag/validation/L2/imap_mag_l1b_norm-mago_20251017_v002.cdf +0 -0
  260. imap_processing/tests/mag/validation/calibration/imap_mag_l1b-calibration_20240229_v001.cdf +0 -0
  261. imap_processing/tests/mag/validation/calibration/imap_mag_l2-calibration-matrices_20251017_v004.cdf +0 -0
  262. imap_processing/tests/mag/validation/calibration/imap_mag_l2-offsets-norm_20251017_20251017_v001.cdf +0 -0
  263. imap_processing/tests/spacecraft/data/SSR_2024_190_20_08_12_0483851794_2_DA_apid0594_1packet.pkts +0 -0
  264. imap_processing/tests/spacecraft/test_quaternions.py +71 -0
  265. imap_processing/tests/spice/test_data/fake_repoint_data.csv +5 -0
  266. imap_processing/tests/spice/test_data/fake_spin_data.csv +11 -11
  267. imap_processing/tests/spice/test_geometry.py +9 -12
  268. imap_processing/tests/spice/test_kernels.py +1 -200
  269. imap_processing/tests/spice/test_pointing_frame.py +185 -0
  270. imap_processing/tests/spice/test_repoint.py +121 -0
  271. imap_processing/tests/spice/test_spin.py +50 -9
  272. imap_processing/tests/spice/test_time.py +14 -0
  273. imap_processing/tests/swapi/lut/imap_swapi_esa-unit-conversion_20250211_v000.csv +73 -0
  274. imap_processing/tests/swapi/lut/imap_swapi_lut-notes_20250211_v000.csv +1025 -0
  275. imap_processing/tests/swapi/test_swapi_l1.py +13 -11
  276. imap_processing/tests/swapi/test_swapi_l2.py +180 -8
  277. imap_processing/tests/swe/l0_data/2024051010_SWE_HK_packet.bin +0 -0
  278. imap_processing/tests/swe/l0_data/2024051011_SWE_CEM_RAW_packet.bin +0 -0
  279. imap_processing/tests/swe/l0_validation_data/idle_export_eu.SWE_APP_HK_20240510_092742.csv +49 -0
  280. imap_processing/tests/swe/l0_validation_data/idle_export_eu.SWE_CEM_RAW_20240510_092742.csv +593 -0
  281. imap_processing/tests/swe/lut/checker-board-indices.csv +24 -0
  282. imap_processing/tests/swe/lut/imap_swe_esa-lut_20250301_v000.csv +385 -0
  283. imap_processing/tests/swe/lut/imap_swe_l1b-in-flight-cal_20240510_20260716_v000.csv +3 -0
  284. imap_processing/tests/swe/test_swe_l1a.py +20 -2
  285. imap_processing/tests/swe/test_swe_l1a_cem_raw.py +52 -0
  286. imap_processing/tests/swe/test_swe_l1a_hk.py +68 -0
  287. imap_processing/tests/swe/test_swe_l1a_science.py +3 -3
  288. imap_processing/tests/swe/test_swe_l1b.py +162 -24
  289. imap_processing/tests/swe/test_swe_l2.py +153 -91
  290. imap_processing/tests/test_cli.py +171 -88
  291. imap_processing/tests/test_utils.py +140 -17
  292. imap_processing/tests/ultra/data/l0/FM45_UltraFM45_Functional_2024-01-22T0105_20240122T010548.CCSDS +0 -0
  293. imap_processing/tests/ultra/data/l0/ultra45_raw_sc_ultraimgrates_20220530_00.csv +164 -0
  294. 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
  295. imap_processing/tests/ultra/data/mock_data.py +369 -0
  296. imap_processing/tests/ultra/unit/conftest.py +115 -89
  297. imap_processing/tests/ultra/unit/test_badtimes.py +4 -4
  298. imap_processing/tests/ultra/unit/test_cullingmask.py +8 -6
  299. imap_processing/tests/ultra/unit/test_de.py +14 -13
  300. imap_processing/tests/ultra/unit/test_decom_apid_880.py +27 -76
  301. imap_processing/tests/ultra/unit/test_decom_apid_881.py +54 -11
  302. imap_processing/tests/ultra/unit/test_decom_apid_883.py +12 -10
  303. imap_processing/tests/ultra/unit/test_decom_apid_896.py +202 -55
  304. imap_processing/tests/ultra/unit/test_lookup_utils.py +23 -1
  305. imap_processing/tests/ultra/unit/test_spacecraft_pset.py +77 -0
  306. imap_processing/tests/ultra/unit/test_ultra_l1a.py +98 -305
  307. imap_processing/tests/ultra/unit/test_ultra_l1b.py +60 -14
  308. imap_processing/tests/ultra/unit/test_ultra_l1b_annotated.py +2 -2
  309. imap_processing/tests/ultra/unit/test_ultra_l1b_culling.py +26 -27
  310. imap_processing/tests/ultra/unit/test_ultra_l1b_extended.py +239 -70
  311. imap_processing/tests/ultra/unit/test_ultra_l1c.py +5 -5
  312. imap_processing/tests/ultra/unit/test_ultra_l1c_pset_bins.py +114 -83
  313. imap_processing/tests/ultra/unit/test_ultra_l2.py +230 -0
  314. imap_processing/ultra/constants.py +1 -1
  315. imap_processing/ultra/l0/decom_tools.py +27 -39
  316. imap_processing/ultra/l0/decom_ultra.py +168 -204
  317. imap_processing/ultra/l0/ultra_utils.py +152 -136
  318. imap_processing/ultra/l1a/ultra_l1a.py +55 -271
  319. imap_processing/ultra/l1b/badtimes.py +1 -4
  320. imap_processing/ultra/l1b/cullingmask.py +2 -6
  321. imap_processing/ultra/l1b/de.py +116 -57
  322. imap_processing/ultra/l1b/extendedspin.py +20 -18
  323. imap_processing/ultra/l1b/lookup_utils.py +72 -9
  324. imap_processing/ultra/l1b/ultra_l1b.py +36 -16
  325. imap_processing/ultra/l1b/ultra_l1b_culling.py +66 -30
  326. imap_processing/ultra/l1b/ultra_l1b_extended.py +297 -94
  327. imap_processing/ultra/l1c/histogram.py +2 -6
  328. imap_processing/ultra/l1c/spacecraft_pset.py +84 -0
  329. imap_processing/ultra/l1c/ultra_l1c.py +8 -9
  330. imap_processing/ultra/l1c/ultra_l1c_pset_bins.py +206 -108
  331. imap_processing/ultra/l2/ultra_l2.py +299 -0
  332. imap_processing/ultra/lookup_tables/Angular_Profiles_FM45_LeftSlit.csv +526 -0
  333. imap_processing/ultra/lookup_tables/Angular_Profiles_FM45_RightSlit.csv +526 -0
  334. imap_processing/ultra/lookup_tables/Angular_Profiles_FM90_LeftSlit.csv +526 -0
  335. imap_processing/ultra/lookup_tables/Angular_Profiles_FM90_RightSlit.csv +526 -0
  336. imap_processing/ultra/lookup_tables/FM45_Startup1_ULTRA_IMGPARAMS_20240719.csv +2 -2
  337. imap_processing/ultra/lookup_tables/FM90_Startup1_ULTRA_IMGPARAMS_20240719.csv +2 -0
  338. imap_processing/ultra/packet_definitions/README.md +38 -0
  339. imap_processing/ultra/packet_definitions/ULTRA_SCI_COMBINED.xml +15302 -482
  340. imap_processing/ultra/utils/ultra_l1_utils.py +31 -12
  341. imap_processing/utils.py +69 -29
  342. {imap_processing-0.11.0.dist-info → imap_processing-0.13.0.dist-info}/METADATA +10 -6
  343. imap_processing-0.13.0.dist-info/RECORD +578 -0
  344. imap_processing/cdf/config/imap_mag_l1_variable_attrs.yaml +0 -237
  345. imap_processing/hi/l1a/housekeeping.py +0 -27
  346. imap_processing/hi/l1b/hi_eng_unit_convert_table.csv +0 -154
  347. imap_processing/swe/l1b/swe_esa_lookup_table.csv +0 -1441
  348. imap_processing/swe/l1b/swe_l1b_science.py +0 -652
  349. imap_processing/tests/codice/data/imap_codice_l1a_hi-counters-aggregated_20240429_v001.cdf +0 -0
  350. imap_processing/tests/codice/data/imap_codice_l1a_hi-counters-singles_20240429_v001.cdf +0 -0
  351. imap_processing/tests/codice/data/imap_codice_l1a_hi-omni_20240429_v001.cdf +0 -0
  352. imap_processing/tests/codice/data/imap_codice_l1a_hi-sectored_20240429_v001.cdf +0 -0
  353. imap_processing/tests/codice/data/imap_codice_l1a_hskp_20100101_v001.cdf +0 -0
  354. imap_processing/tests/codice/data/imap_codice_l1a_lo-counters-aggregated_20240429_v001.cdf +0 -0
  355. imap_processing/tests/codice/data/imap_codice_l1a_lo-counters-singles_20240429_v001.cdf +0 -0
  356. imap_processing/tests/codice/data/imap_codice_l1a_lo-nsw-angular_20240429_v001.cdf +0 -0
  357. imap_processing/tests/codice/data/imap_codice_l1a_lo-nsw-priority_20240429_v001.cdf +0 -0
  358. imap_processing/tests/codice/data/imap_codice_l1a_lo-nsw-species_20240429_v001.cdf +0 -0
  359. imap_processing/tests/codice/data/imap_codice_l1a_lo-sw-angular_20240429_v001.cdf +0 -0
  360. imap_processing/tests/codice/data/imap_codice_l1a_lo-sw-priority_20240429_v001.cdf +0 -0
  361. imap_processing/tests/codice/data/imap_codice_l1a_lo-sw-species_20240429_v001.cdf +0 -0
  362. imap_processing/tests/codice/data/imap_codice_l1b_hi-counters-aggregated_20240429_v001.cdf +0 -0
  363. imap_processing/tests/codice/data/imap_codice_l1b_hi-counters-singles_20240429_v001.cdf +0 -0
  364. imap_processing/tests/codice/data/imap_codice_l1b_hi-omni_20240429_v001.cdf +0 -0
  365. imap_processing/tests/codice/data/imap_codice_l1b_hi-sectored_20240429_v001.cdf +0 -0
  366. imap_processing/tests/codice/data/imap_codice_l1b_hskp_20100101_v001.cdf +0 -0
  367. imap_processing/tests/codice/data/imap_codice_l1b_lo-counters-aggregated_20240429_v001.cdf +0 -0
  368. imap_processing/tests/codice/data/imap_codice_l1b_lo-counters-singles_20240429_v001.cdf +0 -0
  369. imap_processing/tests/codice/data/imap_codice_l1b_lo-nsw-angular_20240429_v001.cdf +0 -0
  370. imap_processing/tests/codice/data/imap_codice_l1b_lo-nsw-priority_20240429_v001.cdf +0 -0
  371. imap_processing/tests/codice/data/imap_codice_l1b_lo-nsw-species_20240429_v001.cdf +0 -0
  372. imap_processing/tests/codice/data/imap_codice_l1b_lo-sw-angular_20240429_v001.cdf +0 -0
  373. imap_processing/tests/codice/data/imap_codice_l1b_lo-sw-priority_20240429_v001.cdf +0 -0
  374. imap_processing/tests/codice/data/imap_codice_l1b_lo-sw-species_20240429_v001.cdf +0 -0
  375. imap_processing/tests/hi/data/l1/imap_hi_l1b_45sensor-de_20250415_v999.cdf +0 -0
  376. imap_processing/tests/hit/PREFLIGHT_raw_record_2023_256_15_59_04_apid1251.pkts +0 -0
  377. imap_processing/tests/hit/PREFLIGHT_raw_record_2023_256_15_59_04_apid1252.pkts +0 -0
  378. imap_processing/tests/hit/validation_data/hskp_sample_eu.csv +0 -89
  379. imap_processing/tests/hit/validation_data/sci_sample_raw1.csv +0 -29
  380. imap_processing/tests/idex/test_data/imap_idex_l0_raw_20231214_v001.pkts +0 -0
  381. imap_processing/tests/lo/test_cdfs/imap_lo_l1a_de_20100101_v001.cdf +0 -0
  382. imap_processing/tests/lo/test_cdfs/imap_lo_l1a_spin_20100101_v001.cdf +0 -0
  383. imap_processing/tests/swe/test_swe_l1b_science.py +0 -84
  384. imap_processing/tests/ultra/test_data/mock_data.py +0 -161
  385. imap_processing/ultra/l1c/pset.py +0 -40
  386. imap_processing/ultra/lookup_tables/dps_sensitivity45.cdf +0 -0
  387. imap_processing-0.11.0.dist-info/RECORD +0 -488
  388. /imap_processing/idex/packet_definitions/{idex_packet_definition.xml → idex_science_packet_definition.xml} +0 -0
  389. /imap_processing/tests/ialirt/{test_data → data}/l0/20240827095047_SWE_IALIRT_packet.bin +0 -0
  390. /imap_processing/tests/ialirt/{test_data → data}/l0/BinLog CCSDS_FRAG_TLM_20240826_152323Z_IALIRT_data_for_SDC.bin +0 -0
  391. /imap_processing/tests/ialirt/{test_data → data}/l0/IALiRT Raw Packet Telemetry.txt +0 -0
  392. /imap_processing/tests/ialirt/{test_data → data}/l0/apid01152.tlm +0 -0
  393. /imap_processing/tests/ialirt/{test_data → data}/l0/eu_SWP_IAL_20240826_152033.csv +0 -0
  394. /imap_processing/tests/ialirt/{test_data → data}/l0/hi_fsw_view_1_ccsds.bin +0 -0
  395. /imap_processing/tests/ialirt/{test_data → data}/l0/hit_ialirt_sample.ccsds +0 -0
  396. /imap_processing/tests/ialirt/{test_data → data}/l0/hit_ialirt_sample.csv +0 -0
  397. /imap_processing/tests/ialirt/{test_data → data}/l0/idle_export_eu.SWE_IALIRT_20240827_093852.csv +0 -0
  398. /imap_processing/tests/ialirt/{test_data → data}/l0/imap_codice_l1a_hi-ialirt_20240523200000_v0.0.0.cdf +0 -0
  399. /imap_processing/tests/ialirt/{test_data → data}/l0/imap_codice_l1a_lo-ialirt_20241110193700_v0.0.0.cdf +0 -0
  400. /imap_processing/{mag/l1b → tests/spacecraft}/__init__.py +0 -0
  401. /imap_processing/{swe/l1b/engineering_unit_convert_table.csv → tests/swe/lut/imap_swe_eu-conversion_20240510_v000.csv} +0 -0
  402. /imap_processing/tests/ultra/{test_data → data}/l0/FM45_40P_Phi28p5_BeamCal_LinearScan_phi28.50_theta-0.00_20240207T102740.CCSDS +0 -0
  403. /imap_processing/tests/ultra/{test_data → data}/l0/FM45_7P_Phi0.0_BeamCal_LinearScan_phi0.04_theta-0.01_20230821T121304.CCSDS +0 -0
  404. /imap_processing/tests/ultra/{test_data → data}/l0/FM45_TV_Cycle6_Hot_Ops_Front212_20240124T063837.CCSDS +0 -0
  405. /imap_processing/tests/ultra/{test_data → data}/l0/Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.CCSDS +0 -0
  406. /imap_processing/tests/ultra/{test_data → data}/l0/ultra45_raw_sc_auxdata_Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.csv +0 -0
  407. /imap_processing/tests/ultra/{test_data → data}/l0/ultra45_raw_sc_enaphxtofhangimg_FM45_TV_Cycle6_Hot_Ops_Front212_20240124T063837.csv +0 -0
  408. /imap_processing/tests/ultra/{test_data → data}/l0/ultra45_raw_sc_ultraimgrates_Ultra45_EM_SwRI_Cal_Run7_ThetaScan_20220530T225054.csv +0 -0
  409. /imap_processing/tests/ultra/{test_data → data}/l0/ultra45_raw_sc_ultrarawimgevent_FM45_7P_Phi00_BeamCal_LinearScan_phi004_theta-001_20230821T121304.csv +0 -0
  410. /imap_processing/tests/ultra/{test_data → data}/l1/dps_exposure_helio_45_E1.cdf +0 -0
  411. /imap_processing/tests/ultra/{test_data → data}/l1/dps_exposure_helio_45_E12.cdf +0 -0
  412. /imap_processing/tests/ultra/{test_data → data}/l1/dps_exposure_helio_45_E24.cdf +0 -0
  413. {imap_processing-0.11.0.dist-info → imap_processing-0.13.0.dist-info}/LICENSE +0 -0
  414. {imap_processing-0.11.0.dist-info → imap_processing-0.13.0.dist-info}/WHEEL +0 -0
  415. {imap_processing-0.11.0.dist-info → imap_processing-0.13.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,32 @@ APIDS_FOR_SCIENCE_PROCESSING = [
29
32
  CODICEAPID.COD_LO_NSW_SPECIES_COUNTS,
30
33
  ]
31
34
 
35
+ # Mapping between descriptors and APID
36
+ CODICEAPID_MAPPING = {
37
+ "hskp": CODICEAPID.COD_NHK,
38
+ "lo-ialirt": CODICEAPID.COD_LO_IAL,
39
+ "lo-pha": CODICEAPID.COD_LO_PHA,
40
+ "lo-sw-priority": CODICEAPID.COD_LO_SW_PRIORITY_COUNTS,
41
+ "lo-sw-species": CODICEAPID.COD_LO_SW_SPECIES_COUNTS,
42
+ "lo-nsw-species": CODICEAPID.COD_LO_NSW_SPECIES_COUNTS,
43
+ "lo-sw-angular": CODICEAPID.COD_LO_SW_ANGULAR_COUNTS,
44
+ "lo-nsw-angular": CODICEAPID.COD_LO_NSW_ANGULAR_COUNTS,
45
+ "lo-nsw-priority": CODICEAPID.COD_LO_NSW_PRIORITY_COUNTS,
46
+ "lo-counters-aggregated": CODICEAPID.COD_LO_INST_COUNTS_AGGREGATED,
47
+ "lo-counters-singles": CODICEAPID.COD_LO_INST_COUNTS_SINGLES,
48
+ "hi-ialirt": CODICEAPID.COD_HI_IAL,
49
+ "hi-pha": CODICEAPID.COD_HI_PHA,
50
+ "hi-counters-aggregated": CODICEAPID.COD_HI_INST_COUNTS_AGGREGATED,
51
+ "hi-counters-singles": CODICEAPID.COD_HI_INST_COUNTS_SINGLES,
52
+ "hi-omni": CODICEAPID.COD_HI_OMNI_SPECIES_COUNTS,
53
+ "hi-sectored": CODICEAPID.COD_HI_SECT_SPECIES_COUNTS,
54
+ "hi-priority": CODICEAPID.COD_HI_INST_COUNTS_PRIORITIES,
55
+ }
56
+
57
+ # Numerical constants
58
+ SPIN_PERIOD_CONVERSION = 0.00032
32
59
 
33
- # CDF-friendly names for lo data products
60
+ # CDF variable names used for lo data products
34
61
  LO_COUNTERS_SINGLES_VARIABLE_NAMES = ["apd_singles"]
35
62
  LO_SW_ANGULAR_VARIABLE_NAMES = ["hplus", "heplusplus", "oplus6", "fe_loq"]
36
63
  LO_NSW_ANGULAR_VARIABLE_NAMES = ["heplusplus"]
@@ -71,14 +98,21 @@ LO_NSW_SPECIES_VARIABLE_NAMES = [
71
98
  "cnoplus",
72
99
  ]
73
100
 
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"]
101
+ # CDF variable names used for hi data products
102
+ HI_COUNTERS_SINGLES_VARIABLE_NAMES = ["tcr", "ssdo", "stssd"]
103
+ HI_OMNI_VARIABLE_NAMES = ["h", "he3", "he4", "c", "o", "ne_mg_si", "fe", "uh"]
104
+ HI_PRIORITY_VARIABLE_NAMES = [
105
+ "Priority0",
106
+ "Priority1",
107
+ "Priority2",
108
+ "Priority3",
109
+ "Priority4",
110
+ "Priority5",
111
+ ]
112
+ HI_SECTORED_VARIABLE_NAMES = ["h", "he3he4", "cno", "fe"]
79
113
 
80
- # lo-counters-aggregated data product variables are dynamically determined
81
- # based on the number of active counters
114
+ # lo- and hi-counters-aggregated data product variables are dynamically
115
+ # determined based on the number of active counters
82
116
  # TODO: Try to convince Joey to move to lower case variable names with
83
117
  # underscores?
84
118
  LO_COUNTERS_AGGREGATED_ACTIVE_VARIABLES = {
@@ -116,65 +150,122 @@ LO_COUNTERS_AGGREGATED_VARIABLE_NAMES = [
116
150
  for name, is_active in LO_COUNTERS_AGGREGATED_ACTIVE_VARIABLES.items()
117
151
  if is_active
118
152
  ]
153
+ HI_COUNTERS_AGGREGATED_ACTIVE_VARIABLES = {
154
+ "DCR": True,
155
+ "STO": True,
156
+ "SPO": True,
157
+ "Reserved1": False,
158
+ "MST": True,
159
+ "Reserved2": False,
160
+ "Reserved3": False,
161
+ "Reserved4": False,
162
+ "Reserved5": False,
163
+ "LowTOFCutoff": False,
164
+ "Reserved6": False,
165
+ "Reserved7": False,
166
+ "ASIC1FlagInvalid": True,
167
+ "ASIC2FlagInvalid": True,
168
+ "ASIC1ChannelInvalid": False,
169
+ "ASIC2ChannelInvalid": False,
170
+ }
171
+ HI_COUNTERS_AGGREGATED_VARIABLE_NAMES = [
172
+ name
173
+ for name, is_active in HI_COUNTERS_AGGREGATED_ACTIVE_VARIABLES.items()
174
+ if is_active
175
+ ]
119
176
 
120
177
  # TODO: Possibly move to consistent order of dimensions with other instruments
121
178
  # TBD after discussion with Joey and at the Science Team Meeting in Feb
122
- DATA_PRODUCT_CONFIGURATIONS = {
179
+ # Various configurations to support processing of individual data products
180
+ # Much of these are described in the algorithm document in chapter 10 ("Data
181
+ # Level 1A")
182
+ DATA_PRODUCT_CONFIGURATIONS: dict[CODICEAPID | int, dict] = {
123
183
  CODICEAPID.COD_HI_INST_COUNTS_AGGREGATED: {
124
184
  "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
185
+ "input_dims": {},
130
186
  "instrument": "hi",
131
- "num_counters": 1,
132
- "support_variables": [], # TODO: Double check with Joey
133
- "variable_names": HI_INST_COUNTS_AGGREGATED_VARIABLE_NAMES,
187
+ "num_counters": len(
188
+ HI_COUNTERS_AGGREGATED_VARIABLE_NAMES
189
+ ), # The number of counters depends on the number of active counters
190
+ "output_dims": {},
191
+ "support_variables": ["data_quality", "spin_period"],
192
+ "variable_names": HI_COUNTERS_AGGREGATED_VARIABLE_NAMES,
134
193
  },
135
194
  CODICEAPID.COD_HI_INST_COUNTS_SINGLES: {
136
195
  "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
196
+ "input_dims": {
197
+ "ssd_index": 12,
198
+ },
142
199
  "instrument": "hi",
143
200
  "num_counters": 3,
144
- "support_variables": [], # No support variables for this one
145
- "variable_names": HI_INST_COUNTS_SINGLES_VARIABLE_NAMES,
201
+ "output_dims": {
202
+ "ssd_index": 12,
203
+ },
204
+ "support_variables": ["data_quality", "spin_period"],
205
+ "variable_names": HI_COUNTERS_SINGLES_VARIABLE_NAMES,
206
+ },
207
+ CODICEAPID.COD_HI_INST_COUNTS_PRIORITIES: {
208
+ "dataset_name": "imap_codice_l1a_hi-priority",
209
+ "input_dims": {},
210
+ "instrument": "hi",
211
+ "num_counters": 6,
212
+ "output_dims": {},
213
+ "support_variables": ["data_quality", "spin_period"],
214
+ "variable_names": HI_PRIORITY_VARIABLE_NAMES,
146
215
  },
147
216
  CODICEAPID.COD_HI_OMNI_SPECIES_COUNTS: {
148
217
  "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
218
+ "input_dims": {"esa_step": 15, "inst_az": 4},
154
219
  "instrument": "hi",
155
220
  "num_counters": 8,
156
- "support_variables": ["data_quality", "spin_period"],
157
- "variable_names": HI_OMNI_SPECIES_VARIABLE_NAMES,
221
+ "output_dims": {"esa_step": 15, "inst_az": 4},
222
+ "support_variables": [
223
+ "data_quality",
224
+ "spin_period",
225
+ "energy_h",
226
+ "energy_he3",
227
+ "energy_he4",
228
+ "energy_c",
229
+ "energy_o",
230
+ "energy_ne_mg_si",
231
+ "energy_fe",
232
+ "energy_uh",
233
+ "energy_junk",
234
+ ],
235
+ "variable_names": HI_OMNI_VARIABLE_NAMES,
158
236
  },
159
237
  CODICEAPID.COD_HI_SECT_SPECIES_COUNTS: {
160
238
  "dataset_name": "imap_codice_l1a_hi-sectored",
161
- "dims": {
239
+ "input_dims": {
162
240
  "esa_step": 8,
163
- "inst_az": 12,
164
- "spin_sector": 12,
165
- }, # TODO: Double check with Joey
241
+ "ssd_index": 12,
242
+ "spin_sector_index": 12,
243
+ },
166
244
  "instrument": "hi",
167
245
  "num_counters": 4,
168
- "support_variables": ["data_quality", "spin_period"],
169
- "variable_names": HI_SECT_SPECIES_VARIABLE_NAMES,
246
+ "output_dims": {
247
+ "esa_step": 8,
248
+ "ssd_index": 12,
249
+ "spin_sector_index": 12,
250
+ },
251
+ "support_variables": [
252
+ "data_quality",
253
+ "spin_period",
254
+ "energy_h",
255
+ "energy_he3he4",
256
+ "energy_cno",
257
+ "energy_fe",
258
+ ],
259
+ "variable_names": HI_SECTORED_VARIABLE_NAMES,
170
260
  },
171
261
  CODICEAPID.COD_LO_INST_COUNTS_AGGREGATED: {
172
262
  "dataset_name": "imap_codice_l1a_lo-counters-aggregated",
173
- "dims": {"spin_sector_pairs": 6, "esa_step": 128},
263
+ "input_dims": {"esa_step": 128, "spin_sector_pairs": 6},
174
264
  "instrument": "lo",
175
265
  "num_counters": len(
176
266
  LO_COUNTERS_AGGREGATED_VARIABLE_NAMES
177
- ), # The number of counters depencds on the number of active counters
267
+ ), # The number of counters depends on the number of active counters
268
+ "output_dims": {"spin_sector_pairs": 6, "esa_step": 128},
178
269
  "support_variables": [
179
270
  "energy_table",
180
271
  "acquisition_time_per_step",
@@ -189,9 +280,10 @@ DATA_PRODUCT_CONFIGURATIONS = {
189
280
  },
190
281
  CODICEAPID.COD_LO_INST_COUNTS_SINGLES: {
191
282
  "dataset_name": "imap_codice_l1a_lo-counters-singles",
192
- "dims": {"inst_az": 24, "spin_sector_pairs": 6, "esa_step": 128},
283
+ "input_dims": {"esa_step": 128, "inst_az": 24, "spin_sector_pairs": 6},
193
284
  "instrument": "lo",
194
285
  "num_counters": 1,
286
+ "output_dims": {"inst_az": 24, "spin_sector_pairs": 6, "esa_step": 128},
195
287
  "support_variables": [
196
288
  "energy_table",
197
289
  "acquisition_time_per_step",
@@ -206,9 +298,10 @@ DATA_PRODUCT_CONFIGURATIONS = {
206
298
  },
207
299
  CODICEAPID.COD_LO_SW_ANGULAR_COUNTS: {
208
300
  "dataset_name": "imap_codice_l1a_lo-sw-angular",
209
- "dims": {"inst_az": 5, "spin_sector": 12, "esa_step": 128},
301
+ "input_dims": {"esa_step": 128, "inst_az": 5, "spin_sector": 12},
210
302
  "instrument": "lo",
211
303
  "num_counters": 4,
304
+ "output_dims": {"inst_az": 5, "spin_sector": 12, "esa_step": 128},
212
305
  "support_variables": [
213
306
  "energy_table",
214
307
  "acquisition_time_per_step",
@@ -223,9 +316,10 @@ DATA_PRODUCT_CONFIGURATIONS = {
223
316
  },
224
317
  CODICEAPID.COD_LO_NSW_ANGULAR_COUNTS: {
225
318
  "dataset_name": "imap_codice_l1a_lo-nsw-angular",
226
- "dims": {"inst_az": 19, "spin_sector": 12, "esa_step": 128},
319
+ "input_dims": {"esa_step": 128, "inst_az": 19, "spin_sector": 12},
227
320
  "instrument": "lo",
228
321
  "num_counters": 1,
322
+ "output_dims": {"inst_az": 19, "spin_sector": 12, "esa_step": 128},
229
323
  "support_variables": [
230
324
  "energy_table",
231
325
  "acquisition_time_per_step",
@@ -240,9 +334,10 @@ DATA_PRODUCT_CONFIGURATIONS = {
240
334
  },
241
335
  CODICEAPID.COD_LO_SW_PRIORITY_COUNTS: {
242
336
  "dataset_name": "imap_codice_l1a_lo-sw-priority",
243
- "dims": {"spin_sector": 12, "esa_step": 128},
337
+ "input_dims": {"esa_step": 128, "spin_sector": 12},
244
338
  "instrument": "lo",
245
339
  "num_counters": 5,
340
+ "output_dims": {"spin_sector": 12, "esa_step": 128},
246
341
  "support_variables": [
247
342
  "energy_table",
248
343
  "acquisition_time_per_step",
@@ -257,9 +352,10 @@ DATA_PRODUCT_CONFIGURATIONS = {
257
352
  },
258
353
  CODICEAPID.COD_LO_NSW_PRIORITY_COUNTS: {
259
354
  "dataset_name": "imap_codice_l1a_lo-nsw-priority",
260
- "dims": {"spin_sector": 12, "esa_step": 128},
355
+ "input_dims": {"esa_step": 128, "spin_sector": 12},
261
356
  "instrument": "lo",
262
357
  "num_counters": 2,
358
+ "output_dims": {"spin_sector": 12, "esa_step": 128},
263
359
  "support_variables": [
264
360
  "energy_table",
265
361
  "acquisition_time_per_step",
@@ -274,9 +370,10 @@ DATA_PRODUCT_CONFIGURATIONS = {
274
370
  },
275
371
  CODICEAPID.COD_LO_SW_SPECIES_COUNTS: {
276
372
  "dataset_name": "imap_codice_l1a_lo-sw-species",
277
- "dims": {"spin_sector": 1, "esa_step": 128},
373
+ "input_dims": {"esa_step": 128, "spin_sector": 1},
278
374
  "instrument": "lo",
279
375
  "num_counters": 16,
376
+ "output_dims": {"spin_sector": 1, "esa_step": 128},
280
377
  "support_variables": [
281
378
  "energy_table",
282
379
  "acquisition_time_per_step",
@@ -291,9 +388,10 @@ DATA_PRODUCT_CONFIGURATIONS = {
291
388
  },
292
389
  CODICEAPID.COD_LO_NSW_SPECIES_COUNTS: {
293
390
  "dataset_name": "imap_codice_l1a_lo-nsw-species",
294
- "dims": {"spin_sector": 1, "esa_step": 128},
391
+ "input_dims": {"esa_step": 128, "spin_sector": 1},
295
392
  "instrument": "lo",
296
393
  "num_counters": 8,
394
+ "output_dims": {"spin_sector": 1, "esa_step": 128},
297
395
  "support_variables": [
298
396
  "energy_table",
299
397
  "acquisition_time_per_step",
@@ -308,9 +406,26 @@ DATA_PRODUCT_CONFIGURATIONS = {
308
406
  },
309
407
  }
310
408
 
311
- # Compression ID lookup table for Lo data products
409
+ # Dictionary to define the bit structure of CoDICE-Lo direct events
410
+ LO_DE_BIT_STRUCTURE = {
411
+ "APDGain": 1,
412
+ "APD_ID": 5,
413
+ "Position": 5,
414
+ "APDEnergy": 9,
415
+ "TOF": 10,
416
+ "MultiFlag": 1,
417
+ "PHAType": 2,
418
+ "SpinAngle": 5,
419
+ "EnergyStep": 7,
420
+ "Priority": 3,
421
+ "Spare": 16,
422
+ }
423
+
424
+ # Compression ID lookup tables
312
425
  # The key is the view_id and the value is the ID for the compression algorithm
313
426
  # (see utils.CoDICECompression to see how the values correspond)
427
+ # These are defined in the "Views" tab of the "*-SCI-LUT-*.xml" spreadsheet that
428
+ # largely defines CoDICE processing.
314
429
  LO_COMPRESSION_ID_LOOKUP = {
315
430
  0: CoDICECompression.LOSSY_A_LOSSLESS,
316
431
  1: CoDICECompression.LOSSY_B_LOSSLESS,
@@ -322,10 +437,6 @@ LO_COMPRESSION_ID_LOOKUP = {
322
437
  7: CoDICECompression.LOSSY_A_LOSSLESS,
323
438
  8: CoDICECompression.LOSSY_A_LOSSLESS,
324
439
  }
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
440
  HI_COMPRESSION_ID_LOOKUP = {
330
441
  0: CoDICECompression.LOSSY_A,
331
442
  1: CoDICECompression.LOSSY_A,
@@ -342,8 +453,8 @@ HI_COMPRESSION_ID_LOOKUP = {
342
453
  # ESA Sweep table ID lookup table
343
454
  # The combination of plan_id and plan_step determine the ESA sweep Table to use
344
455
  # 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
456
+ # but may change in the future. These are defined in the "ESA Sweep" tab of the
457
+ # "*-SCI-LUT-*.xml" spreadsheet that largely defines CoDICE processing.
347
458
  ESA_SWEEP_TABLE_ID_LOOKUP = {
348
459
  (0, 0): 0,
349
460
  (0, 1): 0,
@@ -382,8 +493,9 @@ ESA_SWEEP_TABLE_ID_LOOKUP = {
382
493
  # Lo Stepping table ID lookup table
383
494
  # The combination of plan_id and plan_step determine the Lo Stepping Table to
384
495
  # 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
496
+ # combination, but may change in the future. These are defined in the "Lo
497
+ # Stepping" tab of the "*-SCI-LUT-*.xml" spreadsheet that largely defines CoDICE
498
+ # processing.
387
499
  LO_STEPPING_TABLE_ID_LOOKUP = {
388
500
  (0, 0): 0,
389
501
  (0, 1): 0,
@@ -424,519 +536,1198 @@ LO_STEPPING_TABLE_ID_LOOKUP = {
424
536
  # transformed into python dictionaries. The values in these tables are subject
425
537
  # to change, but the format is expected to stay the same.
426
538
  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,
539
+ 0: 0,
540
+ 1: 1,
541
+ 2: 2,
542
+ 3: 3,
543
+ 4: 4,
544
+ 5: 5,
545
+ 6: 6,
546
+ 7: 7,
547
+ 8: 8,
548
+ 9: 9,
549
+ 10: 10,
550
+ 11: 11,
551
+ 12: 12,
552
+ 13: 13,
553
+ 14: 14,
554
+ 15: 15,
555
+ 16: 16,
556
+ 17: 17,
557
+ 18: 18,
558
+ 19: 19,
559
+ 20: 20,
560
+ 21: 21,
561
+ 22: 22,
562
+ 23: 23,
563
+ 24: 24,
564
+ 25: 25,
565
+ 26: 26,
566
+ 27: 27,
567
+ 28: 28,
568
+ 29: 29,
569
+ 30: 30,
570
+ 31: 31,
571
+ 32: 33,
572
+ 33: 35,
573
+ 34: 37,
574
+ 35: 39,
575
+ 36: 41,
576
+ 37: 43,
577
+ 38: 45,
578
+ 39: 47,
579
+ 40: 49,
580
+ 41: 51,
581
+ 42: 53,
582
+ 43: 55,
583
+ 44: 57,
584
+ 45: 59,
585
+ 46: 61,
586
+ 47: 63,
587
+ 48: 67,
588
+ 49: 71,
589
+ 50: 75,
590
+ 51: 79,
591
+ 52: 83,
592
+ 53: 87,
593
+ 54: 91,
594
+ 55: 95,
595
+ 56: 99,
596
+ 57: 103,
597
+ 58: 107,
598
+ 59: 111,
599
+ 60: 115,
600
+ 61: 119,
601
+ 62: 123,
602
+ 63: 127,
603
+ 64: 135,
604
+ 65: 143,
605
+ 66: 151,
606
+ 67: 159,
607
+ 68: 167,
608
+ 69: 175,
609
+ 70: 183,
610
+ 71: 191,
611
+ 72: 199,
612
+ 73: 207,
613
+ 74: 215,
614
+ 75: 223,
615
+ 76: 231,
616
+ 77: 239,
617
+ 78: 247,
618
+ 79: 255,
619
+ 80: 271,
620
+ 81: 287,
621
+ 82: 303,
622
+ 83: 319,
623
+ 84: 335,
624
+ 85: 351,
625
+ 86: 367,
626
+ 87: 383,
627
+ 88: 399,
628
+ 89: 415,
629
+ 90: 431,
630
+ 91: 447,
631
+ 92: 463,
632
+ 93: 479,
633
+ 94: 495,
634
+ 95: 511,
635
+ 96: 543,
636
+ 97: 575,
637
+ 98: 607,
638
+ 99: 639,
639
+ 100: 671,
640
+ 101: 703,
641
+ 102: 735,
642
+ 103: 767,
643
+ 104: 799,
644
+ 105: 831,
645
+ 106: 863,
646
+ 107: 895,
647
+ 108: 927,
648
+ 109: 959,
649
+ 110: 991,
650
+ 111: 1023,
651
+ 112: 1087,
652
+ 113: 1151,
653
+ 114: 1215,
654
+ 115: 1279,
655
+ 116: 1343,
656
+ 117: 1407,
657
+ 118: 1471,
658
+ 119: 1535,
659
+ 120: 1599,
660
+ 121: 1663,
661
+ 122: 1727,
662
+ 123: 1791,
663
+ 124: 1855,
664
+ 125: 1919,
665
+ 126: 1983,
666
+ 127: 2047,
667
+ 128: 2175,
668
+ 129: 2303,
669
+ 130: 2431,
670
+ 131: 2559,
671
+ 132: 2687,
672
+ 133: 2815,
673
+ 134: 2943,
674
+ 135: 3071,
675
+ 136: 3199,
676
+ 137: 3327,
677
+ 138: 3455,
678
+ 139: 3583,
679
+ 140: 3711,
680
+ 141: 3839,
681
+ 142: 3967,
682
+ 143: 4095,
683
+ 144: 4351,
684
+ 145: 4607,
685
+ 146: 4863,
686
+ 147: 5119,
687
+ 148: 5375,
688
+ 149: 5631,
689
+ 150: 5887,
690
+ 151: 6143,
691
+ 152: 6399,
692
+ 153: 6655,
693
+ 154: 6911,
694
+ 155: 7167,
695
+ 156: 7423,
696
+ 157: 7679,
697
+ 158: 7935,
698
+ 159: 8191,
699
+ 160: 8703,
700
+ 161: 9215,
701
+ 162: 9727,
702
+ 163: 10239,
703
+ 164: 10751,
704
+ 165: 11263,
705
+ 166: 11775,
706
+ 167: 12287,
707
+ 168: 12799,
708
+ 169: 13311,
709
+ 170: 13823,
710
+ 171: 14335,
711
+ 172: 14847,
712
+ 173: 15359,
713
+ 174: 15871,
714
+ 175: 16383,
715
+ 176: 17407,
716
+ 177: 18431,
717
+ 178: 19455,
718
+ 179: 20479,
719
+ 180: 21503,
720
+ 181: 22527,
721
+ 182: 23551,
722
+ 183: 24575,
723
+ 184: 25599,
724
+ 185: 26623,
725
+ 186: 27647,
726
+ 187: 28671,
727
+ 188: 29695,
728
+ 189: 30719,
729
+ 190: 31743,
730
+ 191: 32767,
731
+ 192: 34815,
732
+ 193: 36863,
733
+ 194: 38911,
734
+ 195: 40959,
735
+ 196: 43007,
736
+ 197: 45055,
737
+ 198: 47103,
738
+ 199: 49151,
739
+ 200: 51199,
740
+ 201: 53247,
741
+ 202: 55295,
742
+ 203: 57343,
743
+ 204: 59391,
744
+ 205: 61439,
745
+ 206: 63487,
746
+ 207: 65535,
747
+ 208: 69631,
748
+ 209: 73727,
749
+ 210: 77823,
750
+ 211: 81919,
751
+ 212: 86015,
752
+ 213: 90111,
753
+ 214: 94207,
754
+ 215: 98303,
755
+ 216: 102399,
756
+ 217: 106495,
757
+ 218: 110591,
758
+ 219: 114687,
759
+ 220: 118783,
760
+ 221: 122879,
761
+ 222: 126975,
762
+ 223: 131071,
763
+ 224: 139263,
764
+ 225: 147455,
765
+ 226: 155647,
766
+ 227: 163839,
767
+ 228: 172031,
768
+ 229: 180223,
769
+ 230: 188415,
770
+ 231: 196607,
771
+ 232: 204799,
772
+ 233: 212991,
773
+ 234: 221183,
774
+ 235: 229375,
775
+ 236: 237567,
776
+ 237: 245759,
777
+ 238: 253951,
778
+ 239: 262143,
779
+ 240: 278527,
780
+ 241: 294911,
781
+ 242: 311295,
782
+ 243: 327679,
783
+ 244: 344063,
784
+ 245: 360447,
785
+ 246: 376831,
786
+ 247: 393215,
787
+ 248: 409599,
788
+ 249: 425983,
789
+ 250: 442367,
790
+ 251: 458751,
791
+ 252: 475135,
792
+ 253: 491519,
793
+ 254: 507903,
794
+ 255: 4294967294,
683
795
  }
684
796
 
685
797
  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,
798
+ 0: 0,
799
+ 1: 1,
800
+ 2: 2,
801
+ 3: 3,
802
+ 4: 4,
803
+ 5: 5,
804
+ 6: 6,
805
+ 7: 7,
806
+ 8: 8,
807
+ 9: 9,
808
+ 10: 10,
809
+ 11: 11,
810
+ 12: 12,
811
+ 13: 13,
812
+ 14: 14,
813
+ 15: 15,
814
+ 16: 16,
815
+ 17: 17,
816
+ 18: 18,
817
+ 19: 19,
818
+ 20: 20,
819
+ 21: 21,
820
+ 22: 22,
821
+ 23: 23,
822
+ 24: 24,
823
+ 25: 25,
824
+ 26: 26,
825
+ 27: 27,
826
+ 28: 28,
827
+ 29: 29,
828
+ 30: 30,
829
+ 31: 31,
830
+ 32: 33,
831
+ 33: 35,
832
+ 34: 37,
833
+ 35: 39,
834
+ 36: 41,
835
+ 37: 43,
836
+ 38: 45,
837
+ 39: 47,
838
+ 40: 49,
839
+ 41: 51,
840
+ 42: 53,
841
+ 43: 55,
842
+ 44: 57,
843
+ 45: 59,
844
+ 46: 61,
845
+ 47: 63,
846
+ 48: 67,
847
+ 49: 71,
848
+ 50: 75,
849
+ 51: 79,
850
+ 52: 83,
851
+ 53: 87,
852
+ 54: 91,
853
+ 55: 95,
854
+ 56: 99,
855
+ 57: 103,
856
+ 58: 107,
857
+ 59: 111,
858
+ 60: 115,
859
+ 61: 119,
860
+ 62: 123,
861
+ 63: 127,
862
+ 64: 135,
863
+ 65: 143,
864
+ 66: 151,
865
+ 67: 159,
866
+ 68: 167,
867
+ 69: 175,
868
+ 70: 183,
869
+ 71: 191,
870
+ 72: 199,
871
+ 73: 207,
872
+ 74: 215,
873
+ 75: 223,
874
+ 76: 231,
875
+ 77: 239,
876
+ 78: 247,
877
+ 79: 255,
878
+ 80: 271,
879
+ 81: 287,
880
+ 82: 303,
881
+ 83: 319,
882
+ 84: 335,
883
+ 85: 351,
884
+ 86: 367,
885
+ 87: 383,
886
+ 88: 399,
887
+ 89: 415,
888
+ 90: 431,
889
+ 91: 447,
890
+ 92: 463,
891
+ 93: 479,
892
+ 94: 495,
893
+ 95: 511,
894
+ 96: 543,
895
+ 97: 575,
896
+ 98: 607,
897
+ 99: 639,
898
+ 100: 671,
899
+ 101: 703,
900
+ 102: 735,
901
+ 103: 767,
902
+ 104: 799,
903
+ 105: 831,
904
+ 106: 863,
905
+ 107: 895,
906
+ 108: 927,
907
+ 109: 959,
908
+ 110: 991,
909
+ 111: 1023,
910
+ 112: 1087,
911
+ 113: 1151,
912
+ 114: 1215,
913
+ 115: 1279,
914
+ 116: 1343,
915
+ 117: 1407,
916
+ 118: 1471,
917
+ 119: 1535,
918
+ 120: 1599,
919
+ 121: 1663,
920
+ 122: 1727,
921
+ 123: 1791,
922
+ 124: 1855,
923
+ 125: 1919,
924
+ 126: 1983,
925
+ 127: 2047,
926
+ 128: 2175,
927
+ 129: 2303,
928
+ 130: 2431,
929
+ 131: 2559,
930
+ 132: 2687,
931
+ 133: 2815,
932
+ 134: 2943,
933
+ 135: 3071,
934
+ 136: 3199,
935
+ 137: 3327,
936
+ 138: 3455,
937
+ 139: 3583,
938
+ 140: 3711,
939
+ 141: 3839,
940
+ 142: 3967,
941
+ 143: 4095,
942
+ 144: 4351,
943
+ 145: 4607,
944
+ 146: 4863,
945
+ 147: 5119,
946
+ 148: 5375,
947
+ 149: 5631,
948
+ 150: 5887,
949
+ 151: 6143,
950
+ 152: 6399,
951
+ 153: 6655,
952
+ 154: 6911,
953
+ 155: 7167,
954
+ 156: 7423,
955
+ 157: 7679,
956
+ 158: 7935,
957
+ 159: 8191,
958
+ 160: 8703,
959
+ 161: 9215,
960
+ 162: 9727,
961
+ 163: 10239,
962
+ 164: 10751,
963
+ 165: 11263,
964
+ 166: 11775,
965
+ 167: 12287,
966
+ 168: 12799,
967
+ 169: 13311,
968
+ 170: 13823,
969
+ 171: 14335,
970
+ 172: 14847,
971
+ 173: 15359,
972
+ 174: 15871,
973
+ 175: 16383,
974
+ 176: 17407,
975
+ 177: 18431,
976
+ 178: 19455,
977
+ 179: 20479,
978
+ 180: 21503,
979
+ 181: 22527,
980
+ 182: 23551,
981
+ 183: 24575,
982
+ 184: 25599,
983
+ 185: 26623,
984
+ 186: 27647,
985
+ 187: 28671,
986
+ 188: 29695,
987
+ 189: 30719,
988
+ 190: 31743,
989
+ 191: 32767,
990
+ 192: 36863,
991
+ 193: 40959,
992
+ 194: 45055,
993
+ 195: 49151,
994
+ 196: 53247,
995
+ 197: 57343,
996
+ 198: 61439,
997
+ 199: 65535,
998
+ 200: 73727,
999
+ 201: 81919,
1000
+ 202: 90111,
1001
+ 203: 98303,
1002
+ 204: 106495,
1003
+ 205: 114687,
1004
+ 206: 122879,
1005
+ 207: 131071,
1006
+ 208: 147455,
1007
+ 209: 163839,
1008
+ 210: 180223,
1009
+ 211: 196607,
1010
+ 212: 212991,
1011
+ 213: 229375,
1012
+ 214: 245759,
1013
+ 215: 262143,
1014
+ 216: 294911,
1015
+ 217: 327679,
1016
+ 218: 360447,
1017
+ 219: 393215,
1018
+ 220: 425983,
1019
+ 221: 458751,
1020
+ 222: 491519,
1021
+ 223: 524287,
1022
+ 224: 589823,
1023
+ 225: 655359,
1024
+ 226: 720895,
1025
+ 227: 786431,
1026
+ 228: 851967,
1027
+ 229: 917503,
1028
+ 230: 983039,
1029
+ 231: 1048575,
1030
+ 232: 1179647,
1031
+ 233: 1310719,
1032
+ 234: 1441791,
1033
+ 235: 1572863,
1034
+ 236: 1703935,
1035
+ 237: 1835007,
1036
+ 238: 1966079,
1037
+ 239: 2097151,
1038
+ 240: 2359295,
1039
+ 241: 2621439,
1040
+ 242: 2883583,
1041
+ 243: 3145727,
1042
+ 244: 3407871,
1043
+ 245: 3670015,
1044
+ 246: 3932159,
1045
+ 247: 4194303,
1046
+ 248: 4718591,
1047
+ 249: 5242879,
1048
+ 250: 5767167,
1049
+ 251: 6291455,
1050
+ 252: 6815743,
1051
+ 253: 7340031,
1052
+ 254: 7864319,
1053
+ 255: 4294967294,
1054
+ }
1055
+
1056
+ # Derived acquisition times that get stored in CDF data variables in L1a
1057
+ # processing. These are taken from the "Acq Time" column in the "Lo Stepping"
1058
+ # tab of the "*-SCI-LUT-*.xml" spreadsheet that largely defines CoDICE
1059
+ # processing.
1060
+ ACQUISITION_TIMES = {
1061
+ 0: [
1062
+ 578.7083,
1063
+ 578.7083,
1064
+ 578.7083,
1065
+ 578.7083,
1066
+ 289.35416,
1067
+ 289.35416,
1068
+ 289.35416,
1069
+ 289.35416,
1070
+ 289.35416,
1071
+ 289.35416,
1072
+ 289.35416,
1073
+ 289.35416,
1074
+ 192.90277,
1075
+ 192.90277,
1076
+ 192.90277,
1077
+ 192.90277,
1078
+ 192.90277,
1079
+ 192.90277,
1080
+ 192.90277,
1081
+ 192.90277,
1082
+ 192.90277,
1083
+ 192.90277,
1084
+ 192.90277,
1085
+ 192.90277,
1086
+ 144.67708,
1087
+ 144.67708,
1088
+ 144.67708,
1089
+ 144.67708,
1090
+ 144.67708,
1091
+ 144.67708,
1092
+ 144.67708,
1093
+ 144.67708,
1094
+ 144.67708,
1095
+ 144.67708,
1096
+ 144.67708,
1097
+ 144.67708,
1098
+ 144.67708,
1099
+ 144.67708,
1100
+ 144.67708,
1101
+ 144.67708,
1102
+ 115.74167,
1103
+ 115.74167,
1104
+ 115.74167,
1105
+ 115.74167,
1106
+ 115.74167,
1107
+ 115.74167,
1108
+ 115.74167,
1109
+ 115.74167,
1110
+ 115.74167,
1111
+ 115.74167,
1112
+ 115.74167,
1113
+ 115.74167,
1114
+ 115.74167,
1115
+ 115.74167,
1116
+ 115.74167,
1117
+ 115.74167,
1118
+ 115.74167,
1119
+ 115.74167,
1120
+ 115.74167,
1121
+ 115.74167,
1122
+ 115.74167,
1123
+ 115.74167,
1124
+ 115.74167,
1125
+ 115.74167,
1126
+ 115.74167,
1127
+ 115.74167,
1128
+ 115.74167,
1129
+ 115.74167,
1130
+ 115.74167,
1131
+ 115.74167,
1132
+ 115.74167,
1133
+ 115.74167,
1134
+ 115.74167,
1135
+ 115.74167,
1136
+ 115.74167,
1137
+ 115.74167,
1138
+ 115.74167,
1139
+ 115.74167,
1140
+ 115.74167,
1141
+ 115.74167,
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
+ 95.69444,
1154
+ 95.69444,
1155
+ 95.69444,
1156
+ 95.69444,
1157
+ 95.69444,
1158
+ 95.69444,
1159
+ 95.69444,
1160
+ 95.69444,
1161
+ 95.69444,
1162
+ 95.69444,
1163
+ 95.69444,
1164
+ 95.69444,
1165
+ 95.69444,
1166
+ 95.69444,
1167
+ 95.69444,
1168
+ 95.69444,
1169
+ 95.69444,
1170
+ 95.69444,
1171
+ 95.69444,
1172
+ 95.69444,
1173
+ 95.69444,
1174
+ 95.69444,
1175
+ 95.69444,
1176
+ 95.69444,
1177
+ 95.69444,
1178
+ 95.69444,
1179
+ 95.69444,
1180
+ 95.69444,
1181
+ 95.69444,
1182
+ 95.69444,
1183
+ 95.69444,
1184
+ 95.69444,
1185
+ 95.69444,
1186
+ 95.69444,
1187
+ 95.69444,
1188
+ 95.69444,
1189
+ 95.69444,
1190
+ ],
1191
+ 1: [
1192
+ 578.7083,
1193
+ 578.7083,
1194
+ 578.7083,
1195
+ 578.7083,
1196
+ 289.35416,
1197
+ 289.35416,
1198
+ 289.35416,
1199
+ 289.35416,
1200
+ 289.35416,
1201
+ 289.35416,
1202
+ 289.35416,
1203
+ 289.35416,
1204
+ 192.90277,
1205
+ 192.90277,
1206
+ 192.90277,
1207
+ 192.90277,
1208
+ 192.90277,
1209
+ 192.90277,
1210
+ 192.90277,
1211
+ 192.90277,
1212
+ 192.90277,
1213
+ 192.90277,
1214
+ 192.90277,
1215
+ 192.90277,
1216
+ 144.67708,
1217
+ 144.67708,
1218
+ 144.67708,
1219
+ 144.67708,
1220
+ 144.67708,
1221
+ 144.67708,
1222
+ 144.67708,
1223
+ 144.67708,
1224
+ 144.67708,
1225
+ 144.67708,
1226
+ 144.67708,
1227
+ 144.67708,
1228
+ 144.67708,
1229
+ 144.67708,
1230
+ 144.67708,
1231
+ 144.67708,
1232
+ 115.74167,
1233
+ 115.74167,
1234
+ 115.74167,
1235
+ 115.74167,
1236
+ 115.74167,
1237
+ 115.74167,
1238
+ 115.74167,
1239
+ 115.74167,
1240
+ 115.74167,
1241
+ 115.74167,
1242
+ 115.74167,
1243
+ 115.74167,
1244
+ 115.74167,
1245
+ 115.74167,
1246
+ 115.74167,
1247
+ 115.74167,
1248
+ 115.74167,
1249
+ 115.74167,
1250
+ 115.74167,
1251
+ 115.74167,
1252
+ 115.74167,
1253
+ 115.74167,
1254
+ 115.74167,
1255
+ 115.74167,
1256
+ 115.74167,
1257
+ 115.74167,
1258
+ 115.74167,
1259
+ 115.74167,
1260
+ 115.74167,
1261
+ 115.74167,
1262
+ 115.74167,
1263
+ 115.74167,
1264
+ 115.74167,
1265
+ 115.74167,
1266
+ 115.74167,
1267
+ 115.74167,
1268
+ 115.74167,
1269
+ 115.74167,
1270
+ 115.74167,
1271
+ 115.74167,
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
+ 95.69444,
1284
+ 95.69444,
1285
+ 95.69444,
1286
+ 95.69444,
1287
+ 95.69444,
1288
+ 95.69444,
1289
+ 95.69444,
1290
+ 95.69444,
1291
+ 95.69444,
1292
+ 95.69444,
1293
+ 95.69444,
1294
+ 95.69444,
1295
+ 95.69444,
1296
+ 95.69444,
1297
+ 95.69444,
1298
+ 95.69444,
1299
+ 95.69444,
1300
+ 95.69444,
1301
+ 95.69444,
1302
+ 95.69444,
1303
+ 95.69444,
1304
+ 95.69444,
1305
+ 95.69444,
1306
+ 95.69444,
1307
+ 95.69444,
1308
+ 95.69444,
1309
+ 95.69444,
1310
+ 95.69444,
1311
+ 95.69444,
1312
+ 95.69444,
1313
+ 95.69444,
1314
+ 95.69444,
1315
+ 95.69444,
1316
+ 95.69444,
1317
+ 95.69444,
1318
+ 95.69444,
1319
+ 95.69444,
1320
+ ],
1321
+ 2: [
1322
+ 578.7083,
1323
+ 578.7083,
1324
+ 578.7083,
1325
+ 578.7083,
1326
+ 289.35416,
1327
+ 289.35416,
1328
+ 289.35416,
1329
+ 289.35416,
1330
+ 289.35416,
1331
+ 289.35416,
1332
+ 289.35416,
1333
+ 289.35416,
1334
+ 192.90277,
1335
+ 192.90277,
1336
+ 192.90277,
1337
+ 192.90277,
1338
+ 192.90277,
1339
+ 192.90277,
1340
+ 192.90277,
1341
+ 192.90277,
1342
+ 192.90277,
1343
+ 192.90277,
1344
+ 192.90277,
1345
+ 192.90277,
1346
+ 144.67708,
1347
+ 144.67708,
1348
+ 144.67708,
1349
+ 144.67708,
1350
+ 144.67708,
1351
+ 144.67708,
1352
+ 144.67708,
1353
+ 144.67708,
1354
+ 144.67708,
1355
+ 144.67708,
1356
+ 144.67708,
1357
+ 144.67708,
1358
+ 144.67708,
1359
+ 144.67708,
1360
+ 144.67708,
1361
+ 144.67708,
1362
+ 115.74167,
1363
+ 115.74167,
1364
+ 115.74167,
1365
+ 115.74167,
1366
+ 115.74167,
1367
+ 115.74167,
1368
+ 115.74167,
1369
+ 115.74167,
1370
+ 115.74167,
1371
+ 115.74167,
1372
+ 115.74167,
1373
+ 115.74167,
1374
+ 115.74167,
1375
+ 115.74167,
1376
+ 115.74167,
1377
+ 115.74167,
1378
+ 115.74167,
1379
+ 115.74167,
1380
+ 115.74167,
1381
+ 115.74167,
1382
+ 115.74167,
1383
+ 115.74167,
1384
+ 115.74167,
1385
+ 115.74167,
1386
+ 115.74167,
1387
+ 115.74167,
1388
+ 115.74167,
1389
+ 115.74167,
1390
+ 115.74167,
1391
+ 115.74167,
1392
+ 115.74167,
1393
+ 115.74167,
1394
+ 115.74167,
1395
+ 115.74167,
1396
+ 115.74167,
1397
+ 115.74167,
1398
+ 115.74167,
1399
+ 115.74167,
1400
+ 115.74167,
1401
+ 115.74167,
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
+ 95.69444,
1414
+ 95.69444,
1415
+ 95.69444,
1416
+ 95.69444,
1417
+ 95.69444,
1418
+ 95.69444,
1419
+ 95.69444,
1420
+ 95.69444,
1421
+ 95.69444,
1422
+ 95.69444,
1423
+ 95.69444,
1424
+ 95.69444,
1425
+ 95.69444,
1426
+ 95.69444,
1427
+ 95.69444,
1428
+ 95.69444,
1429
+ 95.69444,
1430
+ 95.69444,
1431
+ 95.69444,
1432
+ 95.69444,
1433
+ 95.69444,
1434
+ 95.69444,
1435
+ 95.69444,
1436
+ 95.69444,
1437
+ 95.69444,
1438
+ 95.69444,
1439
+ 95.69444,
1440
+ 95.69444,
1441
+ 95.69444,
1442
+ 95.69444,
1443
+ 95.69444,
1444
+ 95.69444,
1445
+ 95.69444,
1446
+ 95.69444,
1447
+ 95.69444,
1448
+ 95.69444,
1449
+ 95.69444,
1450
+ ],
1451
+ 3: [
1452
+ 578.7083,
1453
+ 578.7083,
1454
+ 578.7083,
1455
+ 578.7083,
1456
+ 289.35416,
1457
+ 289.35416,
1458
+ 289.35416,
1459
+ 289.35416,
1460
+ 289.35416,
1461
+ 289.35416,
1462
+ 289.35416,
1463
+ 289.35416,
1464
+ 192.90277,
1465
+ 192.90277,
1466
+ 192.90277,
1467
+ 192.90277,
1468
+ 192.90277,
1469
+ 192.90277,
1470
+ 192.90277,
1471
+ 192.90277,
1472
+ 192.90277,
1473
+ 192.90277,
1474
+ 192.90277,
1475
+ 192.90277,
1476
+ 144.67708,
1477
+ 144.67708,
1478
+ 144.67708,
1479
+ 144.67708,
1480
+ 144.67708,
1481
+ 144.67708,
1482
+ 144.67708,
1483
+ 144.67708,
1484
+ 144.67708,
1485
+ 144.67708,
1486
+ 144.67708,
1487
+ 144.67708,
1488
+ 144.67708,
1489
+ 144.67708,
1490
+ 144.67708,
1491
+ 144.67708,
1492
+ 115.74167,
1493
+ 115.74167,
1494
+ 115.74167,
1495
+ 115.74167,
1496
+ 115.74167,
1497
+ 115.74167,
1498
+ 115.74167,
1499
+ 115.74167,
1500
+ 115.74167,
1501
+ 115.74167,
1502
+ 115.74167,
1503
+ 115.74167,
1504
+ 115.74167,
1505
+ 115.74167,
1506
+ 115.74167,
1507
+ 115.74167,
1508
+ 115.74167,
1509
+ 115.74167,
1510
+ 115.74167,
1511
+ 115.74167,
1512
+ 115.74167,
1513
+ 115.74167,
1514
+ 115.74167,
1515
+ 115.74167,
1516
+ 115.74167,
1517
+ 115.74167,
1518
+ 115.74167,
1519
+ 115.74167,
1520
+ 115.74167,
1521
+ 115.74167,
1522
+ 115.74167,
1523
+ 115.74167,
1524
+ 115.74167,
1525
+ 115.74167,
1526
+ 115.74167,
1527
+ 115.74167,
1528
+ 115.74167,
1529
+ 115.74167,
1530
+ 115.74167,
1531
+ 115.74167,
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
+ 95.69444,
1544
+ 95.69444,
1545
+ 95.69444,
1546
+ 95.69444,
1547
+ 95.69444,
1548
+ 95.69444,
1549
+ 95.69444,
1550
+ 95.69444,
1551
+ 95.69444,
1552
+ 95.69444,
1553
+ 95.69444,
1554
+ 95.69444,
1555
+ 95.69444,
1556
+ 95.69444,
1557
+ 95.69444,
1558
+ 95.69444,
1559
+ 95.69444,
1560
+ 95.69444,
1561
+ 95.69444,
1562
+ 95.69444,
1563
+ 95.69444,
1564
+ 95.69444,
1565
+ 95.69444,
1566
+ 95.69444,
1567
+ 95.69444,
1568
+ 95.69444,
1569
+ 95.69444,
1570
+ 95.69444,
1571
+ 95.69444,
1572
+ 95.69444,
1573
+ 95.69444,
1574
+ 95.69444,
1575
+ 95.69444,
1576
+ 95.69444,
1577
+ 95.69444,
1578
+ 95.69444,
1579
+ 95.69444,
1580
+ ],
1581
+ }
1582
+
1583
+ # Energy tables for CoDICE-Hi data products. These values represent the edges
1584
+ # of the bins, and are used in the CoDICE L1a pipeline to compute the centers
1585
+ # and deltas of the bins, which then get stored in the CDF files for future use.
1586
+ # These are defined in the "Data Products - Hi" tab of the "*-SCI-LUT-*.xml"
1587
+ # spreadsheet that largely defines CoDICE processing.
1588
+ OMNI_ENERGY_TABLE = {
1589
+ "h": [
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
+ 9.050966799,
1606
+ ],
1607
+ "he3": [
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
+ ],
1625
+ "he4": [
1626
+ 0.035355339,
1627
+ 0.05,
1628
+ 0.070710678,
1629
+ 0.1,
1630
+ 0.141421356,
1631
+ 0.2,
1632
+ 0.282842712,
1633
+ 0.4,
1634
+ 0.565685425,
1635
+ 0.8,
1636
+ 1.13137085,
1637
+ 1.6,
1638
+ 2.2627417,
1639
+ 3.2,
1640
+ 4.5254834,
1641
+ 6.4,
1642
+ ],
1643
+ "c": [
1644
+ 0.025,
1645
+ 0.035355339,
1646
+ 0.05,
1647
+ 0.070710678,
1648
+ 0.1,
1649
+ 0.141421356,
1650
+ 0.2,
1651
+ 0.282842712,
1652
+ 0.4,
1653
+ 0.565685425,
1654
+ 0.8,
1655
+ 1.13137085,
1656
+ 1.6,
1657
+ 2.2627417,
1658
+ 3.2,
1659
+ 4.5254834,
1660
+ 6.4,
1661
+ 9.050966799,
1662
+ 12.8,
1663
+ ],
1664
+ "o": [
1665
+ 0.025,
1666
+ 0.035355339,
1667
+ 0.05,
1668
+ 0.070710678,
1669
+ 0.1,
1670
+ 0.141421356,
1671
+ 0.2,
1672
+ 0.282842712,
1673
+ 0.4,
1674
+ 0.565685425,
1675
+ 0.8,
1676
+ 1.13137085,
1677
+ 1.6,
1678
+ 2.2627417,
1679
+ 3.2,
1680
+ 4.5254834,
1681
+ 6.4,
1682
+ 9.050966799,
1683
+ 12.8,
1684
+ ],
1685
+ "ne_mg_si": [
1686
+ 0.01767767,
1687
+ 0.025,
1688
+ 0.035355339,
1689
+ 0.05,
1690
+ 0.070710678,
1691
+ 0.1,
1692
+ 0.141421356,
1693
+ 0.2,
1694
+ 0.282842712,
1695
+ 0.4,
1696
+ 0.565685425,
1697
+ 0.8,
1698
+ 1.13137085,
1699
+ 1.6,
1700
+ 2.2627417,
1701
+ 3.2,
1702
+ ],
1703
+ "fe": [
1704
+ 0.01767767,
1705
+ 0.025,
1706
+ 0.035355339,
1707
+ 0.05,
1708
+ 0.070710678,
1709
+ 0.1,
1710
+ 0.141421356,
1711
+ 0.2,
1712
+ 0.282842712,
1713
+ 0.4,
1714
+ 0.565685425,
1715
+ 0.8,
1716
+ 1.13137085,
1717
+ 1.6,
1718
+ 2.2627417,
1719
+ 3.2,
1720
+ 4.5254834,
1721
+ 6.4,
1722
+ 9.050966799,
1723
+ ],
1724
+ "uh": [0.01767767, 0.025, 0.035355339, 0.05, 0.070710678, 0.1],
1725
+ "junk": [0.05, 0.070710678],
1726
+ }
1727
+
1728
+ SECTORED_ENERGY_TABLE = {
1729
+ "h": [0.05, 0.1, 0.2, 0.4, 0.8, 1.6, 3.2, 6.4, 12.8],
1730
+ "he3he4": [0.025, 0.05, 0.1, 0.2, 0.4, 0.8, 1.6, 3.2, 6.4],
1731
+ "cno": [0.025, 0.05, 0.1, 0.2, 0.4, 0.8, 1.6, 3.2, 6.4],
1732
+ "fe": [0.0125, 0.025, 0.05, 0.1, 0.2, 0.4, 0.8, 1.6, 3.2],
942
1733
  }