syncmoss 0.8.2__tar.gz → 0.8.3__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 (308) hide show
  1. {syncmoss-0.8.2/syncmoss.egg-info → syncmoss-0.8.3}/PKG-INFO +1 -1
  2. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/dual_numbers.py +23 -4
  3. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/exclusion_bar.py +2 -1
  4. syncmoss-0.8.3/syncmoss/expression_eval.py +66 -0
  5. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/main.py +1 -1
  6. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/model_io.py +5 -0
  7. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/parameters/help_extended.md +10 -5
  8. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/spectrum_io.py +14 -13
  9. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/syncmoss_main.py +17 -1
  10. {syncmoss-0.8.2 → syncmoss-0.8.3/syncmoss.egg-info}/PKG-INFO +1 -1
  11. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/resource_profile.json +506 -74
  12. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_dual_numbers.py +15 -2
  13. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_exclusion_gui.py +47 -1
  14. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_expression_validation.py +2 -2
  15. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_faddeeva.py +13 -1
  16. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_save_result_model.py +14 -2
  17. syncmoss-0.8.2/syncmoss/expression_eval.py +0 -43
  18. {syncmoss-0.8.2 → syncmoss-0.8.3}/.gitattributes +0 -0
  19. {syncmoss-0.8.2 → syncmoss-0.8.3}/.github/workflows/Tests.yml +0 -0
  20. {syncmoss-0.8.2 → syncmoss-0.8.3}/.github/workflows/_MacOS.yml +0 -0
  21. {syncmoss-0.8.2 → syncmoss-0.8.3}/.github/workflows/_PyPI.yml +0 -0
  22. {syncmoss-0.8.2 → syncmoss-0.8.3}/.github/workflows/_TagRelease.yml +0 -0
  23. {syncmoss-0.8.2 → syncmoss-0.8.3}/.github/workflows/_Tests.yml +0 -0
  24. {syncmoss-0.8.2 → syncmoss-0.8.3}/.github/workflows/_UploadRelease.yml +0 -0
  25. {syncmoss-0.8.2 → syncmoss-0.8.3}/.github/workflows/_Version.yml +0 -0
  26. {syncmoss-0.8.2 → syncmoss-0.8.3}/.github/workflows/_Wheels.yml +0 -0
  27. {syncmoss-0.8.2 → syncmoss-0.8.3}/.github/workflows/_WindowsExe.yml +0 -0
  28. {syncmoss-0.8.2 → syncmoss-0.8.3}/.github/workflows/release.yml +0 -0
  29. {syncmoss-0.8.2 → syncmoss-0.8.3}/.gitignore +0 -0
  30. {syncmoss-0.8.2 → syncmoss-0.8.3}/.vscode/settings.json +0 -0
  31. {syncmoss-0.8.2 → syncmoss-0.8.3}/COPYING.txt +0 -0
  32. {syncmoss-0.8.2 → syncmoss-0.8.3}/LICENSE +0 -0
  33. {syncmoss-0.8.2 → syncmoss-0.8.3}/Lib_test/test.mdl +0 -0
  34. {syncmoss-0.8.2 → syncmoss-0.8.3}/NOTICE.txt +0 -0
  35. {syncmoss-0.8.2 → syncmoss-0.8.3}/README.md +0 -0
  36. {syncmoss-0.8.2 → syncmoss-0.8.3}/bundle/MacOS.spec +0 -0
  37. {syncmoss-0.8.2 → syncmoss-0.8.3}/bundle/SYNCmoss.png +0 -0
  38. {syncmoss-0.8.2 → syncmoss-0.8.3}/bundle/Windows.spec +0 -0
  39. {syncmoss-0.8.2 → syncmoss-0.8.3}/bundle/bundle.py +0 -0
  40. {syncmoss-0.8.2 → syncmoss-0.8.3}/bundle/dmg_background.pdf +0 -0
  41. {syncmoss-0.8.2 → syncmoss-0.8.3}/bundle/licenses/GPL-3.0.txt +0 -0
  42. {syncmoss-0.8.2 → syncmoss-0.8.3}/bundle/licenses/LGPL-3.0.txt +0 -0
  43. {syncmoss-0.8.2 → syncmoss-0.8.3}/bundle/macos_bundle.py +0 -0
  44. {syncmoss-0.8.2 → syncmoss-0.8.3}/bundle/third_party_licenses.py +0 -0
  45. {syncmoss-0.8.2 → syncmoss-0.8.3}/docs/thick_models.md +0 -0
  46. {syncmoss-0.8.2 → syncmoss-0.8.3}/docs/thick_vs_thin.md +0 -0
  47. {syncmoss-0.8.2 → syncmoss-0.8.3}/pyproject.toml +0 -0
  48. {syncmoss-0.8.2 → syncmoss-0.8.3}/requirements.txt +0 -0
  49. {syncmoss-0.8.2 → syncmoss-0.8.3}/setup.cfg +0 -0
  50. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/CMS_source_geometry_calibration.py +0 -0
  51. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Calibration.py +0 -0
  52. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Expressions/ASM P(m) from m.mdl +0 -0
  53. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Expressions/ASM m from P(m).mdl +0 -0
  54. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Expressions/Central shift vs temperature.mdl +0 -0
  55. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Expressions/Hyperfine field in applied field, Langevin.mdl +0 -0
  56. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Expressions/Hyperfine field vs temperature, Bloch.mdl +0 -0
  57. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Expressions/Hyperfine field vs temperature, critical.mdl +0 -0
  58. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Expressions/Hyperfine field vs temperature, empirical.mdl +0 -0
  59. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Expressions/Lamb-Mossbauer factor vs temperature.mdl +0 -0
  60. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Expressions/Lifetime from line width.mdl +0 -0
  61. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Expressions/Neel relaxation time vs temperature.mdl +0 -0
  62. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Expressions/Paramagnetic quadrupole shift from Hamiltonian.mdl +0 -0
  63. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Expressions/Quadrupole splitting, doublet.mdl +0 -0
  64. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Expressions/Quadrupole splitting, sextet.mdl +0 -0
  65. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Expressions/Thickness PDF, Gamma.mdl +0 -0
  66. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Expressions/Thickness PDF, pressed window (clamped plate).mdl +0 -0
  67. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Expressions/Thickness PDF, pressed window (membrane).mdl +0 -0
  68. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Hamiltonian_helper.py +0 -0
  69. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Aegirine.mdl +0 -0
  70. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Akaganeite.mdl +0 -0
  71. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Almandine.mdl +0 -0
  72. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Antitaenite.mdl +0 -0
  73. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Arsenopyrite.mdl +0 -0
  74. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Bornite.mdl +0 -0
  75. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Bridgmanite (Fe,Al-bearing) @100 GPa.mdl +0 -0
  76. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Bridgmanite (Fe,Al-bearing).mdl +0 -0
  77. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Celadonite.mdl +0 -0
  78. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Cementite.mdl +0 -0
  79. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Chalcopyrite.mdl +0 -0
  80. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Clinopyroxene (augite).mdl +0 -0
  81. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Copiapite.mdl +0 -0
  82. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Cubanite.mdl +0 -0
  83. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Epidote.mdl +0 -0
  84. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Fayalite (Fe-olivine).mdl +0 -0
  85. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Ferrihydrite (2-line).mdl +0 -0
  86. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Ferropericlase.mdl +0 -0
  87. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Goethite.mdl +0 -0
  88. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Green rust (fougerite, carbonate).mdl +0 -0
  89. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Haegg carbide.mdl +0 -0
  90. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Hedenbergite.mdl +0 -0
  91. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Hematite.mdl +0 -0
  92. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Heterosite (FePO4).mdl +0 -0
  93. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Ilmenite.mdl +0 -0
  94. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Iron phosphide.mdl +0 -0
  95. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Isocubanite.mdl +0 -0
  96. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Jarosite.mdl +0 -0
  97. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Kamacite.mdl +0 -0
  98. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Lepidocrocite.mdl +0 -0
  99. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Maghemite.mdl +0 -0
  100. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Magnetite.mdl +0 -0
  101. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Marcasite.mdl +0 -0
  102. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Melanterite.mdl +0 -0
  103. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Orthopyroxene (enstatite-ferrosilite).mdl +0 -0
  104. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Prussian blue (ferric ferrocyanide).mdl +0 -0
  105. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Pyrite.mdl +0 -0
  106. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Pyrrhotite.mdl +0 -0
  107. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Rhomboclase.mdl +0 -0
  108. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Roemerite.mdl +0 -0
  109. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Siderite.mdl +0 -0
  110. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Szomolnokite.mdl +0 -0
  111. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Taenite.mdl +0 -0
  112. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Talnakhite.mdl +0 -0
  113. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Tetrataenite.mdl +0 -0
  114. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Triphylite (LiFePO4).mdl +0 -0
  115. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Troilite.mdl +0 -0
  116. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Vivianite.mdl +0 -0
  117. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/Voltaite.mdl +0 -0
  118. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library/alpha-Fe (metallic iron, bcc).mdl +0 -0
  119. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library_io.py +0 -0
  120. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/Library_window.py +0 -0
  121. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/app_paths.py +0 -0
  122. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/bliss_channel.py +0 -0
  123. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/compile_functions.py +0 -0
  124. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/compile_window.py +0 -0
  125. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/components_results.py +0 -0
  126. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/components_search.py +0 -0
  127. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/components_window.py +0 -0
  128. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/console_io.py +0 -0
  129. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/constants.py +0 -0
  130. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/dual_kernels.py +0 -0
  131. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/error_reporter.py +0 -0
  132. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/exclusion_regions.py +0 -0
  133. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/experimental_features.py +0 -0
  134. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/expressions_io.py +0 -0
  135. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/expressions_window.py +0 -0
  136. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/faddeeva.py +0 -0
  137. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/fit_quality.py +0 -0
  138. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/fitting_io.py +0 -0
  139. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/frozen_cache_locator.py +0 -0
  140. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/hamiltonian_dual.py +0 -0
  141. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/icons/CheckBox.png +0 -0
  142. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/icons/CheckBox_.png +0 -0
  143. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/icons/CheckBox_L.png +0 -0
  144. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/icons/CheckBox_L2.png +0 -0
  145. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/icons/DU.png +0 -0
  146. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/icons/Switch.png +0 -0
  147. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/icons/UD.png +0 -0
  148. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/icons/icon_r.ico +0 -0
  149. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/instrumental_dialogs.py +0 -0
  150. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/instrumental_io.py +0 -0
  151. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/instrumental_window.py +0 -0
  152. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/jit_cache.py +0 -0
  153. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/legacy.py +0 -0
  154. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/license_window.py +0 -0
  155. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/minimi_lib.py +0 -0
  156. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/models.py +0 -0
  157. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/models_description_window.py +0 -0
  158. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/models_dual.py +0 -0
  159. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/models_positions.py +0 -0
  160. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/models_removed.py +0 -0
  161. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/one_model.py +0 -0
  162. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/one_spectrum.py +0 -0
  163. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/parameters/ABSorber3.txt +0 -0
  164. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/parameters/Be.txt +0 -0
  165. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/parameters/Calibration.dat +0 -0
  166. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/parameters/GCMS.txt +0 -0
  167. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/parameters/INS_APS.txt +0 -0
  168. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/parameters/INSexp.txt +0 -0
  169. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/parameters/INSint.txt +0 -0
  170. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/parameters/INSth.txt +0 -0
  171. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/parameters/KB.txt +0 -0
  172. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/parameters/NFS.txt +0 -0
  173. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/parameters/Standard_CMS.dat +0 -0
  174. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/parameters/Standard_SMS.dat +0 -0
  175. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/parameters/calibr.png +0 -0
  176. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/parameters/help.md +0 -0
  177. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/parameters/models_description.md +0 -0
  178. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/parameters_table.py +0 -0
  179. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/result_window.py +0 -0
  180. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/results_table.py +0 -0
  181. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/sms_theory.py +0 -0
  182. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/spectrum_model.py +0 -0
  183. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/spectrum_parameters.py +0 -0
  184. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/spectrum_plotter.py +0 -0
  185. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/spectrum_reference.py +0 -0
  186. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/spectrum_reference_window.py +0 -0
  187. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/supp_menu.py +0 -0
  188. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/support_math.py +0 -0
  189. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/test_graf.txt +0 -0
  190. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/test_param.txt +0 -0
  191. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/theme_dark.json +0 -0
  192. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/theme_light.json +0 -0
  193. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss/thickness_distribution.py +0 -0
  194. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss.egg-info/SOURCES.txt +0 -0
  195. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss.egg-info/dependency_links.txt +0 -0
  196. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss.egg-info/entry_points.txt +0 -0
  197. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss.egg-info/requires.txt +0 -0
  198. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss.egg-info/scm_file_list.json +0 -0
  199. {syncmoss-0.8.2 → syncmoss-0.8.3}/syncmoss.egg-info/top_level.txt +0 -0
  200. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/README.md +0 -0
  201. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/compile_stand_ins.py +0 -0
  202. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/conftest.py +0 -0
  203. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/data/Distr_corr.mdl +0 -0
  204. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/data/Distr_distr.mdl +0 -0
  205. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/data/alpha_fe_sms_000.mca +0 -0
  206. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/data/calibration_000_golden.json +0 -0
  207. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/data/generate_cal_fixtures.py +0 -0
  208. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/data/parameters/Calibration.dat +0 -0
  209. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/data/parameters/GCMS.txt +0 -0
  210. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/data/parameters/INSexp.txt +0 -0
  211. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/data/parameters/INSint.txt +0 -0
  212. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/data/parameters/INSth.txt +0 -0
  213. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/data/synthetic_alpha_fe_cms_linear.mca +0 -0
  214. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/data/synthetic_alpha_fe_cms_sinus.mca +0 -0
  215. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/golden_models.json +0 -0
  216. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/profile_resources.py +0 -0
  217. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/syncmoss_test.py +0 -0
  218. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_asm_p.py +0 -0
  219. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_baseline_polynomial.py +0 -0
  220. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_bliss_channel.py +0 -0
  221. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_calculation_time.py +0 -0
  222. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_calibrate_menu.py +0 -0
  223. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_calibration.py +0 -0
  224. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_calibration_helpers.py +0 -0
  225. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_calibration_path.py +0 -0
  226. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_channel_average.py +0 -0
  227. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_chi2_spread.py +0 -0
  228. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_cms_source_geometry_calibration.py +0 -0
  229. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_components_search.py +0 -0
  230. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_console_io.py +0 -0
  231. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_contact_author.py +0 -0
  232. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_cosine_smearing.py +0 -0
  233. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_create_spectrum_from_model.py +0 -0
  234. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_default_settings.py +0 -0
  235. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_distr_composition.py +0 -0
  236. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_distr_expansion.py +0 -0
  237. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_distr_mdl.py +0 -0
  238. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_distr_t.py +0 -0
  239. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_distr_targets.py +0 -0
  240. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_distr_text_references.py +0 -0
  241. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_dual_kernels.py +0 -0
  242. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_error_reporter.py +0 -0
  243. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_exclusion_fit.py +0 -0
  244. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_exclusion_regions.py +0 -0
  245. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_expression_fit_start.py +0 -0
  246. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_expressions.py +0 -0
  247. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_find_bar.py +0 -0
  248. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_fit_core.py +0 -0
  249. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_fit_one_spectrum.py +0 -0
  250. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_fit_quality.py +0 -0
  251. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_golden_models.py +0 -0
  252. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_gui_smoke.py +0 -0
  253. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_hamiltonian_dual.py +0 -0
  254. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_hamiltonian_texture.py +0 -0
  255. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_impurity_presets.py +0 -0
  256. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_instrumental_joint.py +0 -0
  257. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_instrumental_metadata.py +0 -0
  258. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_instrumental_method_choice.py +0 -0
  259. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_instrumental_recentre.py +0 -0
  260. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_instrumental_window.py +0 -0
  261. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_integral_points.py +0 -0
  262. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_interrupt.py +0 -0
  263. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_jacobi_elliptic.py +0 -0
  264. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_jit_cache.py +0 -0
  265. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_legacy.py +0 -0
  266. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_library_dir.py +0 -0
  267. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_library_io.py +0 -0
  268. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_license_window.py +0 -0
  269. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_link_chains.py +0 -0
  270. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_minimi_batch_eval.py +0 -0
  271. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_minimi_bounds.py +0 -0
  272. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_minimi_covariance.py +0 -0
  273. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_model_append.py +0 -0
  274. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_model_io.py +0 -0
  275. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_model_only_mode.py +0 -0
  276. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_model_pointwise.py +0 -0
  277. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_models_dual.py +0 -0
  278. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_nbaseline_multidistr.py +0 -0
  279. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_nbaseline_results.py +0 -0
  280. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_node_sum_reuse.py +0 -0
  281. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_one_model_expand.py +0 -0
  282. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_one_model_gui.py +0 -0
  283. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_overwrite_dat_instrumental.py +0 -0
  284. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_parameter_links.py +0 -0
  285. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_polarization.py +0 -0
  286. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_recon_composition.py +0 -0
  287. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_recon_mdl.py +0 -0
  288. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_recon_results.py +0 -0
  289. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_recon_variants.py +0 -0
  290. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_reference_shift.py +0 -0
  291. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_replaced_component_skip.py +0 -0
  292. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_result_window.py +0 -0
  293. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_results_table_image.py +0 -0
  294. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_results_table_rows.py +0 -0
  295. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_sdw_grid.py +0 -0
  296. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_search_guards.py +0 -0
  297. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_sms_theory.py +0 -0
  298. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_source_norm.py +0 -0
  299. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_spectrum_model.py +0 -0
  300. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_spectrum_parameters.py +0 -0
  301. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_support_math.py +0 -0
  302. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_table_marks.py +0 -0
  303. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_take_result.py +0 -0
  304. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_texture_s1.py +0 -0
  305. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_theory_search.py +0 -0
  306. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_thick_gui.py +0 -0
  307. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/test_voigt_complex.py +0 -0
  308. {syncmoss-0.8.2 → syncmoss-0.8.3}/tests/worker_plan.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: syncmoss
