syncmoss 0.8.0__tar.gz → 0.8.2__tar.gz

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.
Files changed (307) hide show
  1. {syncmoss-0.8.0/syncmoss.egg-info → syncmoss-0.8.2}/PKG-INFO +1 -1
  2. syncmoss-0.8.2/syncmoss/Expressions/ASM P(m) from m.mdl +7 -0
  3. syncmoss-0.8.2/syncmoss/Expressions/ASM m from P(m).mdl +7 -0
  4. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library_io.py +1 -1
  5. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/components_search.py +13 -7
  6. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/dual_kernels.py +167 -9
  7. syncmoss-0.8.2/syncmoss/faddeeva.py +159 -0
  8. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/fitting_io.py +13 -2
  9. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/legacy.py +45 -1
  10. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/main.py +1 -1
  11. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/minimi_lib.py +50 -5
  12. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/model_io.py +4 -4
  13. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/models.py +162 -105
  14. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/models_dual.py +41 -42
  15. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/models_positions.py +2 -9
  16. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/parameters/help_extended.md +24 -3
  17. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/parameters/models_description.md +2 -2
  18. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/parameters_table.py +1 -1
  19. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/spectrum_reference.py +11 -10
  20. {syncmoss-0.8.0 → syncmoss-0.8.2/syncmoss.egg-info}/PKG-INFO +1 -1
  21. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss.egg-info/SOURCES.txt +6 -0
  22. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss.egg-info/scm_file_list.json +6 -0
  23. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/conftest.py +11 -0
  24. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/golden_models.json +49 -49
  25. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/resource_profile.json +578 -122
  26. syncmoss-0.8.2/tests/test_asm_p.py +186 -0
  27. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_dual_kernels.py +78 -3
  28. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_expressions.py +3 -0
  29. syncmoss-0.8.2/tests/test_faddeeva.py +223 -0
  30. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_fit_core.py +14 -2
  31. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_golden_models.py +6 -4
  32. syncmoss-0.8.2/tests/test_jacobi_elliptic.py +52 -0
  33. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_jit_cache.py +8 -6
  34. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_legacy.py +38 -2
  35. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_minimi_batch_eval.py +41 -1
  36. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_models_dual.py +36 -1
  37. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_texture_s1.py +3 -2
  38. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_voigt_complex.py +2 -1
  39. {syncmoss-0.8.0 → syncmoss-0.8.2}/.gitattributes +0 -0
  40. {syncmoss-0.8.0 → syncmoss-0.8.2}/.github/workflows/Tests.yml +0 -0
  41. {syncmoss-0.8.0 → syncmoss-0.8.2}/.github/workflows/_MacOS.yml +0 -0
  42. {syncmoss-0.8.0 → syncmoss-0.8.2}/.github/workflows/_PyPI.yml +0 -0
  43. {syncmoss-0.8.0 → syncmoss-0.8.2}/.github/workflows/_TagRelease.yml +0 -0
  44. {syncmoss-0.8.0 → syncmoss-0.8.2}/.github/workflows/_Tests.yml +0 -0
  45. {syncmoss-0.8.0 → syncmoss-0.8.2}/.github/workflows/_UploadRelease.yml +0 -0
  46. {syncmoss-0.8.0 → syncmoss-0.8.2}/.github/workflows/_Version.yml +0 -0
  47. {syncmoss-0.8.0 → syncmoss-0.8.2}/.github/workflows/_Wheels.yml +0 -0
  48. {syncmoss-0.8.0 → syncmoss-0.8.2}/.github/workflows/_WindowsExe.yml +0 -0
  49. {syncmoss-0.8.0 → syncmoss-0.8.2}/.github/workflows/release.yml +0 -0
  50. {syncmoss-0.8.0 → syncmoss-0.8.2}/.gitignore +0 -0
  51. {syncmoss-0.8.0 → syncmoss-0.8.2}/.vscode/settings.json +0 -0
  52. {syncmoss-0.8.0 → syncmoss-0.8.2}/COPYING.txt +0 -0
  53. {syncmoss-0.8.0 → syncmoss-0.8.2}/LICENSE +0 -0
  54. {syncmoss-0.8.0 → syncmoss-0.8.2}/Lib_test/test.mdl +0 -0
  55. {syncmoss-0.8.0 → syncmoss-0.8.2}/NOTICE.txt +0 -0
  56. {syncmoss-0.8.0 → syncmoss-0.8.2}/README.md +0 -0
  57. {syncmoss-0.8.0 → syncmoss-0.8.2}/bundle/MacOS.spec +0 -0
  58. {syncmoss-0.8.0 → syncmoss-0.8.2}/bundle/SYNCmoss.png +0 -0
  59. {syncmoss-0.8.0 → syncmoss-0.8.2}/bundle/Windows.spec +0 -0
  60. {syncmoss-0.8.0 → syncmoss-0.8.2}/bundle/bundle.py +0 -0
  61. {syncmoss-0.8.0 → syncmoss-0.8.2}/bundle/dmg_background.pdf +0 -0
  62. {syncmoss-0.8.0 → syncmoss-0.8.2}/bundle/licenses/GPL-3.0.txt +0 -0
  63. {syncmoss-0.8.0 → syncmoss-0.8.2}/bundle/licenses/LGPL-3.0.txt +0 -0
  64. {syncmoss-0.8.0 → syncmoss-0.8.2}/bundle/macos_bundle.py +0 -0
  65. {syncmoss-0.8.0 → syncmoss-0.8.2}/bundle/third_party_licenses.py +0 -0
  66. {syncmoss-0.8.0 → syncmoss-0.8.2}/docs/thick_models.md +0 -0
  67. {syncmoss-0.8.0 → syncmoss-0.8.2}/docs/thick_vs_thin.md +0 -0
  68. {syncmoss-0.8.0 → syncmoss-0.8.2}/pyproject.toml +0 -0
  69. {syncmoss-0.8.0 → syncmoss-0.8.2}/requirements.txt +0 -0
  70. {syncmoss-0.8.0 → syncmoss-0.8.2}/setup.cfg +0 -0
  71. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/CMS_source_geometry_calibration.py +0 -0
  72. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Calibration.py +0 -0
  73. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Expressions/Central shift vs temperature.mdl +0 -0
  74. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Expressions/Hyperfine field in applied field, Langevin.mdl +0 -0
  75. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Expressions/Hyperfine field vs temperature, Bloch.mdl +0 -0
  76. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Expressions/Hyperfine field vs temperature, critical.mdl +0 -0
  77. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Expressions/Hyperfine field vs temperature, empirical.mdl +0 -0
  78. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Expressions/Lamb-Mossbauer factor vs temperature.mdl +0 -0
  79. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Expressions/Lifetime from line width.mdl +0 -0
  80. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Expressions/Neel relaxation time vs temperature.mdl +0 -0
  81. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Expressions/Paramagnetic quadrupole shift from Hamiltonian.mdl +0 -0
  82. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Expressions/Quadrupole splitting, doublet.mdl +0 -0
  83. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Expressions/Quadrupole splitting, sextet.mdl +0 -0
  84. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Expressions/Thickness PDF, Gamma.mdl +0 -0
  85. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Expressions/Thickness PDF, pressed window (clamped plate).mdl +0 -0
  86. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Expressions/Thickness PDF, pressed window (membrane).mdl +0 -0
  87. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Hamiltonian_helper.py +0 -0
  88. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Aegirine.mdl +0 -0
  89. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Akaganeite.mdl +0 -0
  90. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Almandine.mdl +0 -0
  91. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Antitaenite.mdl +0 -0
  92. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Arsenopyrite.mdl +0 -0
  93. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Bornite.mdl +0 -0
  94. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Bridgmanite (Fe,Al-bearing) @100 GPa.mdl +0 -0
  95. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Bridgmanite (Fe,Al-bearing).mdl +0 -0
  96. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Celadonite.mdl +0 -0
  97. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Cementite.mdl +0 -0
  98. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Chalcopyrite.mdl +0 -0
  99. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Clinopyroxene (augite).mdl +0 -0
  100. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Copiapite.mdl +0 -0
  101. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Cubanite.mdl +0 -0
  102. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Epidote.mdl +0 -0
  103. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Fayalite (Fe-olivine).mdl +0 -0
  104. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Ferrihydrite (2-line).mdl +0 -0
  105. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Ferropericlase.mdl +0 -0
  106. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Goethite.mdl +0 -0
  107. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Green rust (fougerite, carbonate).mdl +0 -0
  108. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Haegg carbide.mdl +0 -0
  109. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Hedenbergite.mdl +0 -0
  110. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Hematite.mdl +0 -0
  111. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Heterosite (FePO4).mdl +0 -0
  112. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Ilmenite.mdl +0 -0
  113. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Iron phosphide.mdl +0 -0
  114. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Isocubanite.mdl +0 -0
  115. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Jarosite.mdl +0 -0
  116. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Kamacite.mdl +0 -0
  117. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Lepidocrocite.mdl +0 -0
  118. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Maghemite.mdl +0 -0
  119. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Magnetite.mdl +0 -0
  120. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Marcasite.mdl +0 -0
  121. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Melanterite.mdl +0 -0
  122. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Orthopyroxene (enstatite-ferrosilite).mdl +0 -0
  123. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Prussian blue (ferric ferrocyanide).mdl +0 -0
  124. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Pyrite.mdl +0 -0
  125. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Pyrrhotite.mdl +0 -0
  126. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Rhomboclase.mdl +0 -0
  127. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Roemerite.mdl +0 -0
  128. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Siderite.mdl +0 -0
  129. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Szomolnokite.mdl +0 -0
  130. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Taenite.mdl +0 -0
  131. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Talnakhite.mdl +0 -0
  132. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Tetrataenite.mdl +0 -0
  133. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Triphylite (LiFePO4).mdl +0 -0
  134. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Troilite.mdl +0 -0
  135. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Vivianite.mdl +0 -0
  136. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/Voltaite.mdl +0 -0
  137. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library/alpha-Fe (metallic iron, bcc).mdl +0 -0
  138. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/Library_window.py +0 -0
  139. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/app_paths.py +0 -0
  140. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/bliss_channel.py +0 -0
  141. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/compile_functions.py +0 -0
  142. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/compile_window.py +0 -0
  143. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/components_results.py +0 -0
  144. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/components_window.py +0 -0
  145. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/console_io.py +0 -0
  146. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/constants.py +0 -0
  147. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/dual_numbers.py +0 -0
  148. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/error_reporter.py +0 -0
  149. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/exclusion_bar.py +0 -0
  150. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/exclusion_regions.py +0 -0
  151. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/experimental_features.py +0 -0
  152. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/expression_eval.py +0 -0
  153. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/expressions_io.py +0 -0
  154. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/expressions_window.py +0 -0
  155. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/fit_quality.py +0 -0
  156. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/frozen_cache_locator.py +0 -0
  157. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/hamiltonian_dual.py +0 -0
  158. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/icons/CheckBox.png +0 -0
  159. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/icons/CheckBox_.png +0 -0
  160. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/icons/CheckBox_L.png +0 -0
  161. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/icons/CheckBox_L2.png +0 -0
  162. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/icons/DU.png +0 -0
  163. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/icons/Switch.png +0 -0
  164. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/icons/UD.png +0 -0
  165. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/icons/icon_r.ico +0 -0
  166. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/instrumental_dialogs.py +0 -0
  167. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/instrumental_io.py +0 -0
  168. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/instrumental_window.py +0 -0
  169. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/jit_cache.py +0 -0
  170. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/license_window.py +0 -0
  171. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/models_description_window.py +0 -0
  172. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/models_removed.py +0 -0
  173. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/one_model.py +0 -0
  174. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/one_spectrum.py +0 -0
  175. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/parameters/ABSorber3.txt +0 -0
  176. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/parameters/Be.txt +0 -0
  177. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/parameters/Calibration.dat +0 -0
  178. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/parameters/GCMS.txt +0 -0
  179. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/parameters/INS_APS.txt +0 -0
  180. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/parameters/INSexp.txt +0 -0
  181. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/parameters/INSint.txt +0 -0
  182. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/parameters/INSth.txt +0 -0
  183. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/parameters/KB.txt +0 -0
  184. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/parameters/NFS.txt +0 -0
  185. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/parameters/Standard_CMS.dat +0 -0
  186. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/parameters/Standard_SMS.dat +0 -0
  187. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/parameters/calibr.png +0 -0
  188. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/parameters/help.md +0 -0
  189. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/result_window.py +0 -0
  190. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/results_table.py +0 -0
  191. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/sms_theory.py +0 -0
  192. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/spectrum_io.py +0 -0
  193. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/spectrum_model.py +0 -0
  194. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/spectrum_parameters.py +0 -0
  195. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/spectrum_plotter.py +0 -0
  196. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/spectrum_reference_window.py +0 -0
  197. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/supp_menu.py +0 -0
  198. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/support_math.py +0 -0
  199. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/syncmoss_main.py +0 -0
  200. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/test_graf.txt +0 -0
  201. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/test_param.txt +0 -0
  202. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/theme_dark.json +0 -0
  203. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/theme_light.json +0 -0
  204. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss/thickness_distribution.py +0 -0
  205. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss.egg-info/dependency_links.txt +0 -0
  206. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss.egg-info/entry_points.txt +0 -0
  207. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss.egg-info/requires.txt +0 -0
  208. {syncmoss-0.8.0 → syncmoss-0.8.2}/syncmoss.egg-info/top_level.txt +0 -0
  209. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/README.md +0 -0
  210. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/compile_stand_ins.py +0 -0
  211. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/data/Distr_corr.mdl +0 -0
  212. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/data/Distr_distr.mdl +0 -0
  213. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/data/alpha_fe_sms_000.mca +0 -0
  214. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/data/calibration_000_golden.json +0 -0
  215. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/data/generate_cal_fixtures.py +0 -0
  216. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/data/parameters/Calibration.dat +0 -0
  217. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/data/parameters/GCMS.txt +0 -0
  218. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/data/parameters/INSexp.txt +0 -0
  219. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/data/parameters/INSint.txt +0 -0
  220. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/data/parameters/INSth.txt +0 -0
  221. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/data/synthetic_alpha_fe_cms_linear.mca +0 -0
  222. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/data/synthetic_alpha_fe_cms_sinus.mca +0 -0
  223. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/profile_resources.py +0 -0
  224. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/syncmoss_test.py +0 -0
  225. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_baseline_polynomial.py +0 -0
  226. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_bliss_channel.py +0 -0
  227. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_calculation_time.py +0 -0
  228. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_calibrate_menu.py +0 -0
  229. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_calibration.py +0 -0
  230. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_calibration_helpers.py +0 -0
  231. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_calibration_path.py +0 -0
  232. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_channel_average.py +0 -0
  233. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_chi2_spread.py +0 -0
  234. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_cms_source_geometry_calibration.py +0 -0
  235. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_components_search.py +0 -0
  236. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_console_io.py +0 -0
  237. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_contact_author.py +0 -0
  238. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_cosine_smearing.py +0 -0
  239. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_create_spectrum_from_model.py +0 -0
  240. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_default_settings.py +0 -0
  241. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_distr_composition.py +0 -0
  242. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_distr_expansion.py +0 -0
  243. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_distr_mdl.py +0 -0
  244. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_distr_t.py +0 -0
  245. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_distr_targets.py +0 -0
  246. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_distr_text_references.py +0 -0
  247. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_dual_numbers.py +0 -0
  248. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_error_reporter.py +0 -0
  249. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_exclusion_fit.py +0 -0
  250. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_exclusion_gui.py +0 -0
  251. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_exclusion_regions.py +0 -0
  252. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_expression_fit_start.py +0 -0
  253. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_expression_validation.py +0 -0
  254. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_find_bar.py +0 -0
  255. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_fit_one_spectrum.py +0 -0
  256. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_fit_quality.py +0 -0
  257. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_gui_smoke.py +0 -0
  258. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_hamiltonian_dual.py +0 -0
  259. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_hamiltonian_texture.py +0 -0
  260. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_impurity_presets.py +0 -0
  261. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_instrumental_joint.py +0 -0
  262. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_instrumental_metadata.py +0 -0
  263. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_instrumental_method_choice.py +0 -0
  264. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_instrumental_recentre.py +0 -0
  265. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_instrumental_window.py +0 -0
  266. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_integral_points.py +0 -0
  267. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_interrupt.py +0 -0
  268. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_library_dir.py +0 -0
  269. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_library_io.py +0 -0
  270. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_license_window.py +0 -0
  271. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_link_chains.py +0 -0
  272. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_minimi_bounds.py +0 -0
  273. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_minimi_covariance.py +0 -0
  274. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_model_append.py +0 -0
  275. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_model_io.py +0 -0
  276. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_model_only_mode.py +0 -0
  277. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_model_pointwise.py +0 -0
  278. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_nbaseline_multidistr.py +0 -0
  279. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_nbaseline_results.py +0 -0
  280. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_node_sum_reuse.py +0 -0
  281. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_one_model_expand.py +0 -0
  282. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_one_model_gui.py +0 -0
  283. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_overwrite_dat_instrumental.py +0 -0
  284. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_parameter_links.py +0 -0
  285. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_polarization.py +0 -0
  286. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_recon_composition.py +0 -0
  287. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_recon_mdl.py +0 -0
  288. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_recon_results.py +0 -0
  289. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_recon_variants.py +0 -0
  290. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_reference_shift.py +0 -0
  291. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_replaced_component_skip.py +0 -0
  292. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_result_window.py +0 -0
  293. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_results_table_image.py +0 -0
  294. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_results_table_rows.py +0 -0
  295. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_save_result_model.py +0 -0
  296. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_sdw_grid.py +0 -0
  297. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_search_guards.py +0 -0
  298. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_sms_theory.py +0 -0
  299. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_source_norm.py +0 -0
  300. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_spectrum_model.py +0 -0
  301. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_spectrum_parameters.py +0 -0
  302. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_support_math.py +0 -0
  303. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_table_marks.py +0 -0
  304. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_take_result.py +0 -0
  305. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_theory_search.py +0 -0
  306. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/test_thick_gui.py +0 -0
  307. {syncmoss-0.8.0 → syncmoss-0.8.2}/tests/worker_plan.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: syncmoss
