syncmoss 0.6.0__tar.gz → 0.7.0__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.
- {syncmoss-0.6.0 → syncmoss-0.7.0}/PKG-INFO +1 -1
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Calibration.py +113 -48
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library_io.py +1 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/constants.py +5 -0
- syncmoss-0.7.0/syncmoss/fit_quality.py +489 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/fitting_io.py +36 -8
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/instrumental_io.py +19 -13
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/main.py +1 -1
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/minimi_lib.py +11 -5
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/model_io.py +26 -5
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/models.py +82 -15
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/models_positions.py +6 -1
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/one_model.py +20 -9
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/parameters/help.md +32 -4
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/parameters/help_extended.md +170 -12
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/parameters/models_description.md +13 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/parameters_table.py +111 -67
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/result_window.py +12 -7
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/results_table.py +135 -5
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/spectrum_io.py +22 -1
- syncmoss-0.7.0/syncmoss/spectrum_model.py +56 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/spectrum_plotter.py +25 -28
- syncmoss-0.7.0/syncmoss/spectrum_reference.py +562 -0
- syncmoss-0.7.0/syncmoss/spectrum_reference_window.py +318 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/syncmoss_main.py +123 -37
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss.egg-info/PKG-INFO +1 -1
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss.egg-info/SOURCES.txt +7 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss.egg-info/scm_file_list.json +7 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/resource_profile.json +371 -143
- syncmoss-0.7.0/tests/test_calibrate_menu.py +75 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_calibration.py +37 -6
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_calibration_helpers.py +57 -2
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_chi2_spread.py +5 -10
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_default_settings.py +6 -1
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_exclusion_gui.py +9 -0
- syncmoss-0.7.0/tests/test_fit_quality.py +331 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_instrumental_recentre.py +42 -2
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_minimi_covariance.py +28 -9
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_one_model_expand.py +20 -3
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_one_model_gui.py +77 -5
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_result_window.py +28 -1
- syncmoss-0.7.0/tests/test_spectrum_model.py +404 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_thick_gui.py +20 -1
- {syncmoss-0.6.0 → syncmoss-0.7.0}/.gitattributes +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/.github/workflows/Tests.yml +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/.github/workflows/_MacOS.yml +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/.github/workflows/_PyPI.yml +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/.github/workflows/_TagRelease.yml +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/.github/workflows/_Tests.yml +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/.github/workflows/_UploadRelease.yml +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/.github/workflows/_Version.yml +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/.github/workflows/_Wheels.yml +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/.github/workflows/_WindowsExe.yml +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/.github/workflows/release.yml +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/.gitignore +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/.vscode/settings.json +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/COPYING.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/LICENSE +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/Lib_test/test.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/NOTICE.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/README.md +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/bundle/MacOS.spec +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/bundle/SYNCmoss.png +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/bundle/Windows.spec +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/bundle/bundle.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/bundle/dmg_background.pdf +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/bundle/licenses/GPL-3.0.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/bundle/licenses/LGPL-3.0.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/bundle/macos_bundle.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/bundle/third_party_licenses.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/docs/thick_models.md +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/docs/thick_vs_thin.md +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/pyproject.toml +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/requirements.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/setup.cfg +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/CMS_source_geometry_calibration.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Expressions/Central shift vs temperature.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Expressions/Hyperfine field in applied field, Langevin.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Expressions/Hyperfine field vs temperature, Bloch.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Expressions/Hyperfine field vs temperature, critical.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Expressions/Hyperfine field vs temperature, empirical.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Expressions/Lamb-Mossbauer factor vs temperature.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Expressions/Lifetime from line width.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Expressions/Neel relaxation time vs temperature.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Expressions/Paramagnetic quadrupole shift from Hamiltonian.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Expressions/Quadrupole splitting, doublet.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Expressions/Quadrupole splitting, sextet.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Hamiltonian_helper.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Aegirine.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Akaganeite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Almandine.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Antitaenite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Arsenopyrite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Bornite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Bridgmanite (Fe,Al-bearing) @100 GPa.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Bridgmanite (Fe,Al-bearing).mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Celadonite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Cementite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Chalcopyrite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Clinopyroxene (augite).mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Copiapite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Cubanite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Epidote.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Fayalite (Fe-olivine).mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Ferrihydrite (2-line).mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Ferropericlase.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Goethite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Green rust (fougerite, carbonate).mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Haegg carbide.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Hedenbergite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Hematite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Heterosite (FePO4).mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Ilmenite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Iron phosphide.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Isocubanite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Jarosite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Kamacite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Lepidocrocite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Maghemite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Magnetite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Marcasite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Melanterite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Orthopyroxene (enstatite-ferrosilite).mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Prussian blue (ferric ferrocyanide).mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Pyrite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Pyrrhotite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Rhomboclase.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Roemerite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Siderite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Szomolnokite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Taenite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Talnakhite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Tetrataenite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Triphylite (LiFePO4).mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Troilite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Vivianite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/Voltaite.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library/alpha-Fe (metallic iron, bcc).mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/Library_window.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/bliss_channel.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/error_reporter.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/exclusion_bar.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/exclusion_regions.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/expression_eval.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/expressions_io.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/expressions_window.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/icons/CheckBox.png +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/icons/CheckBox_.png +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/icons/CheckBox_L.png +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/icons/CheckBox_L2.png +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/icons/DU.png +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/icons/Switch.png +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/icons/UD.png +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/icons/icon_r.ico +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/instrumental_dialogs.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/instrumental_window.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/legacy.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/license_window.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/models_description_window.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/one_spectrum.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/parameters/ABSorber3.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/parameters/Be.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/parameters/Calibration.dat +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/parameters/GCMS.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/parameters/INS_APS.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/parameters/INSexp.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/parameters/INSint.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/parameters/INSth.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/parameters/KB.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/parameters/NFS.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/parameters/Standard_CMS.dat +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/parameters/Standard_SMS.dat +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/parameters/calibr.png +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/sms_theory.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/spectrum_parameters.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/supp_menu.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/support_math.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/test_graf.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/test_param.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/theme_dark.json +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss/theme_light.json +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss.egg-info/dependency_links.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss.egg-info/entry_points.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss.egg-info/requires.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/syncmoss.egg-info/top_level.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/README.md +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/conftest.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/data/Distr_corr.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/data/Distr_distr.mdl +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/data/alpha_fe_sms_000.mca +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/data/calibration_000_golden.json +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/data/generate_cal_fixtures.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/data/parameters/Calibration.dat +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/data/parameters/GCMS.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/data/parameters/INSexp.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/data/parameters/INSint.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/data/parameters/INSth.txt +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/data/synthetic_alpha_fe_cms_linear.mca +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/data/synthetic_alpha_fe_cms_sinus.mca +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/golden_models.json +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/profile_resources.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/syncmoss_test.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_baseline_polynomial.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_bliss_channel.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_calculation_time.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_calibration_path.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_channel_average.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_cms_source_geometry_calibration.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_contact_author.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_cosine_smearing.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_create_spectrum_from_model.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_distr_composition.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_distr_expansion.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_distr_mdl.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_distr_targets.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_distr_text_references.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_error_reporter.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_exclusion_fit.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_exclusion_regions.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_expression_fit_start.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_expression_validation.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_expressions.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_find_bar.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_fit_core.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_fit_one_spectrum.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_golden_models.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_gui_smoke.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_hamiltonian_texture.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_impurity_presets.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_instrumental_joint.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_instrumental_metadata.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_instrumental_method_choice.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_instrumental_window.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_integral_points.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_interrupt.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_legacy.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_library_dir.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_library_io.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_license_window.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_link_chains.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_minimi_batch_eval.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_minimi_bounds.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_model_append.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_model_io.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_model_only_mode.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_model_pointwise.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_nbaseline_multidistr.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_nbaseline_results.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_node_sum_reuse.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_overwrite_dat_instrumental.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_parameter_links.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_polarization.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_recon_composition.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_recon_mdl.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_recon_results.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_recon_variants.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_reference_shift.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_replaced_component_skip.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_results_table_image.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_results_table_rows.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_save_result_model.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_sdw_grid.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_search_guards.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_sms_theory.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_source_norm.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_spectrum_parameters.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_support_math.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_table_marks.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_take_result.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_texture_s1.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/test_theory_search.py +0 -0
- {syncmoss-0.6.0 → syncmoss-0.7.0}/tests/worker_plan.py +0 -0
|
@@ -62,9 +62,13 @@ has many steps. The steps, in order (mirrored by the STEP banners in
|
|
|
62
62
|
7. **Distortion fit** -- the source-absorber solid angle changes with the
|
|
63
63
|
drive position, adding a parabolic count modulation that differs between
|
|
64
64
|
the half-sweeps; it is fitted from their difference.
|
|
65
|
-
8. **Final global fit** -- drive parameters, parabolic distortion
|
|
66
|
-
intensities
|
|
67
|
-
the
|
|
65
|
+
8. **Final global fit** -- drive parameters, parabolic distortion and absorber
|
|
66
|
+
intensities are all refined together. Besides the alpha-Fe sextet the
|
|
67
|
+
model holds what the caller chooses (the Calibrate menu): the foil's
|
|
68
|
+
impurity sextet (its intensity fitted) and the doublet of the optics' iron
|
|
69
|
+
impurity, the beamline's preset ``Be.txt`` or ``KB.txt`` (held). By
|
|
70
|
+
default (:func:`default_impurities`) no impurity sextet, and for SMS the
|
|
71
|
+
Be doublet.
|
|
68
72
|
9. **Folding** -- each velocity is visited twice per period; the two visits
|
|
69
73
|
are averaged onto a single velocity axis. For SMS the multi-line
|
|
70
74
|
instrumental function also shifts the apparent line positions; the
|
|
@@ -83,15 +87,18 @@ Parameter-vector layouts used throughout (``nbp`` = number_of_baseline_parameter
|
|
|
83
87
|
a+(+10) a-(+11) GH(+12) I13(+13)``.
|
|
84
88
|
``theta_k=90, phi_h=0, A=0`` make the polarized Sextet identical to the old
|
|
85
89
|
scalar one (isotropic powder); ``Am=0`` is also a no-op since
|
|
86
|
-
``theta_k=90 -> n_z=0`` kills the Faraday term.
|
|
90
|
+
``theta_k=90 -> n_z=0`` kills the Faraday term. In the final model ``pCAL``
|
|
91
|
+
the impurity Sextet block (14) and then the optics Doublet (9) follow, each
|
|
92
|
+
when chosen.
|
|
87
93
|
* Drive-curve parameters ``ps`` (3): sinusoidal ``[amplitude, phase(rad),
|
|
88
94
|
source shift]``; triangular ``[v at ch 0, v at last ch, v step/channel]``.
|
|
89
95
|
* Final-fit vector ``ps1`` / ``pS``: ``[0..2]`` drive curve, ``[3]`` global
|
|
90
96
|
intensity scale, ``[4..6]`` parabola of half-sweep 1 (centre, curvature,
|
|
91
97
|
offset), ``[7..8]`` parabola of half-sweep 2 (centre, curvature),
|
|
92
|
-
``[9]`` main sextet intensity, ``[10]`` texture parameter A, then
|
|
93
|
-
``[11]``
|
|
94
|
-
|
|
98
|
+
``[9]`` main sextet intensity, ``[10]`` texture parameter A, then for CMS
|
|
99
|
+
``[11..12]`` the count rate and the unattenuated background, ``pCAL[0]``
|
|
100
|
+
and ``pCAL[4]``, and last the impurity sextet's intensity when it is fitted
|
|
101
|
+
(``[11]`` SMS, ``[13]`` CMS).
|
|
95
102
|
"""
|
|
96
103
|
|
|
97
104
|
import os
|
|
@@ -126,6 +133,23 @@ ALPHA_FE_LINE_VELOCITIES = np.array(
|
|
|
126
133
|
LINE_RATIO_25 * _ALPHA_FE_HH / 2,
|
|
127
134
|
_ALPHA_FE_HH / 2])
|
|
128
135
|
|
|
136
|
+
# The second sextet an alpha-Fe foil may show (an iron impurity of the foil):
|
|
137
|
+
# a polarized Sextet block (layout in the module docstring) whose intensity the
|
|
138
|
+
# final fit frees, the rest held.
|
|
139
|
+
IMPURITY_SEXTET = np.array([0.451, -0.041, 0.003, 30.88, NAT_WIDTH, 0.1, 90, 0, 0, 0, 0, 0, 0, 3])
|
|
140
|
+
|
|
141
|
+
# The doublet of the optics' iron impurity the final fit can add: the file of
|
|
142
|
+
# the beamline's preset (Supp -> "Set parameters of Be / KB"), or none.
|
|
143
|
+
OPTICS_PRESETS = {'Be': 'Be.txt', 'KB': 'KB.txt', 'none': None}
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
def default_impurities(VVV):
|
|
147
|
+
"""``(impurity sextet, optics)`` a calibration of method *VVV* uses unless
|
|
148
|
+
told otherwise -- what the Calibrate menu starts from and returns to when
|
|
149
|
+
CMS/SMS is switched: no impurity sextet; the Be doublet for SMS, nothing
|
|
150
|
+
for CMS."""
|
|
151
|
+
return False, ('Be' if VVV == 3 else 'none')
|
|
152
|
+
|
|
129
153
|
|
|
130
154
|
# ========================================================================= #
|
|
131
155
|
# Raw-file loading #
|
|
@@ -298,6 +322,55 @@ def _subtract_distortion(counts, channels, pS):
|
|
|
298
322
|
return flat
|
|
299
323
|
|
|
300
324
|
|
|
325
|
+
# ========================================================================= #
|
|
326
|
+
# The final model (STEP 9) #
|
|
327
|
+
# ========================================================================= #
|
|
328
|
+
|
|
329
|
+
def _read_optics_preset(dir_path, name):
|
|
330
|
+
"""The nine Doublet values of the optics preset *name* ('Be' or 'KB') from
|
|
331
|
+
its file in *dir_path*. A Be file that cannot be read gives the built-in
|
|
332
|
+
values (an earlier beamline state); KB has none."""
|
|
333
|
+
file_name = OPTICS_PRESETS[name]
|
|
334
|
+
try:
|
|
335
|
+
values = np.genfromtxt(os.path.join(dir_path, file_name), delimiter='\t', skip_footer=0)
|
|
336
|
+
print(file_name, 'was read')
|
|
337
|
+
except Exception:
|
|
338
|
+
if name != 'Be':
|
|
339
|
+
raise ValueError(f"could not read {file_name}")
|
|
340
|
+
values = np.array([0.057, 0.066, -0.261, NAT_WIDTH, 0.375, 90, 0, 0.427, 1])
|
|
341
|
+
print('COULD NOT READ Be.txt')
|
|
342
|
+
return values
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
def _final_model(VVV, method, p, p0, impurity, optics_doublet):
|
|
346
|
+
"""The model of the final fit and its parameter vector ``pCAL``: the
|
|
347
|
+
alpha-Fe sextet, then the impurity sextet (*impurity*) and the optics
|
|
348
|
+
doublet (*optics_doublet*: its nine values, or None), each when chosen.
|
|
349
|
+
|
|
350
|
+
*p* is the last refinement fit and *p0* its copy (STEP 6). A sinusoidal
|
|
351
|
+
drive starts from the reference alpha-Fe; a triangular one (``method`` 1,
|
|
352
|
+
CMS) from that copy itself, which is changed in place.
|
|
353
|
+
"""
|
|
354
|
+
nbp = number_of_baseline_parameters
|
|
355
|
+
if method == 0:
|
|
356
|
+
# the count rate through the absorber; CMS also the background the
|
|
357
|
+
# absorber does not attenuate
|
|
358
|
+
pCAL = np.array([p[0], 0, 0, 0, p[4] if VVV == 1 else 0, 0, 0, 0,
|
|
359
|
+
8.08, 0, 0, ALPHA_FE_FIELD, NAT_WIDTH, 0, 90, 0, 0, 0, 0, 0, 0, 3])
|
|
360
|
+
else:
|
|
361
|
+
pCAL = p0
|
|
362
|
+
pCAL[nbp + 13] = 3 # I1/I3 line-intensity ratio
|
|
363
|
+
pCAL[nbp + 5] = 0 # Gaussian broadening G
|
|
364
|
+
model = ['Sextet']
|
|
365
|
+
if impurity:
|
|
366
|
+
model.append('Sextet')
|
|
367
|
+
pCAL = np.concatenate((pCAL, IMPURITY_SEXTET))
|
|
368
|
+
if optics_doublet is not None:
|
|
369
|
+
model.append('Doublet')
|
|
370
|
+
pCAL = np.concatenate((pCAL, optics_doublet))
|
|
371
|
+
return model, pCAL
|
|
372
|
+
|
|
373
|
+
|
|
301
374
|
# ========================================================================= #
|
|
302
375
|
# Folding the two half-sweeps onto one velocity axis #
|
|
303
376
|
# ========================================================================= #
|
|
@@ -417,9 +490,10 @@ def _write_calibration_dat(dir_path, method, n1, n2, v_folded, data_folded):
|
|
|
417
490
|
|
|
418
491
|
def _save_sms_diagnostic_plot(dir_path, channels, counts, final_curve, flat_counts,
|
|
419
492
|
v_axis, v_folded, data_folded, fold_residual,
|
|
420
|
-
pS, baseline, method, n1, n2):
|
|
493
|
+
pS, imp, baseline, method, n1, n2):
|
|
421
494
|
"""Save ``calibr.png``: raw data + fit vs channel, folded halves vs velocity,
|
|
422
|
-
the fold residual, and the key numbers (amplitude, distortion, impurity
|
|
495
|
+
the fold residual, and the key numbers (amplitude, distortion, impurity:
|
|
496
|
+
``pS[imp]``, *imp* None without the impurity sextet)."""
|
|
423
497
|
fig, ax = plt.subplots(dpi=300)
|
|
424
498
|
plt.plot(channels, counts, 'm')
|
|
425
499
|
plt.plot(channels, final_curve, 'b')
|
|
@@ -448,7 +522,8 @@ def _save_sms_diagnostic_plot(dir_path, channels, counts, final_curve, flat_coun
|
|
|
448
522
|
'ΔN0 = %.1f ' % (abs(pS[6]) / (baseline + pS[6] * (1 + np.sign(pS[6])) / 2) * 100) + '%',
|
|
449
523
|
color='w', fontsize=8, horizontalalignment='center')
|
|
450
524
|
ax.text(len(channels), max(counts) + 4 * np.sqrt(max(counts)),
|
|
451
|
-
'impurity %.1f ' % (pS[
|
|
525
|
+
'impurity %.1f ' % (pS[imp] / (pS[9] + pS[imp]) * 100) + '%' if imp is not None
|
|
526
|
+
else 'no impurity sextet',
|
|
452
527
|
color='w', fontsize=8, horizontalalignment='right')
|
|
453
528
|
ax.text(len(channels) / 2, max(counts) + 10 * np.sqrt(max(counts)),
|
|
454
529
|
str('lin ') * (method == 1) + str('sin ') * (method == 0)
|
|
@@ -488,7 +563,7 @@ def _raw_drive(x):
|
|
|
488
563
|
# ========================================================================= #
|
|
489
564
|
|
|
490
565
|
def Calibration(dir_path, Cal_file, pool, VVV, INS, JN, x0, MulCo, Vel_start=1, GCMS=0.1, dtheta=0.0,
|
|
491
|
-
r_ratio=0.0, details=None, channel_average=False):
|
|
566
|
+
r_ratio=0.0, details=None, channel_average=False, impurities=None):
|
|
492
567
|
"""Fit the velocity calibration of a standard alpha-Fe absorber spectrum.
|
|
493
568
|
|
|
494
569
|
Loads the calibration spectrum ``Cal_file``, auto-detects everything about
|
|
@@ -499,8 +574,8 @@ def Calibration(dir_path, Cal_file, pool, VVV, INS, JN, x0, MulCo, Vel_start=1,
|
|
|
499
574
|
channel -> velocity scale.
|
|
500
575
|
|
|
501
576
|
Args:
|
|
502
|
-
dir_path: Writable directory holding ``Be.txt`` and
|
|
503
|
-
``Calibration.dat`` / ``calibr.png``.
|
|
577
|
+
dir_path: Writable directory holding ``Be.txt`` / ``KB.txt`` and
|
|
578
|
+
receiving ``Calibration.dat`` / ``calibr.png``.
|
|
504
579
|
Cal_file: Path of the raw calibration spectrum (format by extension).
|
|
505
580
|
pool: Shared multiprocessing pool for the transmission integral.
|
|
506
581
|
VVV: Experimental method -- ``1`` conventional source (CMS / MS mode),
|
|
@@ -530,6 +605,10 @@ def Calibration(dir_path, Cal_file, pool, VVV, INS, JN, x0, MulCo, Vel_start=1,
|
|
|
530
605
|
velocities the drive runs through in it (the Supp setting,
|
|
531
606
|
models "Channel average"), the widths from the drive curve being
|
|
532
607
|
fitted (_raw_drive).
|
|
608
|
+
impurities: what the final fit adds to the alpha-Fe sextet (the
|
|
609
|
+
Calibrate menu), ``(impurity sextet, optics)``: True/False and a
|
|
610
|
+
key of OPTICS_PRESETS ('Be', 'KB' or 'none'). None: the method's
|
|
611
|
+
defaults (default_impurities).
|
|
533
612
|
|
|
534
613
|
Returns:
|
|
535
614
|
tuple ``(v_folded, data_folded, fit_folded)`` -- the folded velocity
|
|
@@ -537,6 +616,9 @@ def Calibration(dir_path, Cal_file, pool, VVV, INS, JN, x0, MulCo, Vel_start=1,
|
|
|
537
616
|
"""
|
|
538
617
|
print('experimental method VVV =', VVV)
|
|
539
618
|
nbp = number_of_baseline_parameters
|
|
619
|
+
impurity, optics = default_impurities(VVV) if impurities is None else impurities
|
|
620
|
+
# read now: a preset that cannot be read stops the calibration before its fits
|
|
621
|
+
optics_doublet = None if optics == 'none' else _read_optics_preset(dir_path, optics)
|
|
540
622
|
counts = _load_raw_counts(Cal_file)
|
|
541
623
|
n_ch = len(counts)
|
|
542
624
|
channels = np.linspace(0, n_ch - 1, n_ch) # 0, 1, ..., n_ch-1 as floats
|
|
@@ -644,10 +726,10 @@ def Calibration(dir_path, Cal_file, pool, VVV, INS, JN, x0, MulCo, Vel_start=1,
|
|
|
644
726
|
module docstring for the meaning of p)."""
|
|
645
727
|
pCAL2 = pCAL # ALIAS: writes into pCAL
|
|
646
728
|
pCAL2[nbp] = p[9] # main sextet intensity
|
|
647
|
-
if
|
|
729
|
+
if imp is not None:
|
|
648
730
|
# second Sextet (impurity) intensity: baseline(8) + first
|
|
649
731
|
# Sextet(14) -> the second Sextet block starts at nbp+14.
|
|
650
|
-
pCAL2[nbp + 14] = p[
|
|
732
|
+
pCAL2[nbp + 14] = p[imp]
|
|
651
733
|
Hx = (p[0] / np.pi * n_ch * np.sin(np.pi / n_ch)
|
|
652
734
|
* np.cos(p[1] + np.pi / n_ch * (2 * x + 1)) + p[2])
|
|
653
735
|
if min(Hx) > -2.95 and max(Hx) < 2.95:
|
|
@@ -671,6 +753,8 @@ def Calibration(dir_path, Cal_file, pool, VVV, INS, JN, x0, MulCo, Vel_start=1,
|
|
|
671
753
|
"""Final-fit model for the triangular drive (CMS only)."""
|
|
672
754
|
pCAL2 = pCAL # ALIAS: writes into pCAL
|
|
673
755
|
pCAL2[nbp] = p[9] # main sextet intensity
|
|
756
|
+
if imp is not None:
|
|
757
|
+
pCAL2[nbp + 14] = p[imp] # impurity sextet intensity
|
|
674
758
|
first = x <= int(n_ch / 2)
|
|
675
759
|
Hx = np.where(first, p[0] - p[2] * x, p[1] - p[2] * (n_ch - 1 - x))
|
|
676
760
|
# Indicators of the two half-sweeps (x is always the sorted channel
|
|
@@ -907,42 +991,16 @@ def Calibration(dir_path, Cal_file, pool, VVV, INS, JN, x0, MulCo, Vel_start=1,
|
|
|
907
991
|
ps1 = np.append(ps1, (-1) * parab[1] / 2) # ps1[8]: curvature, half 2
|
|
908
992
|
|
|
909
993
|
# --------------------------------------------------------------------- #
|
|
910
|
-
# STEP 9: final model
|
|
911
|
-
# sextet and the
|
|
912
|
-
#
|
|
994
|
+
# STEP 9: final model: the alpha-Fe sextet, then the foil's impurity #
|
|
995
|
+
# sextet and the doublet of the optics (Be.txt / KB.txt), each when #
|
|
996
|
+
# chosen. CMS also frees the count rate and the background. #
|
|
913
997
|
# --------------------------------------------------------------------- #
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
model = ['Sextet', 'Sextet', 'Doublet']
|
|
917
|
-
try:
|
|
918
|
-
Be_param = np.genfromtxt(os.path.join(dir_path, 'Be.txt'),
|
|
919
|
-
delimiter='\t', skip_footer=0)
|
|
920
|
-
print('Be.txt was read')
|
|
921
|
-
except Exception:
|
|
922
|
-
Be_param = np.array([0.057, 0.066, -0.261, NAT_WIDTH, 0.375, 90, 0,
|
|
923
|
-
0.427, 1])
|
|
924
|
-
print('COULD NOT READ Be.txt')
|
|
925
|
-
# baseline(8) + two polarized Sextets(14 each) + Be Doublet(9).
|
|
926
|
-
pCAL = np.array([p[0], 0, 0, 0, 0, 0, 0, 0,
|
|
927
|
-
8.08, 0, 0, ALPHA_FE_FIELD, NAT_WIDTH, 0, 90, 0, 0, 0, 0, 0, 0, 3,
|
|
928
|
-
0.451, -0.041, 0.003, 30.88, NAT_WIDTH, 0.1, 90, 0, 0, 0, 0, 0, 0, 3])
|
|
929
|
-
pCAL = np.concatenate((pCAL, Be_param))
|
|
930
|
-
if VVV == 1:
|
|
931
|
-
model = ['Sextet']
|
|
932
|
-
pCAL = np.array([p[0], 0, 0, 0, p[4], 0, 0, 0,
|
|
933
|
-
8.08, 0, 0, ALPHA_FE_FIELD, NAT_WIDTH, 0, 90, 0, 0, 0, 0, 0, 0, 3])
|
|
934
|
-
print('background ', pCAL[0], pCAL[4], ps1[3])
|
|
935
|
-
if method == 1:
|
|
936
|
-
model = ['Sextet']
|
|
937
|
-
pCAL = p0
|
|
938
|
-
pCAL[nbp + 13] = 3 # I1/I3 line-intensity ratio
|
|
939
|
-
pCAL[nbp + 5] = 0 # Gaussian broadening G
|
|
998
|
+
model, pCAL = _final_model(VVV, method, p, p0, impurity, optics_doublet)
|
|
999
|
+
if VVV == 1:
|
|
940
1000
|
print('background ', pCAL[0], pCAL[4], ps1[3])
|
|
941
1001
|
|
|
942
1002
|
ps1 = np.append(ps1, 8) # ps1[9]: main sextet intensity
|
|
943
1003
|
ps1 = np.append(ps1, 0) # ps1[10]: texture parameter A
|
|
944
|
-
if VVV == 3:
|
|
945
|
-
ps1 = np.append(ps1, 0.5) # ps1[11]: impurity intensity
|
|
946
1004
|
if VVV == 1:
|
|
947
1005
|
# Free the count rate and the background, starting from a 60/40 split
|
|
948
1006
|
# of the fitted total; rescale the intensity guess accordingly.
|
|
@@ -953,6 +1011,12 @@ def Calibration(dir_path, Cal_file, pool, VVV, INS, JN, x0, MulCo, Vel_start=1,
|
|
|
953
1011
|
ps1 = np.append(ps1, pCAL[0]) # ps1[11]: count rate through the absorber
|
|
954
1012
|
ps1 = np.append(ps1, pCAL[4]) # ps1[12]: unattenuated background
|
|
955
1013
|
print('baseline ', ps1[11], ps1[12])
|
|
1014
|
+
# The impurity sextet's intensity comes last ([11] SMS, [13] CMS), from
|
|
1015
|
+
# 1/16 of the main sextet's (SMS: 0.5).
|
|
1016
|
+
imp = None
|
|
1017
|
+
if impurity:
|
|
1018
|
+
imp = len(ps1)
|
|
1019
|
+
ps1 = np.append(ps1, ps1[9] / 16)
|
|
956
1020
|
|
|
957
1021
|
print('parameter set after preliminary fit ', ps1)
|
|
958
1022
|
print('model parameters after preliminary fit ', pCAL)
|
|
@@ -1005,7 +1069,7 @@ def Calibration(dir_path, Cal_file, pool, VVV, INS, JN, x0, MulCo, Vel_start=1,
|
|
|
1005
1069
|
if VVV == 3:
|
|
1006
1070
|
_save_sms_diagnostic_plot(dir_path, channels, counts, final_curve,
|
|
1007
1071
|
flat_counts, v_axis, v_folded, data_folded,
|
|
1008
|
-
fold_residual, pS, pCAL[0], method, n1, n2)
|
|
1072
|
+
fold_residual, pS, imp, pCAL[0], method, n1, n2)
|
|
1009
1073
|
print('Shift due to instrumental function ', INS_shift)
|
|
1010
1074
|
print('Velocity range: ', min(v_folded), ' to ', max(v_folded),
|
|
1011
1075
|
'mm/s, absolute shift ', (max(v_folded) + min(v_folded)) / 2)
|
|
@@ -1013,7 +1077,8 @@ def Calibration(dir_path, Cal_file, pool, VVV, INS, JN, x0, MulCo, Vel_start=1,
|
|
|
1013
1077
|
print('Source shift is', pS[2], 'mm/s')
|
|
1014
1078
|
print('difference of N0:',
|
|
1015
1079
|
abs(pS[6]) / (pCAL[0] + pS[6] * (1 + np.sign(pS[6])) / 2) * 100, '%')
|
|
1016
|
-
|
|
1080
|
+
if imp is not None:
|
|
1081
|
+
print('impurity is', pS[imp] / (pS[9] + pS[imp]) * 100, '%')
|
|
1017
1082
|
print('maximum deviation is ', max(np.abs(data_folded - fit_folded)),
|
|
1018
1083
|
'or ', max(np.abs(data_folded - fit_folded)) / pCAL[0], '%')
|
|
1019
1084
|
print('Texture parameter is', pS[10], 'should be 0 for isotropic')
|
|
@@ -42,6 +42,7 @@ MODEL_PARAMETER_NAMES = {
|
|
|
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
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', 'ω, °'],
|
|
45
|
+
'Spectrum': ['T', 'δ, mm/s', 'G, mm/s', 'Lines'],
|
|
45
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'],
|
|
46
47
|
'Be': ['T', 'δ, mm/s', 'ε, mm/s', 'L, mm/s', 'G, mm/s', 'θk, °', 'φh, °', 'A', 'G2/G1'],
|
|
47
48
|
'KB_nano': ['T', 'δ, mm/s', 'ε, mm/s', 'L, mm/s', 'G, mm/s', 'θk, °', 'φh, °', 'A', 'G2/G1'],
|
|
@@ -111,6 +111,11 @@ ISSUES_URL = 'https://github.com/sergey-yaroslavtsev/syncmoss/issues'
|
|
|
111
111
|
# Number of baseline parameters
|
|
112
112
|
number_of_baseline_parameters = 8
|
|
113
113
|
|
|
114
|
+
# A CMS spectrum's non-resonant counts, Nnr = CMS_NNR_RATIO * Ns: the link a CMS
|
|
115
|
+
# baseline starts with (parameters_table) and the one a CMS reference of a
|
|
116
|
+
# 'Spectrum' row is fitted with (spectrum_reference; an SMS reference: Nnr = 0).
|
|
117
|
+
CMS_NNR_RATIO = 0.67
|
|
118
|
+
|
|
114
119
|
# Default color sequence for plotting models
|
|
115
120
|
model_colors = ['red', 'blue', 'cyan', 'yellow', 'fuchsia', 'lime', 'darkorange', 'blueviolet', 'green', 'tomato', 'white', 'silver', 'lightgreen', 'pink']
|
|
116
121
|
|