3
- Version: 0.8.2
3
+ Version: 0.8.3
4
4
  Summary: SYNCmoss — Mössbauer spectroscopy analysis application
5
5
  Author: Sergey Yaroslavtsev
6
6
  License: MIT
@@ -31,9 +31,10 @@ Where a derivative does not exist:
31
31
  * abs at 0: along each parameter the one-sided derivative |d|, what its
32
32
  forward difference gives -- the column of a parameter that starts at 0 is
33
33
  not zero, so it can leave 0;
34
- * sqrt and a fractional power at 0: 0, not inf. So sqrt(a**2 + b**2) has no
35
- derivative left at a = b = 0; np.hypot(a, b) is the form that keeps it
36
- (one-sided along each parameter, as abs);
34
+ * sqrt, cbrt and a fractional power at 0: 0, not inf. So sqrt(a**2 + b**2)
35
+ has no derivative left at a = b = 0; np.hypot(a, b) is the form that keeps
36
+ it (one-sided along each parameter, as abs);
37
+ * arctan2 at (0, 0): 0;
37
38
  * floor, ceil, round, sign: plain numbers (their derivative is 0).
38
39
  The values may be complex; the parameters are real.
39
40
 
@@ -395,6 +396,18 @@ def _sqrt_derivative(v, f):
395
396
  return np.where(f == 0, 0, 0.5 / f)