3
- Version: 0.8.0
3
+ Version: 0.8.2
4
4
  Summary: SYNCmoss — Mössbauer spectroscopy analysis application
5
5
  Author: Sergey Yaroslavtsev
6
6
  License: MIT
@@ -0,0 +1,7 @@
1
+ #@Comment P(m) of the ASM from its anharmonicity m (a published value, say): a start, or a comparison.
2
+ #@Comment $P=\mathrm{sign}(m)\,\frac{L}{L+\ln 16},\ L=-\ln(1-|m|)$
3
+ #@Comment {m} - the anharmonicity m, |m| < 1.
4
+ baseline Expression
5
+ red red
6
+ 10000 1 False 0 True 0 True 0 True 0 True =[1,1] True =[2,1] True =[3,1] True False False False False False False False False False False False False False False False False False False False
7
+ sign({m})*log(1-abs({m}))/(log(1-abs({m}))-log(16)) True False False False False False False False False False False False False False False False False False False False False False False False False False False
@@ -0,0 +1,7 @@
1
+ #@Comment The anharmonicity m of the ASM - the parameter of the Jacobi function sn(x|m) of the moment's angle - from its fitted P(m).
2
+ #@Comment $m=\mathrm{sign}(P)\,\left(1-16^{-|P|/(1-|P|)}\right)$
3
+ #@Comment {P} - P(m) of the ASM row: p[k], k its number. P = 0 is m = 0 (harmonic cycloid), P = ±1 is m = ±1 (collinear).
4
+ baseline Expression
5
+ red red
6
+ 10000 1 False 0 True 0 True 0 True 0 True =[1,1] True =[2,1] True =[3,1] True False False False False False False False False False False False False False False False False False False False
7
+ sign({P})*(1-16**(-abs({P})/(1-abs({P})))) True False False False False False False False False False False False False False False False False False False False False False False False False False False
@@ -41,7 +41,7 @@ MODEL_PARAMETER_NAMES = {
41
41
  'Hamilton_pc': ['T', 'δ, mm/s', 'Q, mm/s', 'H, T', 'L, mm/s', 'G, mm/s', 'η', 'θH, °', 'φH, °'],
42
42
  'Relax_MS': ['T', 'δ, mm/s', 'ε, mm/s', 'H, T', 'L, mm/s', 'θk, °', 'φh, °', 'A', 'R', 'alfa', 'S'],
43
43
  'Relax_2S': ['T', 'δ1, mm/s', 'ε1, mm/s', 'H1, T', 'δ2, mm/s', 'ε2, mm/s', 'H2, T', 'L, mm/s', 'θk, °', 'φh, °', 'A', 'Am', 'Ω12', 'P1/P2'],
44
- 'ASM': ['T', 'δ, mm/s', 'εm, mm/s', 'εl, mm/s', 'His, T', 'Han, T', 'L, mm/s', 'G, mm/s', 'm', 'θk, °', 'φh, °', 'A', 'Num', 'I13', 'ω, °'],
44
+ 'ASM': ['T', 'δ, mm/s', 'εm, mm/s', 'εl, mm/s', 'His, T', 'Han, T', 'L, mm/s', 'G, mm/s', 'P(m)', 'θk, °', 'φh, °', 'A', 'Num', 'I13', 'ω, °'],
45
45
  'Spectrum': ['T', 'δ, mm/s', 'G, mm/s', 'Lines'],
46
46
  'SCDW': ['T', 'δ, mm/s', 'ε, mm/s', 'H0, T', 'L, mm/s', 'G, mm/s', 'θk, °', 'φh, °', 'A', 'Am', 'KδH', 'KεH', 'Φ, °', 'h1, T', 'h3, T', 'h5, T', 'h7, T', 'h9, T', 'h11, T', 'h13, T', 'h15, T', 'd2, mm/s', 'd4, mm/s', 'd6, mm/s', 'd8, mm/s', 'N/Γ', 'I13'],
47
47
  'Be': ['T', 'δ, mm/s', 'ε, mm/s', 'L, mm/s', 'G, mm/s', 'θk, °', 'φh, °', 'A', 'G2/G1'],
@@ -55,7 +55,8 @@ import numpy as np
55
55
  import syncmoss.minimi_lib as mi
56
56
  import syncmoss.models as m5
57
57
  from syncmoss.constants import NAT_WIDTH, number_of_baseline_parameters as NB
58
- from syncmoss.dual_kernels import _voigt_parts, voigt_value
58
+ import syncmoss.faddeeva as faddeeva
59
+ from syncmoss.dual_kernels import _faddeeva_parts, _voigt_parts, voigt_value
59
60
  from syncmoss.fit_quality import deviance_moments
60
61
  from syncmoss.instrumental_io import source_for
61
62
  from syncmoss.spectrum_io import estimate_edge_background, ns_for_background
@@ -119,9 +120,14 @@ def _check_interrupt():
119
120
  def _ready():
120
121
  """Whether numba has the search's compiled kernels in this process
121
122
  already: a line's depth and its depth with the derivatives (dual_kernels'
122
- twins of the Voigt), the program's Voigt itself (line_fwhm), minimi_hi's
123
- linear solve."""
124
- return all(kernel.signatures for kernel in (voigt_value, _voigt_parts, m5.Voigt, mi.solution))
123
+ twins of the program's line shape, models.Voigt_r -- the exact Voigt's or
124
+ the pseudo-Voigt's, models.exact_voigt), the line shape itself
125
+ (line_fwhm), minimi_hi's linear solve."""
126
+ if m5.exact_voigt():
127
+ kernels = (faddeeva.voigt_line, _faddeeva_parts)
128
+ else:
129
+ kernels = (voigt_value, _voigt_parts, m5.Voigt)
130
+ return all(kernel.signatures for kernel in kernels + (mi.solution,))
125
131
 
126
132
 
127
133
  def _warm_up():
@@ -133,7 +139,7 @@ def _warm_up():
133
139
  E = np.linspace(-1.0, 1.0, 8)
134
140
  singlet_depth(E.reshape(2, 4), 1.0, 1.0, 0.0, 0.1)
135
141
  singlet_parts(E.reshape(2, 4), 1.0, 0.0, 0.1)
136
- m5.Voigt(NAT_WIDTH, 0.1, E)
142
+ m5.Voigt_r(NAT_WIDTH, 0.1, E)
137
143
  mi.warmup()
138
144
  return True
139
145
 
@@ -1124,10 +1130,10 @@ def merge_duplicates(lines, beta, mask, cols):
1124
1130
 
1125
1131
  def line_fwhm(G):
1126
1132
  """The full width at half maximum (mm/s) of a line of the natural width
1127
- and the Gaussian G, measured on the program's Voigt."""
1133
+ and the Gaussian G, measured on the program's line shape (models.Voigt_r)."""
1128
1134
  half = 4 * (NAT_WIDTH + G) + 0.5
1129
1135
  E = np.linspace(-half, half, 40001)
1130
- v = m5.Voigt(NAT_WIDTH, float(G), E)
1136
+ v = m5.Voigt_r(NAT_WIDTH, float(G), E)
1131
1137
  above = E[v >= v.max() / 2]
1132
1138
  return float(above[-1] - above[0])
1133
1139
 
@@ -8,6 +8,10 @@ here does that work in one compiled pass over plain arrays:
8
8
  returns the value and its derivatives in the kernel's OWN arguments, and
9
9
  dual_numbers.chain makes the Dual of them, whatever fit parameters the
10
10
  arguments depend on; voigt_value is the value alone, in one pass;
11
+ * _faddeeva_parts -- the exact Voigt of faddeeva.voigt_line (models.Voigt_c
12
+ and Voigt_r under COMPLEX_VOIGT_METHOD 'faddeeva' / 'wofz') with its
13
+ derivatives, as _voigt_parts has them; voigt_parts and line_value choose
14
+ between the two by models.exact_voigt();
11
15
  * expm_neg, readout -- models._expm_neg and the readout of
12
16
  models._polarised_readout: the value and its derivatives along the
13
17
  derivatives of the matrix handed in.
@@ -27,9 +31,12 @@ parameter i, written by hand -- with a code after SLOPE, its number of
27
31
  parameters in _COUNT, its branch in _transmission, and its test against
28
32
  central differences in tests/test_dual_kernels.py.
29
33
  """
34
+ import math
35
+
30
36
  import numpy as np
31
37
  from numba import njit
32
38
 
39
+ import syncmoss.faddeeva as faddeeva
33
40
  from syncmoss.constants import LINE_RATIO_25, LINE_RATIO_34
34
41
  from syncmoss.dual_numbers import Dual, chain, value
35
42
 
@@ -207,6 +214,150 @@ def voigt_value(gL, gG, S):
207
214
  return out
208
215
 
209
216
 
217
+ # =============================================================================
218
+ # The exact Voigt of faddeeva.voigt_line (COMPLEX_VOIGT_METHOD 'faddeeva')
219
+ # =============================================================================
220
+ # faddeeva.py's constants, written out here: a kernel keeps the values of the
221
+ # globals it read from another file (see faddeeva.py) -- the coefficients come
222
+ # in as arguments for that reason
223
+ _F_S2L2 = math.sqrt(8.0 * math.log(2.0))
224
+ _F_SQRT_2 = math.sqrt(2.0)
225
+ _F_SQRT_PI = math.sqrt(math.pi)
226
+ _F_SQRT_2PI = math.sqrt(2.0 * math.pi)
227
+ _F_CHUNK = 64
228
+ #: |z| from which the slopes of w are taken from its asymptotic series: below
229
+ #: it w' = -2 z w + 2i/sqrt(pi) and z w' + w lose |z|^2 of w's digits to
230
+ #: cancellation; above it the series' terms fall as |z|^-2 (12 terms: 2e-18 at
231
+ #: |z| = 15). Against w' in high-precision arithmetic: 1e-13 below, 5e-16
232
+ #: above (the time domain's derivatives, measured 2026-11-17).
233
+ Z_ASYMPTOTIC = 15.0
234
+ _ASYMPTOTIC_TERMS = 12
235
+
236
+
237
+ @njit(cache=True)
238
+ def _w_slopes(z, w):
239
+ """(w'(z), z w'(z) + w(z)) for w = w(z)."""
240
+ if abs(z) < Z_ASYMPTOTIC:
241
+ wp = -2.0 * z * w + 2j / _F_SQRT_PI
242
+ return wp, z * wp + w
243
+ # w ~ (i/sqrt(pi)) sum_n c_n z^-(2n+1), c_n = (2n-1)!!/2^n
244
+ u = 1.0 / (z * z)
245
+ c = 1.0
246
+ un = 1.0 + 0j
247
+ s1 = 0j # sum (2n+1) c_n u^n
248
+ s2 = 0j # sum 2n c_n u^n
249
+ for n in range(_ASYMPTOTIC_TERMS):
250
+ s1 += (2 * n + 1) * c * un
251
+ s2 += 2 * n * c * un
252
+ c *= (2 * n + 1) / 2.0
253
+ un *= u
254
+ pref = 1j / _F_SQRT_PI
255
+ return -pref * s1 * u, -pref * s2 / z
256
+
257
+
258
+ @njit(cache=True)
259
+ def _faddeeva_parts(gL, gG, S, A, L, dispersion):
260
+ """_voigt_parts of the exact Voigt of faddeeva.voigt_line, by its steps
261
+ (the value is voigt_line's bit for bit): the absorptive part V and the
262
+ dispersive D, each with its derivatives, rows (value, d/dgL, d/dgG, d/dS)
263
+ over the points of S; D left zero unless *dispersion*. A, L: the
264
+ expansion's coefficients and scale (faddeeva.FADDEEVA_A, FADDEEVA_L).
265
+
266
+ F = V + iD = w(z) / (sigma sqrt(2 pi)) with z = (S + i gL/2) / (sigma sqrt 2)
267
+ and sigma = gG / sqrt(8 ln 2) depends on S + i gL/2 alone, so
268
+ dF/dS = w'(z) / (sigma sqrt 2 sigma sqrt(2 pi)), dF/dgL = (i/2) dF/dS,
269
+ dF/dsigma = -(w + z w') / (sigma^2 sqrt(2 pi)), dF/dgG = dF/dsigma / sqrt(8 ln 2).
270
+ Without a Gaussian (gG <= 0) the Lorentzian (1/pi)/(gL/2 - iS); its
271
+ derivative in gG is 0, the Voigt being even in sigma."""
272
+ n = len(S)
273
+ Ar = np.zeros((4, n))
274
+ Dr = np.zeros((4, n))
275
+ gamma = 0.5 * gL
276
+ if gG <= 0.0:
277
+ for k in range(n):
278
+ den = np.pi * (gamma * gamma + S[k] * S[k]) # the value as voigt_line takes it
279
+ u = gamma - 1j * S[k]
280
+ F_S = 1j / (np.pi * u * u)
281
+ F_L = 0.5j * F_S
282
+ Ar[0, k] = gamma / den
283
+ Ar[1, k] = F_L.real
284
+ Ar[3, k] = F_S.real
285
+ if dispersion:
286
+ Dr[0, k] = S[k] / den
287
+ Dr[1, k] = F_L.imag
288
+ Dr[3, k] = F_S.imag
289
+ return Ar, Dr
290
+ # w at every point, as faddeeva.voigt_line takes it
291
+ na = A.shape[0]
292
+ sigma = gG / _F_S2L2
293
+ s2 = gG / _F_S2L2 * _F_SQRT_2
294
+ norm = 1.0 / (gG / _F_S2L2 * _F_SQRT_2PI)
295
+ zi = gamma / s2
296
+ a = L + zi
297
+ b = L - zi
298
+ wr = np.empty(n)
299
+ wi = np.empty(n)
300
+ ir = np.empty(_F_CHUNK)
301
+ ii = np.empty(_F_CHUNK)
302
+ Zr = np.empty(_F_CHUNK)
303
+ Zi = np.empty(_F_CHUNK)
304
+ pr = np.empty(_F_CHUNK)
305
+ pi_ = np.empty(_F_CHUNK)
306
+ for lo in range(0, n, _F_CHUNK):
307
+ m = min(n, lo + _F_CHUNK) - lo
308
+ for k in range(m):
309
+ zr = S[lo + k] / s2
310
+ q = 1.0 / (a * a + zr * zr)
311
+ ir[k] = a * q
312
+ ii[k] = zr * q
313
+ Zr[k] = b * ir[k] - zr * ii[k]
314
+ Zi[k] = b * ii[k] + zr * ir[k]
315
+ pr[k] = A[0]
316
+ pi_[k] = 0.0
317
+ for t in range(1, na):
318
+ c = A[t]
319
+ for k in range(m):
320
+ r = pr[k] * Zr[k] - pi_[k] * Zi[k] + c
321
+ pi_[k] = pr[k] * Zi[k] + pi_[k] * Zr[k]
322
+ pr[k] = r
323
+ for k in range(m):
324
+ i2r = ir[k] * ir[k] - ii[k] * ii[k]
325
+ i2i = 2.0 * ir[k] * ii[k]
326
+ wr[lo + k] = 2.0 * (pr[k] * i2r - pi_[k] * i2i) + ir[k] / _F_SQRT_PI
327
+ wi[lo + k] = 2.0 * (pr[k] * i2i + pi_[k] * i2r) + ii[k] / _F_SQRT_PI
328
+ # the line and its derivatives
329
+ for k in range(n):
330
+ w = wr[k] + 1j * wi[k]
331
+ wp, zwpw = _w_slopes(S[k] / s2 + 1j * zi, w)
332
+ F_S = wp * (norm / s2)
333
+ F_L = 0.5j * F_S
334
+ F_G = zwpw * (-norm / (sigma * _F_S2L2))
335
+ Ar[0, k] = wr[k] * norm
336
+ Ar[1, k] = F_L.real
337
+ Ar[2, k] = F_G.real
338
+ Ar[3, k] = F_S.real
339
+ if dispersion:
340
+ Dr[0, k] = wi[k] * norm
341
+ Dr[1, k] = F_L.imag
342
+ Dr[2, k] = F_G.imag
343
+ Dr[3, k] = F_S.imag
344
+ return Ar, Dr
345
+
346
+
347
+ def voigt_parts(gL, gG, S, dispersion, exact):
348
+ """_voigt_parts (the pseudo-Voigt), or for *exact* (models.exact_voigt())
349
+ _faddeeva_parts (the exact Voigt), with the expansion's coefficients."""
350
+ if exact:
351
+ return _faddeeva_parts(gL, gG, S, faddeeva.FADDEEVA_A, faddeeva.FADDEEVA_L, dispersion)
352
+ return _voigt_parts(gL, gG, S, dispersion)
353
+
354
+
355
+ def line_value(gL, gG, S, exact):
356
+ """voigt_value (the pseudo-Voigt) at the points S (1-D), or for *exact*
357
+ the exact Voigt's (faddeeva.voigt)."""
358
+ return faddeeva.voigt(gL, gG, S) if exact else voigt_value(gL, gG, S)
359
+
360
+
210
361
  def Voigt_complex(gL, gG, S, C1, C2):
211
362
  """models.Voigt_complex for widths gL, gG (numbers) and positions S (an
212
363
  array of any shape) that may be Duals; C1 and C2 are plain numbers. A Dual
@@ -319,9 +470,14 @@ _COUNT = np.array([3, 5, 6, 6, 6, 0]) # those a shape is differentiated in
319
470
 
320
471
 
321
472
  @njit(cache=True)
322
- def _shape_voigt(E, par, sign, dispersion):
323
- """models.Voigt / Voigt_c at E - pos: par = (pos, gL, gG)."""
324
- A, D = _voigt_parts(par[1], par[2], E - par[0], dispersion)
473
+ def _shape_voigt(E, par, sign, dispersion, exact, fA, fL):
474
+ """models.Voigt_r / Voigt_c at E - pos: par = (pos, gL, gG). *exact*: the
475
+ exact Voigt (_faddeeva_parts, the expansion's coefficients fA and scale
476
+ fL), else the pseudo-Voigt (_voigt_parts)."""
477
+ if exact:
478
+ A, D = _faddeeva_parts(par[1], par[2], E - par[0], fA, fL, dispersion)
479
+ else:
480
+ A, D = _voigt_parts(par[1], par[2], E - par[0], dispersion)
325
481
  F = np.zeros((1 + PARAMETERS, len(E)), dtype=np.complex128)
326
482
  for e in range(len(E)):
327
483
  F[0, e] = A[0, e] + 1j * sign * D[0, e]
@@ -332,14 +488,14 @@ def _shape_voigt(E, par, sign, dispersion):
332
488
 
333
489
 
334
490
  @njit(cache=True)
335
- def _shape_slope(E, par, sign, dispersion):
491
+ def _shape_slope(E, par, sign, dispersion, exact, fA, fL):
336
492
  """_shape_voigt's derivative in its position, as a shape: par = (pos, gL, gG).
337
493
  It is what the FIRST MOMENT of lines that stand at one position multiplies:
338
494
  sum_k I_k V(E - pos_k) = (sum_k I_k) V(E - pos) + (sum_k I_k (pos_k - pos)) dV/dpos + ...
339
495
  Such a moment is 0 where the lines coincide and only its derivatives count
340
496
  (hamiltonian_dual), so this shape has no derivatives of its own: a line of
341
497
  it must have the amplitude, or the matrix, 0."""
342
- F = _shape_voigt(E, par, sign, dispersion)
498
+ F = _shape_voigt(E, par, sign, dispersion, exact, fA, fL)
343
499
  for e in range(len(E)):
344
500
  F[0, e] = F[1, e]
345
501
  F[1, e] = 0.0
@@ -534,7 +690,7 @@ def _seen(T, dT, rho11, rho22):
534
690
 
535
691
  @njit(cache=True)
536
692
  def _transmission(E, l_shape, l_par, l_amp, l_group, l_scaled, l_dpar, l_damp,
537
- g_M, g_dM, g_layer, g_scaled, t_s, t_w, t_ds, t_dw, sign, rho11, rho22):
693
+ g_M, g_dM, g_layer, g_scaled, t_s, t_w, t_ds, t_dw, sign, exact, fA, fL, rho11, rho22):
538
694
  """The detected transmission r (n,) of an absorber at the energies E and
539
695
  dr (n, k), its derivatives in k parameters. The absorber is a list of lines,
540
696
  each a shape (l_shape, with its parameters l_par) times an amplitude l_amp:
@@ -553,7 +709,9 @@ def _transmission(E, l_shape, l_par, l_amp, l_group, l_scaled, l_dpar, l_damp,
553
709
 
554
710
  The "d" arguments are the derivatives in the k parameters, with one last
555
711
  axis; a line is differentiated only in the parameters in which one of its
556
- own values is not zero.
712
+ own values is not zero. A Voigt line is the exact Voigt where *exact*
713
+ (_faddeeva_parts: fA, fL the expansion's coefficients and scale), else the
714
+ pseudo-Voigt (models.exact_voigt).
557
715
  """
558
716
  n, k, G = len(E), l_damp.shape[1], len(g_M)
559
717
  act = np.empty(k, dtype=np.int64) # the parameters the line in hand depends on
@@ -565,11 +723,11 @@ def _transmission(E, l_shape, l_par, l_amp, l_group, l_scaled, l_dpar, l_damp,
565
723
  g = l_group[l]
566
724
  shape = l_shape[l]
567
725
  if shape == VOIGT:
568
- F = _shape_voigt(E, l_par[l], sign, g >= 0 and sign != 0)
726
+ F = _shape_voigt(E, l_par[l], sign, g >= 0 and sign != 0, exact, fA, fL)
569
727
  elif shape == BLUME:
570
728
  F = _shape_blume(E, l_par[l], sign)
571
729
  elif shape == SLOPE:
572
- F = _shape_slope(E, l_par[l], sign, g >= 0 and sign != 0)
730
+ F = _shape_slope(E, l_par[l], sign, g >= 0 and sign != 0, exact, fA, fL)
573
731
  else:
574
732
  F = _shape_relax(E, l_par[l], sign, shape - RELAX)
575
733
  count = _COUNT[shape]
@@ -0,0 +1,159 @@
1
+ """The Faddeeva function w(z) = exp(-z^2) erfc(-iz), Im z >= 0, by Weideman's
2
+ expansion, and the exact Voigt line built on it -- the line shape of
3
+ models.Voigt_c / Voigt_r under COMPLEX_VOIGT_METHOD = 'faddeeva'.
4
+
5
+ w(z) = 2 p(Z) / (L - iz)^2 + 1 / (sqrt(pi) (L - iz)), Z = (L + iz)/(L - iz),
6
+
7
+ p a polynomial of degree FADDEEVA_TERMS - 1 (J. A. C. Weideman, SIAM J. Numer.
8
+ Anal. 31 (1994) 1497). Its coefficients are a Fourier transform, made once
9
+ (coefficients); a point then costs one complex division and FADDEEVA_TERMS - 1
10
+ complex multiply-adds -- plain arithmetic, which voigt_line runs over chunks of
11
+ points, so the compiler makes vector instructions of it.
12
+
13
+ The Voigt line of Lorentzian FWHM gL and Gaussian FWHM gG, unit area, is
14
+
15
+ V + iD = w(z) / (sigma sqrt(2 pi)), z = (S + i gL/2) / (sigma sqrt 2),
16
+ sigma = gG / sqrt(8 ln 2),
17
+
18
+ V its absorptive part and D the dispersive one (Kramers-Kronig partner of V),
19
+ D > 0 for S > 0; without a Gaussian (gG <= 0) the Lorentzian
20
+ (1/pi) / (gL/2 - iS). Im z = gL/(2 sigma sqrt 2) > 0 for every line with a
21
+ width, the half-plane the expansion is made for.
22
+
23
+ Its dual twin, the line with its derivatives in its parameters, is
24
+ dual_kernels._faddeeva_parts: the same steps, which tests/test_faddeeva.py
25
+ holds to this module. The coefficients reach the compiled code as ARGUMENTS
26
+ (voigt_line's A and L): numba stores a compiled function with the values of
27
+ the globals it read, checking only its own file, so a global of this module
28
+ read by a kernel of another one would keep its old value after a change here.
29
+ """
30
+ import math
31
+
32
+ import numpy as np
33
+ from numba import njit
34
+
35
+ #: Terms of the expansion. The error against w computed in 50-440 digit decimal
36
+ #: arithmetic (an independent reference, 297 points with Im z from 1e-10 to
37
+ #: 1000 and |Re z| to 1e5), relative to |w|: 3e-4 at 8 terms, 4e-7 at 16, 4e-10
38
+ #: at 24, 3e-13 at 32, 7e-15 at 36, 8.6e-16 at 40 -- and 8-15e-16 for every
39
+ #: count from there to 128: 40 is where it reaches the rounding of the double
40
+ #: arithmetic. (scipy.special.wofz is right to 9e-15 there.)
41
+ FADDEEVA_TERMS = 40
42
+
43
+ _S2L2 = math.sqrt(8.0 * math.log(2.0)) # FWHM / sigma of a Gaussian
44
+ _SQRT_2 = math.sqrt(2.0)
45
+ _SQRT_PI = math.sqrt(math.pi)
46
+ _SQRT_2PI = math.sqrt(2.0 * math.pi)
47
+
48
+ #: Points of a chunk of voigt_line: the arrays of one chunk stay in the
49
+ #: first-level cache
50
+ CHUNK = 64
51
+
52
+
53
+ def coefficients(n):
54
+ """The coefficients of the expansion with *n* terms, the highest power
55
+ first, and its scale L: a discrete Fourier transform of
56
+ (L^2 + t^2) exp(-t^2) at t = L tan(theta/2), no table."""
57
+ L = np.sqrt(n / np.sqrt(2.0))
58
+ k = np.arange(-2 * n + 1, 2 * n)
59
+ t = L * np.tan(k * np.pi / (4 * n))
60
+ f = np.concatenate(([0.0], np.exp(-t ** 2) * (L ** 2 + t ** 2)))
61
+ a = np.real(np.fft.fft(np.fft.fftshift(f))) / (4 * n)
62
+ return a[n:0:-1].copy(), float(L)
63
+
64
+
65
+ FADDEEVA_A, FADDEEVA_L = coefficients(FADDEEVA_TERMS)
66
+
67
+
68
+ def faddeeva(z):
69
+ """w(z) for Im z >= 0, any shape: the expansion in numpy, by Horner's
70
+ rule (voigt_line's arithmetic, one array operation at a time)."""
71
+ z = np.asarray(z, dtype=complex)
72
+ lz = FADDEEVA_L - 1j * z
73
+ Z = (FADDEEVA_L + 1j * z) / lz
74
+ p = np.full(Z.shape, FADDEEVA_A[0], dtype=complex)
75
+ for coefficient in FADDEEVA_A[1:]:
76
+ p = p * Z + coefficient
77
+ return 2.0 * p / lz ** 2 + (1.0 / _SQRT_PI) / lz
78
+
79
+
80
+ @njit(cache=True)
81
+ def voigt_line(gL, gG, S, A, L, out):
82
+ """The exact Voigt line of Lorentzian FWHM gL and Gaussian FWHM gG (unit
83
+ area) at the points S (1-D): out[k, 0] = V(S[k]) and, when out has a
84
+ second column, out[k, 1] = D(S[k]), its dispersion. A, L: the expansion's
85
+ coefficients and scale (FADDEEVA_A, FADDEEVA_L). gG <= 0: the Lorentzian.
86
+
87
+ The divisions are products with the reciprocal of |.|^2, and the steps of
88
+ the polynomial run over a chunk of points as real arrays: a loop without
89
+ calls, which the compiler turns into vector instructions."""
90
+ n = S.shape[0]
91
+ with_d = out.shape[1] > 1
92
+ gamma = 0.5 * gL
93
+ if gG <= 0.0:
94
+ # (1/pi) / (gamma - iS)
95
+ for k in range(n):
96
+ den = math.pi * (gamma * gamma + S[k] * S[k])
97
+ out[k, 0] = gamma / den
98
+ if with_d:
99
+ out[k, 1] = S[k] / den
100
+ return
101
+ na = A.shape[0]
102
+ s2 = gG / _S2L2 * _SQRT_2 # sigma sqrt 2
103
+ norm = 1.0 / (gG / _S2L2 * _SQRT_2PI) # 1 / (sigma sqrt(2 pi))
104
+ zi = gamma / s2 # Im z
105
+ a = L + zi # L - iz = a - i Re z
106
+ b = L - zi # L + iz = b + i Re z
107
+ ir = np.empty(CHUNK) # 1/(L - iz)
108
+ ii = np.empty(CHUNK)
109
+ Zr = np.empty(CHUNK) # Z = (L + iz)/(L - iz)
110
+ Zi = np.empty(CHUNK)
111
+ pr = np.empty(CHUNK) # the polynomial in Z
112
+ pi_ = np.empty(CHUNK)
113
+ for lo in range(0, n, CHUNK):
114
+ m = min(n, lo + CHUNK) - lo
115
+ for k in range(m):
116
+ zr = S[lo + k] / s2
117
+ q = 1.0 / (a * a + zr * zr)
118
+ ir[k] = a * q
119
+ ii[k] = zr * q
120
+ Zr[k] = b * ir[k] - zr * ii[k]
121
+ Zi[k] = b * ii[k] + zr * ir[k]
122
+ pr[k] = A[0]
123
+ pi_[k] = 0.0
124
+ for t in range(1, na):
125
+ c = A[t]
126
+ for k in range(m):
127
+ r = pr[k] * Zr[k] - pi_[k] * Zi[k] + c
128
+ pi_[k] = pr[k] * Zi[k] + pi_[k] * Zr[k]
129
+ pr[k] = r
130
+ # w = 2 p / (L - iz)^2 + (1/sqrt(pi)) / (L - iz)
131
+ if with_d:
132
+ for k in range(m):
133
+ i2r = ir[k] * ir[k] - ii[k] * ii[k]
134
+ i2i = 2.0 * ir[k] * ii[k]
135
+ out[lo + k, 0] = (2.0 * (pr[k] * i2r - pi_[k] * i2i) + ir[k] / _SQRT_PI) * norm
136
+ out[lo + k, 1] = (2.0 * (pr[k] * i2i + pi_[k] * i2r) + ii[k] / _SQRT_PI) * norm
137
+ else:
138
+ for k in range(m):
139
+ i2r = ir[k] * ir[k] - ii[k] * ii[k]
140
+ i2i = 2.0 * ir[k] * ii[k]
141
+ out[lo + k, 0] = (2.0 * (pr[k] * i2r - pi_[k] * i2i) + ir[k] / _SQRT_PI) * norm
142
+
143
+
144
+ def voigt(gL, gG, S):
145
+ """V, the absorptive part of the exact Voigt line, at S (any shape)."""
146
+ S = np.asarray(S, dtype=np.float64)
147
+ out = np.empty(S.shape, dtype=np.float64)
148
+ voigt_line(float(gL), float(gG), np.ascontiguousarray(S.reshape(-1)), FADDEEVA_A, FADDEEVA_L,
149
+ out.reshape(-1, 1))
150
+ return out
151
+
152
+
153
+ def voigt_complex(gL, gG, S):
154
+ """V + iD, the exact Voigt line with its dispersion, at S (any shape)."""
155
+ S = np.asarray(S, dtype=np.float64)
156
+ out = np.empty(S.shape, dtype=np.complex128)
157
+ voigt_line(float(gL), float(gG), np.ascontiguousarray(S.reshape(-1)), FADDEEVA_A, FADDEEVA_L,
158
+ out.reshape(-1).view(np.float64).reshape(-1, 2))
159
+ return out
@@ -803,6 +803,15 @@ def fit_model(app, inputs, spectrum_files, pool):
803
803
  print(f'[Fitting] Derivatives by differences: {reason}')
804
804
  jacobian = None
805
805
  print(f"[Fitting] Derivatives: {'exact' if jacobian is not None else 'differences'}")
806
+ # A step that fails with the Jacobian of an earlier point is tried again
807
+ # with the Jacobian of its own (minimi_hi's refresh_jacobian): the fit of
808
+ # one spectrum with exact derivatives, where a Jacobian costs 1-2 trial
809
+ # steps -- 1.25-1.7 times faster on synthetic spectra, about even on real
810
+ # ones. Not with differences (a Jacobian is an evaluation per free
811
+ # parameter), nor in a simultaneous fit: a Jacobian there costs 5-7
812
+ # trial steps -- about even over different starts, 1.2-1.5 times slower
813
+ # from a previous result (docs/minimization.md, section 12)
814
+ refresh_jacobian = jacobian is not None and not is_simultaneous
806
815
 
807
816
  # Perform minimization
808
817
  tau0 = 10 ** -3
@@ -833,7 +842,8 @@ def fit_model(app, inputs, spectrum_files, pool):
833
842
  batch_eval=batch_eval,
834
843
  weights='P',
835
844
  chi2_correction=chi2_correction(app),
836
- jacobian=jacobian
845
+ jacobian=jacobian,
846
+ refresh_jacobian=refresh_jacobian
837
847
  )
838
848
  if hi2 > 1.25:
839
849
  print('hi2 is too high let me try to continue')
@@ -854,7 +864,8 @@ def fit_model(app, inputs, spectrum_files, pool):
854
864
  batch_eval=batch_eval,
855
865
  weights='P',
856
866
  chi2_correction=chi2_correction(app),
857
- jacobian=jacobian
867
+ jacobian=jacobian,
868
+ refresh_jacobian=refresh_jacobian
858
869
  )
859
870
  if np.array_equal(pfit, pO) == True:
860
871
  if len(er) == 1:
@@ -36,7 +36,10 @@ The upgrade applies the SAME transform the presets/data files were converted wit
36
36
  the pre-merge scalar layout AND from the pre-omega polarized layout). It is
37
37
  appended set to ``omega_0(theta_k, phi_h)`` -- the angle that reproduces the
38
38
  old (plane-contains-h) geometry, up to the exact full-period symmetrization
39
- that the new ASM applies (see :func:`_asm_omega0` and ``models.TImod``).
39
+ that the new ASM applies (see :func:`_asm_omega0` and ``models.TImod``);
40
+ * ``ASM``'s anharmonicity ``m`` became ``P(m)`` (2026-11, see
41
+ :func:`asm_p_of_m`): a row that does not carry ``ASM_P_NAME`` in the name
42
+ field of that slot holds ``m``, whose value and bounds are converted exactly.
40
43
 
41
44
  The asymmetry->texture map ``f`` is the cubic through the three points the old
42
45
  scalar defaults map onto in the new parametrisation:
@@ -174,6 +177,38 @@ def _append_trailing(model_name, info, groups):
174
177
  return groups
175
178
 
176
179
 
180
+ ASM_P_SLOT = 8 # ASM's anharmonicity: P(m) since 2026-11, m before
181
+ ASM_P_NAME = 'P(m)' # written in the name field of that slot: a row without it holds m
182
+
183
+
184
+ def asm_p_of_m(m):
185
+ """ASM's P(m) = sign(m) L / (L + ln 16), L = -ln(1 - |m|) -- 0 the harmonic
186
+ cycloid, +/-1 the collinear limits; back: m = sign(P) (1 - 16**(-|P|/(1 - |P|)))
187
+ (models.ASM_modulus)."""
188
+ a = min(abs(m), 1.0)
189
+ if a == 1.0:
190
+ return math.copysign(1.0, m)
191
+ L = -math.log1p(-a)
192
+ return math.copysign(L / (L + math.log(16.0)), m)
193
+
194
+
195
+ def _asm_p_slot(row_data):
196
+ """An ASM row (flat fields) with its slot ASM_P_SLOT holding m -- no
197
+ ASM_P_NAME in its name field -- gets P(m) in the value and both bounds and
198
+ the name. A link or an expression text stays as it is."""
199
+ k = ASM_P_SLOT * 5
200
+ if len(row_data) < k + 5 or row_data[k + 3] == ASM_P_NAME or str(row_data[k]).strip() == '':
201
+ return row_data
202
+ fields = list(row_data)
203
+ for j in (k, k + 1, k + 2):
204
+ try:
205
+ fields[j] = repr(asm_p_of_m(float(fields[j])))
206
+ except (ValueError, TypeError):
207
+ pass
208
+ fields[k + 3] = ASM_P_NAME
209
+ return fields
210
+
211
+
177
212
  def normalize_legacy_model_name(name):
178
213
  """Map a pre-merge model name to its current name.
179
214
 
@@ -212,9 +247,18 @@ def upgrade_mdl_row(model_name, row_data):
212
247
  parameters that reproduce the old model exactly; see
213
248
  :data:`_HAMILTONIAN_UPGRADES`.
214
249
 
250
+ An ``ASM`` row whose anharmonicity slot is not marked ``ASM_P_NAME`` holds
251
+ ``m`` (any layout before 2026-11): it is converted to ``P(m)``.
252
+
215
253
  ``model_name`` must already be normalised (see
216
254
  :func:`normalize_legacy_model_name`).
217
255
  """
256
+ row_data = _upgrade_layout(model_name, row_data)
257
+ return _asm_p_slot(row_data) if model_name == 'ASM' else row_data
258
+
259
+
260
+ def _upgrade_layout(model_name, row_data):
261
+ """upgrade_mdl_row's change of the layout: the slots a component gained."""
218
262
  info = _MERGED.get(model_name)
219
263
  if info is None and model_name != 'Hamiltonian':
220
264
  return row_data
@@ -17,7 +17,7 @@ from syncmoss.syncmoss_main import PhysicsApp, new_pool
17
17
  from syncmoss.supp_menu import apply_saved_settings
18
18
  from syncmoss.compile_functions import compile_functions
19
19
  from syncmoss.compile_window import compile_if_needed, current_stamp
20
- __VERSION__ = "0.8.0"
20
+ __VERSION__ = "0.8.2"
21
21
 
22
22
  # What --test leaves in the cache folder for --test-again: the seconds of its
23
23
  # plain fit before anything was compiled