396
397
 
397
398
 
399
+ def _cbrt_derivative(v, f):
400
+ with np.errstate(divide='ignore', invalid='ignore'):
401
+ return np.where(f == 0, 0, 1 / (3 * f * f))
402
+
403
+
404
+ def _arctan2(a, b):
405
+ va, vb = value(a), value(b)
406
+ r2 = va * va + vb * vb
407
+ with np.errstate(divide='ignore', invalid='ignore'):
408
+ return chain(np.arctan2(va, vb), (np.where(r2 == 0, 0, vb / r2), np.where(r2 == 0, 0, -va / r2)), (a, b))
409
+
410
+
398
411
  # =============================================================================
399
412
  # The array functions
400
413
  # =============================================================================
@@ -429,16 +442,22 @@ def _linspace(start, stop, num=50):
429
442
  _UFUNCS = {
430
443
  np.add: _add, np.subtract: _subtract, np.multiply: _multiply, np.true_divide: _divide,
431
444
  np.power: _power, np.float_power: _power, np.matmul: _matmul, np.hypot: _hypot,
432
- np.maximum: _maximum, np.minimum: _minimum,
445
+ np.maximum: _maximum, np.minimum: _minimum, np.arctan2: _arctan2,
433
446
  np.negative: lambda a: -a,
434
447
  np.positive: lambda a: a,
435
448
  np.absolute: _abs,
436
449
  np.conjugate: lambda a: a.conj(),
437
450
  np.square: lambda a: _multiply(a, a),
438
451
  np.sqrt: _function(np.sqrt, _sqrt_derivative),
452
+ np.cbrt: _function(np.cbrt, _cbrt_derivative),
439
453
  np.exp: _function(np.exp, lambda v, f: f),
454
+ np.expm1: _function(np.expm1, lambda v, f: np.exp(v)),
440
455
  np.log: _function(np.log, lambda v, f: 1 / v),
456
+ np.log1p: _function(np.log1p, lambda v, f: 1 / (1 + v)),
457
+ np.log2: _function(np.log2, lambda v, f: 1 / (v * np.log(2))),
441
458
  np.log10: _function(np.log10, lambda v, f: 1 / (v * np.log(10))),
459
+ np.deg2rad: _function(np.deg2rad, lambda v, f: np.pi / 180),
460
+ np.rad2deg: _function(np.rad2deg, lambda v, f: 180 / np.pi),
442
461
  np.sin: _function(np.sin, lambda v, f: np.cos(v)),
443
462
  np.cos: _function(np.cos, lambda v, f: -np.sin(v)),
444
463
  np.tan: _function(np.tan, lambda v, f: 1 + f * f),
@@ -216,7 +216,8 @@ class ExclusionBar(QWidget):
216
216
  base = self.main_window._result_base_path()
217
217
  default = (base + er.FILE_SUFFIX if base
218
218
  else os.path.join(self.main_window.workfolder or "", "regions" + er.FILE_SUFFIX))
219
- path, _ = QFileDialog.getSaveFileName(self, "Save exclusion regions", default, _FILE_FILTER)
219
+ path, _ = QFileDialog.getSaveFileName(self, "Save exclusion regions",
220
+ self.main_window._save_dialog_start(default), _FILE_FILTER)
220
221
  if not path:
221
222
  self.main_window.set_status("Saving canceled", "orange")
222
223
  return
@@ -0,0 +1,66 @@
1
+ """The user-typed texts: Expression, Distr (probability density) and Corr
2
+ (dependency) rows, and the one function that evaluates them.
3
+
4
+ The ``from numpy import (...)`` block below and ``erf`` ARE the set of bare
5
+ names those texts may use, e.g. "sqrt(p[3])" or "exp(-X**2/2)"; any other
6
+ numpy function is written ``np.<name>``. Every place that evaluates such a text calls
7
+ ``eval_expr`` -- the fit, Show model, the check before them, the distribution
8
+ plot, the results table -- so they all accept the same texts. Nothing else
9
+ belongs in this module: its namespace is what the texts see.
10
+
11
+ Every function below takes dual numbers (dual_numbers' tables), so a fit's
12
+ exact Jacobian and the results table's errors cover it; a function added here
13
+ gets its derivative there. No name may be one a text reads otherwise (p, X,
14
+ N, N1, ...) nor hide a Python builtin other than abs and round: sum, max, min
15
+ keep Python's meaning (maximum, minimum are the element-wise ones).
16
+ """
17
+ import numpy as np
18
+ from numpy import (
19
+ # constants
20
+ pi, e,
21
+
22
+ # math basics
23
+ exp, log, log10, sqrt, abs, power,
24
+ log2, expm1, log1p, cbrt, square, hypot,
25
+
26
+ # trig functions (core)
27
+ sin, cos, tan,
28
+ arcsin, arccos, arctan, arctan2,
29
+ sinh, cosh, tanh,
30
+ arcsinh, arccosh, arctanh,
31
+ deg2rad, rad2deg,
32
+
33
+ # utility math
34
+ floor, ceil, round, sign,
35
+ maximum, minimum, where,
36
+
37
+ # aggregation
38
+ mean, std, var,
39
+ )
40
+
41
+ from syncmoss.dual_numbers import chain as _chain, value as _value
42
+ from syncmoss.faddeeva import faddeeva as _faddeeva
43
+
44
+
45
+ def erf(x):
46
+ """The error function, from the Faddeeva function of the line shapes:
47
+ erf(x) = 1 - exp(-x^2) w(i|x|), odd. Within 1e-15 of the exact one
48
+ (absolute: below |x| ~ 1e-3, where erf is that small, not to all its
49
+ digits). Takes dual numbers: its derivative is 2 exp(-x^2) / sqrt(pi)."""
50
+ v = np.asarray(_value(x), dtype=float)
51
+ a = np.abs(v)
52
+ y = np.sign(v) * (1.0 - np.exp(-a * a) * _faddeeva(1j * a).real)
53
+ return _chain(y, (2.0 / np.sqrt(pi) * np.exp(-v * v),), (x,))
54
+
55
+
56
+ def eval_expr(expr, p, X=None):
57
+ """Evaluate a user-typed text.
58
+
59
+ ``p`` is the model's parameter array, so the text may reference ``p[i]``;
60
+ bare numpy functions (``sqrt``, ``exp``, ...) resolve through this module's
61
+ globals (the imports above). ``X`` is optional: the distribution axis,
62
+ given for the Distr/Corr texts."""
63
+ locals_dict = {"p": p}
64
+ if X is not None:
65
+ locals_dict["X"] = X
66
+ return eval(expr, globals(), locals_dict)
@@ -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.2"
20
+ __VERSION__ = "0.8.3"
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
@@ -559,10 +559,15 @@ def fitted_model_rows(model_rows, parameters, recon_weights=(), keep_independent
559
559
  def _write_model_file(main_window, file_path, model_rows, comment=None, metadata=None, exclusion=()):
560
560
  """Write *model_rows* (see :func:`model_file_rows`) as the .mdl *file_path*;
561
561
  *exclusion*, a fit result's exclusion regions (:func:`_write_model_lines`).
562
+ Its folder is created when it does not exist yet (the save path of several
563
+ spectra is a new ``result`` folder).
562
564
 
563
565
  Returns True when the file was written, False when that failed.
564
566
  """
565
567
  try:
568
+ folder = os.path.dirname(file_path)
569
+ if folder:
570
+ os.makedirs(folder, exist_ok=True)
566
571
  with open(file_path, 'w', encoding='utf-8') as f:
567
572
  if isinstance(metadata, dict):
568
573
  metadata_to_write = dict(LIBRARY_METADATA_DEFAULTS)
@@ -76,11 +76,16 @@ again after editing the model.
76
76
  These rows take **text**, not numbers:
77
77
 
78
78
  - `Expression`: any formula in `p[i]`, e.g. `p[9]*0.5`, `sqrt(p[3]**2+p[5]**2)`,
79
- `33.0-p[12]`. The bare names `pi`, `e`, `exp`, `log`, `log10`, `sqrt`, `abs`,
80
- `power`, `sin`, `cos`, `tan`, `arcsin`, `arccos`, `arctan`, `sinh`, `cosh`,
81
- `tanh`, `arcsinh`, `arccosh`, `arctanh`, `floor`, `ceil`, `round`, `sign`,
82
- `mean`, `std`, `var` are available, here and in `Distr`/`Corr`; any other NumPy
83
- function is written `np.<name>`, e.g. `np.heaviside(X, 1)`. The result
79
+ `33.0-p[12]`. The bare names `pi`, `e`, `exp`, `log`, `log10`, `log2`,
80
+ `expm1`, `log1p`, `sqrt`, `cbrt`, `square`, `hypot`, `abs`, `power`, `sin`,
81
+ `cos`, `tan`, `arcsin`, `arccos`, `arctan`, `arctan2`, `sinh`, `cosh`, `tanh`,
82
+ `arcsinh`, `arccosh`, `arctanh`, `deg2rad`, `rad2deg`, `floor`, `ceil`,
83
+ `round`, `sign`, `maximum`, `minimum`, `where`, `mean`, `std`, `var` and
84
+ `erf` are available, here and in `Distr`/`Corr`. `erf` is not NumPy's (NumPy
85
+ has none): it is computed from the Faddeeva function of the line shapes and
86
+ is within about 1e-15 of the exact value. Any other NumPy function is written
87
+ `np.<name>`, e.g. `np.heaviside(X, 1)` (a fit may then be slower: without
88
+ exact derivatives it takes differences). The result
84
89
  becomes a parameter of its own — click its label to read the number, then
85
90
  point real parameters at it with `=[X,Y]`. That is how a
86
91
  parameter is made to follow an arbitrary formula rather than a plain multiple.
@@ -772,26 +772,27 @@ def process_half_spectrum(main_window, spectrum_path, save_path, auto_load=False
772
772
  return False
773
773
 
774
774
 
775
+ def folder_of_save_path(save_path_text, workfolder):
776
+ """The folder files written for several spectra go to, as RAW to DAT
777
+ writes them: the save path itself when it is a folder, else its folder
778
+ (``<folder>/result/result`` -> ``<folder>/result``); *workfolder* for a
779
+ bare name."""
780
+ if os.path.isdir(save_path_text):
781
+ return save_path_text
782
+ return os.path.dirname(save_path_text) or workfolder
783
+
784
+
775
785
  def _directory_for_several_spectra(main_window):
776
- """Where an operation on several spectra writes them: the save path's
777
- folder (or the save path itself when it names a folder), created if need
778
- be. None, after saying why, when there is none."""
786
+ """Where an operation on several spectra writes them
787
+ (folder_of_save_path), created if need be. None, after saying why, when
788
+ there is none."""
779
789
  save_path_text = main_window.save_path.text().strip()
780
790
 
781
791
  if not save_path_text:
782
792
  main_window.set_status("Please specify save path", "orange")
783
793
  return None
784
794
 
785
- # Determine if save_path_text is a file path or directory path
786
- if '.' in os.path.basename(save_path_text):
787
- # Looks like a file path (has extension), use its directory
788
- save_dir = os.path.dirname(save_path_text)
789
- else:
790
- # Looks like a directory path
791
- save_dir = save_path_text
792
-
793
- # Remove trailing slashes for consistency
794
- save_dir = save_dir.rstrip('\\/')
795
+ save_dir = folder_of_save_path(save_path_text, main_window.workfolder)
795
796
 
796
797
  # Create directory if it doesn't exist
797
798
  if not os.path.exists(save_dir):
@@ -3861,7 +3861,7 @@ class PhysicsApp(QMainWindow):
3861
3861
  start = (base + '_inputs.txt' if base
3862
3862
  else os.path.join(self.workfolder, 'inputs.txt'))
3863
3863
  path, _ = QFileDialog.getSaveFileName(
3864
- self, "Save parameters of the spectra", start,
3864
+ self, "Save parameters of the spectra", self._save_dialog_start(start),
3865
3865
  "Text files (*.txt);;All files (*.*)")
3866
3866
  if not path:
3867
3867
  self.set_status("Saving parameters of the spectra was canceled", "orange")
@@ -4800,6 +4800,10 @@ class PhysicsApp(QMainWindow):
4800
4800
  is replaced."""
4801
4801
  path = self._sequence_file('_result_table_PNG.html')
4802
4802
  try:
4803
+ # A sequence starts before its first spectrum's files make the folder
4804
+ folder = os.path.dirname(path)
4805
+ if folder and not os.path.exists(folder):
4806
+ os.makedirs(folder)
4803
4807
  page = ''
4804
4808
  if append and os.path.exists(path):
4805
4809
  with open(path, encoding='utf-8') as f:
@@ -5104,6 +5108,18 @@ class PhysicsApp(QMainWindow):
5104
5108
  spectrum's extension (``Fe_4.2K.dat`` -> ``Fe_4.2K_param.txt``, ...)."""
5105
5109
  return strip_known_extension(self.save_path.text().strip())
5106
5110
 
5111
+ def _save_dialog_start(self, path):
5112
+ """Where a save dialog pre-filled with *path* (made from the save path)
5113
+ opens: *path* when its folder exists -- else its file name in the
5114
+ folder of the first spectrum, else in the workfolder, else the bare
5115
+ name (the dialog then opens where it likes)."""
5116
+ name = os.path.basename(path)
5117
+ spectrum_folder = os.path.dirname(self.path_list[0]) if self.path_list else ''
5118
+ for folder in (os.path.dirname(path), spectrum_folder, self.workfolder):
5119
+ if folder and os.path.isdir(folder):
5120
+ return os.path.join(folder, name)
5121
+ return name
5122
+
5107
5123
  def _refuse_saving_search_result(self):
5108
5124
  """True -- after saying why -- when the results table shows the model of
5109
5125
  an instrumental-function search: it is not a fit result (the curves of
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: syncmoss
3
- Version: 0.8.2
3
+ Version: 0.8.3
4
4
  Summary: SYNCmoss — Mössbauer spectroscopy analysis application
5
5
  Author: Sergey Yaroslavtsev
6
6
  License: MIT