Added an example to documnetation.
This commit is contained in:
1 parent
95b0cd8dcc
commit
163dc9df17
17 files changed
+3658
-1
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 298 KiB |
@@ -212,6 +212,23 @@ Growing the layout clones the active panel, so expanding a ``1 x 1`` grid to
|
||||
removes that file from the active panel only; the file stays available in the
|
||||
list for other panels.
|
||||
|
||||
Worked example: energy scan at two temperatures
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. figure:: images/lem2025-energy-scan.png
|
||||
:alt: Fitted magnetic field, Gaussian relaxation rate and initial asymmetry versus implantation energy for 85 nm Nb/Al2O3 at 3.8 K (blue) and 10 K (red).
|
||||
:width: 100%
|
||||
|
||||
Real Gaussian-cosine fits of a LEM 2025 energy scan on 85 nm Nb/Al₂O₃ at
|
||||
B ≈ 100 G. Data set 1 (runs 1014–1027, 3.8 K, blue) is superconducting and
|
||||
its field is screened below the applied value; data set 2 (runs 1033–1045,
|
||||
10 K, red) is in the normal state with a flat field. **B**, **σ**, and
|
||||
**A₀** share one panel each, with the two scans overlaid in the same
|
||||
blue/red pairing the parameter-plot window gives to two overlaid
|
||||
``*.dat`` files. This is a fit result, not a screenshot of the application.
|
||||
The exact fits, run files, and reproduction scripts are in
|
||||
``docs/examples/lem2025-energy-scan``.
|
||||
|
||||
Editing trace styles
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
+19
@@ -60,6 +60,7 @@
|
||||
<li class="toctree-l3"><a class="reference internal" href="#plot-options">Plot options</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#remembered-plot-configurations">Remembered plot configurations</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#overlay-data-sets-multiple-files-in-one-panel">Overlay data sets (multiple files in one panel)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#worked-example-energy-scan-at-two-temperatures">Worked example: energy scan at two temperatures</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#editing-trace-styles">Editing trace styles</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#template-and-series-presets">Template and series presets</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#keyboard-shortcuts">Keyboard shortcuts</a></li>
|
||||
@@ -305,6 +306,24 @@ are prefixed with the file name (<code class="docutils literal notranslate"><spa
|
||||
removes that file from the active panel only; the file stays available in the
|
||||
list for other panels.</p>
|
||||
</section>
|
||||
<section id="worked-example-energy-scan-at-two-temperatures">
|
||||
<h3>Worked example: energy scan at two temperatures<a class="headerlink" href="#worked-example-energy-scan-at-two-temperatures" title="Link to this heading"></a></h3>
|
||||
<figure class="align-default" id="id3">
|
||||
<a class="reference internal image-reference" href="_images/lem2025-energy-scan.png"><img alt="Fitted magnetic field, Gaussian relaxation rate and initial asymmetry versus implantation energy for 85 nm Nb/Al2O3 at 3.8 K (blue) and 10 K (red)." src="_images/lem2025-energy-scan.png" style="width: 100%;" />
|
||||
</a>
|
||||
<figcaption>
|
||||
<p><span class="caption-text">Real Gaussian-cosine fits of a LEM 2025 energy scan on 85 nm Nb/Al₂O₃ at
|
||||
B ≈ 100 G. Data set 1 (runs 1014–1027, 3.8 K, blue) is superconducting and
|
||||
its field is screened below the applied value; data set 2 (runs 1033–1045,
|
||||
10 K, red) is in the normal state with a flat field. <strong>B</strong>, <strong>σ</strong>, and
|
||||
<strong>A₀</strong> share one panel each, with the two scans overlaid in the same
|
||||
blue/red pairing the parameter-plot window gives to two overlaid
|
||||
<code class="docutils literal notranslate"><span class="pre">*.dat</span></code> files. This is a fit result, not a screenshot of the application.
|
||||
The exact fits, run files, and reproduction scripts are in
|
||||
<code class="docutils literal notranslate"><span class="pre">docs/examples/lem2025-energy-scan</span></code>.</span><a class="headerlink" href="#id3" title="Link to this image"></a></p>
|
||||
</figcaption>
|
||||
</figure>
|
||||
</section>
|
||||
<section id="editing-trace-styles">
|
||||
<h3>Editing trace styles<a class="headerlink" href="#editing-trace-styles" title="Link to this heading"></a></h3>
|
||||
<p>Click any marker directly in a plot panel to open a small style editor near
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
Search.setIndex({"alltitles":{"A first fit":[[9,"a-first-fit"]],"Alternative: runtime AppImage":[[5,"alternative-runtime-appimage"]],"Alternative: system runtime RPM":[[5,"alternative-system-runtime-rpm"]],"AppImage":[[5,"appimage"]],"Before you start":[[6,"before-you-start"]],"Bundled ROOT and musrfit":[[11,"bundled-root-and-musrfit"]],"Cannot find wsl.exe":[[6,"cannot-find-wsl-exe"]],"Cannot load libCore.so":[[6,"cannot-load-libcore-so"]],"Choose folders and test":[[5,"choose-folders-and-test"]],"Choose your edition":[[2,"choose-your-edition"]],"Command log":[[13,"command-log"]],"Configuration sharing":[[0,null]],"Constraints":[[1,null],[1,"id1"]],"Contents":[[4,null]],"Custom parameters":[[1,"custom-parameters"]],"Desktop installation":[[2,"desktop-installation"]],"Downloading missing runs":[[11,"downloading-missing-runs"]],"Editing trace styles":[[10,"editing-trace-styles"]],"Example: couple the magnetic field to the Larmor frequency":[[1,"example-couple-the-magnetic-field-to-the-larmor-frequency"]],"Execution details":[[13,"execution-details"]],"Existing installations":[[6,"existing-installations"]],"File handling":[[8,"file-handling"]],"Fit and Plot":[[14,"fit-and-plot"]],"Fit model":[[14,"fit-model"]],"Fit options":[[14,"fit-options"]],"Fit or plot will not start":[[16,"fit-or-plot-will-not-start"]],"Fit range":[[14,"fit-range"]],"Fitted parameters look wrong or unchanged":[[16,"fitted-parameters-look-wrong-or-unchanged"]],"General notes":[[7,"general-notes"]],"Getting started":[[2,null]],"Glossary":[[3,null]],"Install step by step":[[6,"install-step-by-step"]],"Install the application":[[5,"install-the-application"]],"Install the separate runtime from a local bundle":[[5,"install-the-separate-runtime-from-a-local-bundle"]],"Keyboard shortcuts":[[7,null],[10,"keyboard-shortcuts"]],"Linux installation":[[5,null]],"MSR editor":[[7,"msr-editor"],[8,null]],"Missing boost/version.hpp or plotting crash":[[6,"missing-boost-version-hpp-or-plotting-crash"]],"Multi-group asymmetry fits":[[15,"multi-group-asymmetry-fits"]],"No spectrum window appears":[[6,"no-spectrum-window-appears"]],"Notes":[[0,"notes"]],"On the desktop":[[0,"on-the-desktop"]],"On the web":[[0,"on-the-web"]],"Opening the web edition":[[2,"opening-the-web-edition"]],"Outcome dialog":[[13,"outcome-dialog"]],"Overlay data sets (multiple files in one panel)":[[10,"overlay-data-sets-multiple-files-in-one-panel"]],"Overview":[[9,null]],"Ownership: GUI or editor":[[8,"ownership-gui-or-editor"]],"Parameter plot hangs on \u201cPreparing plot files\u201d":[[16,"parameter-plot-hangs-on-preparing-plot-files"]],"Parameter plot is empty or missing data":[[16,"parameter-plot-is-empty-or-missing-data"]],"Parameter selection (Parameters tab)":[[7,"parameter-selection-parameters-tab"]],"Parameter-plot window":[[7,"parameter-plot-window"]],"Parameters and parameter plots":[[10,null]],"Per-run statistics":[[14,"per-run-statistics"]],"Plot options":[[10,"plot-options"]],"Preferences":[[12,null]],"Preview":[[1,"preview"]],"RPM":[[5,"rpm"]],"Remembered plot configurations":[[10,"remembered-plot-configurations"]],"Reporting a problem":[[6,"reporting-a-problem"]],"Reporting problems":[[16,"reporting-problems"]],"Required feature is not installed":[[6,"required-feature-is-not-installed"]],"Restored configuration differs from the original machine":[[16,"restored-configuration-differs-from-the-original-machine"]],"Result files":[[13,"result-files"]],"Results and diagnostics":[[13,null]],"Run log window":[[13,"run-log-window"]],"Run selection":[[14,"run-selection"]],"Running the desktop app":[[2,"running-the-desktop-app"]],"Runs and fitting":[[14,null]],"Selecting parameters for plotting":[[10,"selecting-parameters-for-plotting"]],"Series fit actions":[[14,"series-fit-actions"]],"Set up ROOT and musrfit":[[5,"set-up-root-and-musrfit"]],"Some links start with a different prefix":[[16,"some-links-start-with-a-different-prefix"]],"Support":[[2,"support"]],"Template and series presets":[[10,"template-and-series-presets"]],"The Choose X axis dialog":[[10,"the-choose-x-axis-dialog"]],"The Quick Start guide":[[2,"the-quick-start-guide"]],"The Shared column":[[10,"the-shared-column"]],"The parameter table":[[10,"the-parameter-table"]],"The parameter-plot window":[[10,"the-parameter-plot-window"]],"The status bar":[[13,"the-status-bar"]],"Troubleshooting":[[6,"troubleshooting"],[16,null]],"Two editions":[[9,"two-editions"]],"Under the hood":[[9,"under-the-hood"]],"Updating and troubleshooting":[[5,"updating-and-troubleshooting"]],"Use an existing installation":[[5,"use-an-existing-installation"]],"View settings":[[14,"view-settings"]],"Web and desktop editions":[[11,null]],"Web page cannot load data":[[16,"web-page-cannot-load-data"]],"What is shared":[[0,"what-is-shared"]],"What you get":[[9,"what-you-get"]],"Windows installation":[[2,"windows-installation"],[6,null]],"Workflow":[[8,"workflow"]],"muSRFlow User Manual":[[4,null]],"t0 / background":[[15,null]],"\u201cNothing to
Line truncated
|
||||
Search.setIndex({"alltitles":{"A first fit":[[9,"a-first-fit"]],"Alternative: runtime AppImage":[[5,"alternative-runtime-appimage"]],"Alternative: system runtime RPM":[[5,"alternative-system-runtime-rpm"]],"AppImage":[[5,"appimage"]],"Before you start":[[6,"before-you-start"]],"Bundled ROOT and musrfit":[[11,"bundled-root-and-musrfit"]],"Cannot find wsl.exe":[[6,"cannot-find-wsl-exe"]],"Cannot load libCore.so":[[6,"cannot-load-libcore-so"]],"Choose folders and test":[[5,"choose-folders-and-test"]],"Choose your edition":[[2,"choose-your-edition"]],"Command log":[[13,"command-log"]],"Configuration sharing":[[0,null]],"Constraints":[[1,null],[1,"id1"]],"Contents":[[4,null]],"Custom parameters":[[1,"custom-parameters"]],"Desktop installation":[[2,"desktop-installation"]],"Downloading missing runs":[[11,"downloading-missing-runs"]],"Editing trace styles":[[10,"editing-trace-styles"]],"Example: couple the magnetic field to the Larmor frequency":[[1,"example-couple-the-magnetic-field-to-the-larmor-frequency"]],"Execution details":[[13,"execution-details"]],"Existing installations":[[6,"existing-installations"]],"File handling":[[8,"file-handling"]],"Fit and Plot":[[14,"fit-and-plot"]],"Fit model":[[14,"fit-model"]],"Fit options":[[14,"fit-options"]],"Fit or plot will not start":[[16,"fit-or-plot-will-not-start"]],"Fit range":[[14,"fit-range"]],"Fitted parameters look wrong or unchanged":[[16,"fitted-parameters-look-wrong-or-unchanged"]],"General notes":[[7,"general-notes"]],"Getting started":[[2,null]],"Glossary":[[3,null]],"Install step by step":[[6,"install-step-by-step"]],"Install the application":[[5,"install-the-application"]],"Install the separate runtime from a local bundle":[[5,"install-the-separate-runtime-from-a-local-bundle"]],"Keyboard shortcuts":[[7,null],[10,"keyboard-shortcuts"]],"Linux installation":[[5,null]],"MSR editor":[[7,"msr-editor"],[8,null]],"Missing boost/version.hpp or plotting crash":[[6,"missing-boost-version-hpp-or-plotting-crash"]],"Multi-group asymmetry fits":[[15,"multi-group-asymmetry-fits"]],"No spectrum window appears":[[6,"no-spectrum-window-appears"]],"Notes":[[0,"notes"]],"On the desktop":[[0,"on-the-desktop"]],"On the web":[[0,"on-the-web"]],"Opening the web edition":[[2,"opening-the-web-edition"]],"Outcome dialog":[[13,"outcome-dialog"]],"Overlay data sets (multiple files in one panel)":[[10,"overlay-data-sets-multiple-files-in-one-panel"]],"Overview":[[9,null]],"Ownership: GUI or editor":[[8,"ownership-gui-or-editor"]],"Parameter plot hangs on \u201cPreparing plot files\u201d":[[16,"parameter-plot-hangs-on-preparing-plot-files"]],"Parameter plot is empty or missing data":[[16,"parameter-plot-is-empty-or-missing-data"]],"Parameter selection (Parameters tab)":[[7,"parameter-selection-parameters-tab"]],"Parameter-plot window":[[7,"parameter-plot-window"]],"Parameters and parameter plots":[[10,null]],"Per-run statistics":[[14,"per-run-statistics"]],"Plot options":[[10,"plot-options"]],"Preferences":[[12,null]],"Preview":[[1,"preview"]],"RPM":[[5,"rpm"]],"Remembered plot configurations":[[10,"remembered-plot-configurations"]],"Reporting a problem":[[6,"reporting-a-problem"]],"Reporting problems":[[16,"reporting-problems"]],"Required feature is not installed":[[6,"required-feature-is-not-installed"]],"Restored configuration differs from the original machine":[[16,"restored-configuration-differs-from-the-original-machine"]],"Result files":[[13,"result-files"]],"Results and diagnostics":[[13,null]],"Run log window":[[13,"run-log-window"]],"Run selection":[[14,"run-selection"]],"Running the desktop app":[[2,"running-the-desktop-app"]],"Runs and fitting":[[14,null]],"Selecting parameters for plotting":[[10,"selecting-parameters-for-plotting"]],"Series fit actions":[[14,"series-fit-actions"]],"Set up ROOT and musrfit":[[5,"set-up-root-and-musrfit"]],"Some links start with a different prefix":[[16,"some-links-start-with-a-different-prefix"]],"Support":[[2,"support"]],"Template and series presets":[[10,"template-and-series-presets"]],"The Choose X axis dialog":[[10,"the-choose-x-axis-dialog"]],"The Quick Start guide":[[2,"the-quick-start-guide"]],"The Shared column":[[10,"the-shared-column"]],"The parameter table":[[10,"the-parameter-table"]],"The parameter-plot window":[[10,"the-parameter-plot-window"]],"The status bar":[[13,"the-status-bar"]],"Troubleshooting":[[6,"troubleshooting"],[16,null]],"Two editions":[[9,"two-editions"]],"Under the hood":[[9,"under-the-hood"]],"Updating and troubleshooting":[[5,"updating-and-troubleshooting"]],"Use an existing installation":[[5,"use-an-existing-installation"]],"View settings":[[14,"view-settings"]],"Web and desktop editions":[[11,null]],"Web page cannot load data":[[16,"web-page-cannot-load-data"]],"What is shared":[[0,"what-is-shared"]],"What you get":[[9,"what-you-get"]],"Windows installation":[[2,"windows-installation"],[6,null]],"Worked example: energy scan at two temperatures":[[10,"worked-example-energy-scan-at-two-temperatures"]],"WorLine truncated
|
||||
@@ -0,0 +1,63 @@
|
||||
# LEM 2025 energy scan — Gaussian-cosine fits at two temperatures
|
||||
|
||||
Worked example behind the figure
|
||||
`docs/source/images/lem2025-energy-scan.png` (used in
|
||||
`docs/source/parameters-plots.rst`). It is a real set of fits, not a mock-up.
|
||||
|
||||
## Data
|
||||
|
||||
* Instrument: LEM (PSI), proposal 20241780.
|
||||
* Sample: 85 nm Nb/Al₂O₃, applied field ≈ 100 G, spin angle −45°.
|
||||
* Data set 1: runs **1014–1027**, sample temperature **3.8 K**
|
||||
(superconducting Nb).
|
||||
* Data set 2: runs **1033–1045**, sample temperature **10 K**
|
||||
(normal state).
|
||||
* Implantation energy scanned from ≈ 0.96 keV to ≈ 17.95 keV.
|
||||
* Run files (`lem25_his_01xx.root`) are MUSR-ROOT files named under
|
||||
`<data root>/lem/his/2025/`. They can be fetched with muSRFlow's
|
||||
**Download run data** flow or from `musruser.psi.ch`.
|
||||
|
||||
`meta.tsv` records the run number, implantation energy, temperature, field,
|
||||
sample, and run title read from each ROOT run header (`meta.C`).
|
||||
|
||||
## Fit
|
||||
|
||||
Each run is fitted independently to the muSRFlow **Gaussian Cosine** model:
|
||||
|
||||
```
|
||||
asymmetry Asy
|
||||
simpleGss Sgm
|
||||
TFieldCos Phi Frq
|
||||
```
|
||||
|
||||
with the field constrained through `Frq = gamma_mu * Bfield`, so `Bfield`
|
||||
(Gauss) is a free parameter and is exported by `msr2data`. Settings:
|
||||
|
||||
* fit range `0 8` µs, packing `100`;
|
||||
* LEM detectors: `forward 21 25`, `backward 23 27`, `alpha 5`;
|
||||
* `MINIMIZE` + `HESSE`, `fittype 2` (asymmetry);
|
||||
* starting values seeded from the preceding run in energy order.
|
||||
|
||||
`fit_all.py` regenerates the 27 `_asy.msr` files, fits them with `musrfit`,
|
||||
and writes `dataset1_3.8K.dat` / `dataset2_10K.dat` with `msr2data`.
|
||||
`example_1014_asy.msr` is the generated document for the first run.
|
||||
|
||||
```sh
|
||||
export MUSRFLOW_DATA_ROOT=/path/to/data # contains lem/his/2025/...
|
||||
python3 fit_all.py
|
||||
python3 plot.py # rewrites the docs figure
|
||||
```
|
||||
|
||||
Requires `musrfit`, `msr2data`, ROOT, numpy, and matplotlib.
|
||||
|
||||
## Result
|
||||
|
||||
All 27 fits converged, χ²/NDF ≈ 0.9–2.1. The fitted field is flat at
|
||||
≈ 99.6 G at 10 K, while at 3.8 K it is screened below the applied value and
|
||||
dips to ≈ 94.7 G around 9 keV — the Meissner response of the superconducting
|
||||
Nb film. The initial asymmetry rises with energy as the stopping profile moves
|
||||
away from the surface; σ is roughly constant away from the lowest energies.
|
||||
|
||||
The documentation figure plots **B**, **σ**, and **A₀** versus implantation
|
||||
energy with data set 1 in blue and data set 2 in red, overlaid on the same
|
||||
three panels — the same multi-file overlay shown by the parameter-plot window.
|
||||
@@ -0,0 +1,17 @@
|
||||
dataT dataTErr dataB dataE dataTr dataRALRAR dataRATRAB dataSpinRot Asy_1014 Asy_1014PosErr Asy_1014NegErr Sgm_1014 Sgm_1014PosErr Sgm_1014NegErr Bfield_1014 Bfield_1014PosErr Bfield_1014NegErr Phi_1014 Phi_1014PosErr Phi_1014NegErr Alpha_1014 Alpha_1014PosErr Alpha_1014NegErr CHISQ NDF CHISQred RUN
|
||||
3.8 0.01 100 0.963889 13.4976 -0.608 -0.009 -45 0.1244 0.0018 0.0018 0.625 0.017 0.017 98.96 0.22 0.22 -34.2 1 1 1.2012 0.0017 0.0017 835.5 404 2.06807 1014
|
||||
3.8 0.01 100 1.26351 13.4976 -0.608 -0.009 -45 0.136 0.0016 0.0016 0.533 0.013 0.013 98.76 0.17 0.17 -34.36 0.91 0.91 1.128 0.0016 0.0016 670 404 1.65842 1015
|
||||
3.8 0.01 100 1.46347 13.4976 -0.608 -0.009 -45 0.1397 0.0015 0.0015 0.493 0.011 0.011 98.68 0.16 0.16 -35.8 0.88 0.88 1.094 0.0015 0.0015 515.8 404 1.27673 1016
|
||||
3.8 0.01 100 1.96244 13.4976 -0.608 -0.009 -45 0.1518 0.0015 0.0015 0.4778 0.0091 0.0091 98.22 0.14 0.14 -36.4 0.81 0.81 1.054 0.0015 0.0015 487.5 404 1.20668 1017
|
||||
3.8 0.01 100 2.46209 13.4975 -0.608 -0.009 -45 0.1633 0.0015 0.0015 0.4753 0.0082 0.0082 97.93 0.13 0.13 -36.89 0.76 0.76 1.0304 0.0014 0.0014 448.7 404 1.11064 1018
|
||||
3.8 0.01 100 2.96149 13.4976 -0.608 -0.009 -45 0.1694 0.0015 0.0015 0.4848 0.008 0.008 97.24 0.13 0.13 -35.45 0.74 0.74 1.0254 0.0014 0.0014 418.4 404 1.03564 1019
|
||||
3.8 0.01 100 4.95944 13.4976 -0.608 -0.009 -45 0.1838 0.0015 0.0015 0.4781 0.0073 0.0073 95.8 0.12 0.12 -35.46 0.68 0.68 1.0077 0.0014 0.0014 450.2 404 1.11436 1020
|
||||
3.8 0.01 100 6.95706 13.4976 -0.608 -0.009 -45 0.194 0.0015 0.0015 0.474 0.0068 0.0068 94.99 0.11 0.11 -36.28 0.65 0.65 1.0043 0.0014 0.0014 409.7 404 1.01411 1021
|
||||
3.8 0.01 100 8.95504 13.4976 -0.608 -0.009 -45 0.2051 0.0015 0.0015 0.4897 0.0066 0.0066 94.69 0.11 0.11 -34.8 0.62 0.62 1.0051 0.0014 0.0014 417 404 1.03218 1022
|
||||
3.8 0.01 100 10.9522 13.4976 -0.608 -0.01 -45 0.209 0.0015 0.0015 0.4873 0.0065 0.0065 95.09 0.11 0.11 -34.97 0.6 0.6 1.0066 0.0014 0.0014 361 404 0.893564 1023
|
||||
3.8 0.01 100 12.9585 13.4976 -0.608 -0.01 -45 0.2117 0.0015 0.0015 0.4924 0.0064 0.0064 95.59 0.11 0.11 -34.28 0.6 0.6 1.0066 0.0014 0.0014 412.1 404 1.02005 1024
|
||||
3.8 0.01 100 15.0559 13.4975 -0.609 -0.01 -45 0.2023 0.0015 0.0015 0.4937 0.0068 0.0068 96.49 0.11 0.11 -34.64 0.62 0.62 1.0034 0.0014 0.0014 443.9 404 1.09876 1025
|
||||
3.8 0.01 100 15.9554 13.4975 -0.608 -0.01 -45 0.1966 0.0015 0.0015 0.4909 0.007 0.007 96.87 0.11 0.11 -35.92 0.64 0.64 1.0082 0.0014 0.0014 427.4 404 1.05792 1026
|
||||
3.8 0.01 100 17.9527 13.4975 -0.608 -0.009 -45 0.167 0.0015 0.0015 0.4927 0.0083 0.0083 97.25 0.13 0.13 -35.87 0.75 0.75 1.0079 0.0014 0.0014 439.7 404 1.08837 1027
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
dataT dataTErr dataB dataE dataTr dataRALRAR dataRATRAB dataSpinRot Asy_1033 Asy_1033PosErr Asy_1033NegErr Sgm_1033 Sgm_1033PosErr Sgm_1033NegErr Bfield_1033 Bfield_1033PosErr Bfield_1033NegErr Phi_1033 Phi_1033PosErr Phi_1033NegErr Alpha_1033 Alpha_1033PosErr Alpha_1033NegErr CHISQ NDF CHISQred RUN
|
||||
10 0.007 100 0.963956 13.4975 -0.608 -0.009 -45 0.1123 0.0022 0.0022 0.585 0.024 0.024 98.95 0.28 0.28 -32.9 1.4 1.4 1.2075 0.002 0.002 726.4 404 1.79802 1033
|
||||
9.999 0.007 100 1.26339 13.4975 -0.608 -0.009 -45 0.1285 0.0019 0.0019 0.48 0.014 0.014 99.6 0.2 0.2 -34.2 1.1 1.1 1.1343 0.0019 0.0019 517.3 404 1.28045 1034
|
||||
10 0.008 100 1.46345 13.4976 -0.608 -0.009 -45 0.1383 0.0019 0.0019 0.46 0.012 0.012 99.52 0.18 0.18 -35 1 1 1.1092 0.0019 0.0019 528.9 404 1.30916 1035
|
||||
10 0.008 100 2.46199 13.4975 -0.608 -0.009 -45 0.1627 0.0018 0.0018 0.4286 0.0093 0.0093 99.75 0.14 0.14 -36.59 0.9 0.9 1.035 0.0017 0.0017 393.4 404 0.973762 1036
|
||||
10 0.008 100 2.96151 13.4975 -0.608 -0.009 -45 0.1682 0.0018 0.0018 0.4211 0.0089 0.0089 99.48 0.14 0.14 -34.83 0.86 0.86 1.0229 0.0017 0.0017 452.4 404 1.1198 1037
|
||||
10 0.008 100 4.95942 13.4975 -0.609 -0.009 -45 0.1876 0.0017 0.0017 0.4198 0.0077 0.0077 99.53 0.12 0.12 -34.5 0.77 0.77 1.0148 0.0017 0.0017 445.6 404 1.10297 1038
|
||||
10 0.007 100 6.95705 13.4975 -0.608 -0.009 -45 0.1985 0.0017 0.0017 0.4095 0.0071 0.0071 99.63 0.11 0.11 -35.02 0.73 0.73 1.0082 0.0017 0.0017 381.9 404 0.945297 1039
|
||||
10 0.007 100 8.95492 13.4975 -0.608 -0.009 -45 0.2065 0.0018 0.0018 0.423 0.0072 0.0072 99.86 0.11 0.11 -36.52 0.7 0.7 1.0063 0.0017 0.0017 430.6 404 1.06584 1040
|
||||
10 0.007 100 10.9523 13.4975 -0.608 -0.01 -45 0.2106 0.0017 0.0017 0.4223 0.007 0.007 99.67 0.11 0.11 -36.11 0.69 0.69 1.0109 0.0017 0.0017 411.8 404 1.01931 1041
|
||||
10 0.007 100 12.9584 13.4975 -0.608 -0.01 -45 0.2112 0.0018 0.0018 0.4259 0.0071 0.0071 99.58 0.11 0.11 -36 0.68 0.68 1.0076 0.0017 0.0017 427.3 404 1.05767 1042
|
||||
10.001 0.008 100 15.0559 13.4975 -0.608 -0.009 -45 0.2071 0.0017 0.0017 0.4222 0.0071 0.0071 99.74 0.11 0.11 -36.4 0.7 0.7 1.0109 0.0017 0.0017 423.3 404 1.04777 1043
|
||||
10.001 0.007 100 15.9552 13.4975 -0.608 -0.01 -45 0.1994 0.0018 0.0018 0.4208 0.0075 0.0075 99.68 0.12 0.12 -35.5 0.72 0.72 1.0077 0.0017 0.0017 415.1 404 1.02748 1044
|
||||
10 0.008 100 17.9527 13.4975 -0.608 -0.009 -45 0.1735 0.0018 0.0018 0.4146 0.0086 0.0086 99.57 0.13 0.13 -35.93 0.82 0.82 1.0068 0.0017 0.0017 454.6 404 1.12525 1045
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
85nm_Nb/Al2O3, T=3.78 K, E=0.96 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/11.79 kV, SR=-45.00
|
||||
# Run Numbers: 1014
|
||||
###############################################################
|
||||
FITPARAMETER
|
||||
###############################################################
|
||||
# No Name Value Step PosErr Min Max
|
||||
1 Asy_1014 0.1244 0.0018 none 0 0.5
|
||||
2 Sgm_1014 0.625 0.017 none 0 50
|
||||
3 Bfield_1014 98.96 0.22 none 0 500
|
||||
4 Phi_1014 -34.2 1.0 none -360 360
|
||||
5 Alpha_1014 1.2012 0.0017 none 0.5 1.5
|
||||
###############################################################
|
||||
THEORY
|
||||
asymmetry 1
|
||||
simpleGss 2 (rate)
|
||||
TFieldCos 4 fun1 (phase frequency)
|
||||
###############################################################
|
||||
FUNCTIONS
|
||||
fun1 = gamma_mu * par3
|
||||
###############################################################
|
||||
GLOBAL
|
||||
fittype 2 (asymmetry fit)
|
||||
fit 0 8
|
||||
packing 100
|
||||
###############################################################
|
||||
RUN lem/his/2025/lem25_his_1014 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
|
||||
alpha 5
|
||||
forward 21 25
|
||||
backward 23 27
|
||||
###############################################################
|
||||
COMMANDS
|
||||
MINIMIZE
|
||||
HESSE
|
||||
SAVE
|
||||
###############################################################
|
||||
PLOT 2 (asymmetry plot)
|
||||
runs 1
|
||||
use_fit_ranges
|
||||
###############################################################
|
||||
STATISTIC --- 2026-11-01 09:06:48
|
||||
chisq = 835.5, NDF = 404, chisq/NDF = 2.068189
|
||||
@@ -0,0 +1,147 @@
|
||||
#!/usr/bin/env python3
|
||||
import os, re, subprocess, sys, math
|
||||
|
||||
WORK = os.path.dirname(os.path.abspath(__file__))
|
||||
DATA_ROOT = os.environ.get("MUSRFLOW_DATA_ROOT", "/mnt/backup/data")
|
||||
ENV = dict(os.environ, MUSRFULLDATAPATH=DATA_ROOT)
|
||||
GAMMA = 0.01355388094 # MHz/G
|
||||
|
||||
meta = {}
|
||||
for line in open(os.path.join(WORK, "meta.tsv")):
|
||||
parts = line.rstrip("\n").split("\t")
|
||||
if len(parts) < 6:
|
||||
continue
|
||||
run = int(parts[0])
|
||||
energy = float(parts[1].split()[0])
|
||||
temp = float(parts[2].split()[0])
|
||||
field = float(parts[3].split()[0])
|
||||
sample = parts[4]
|
||||
title = parts[5]
|
||||
meta[run] = dict(energy=energy, temp=temp, field=field, sample=sample, title=title)
|
||||
|
||||
sets = {
|
||||
"dataset1": list(range(1014, 1028)),
|
||||
"dataset2": list(range(1033, 1046)),
|
||||
}
|
||||
|
||||
|
||||
def write_msr(run, p):
|
||||
title = meta[run]["title"]
|
||||
text = f"""{title}
|
||||
# Run Numbers: {run}
|
||||
###############################################################
|
||||
FITPARAMETER
|
||||
###############################################################
|
||||
# No Name Value Step PosErr Min Max
|
||||
1 Asy_{run} {p['Asy']:.6g} 0.01 none 0 0.5
|
||||
2 Sgm_{run} {p['Sgm']:.6g} 0.01 none 0 50
|
||||
3 Bfield_{run} {p['B']:.6g} 0.1 none 0 500
|
||||
4 Phi_{run} {p['Phi']:.6g} 0.1 none -360 360
|
||||
5 Alpha_{run} {p['A']:.6g} 0.01 none 0.5 1.5
|
||||
###############################################################
|
||||
THEORY
|
||||
asymmetry 1
|
||||
simpleGss 2
|
||||
TFieldCos 4 fun1
|
||||
###############################################################
|
||||
FUNCTIONS
|
||||
fun1 = gamma_mu * par3
|
||||
###############################################################
|
||||
GLOBAL
|
||||
fittype 2
|
||||
fit 0 8
|
||||
packing 100
|
||||
###############################################################
|
||||
RUN lem/his/2025/lem25_his_{run} MUE4 PSI MUSR-ROOT
|
||||
alpha 5
|
||||
forward 21 25
|
||||
backward 23 27
|
||||
###############################################################
|
||||
COMMANDS
|
||||
MINIMIZE
|
||||
HESSE
|
||||
SAVE
|
||||
###############################################################
|
||||
PLOT 2
|
||||
runs 1
|
||||
use_fit_ranges
|
||||
###############################################################
|
||||
STATISTIC
|
||||
chisq
|
||||
"""
|
||||
path = os.path.join(WORK, f"{run}_asy.msr")
|
||||
with open(path, "w") as fh:
|
||||
fh.write(text)
|
||||
return path
|
||||
|
||||
|
||||
def parse_params(msr_path):
|
||||
vals = {}
|
||||
inpar = False
|
||||
for line in open(msr_path):
|
||||
s = line.strip()
|
||||
if s.upper() == "FITPARAMETER":
|
||||
inpar = True
|
||||
continue
|
||||
if inpar:
|
||||
if s.startswith("#"):
|
||||
continue
|
||||
if re.match(r"^[A-Z]", s):
|
||||
break
|
||||
m = re.match(r"^(\d+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)", s)
|
||||
if not m:
|
||||
continue
|
||||
err = m.group(5)
|
||||
if err.lower() == "none":
|
||||
err = m.group(4)
|
||||
vals[m.group(2)] = (m.group(3), err)
|
||||
return vals
|
||||
|
||||
|
||||
def fit(run, seed):
|
||||
path = write_msr(run, seed)
|
||||
r = subprocess.run(["musrfit", path], env=ENV, capture_output=True, text=True, timeout=300)
|
||||
out = r.stdout + r.stderr
|
||||
if "SYNTAX ERROR" in out or "*ERROR*" in out:
|
||||
print(f"[{run}] FIT ERROR\n{out[-800:]}")
|
||||
return None
|
||||
m = re.search(r"chisq/NDF\s*=\s*([0-9.]+)", out)
|
||||
chisq = float(m.group(1)) if m else float("nan")
|
||||
vals = parse_params(path)
|
||||
def g(name):
|
||||
return float(vals[name][0])
|
||||
res = dict(
|
||||
run=run,
|
||||
Asy=g(f"Asy_{run}"), Sgm=g(f"Sgm_{run}"), B=g(f"Bfield_{run}"),
|
||||
Phi=g(f"Phi_{run}"), A=g(f"Alpha_{run}"), chisqred=chisq,
|
||||
AsyErr=float(vals[f"Asy_{run}"][1]), SgmErr=float(vals[f"Sgm_{run}"][1]),
|
||||
BErr=float(vals[f"Bfield_{run}"][1]),
|
||||
)
|
||||
print(f"[{run}] E={meta[run]['energy']:.2f} keV T={meta[run]['temp']:.1f}K "
|
||||
f"Asy={res['Asy']:.4f} Sgm={res['Sgm']:.4f} B={res['B']:.2f} "
|
||||
f"chi2/ndf={chisq:.3f}")
|
||||
return res
|
||||
|
||||
|
||||
seed = dict(Asy=0.15, Sgm=0.3, B=99.0, Phi=-30.0, A=1.0)
|
||||
results = {}
|
||||
for name, runs in sets.items():
|
||||
for run in runs:
|
||||
res = fit(run, seed)
|
||||
if res is None:
|
||||
continue
|
||||
results[run] = res
|
||||
seed = dict(Asy=max(0.01, res["Asy"]), Sgm=max(0.001, res["Sgm"]),
|
||||
B=res["B"], Phi=res["Phi"], A=res["A"])
|
||||
|
||||
print("fitted", len(results), "of 27")
|
||||
|
||||
# Build the msr2data column tables used by the documentation figure.
|
||||
for name, (r0, r1) in (("dataset1_3.8K.dat", (1014, 1027)),
|
||||
("dataset2_10K.dat", (1033, 1045))):
|
||||
out = os.path.join(WORK, name)
|
||||
if os.path.exists(out):
|
||||
os.remove(out)
|
||||
subprocess.run(["msr2data", str(r0), str(r1), "_asy", "data", "-o", out,
|
||||
"header", "new"], cwd=WORK, env=ENV, check=True)
|
||||
print("wrote datasets")
|
||||
@@ -0,0 +1,39 @@
|
||||
#include <TString.h>
|
||||
#include <TSystem.h>
|
||||
#include <TFile.h>
|
||||
#include <TFolder.h>
|
||||
#include <TObjArray.h>
|
||||
#include <TObjString.h>
|
||||
#include <TNamed.h>
|
||||
#include <TRegexp.h>
|
||||
TString fieldOf(TObjArray* info, const char* key) {
|
||||
for (int i=0;i<info->GetEntries();i++) {
|
||||
TString t = ((TObjString*)info->At(i))->GetString();
|
||||
TString k(key); k += ":";
|
||||
if (t.BeginsWith("#")||t.Contains(k)) {
|
||||
auto p = t.Index(':');
|
||||
if (p>=0 && t.Contains(k)) {
|
||||
TString v = t(p+1,999); v = v.Strip(TString::kBoth);
|
||||
v.ReplaceAll(" -@", "\t-@");
|
||||
auto q = v.Index("\t-@"); if (q>=0) v = v(0,q);
|
||||
return v;
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
void meta() {
|
||||
const char* runs[] = {"1014","1015","1016","1017","1018","1019","1020","1021","1022","1023","1024","1025","1026","1027",
|
||||
"1033","1034","1035","1036","1037","1038","1039","1040","1041","1042","1043","1044","1045"};
|
||||
for (auto r : runs) {
|
||||
TString fn = TString::Format("/mnt/backup/data/lem/his/2025/lem25_his_%s.root", r);
|
||||
if (gSystem->AccessPathName(fn)) { printf("%s\tMISSING\n", r); continue; }
|
||||
TFile f(fn);
|
||||
TFolder* rh = (TFolder*)f.Get("RunHeader");
|
||||
TObjArray* info = (TObjArray*)rh->FindObject("RunInfo");
|
||||
printf("%s\t%s\t%s\t%s\t%s\t%s\n",
|
||||
fieldOf(info,"Run Number").Data(), fieldOf(info,"Implantation Energy").Data(),
|
||||
fieldOf(info,"Sample Temperature").Data(), fieldOf(info,"Sample Magnetic Field").Data(),
|
||||
fieldOf(info,"Sample Name").Data(), fieldOf(info,"Run Title").Data());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
1014 0.963889122 keV 3.80 +- 0.01 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=3.78 K, E=0.96 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/11.79 kV, SR=-45.00
|
||||
1015 1.2635135651 keV 3.80 +- 0.01 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=3.80 K, E=1.26 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/11.49 kV, SR=-45.00
|
||||
1016 1.46347332 keV 3.80 +- 0.01 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=3.79 K, E=1.46 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/11.29 kV, SR=-45.00
|
||||
1017 1.962439537 keV 3.80 +- 0.01 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=3.82 K, E=1.96 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/10.79 kV, SR=-45.00
|
||||
1018 2.4620866776 keV 3.80 +- 0.01 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=3.78 K, E=2.46 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/10.29 kV, SR=-45.00
|
||||
1019 2.9614925385 keV 3.80 +- 0.01 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=3.78 K, E=2.96 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/9.79 kV, SR=-45.00
|
||||
1020 4.9594421387 keV 3.80 +- 0.01 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=3.81 K, E=4.96 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/7.80 kV, SR=-45.00
|
||||
1021 6.9570560455 keV 3.80 +- 0.01 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=3.79 K, E=6.96 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/5.80 kV, SR=-45.00
|
||||
1022 8.9550409317 keV 3.80 +- 0.01 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=3.81 K, E=8.95 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/3.80 kV, SR=-45.00
|
||||
1023 10.9522266388 keV 3.80 +- 0.01 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=3.81 K, E=10.95 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/1.80 kV, SR=-45.00
|
||||
1024 12.9585123062 keV 3.80 +- 0.01 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=3.80 K, E=12.96 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/-0.20 kV, SR=-45.00
|
||||
1025 15.0559406281 keV 3.80 +- 0.01 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=3.79 K, E=15.06 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/-2.30 kV, SR=-45.00
|
||||
1026 15.9553699493 keV 3.80 +- 0.01 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=3.79 K, E=15.95 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/-3.20 kV, SR=-45.00
|
||||
1027 17.9526615143 keV 3.80 +- 0.01 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=3.80 K, E=17.95 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/-5.20 kV, SR=-45.00
|
||||
1033 0.9639558792 keV 10.000 +- 0.007 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=9.99 K, E=0.96 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/11.79 kV, SR=-45.00
|
||||
1034 1.2633876801 keV 9.999 +- 0.007 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=9.99 K, E=1.26 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/11.49 kV, SR=-45.00
|
||||
1035 1.4634494781 keV 10.000 +- 0.008 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=10.01 K, E=1.46 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/11.29 kV, SR=-45.00
|
||||
1036 2.4619894028 keV 10.000 +- 0.008 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=10.00 K, E=2.46 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/10.29 kV, SR=-45.00
|
||||
1037 2.9615135193 keV 10.000 +- 0.008 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=10.00 K, E=2.96 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/9.79 kV, SR=-45.00
|
||||
1038 4.959423542 keV 10.000 +- 0.008 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=9.99 K, E=4.96 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/7.80 kV, SR=-45.00
|
||||
1039 6.957054615 keV 10.000 +- 0.007 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=10.01 K, E=6.96 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/5.80 kV, SR=-45.00
|
||||
1040 8.9549207687 keV 10.000 +- 0.007 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=10.00 K, E=8.95 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/3.80 kV, SR=-45.00
|
||||
1041 10.9523229599 keV 10.000 +- 0.007 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=10.02 K, E=10.95 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/1.80 kV, SR=-45.00
|
||||
1042 12.9584188461 keV 10.000 +- 0.007 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=10.00 K, E=12.96 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/-0.20 kV, SR=-45.00
|
||||
1043 15.0558547974 keV 10.001 +- 0.008 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=10.01 K, E=15.06 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/-2.30 kV, SR=-45.00
|
||||
1044 15.9552307129 keV 10.001 +- 0.007 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=10.00 K, E=15.96 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/-3.20 kV, SR=-45.00
|
||||
1045 17.9526748657 keV 10.000 +- 0.008 K 100 +- 0 G 85nm_Nb/Al2O3 85nm_Nb/Al2O3, T=10.01 K, E=17.95 keV, B=~100(G)/2.73(A), Tr/Sa=13.50/-5.20 kV, SR=-45.00
|
||||
|
@@ -0,0 +1,73 @@
|
||||
import os
|
||||
#!/usr/bin/env python3
|
||||
import numpy as np
|
||||
import matplotlib
|
||||
matplotlib.use("Agg")
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
def load(path):
|
||||
path = os.path.join(HERE, path)
|
||||
with open(path) as fh:
|
||||
lines = [l for l in fh.read().splitlines() if l.strip()]
|
||||
header = lines[0].split()
|
||||
rows = [l.split() for l in lines[1:]]
|
||||
arr = np.array(rows, dtype=float)
|
||||
cols = {name: i for i, name in enumerate(header)}
|
||||
return cols, arr
|
||||
|
||||
|
||||
def series(path, stem):
|
||||
cols, arr = load(path)
|
||||
e = arr[:, cols["dataE"]]
|
||||
val_key = next(k for k in cols if k.startswith(stem + "_") and k.endswith(tuple("0123456789")))
|
||||
err_key = next(k for k in cols if k.startswith(stem + "_") and k.endswith("PosErr"))
|
||||
return e, arr[:, cols[val_key]], arr[:, cols[err_key]]
|
||||
|
||||
|
||||
d1 = {s: series("dataset1_3.8K.dat", s) for s in ("Asy", "Sgm", "Bfield")}
|
||||
d2 = {s: series("dataset2_10K.dat", s) for s in ("Asy", "Sgm", "Bfield")}
|
||||
|
||||
BLUE = "#1f5fbf"
|
||||
RED = "#c62828"
|
||||
|
||||
panels = [
|
||||
("Bfield", r"Magnetic field $B$ (G)", "Magnetic field"),
|
||||
("Sgm", r"Gaussian relaxation $\sigma$ (MHz)", "Gaussian relaxation"),
|
||||
("Asy", r"Initial asymmetry $A_0$", "Initial asymmetry"),
|
||||
]
|
||||
|
||||
fig, axes = plt.subplots(1, 3, figsize=(12.6, 3.9))
|
||||
for ax, (stem, ylabel, title) in zip(axes, panels):
|
||||
for data, color, label in (
|
||||
(d1, BLUE, "3.8 K (superconducting)"),
|
||||
(d2, RED, "10 K (normal state)"),
|
||||
):
|
||||
e, v, err = data[stem]
|
||||
order = np.argsort(e)
|
||||
e, v, err = e[order], v[order], err[order]
|
||||
ax.errorbar(e, v, yerr=err, color=color, marker="o", ms=4.2,
|
||||
lw=1.5, capsize=2.5, elinewidth=1.0, mec="white",
|
||||
mew=0.5, label=label, zorder=3)
|
||||
ax.set_xlabel("Implantation energy (keV)")
|
||||
ax.set_ylabel(ylabel)
|
||||
ax.set_title(title, fontsize=11)
|
||||
ax.grid(True, color="0.85", lw=0.7)
|
||||
ax.set_axisbelow(True)
|
||||
for s in ("top", "right"):
|
||||
ax.spines[s].set_visible(False)
|
||||
|
||||
axes[0].set_ylim(93.5, 101.5)
|
||||
axes[1].set_ylim(0.36, 0.68)
|
||||
axes[2].set_ylim(0.09, 0.235)
|
||||
axes[0].legend(frameon=False, fontsize=9, loc="lower left")
|
||||
|
||||
fig.suptitle("LEM 2025 · 85 nm Nb/Al$_2$O$_3$ · Gaussian cosine fit · B ≈ 100 G",
|
||||
fontsize=11.5, y=0.985)
|
||||
fig.tight_layout(rect=(0, 0, 1, 0.95))
|
||||
fig.savefig(os.path.join(HERE, "result.png"), dpi=300)
|
||||
fig.savefig(os.path.join(HERE, "result.svg"))
|
||||
print("wrote result.png/.svg")
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 298 KiB |
File diff suppressed because it is too large.
Load diff
|
After Width: | Height: | Size: 120 KiB |
@@ -31,3 +31,22 @@ Build checks (from the repository root):
|
||||
Keep the diagrams illustrative: do not invent fitted curves or numerical
|
||||
results. Add real spectrum screenshots only with a verified fit and enough
|
||||
context to identify the data, model, and whether the plot is before or after fit.
|
||||
|
||||
Real-fit result figures
|
||||
-----------------------
|
||||
|
||||
`lem2025-energy-scan.png` (and its `.svg`) is a *real* fit result, not a UI
|
||||
screenshot: Gaussian-cosine fits of LEM 2025 runs 1014-1027 (3.8 K) and
|
||||
1033-1045 (10 K) on 85 nm Nb/Al2O3 at B ~ 100 G, plotting field, sigma, and
|
||||
initial asymmetry versus implantation energy with the two data sets overlaid
|
||||
in blue and red. It is referenced from `parameters-plots.rst`.
|
||||
|
||||
Refresh it from the reproducible example (requires musrfit, msr2data, ROOT,
|
||||
numpy, matplotlib and the 2025 LEM run files):
|
||||
|
||||
cd docs/examples/lem2025-energy-scan
|
||||
MUSRFLOW_DATA_ROOT=/path/to/data python3 fit_all.py
|
||||
python3 plot.py
|
||||
|
||||
All 27 fits converge (chi2/NDF ~ 0.9-2.1). Update the caption and
|
||||
`docs/examples/lem2025-energy-scan/README.md` if the data or model change.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 162 KiB |
@@ -212,6 +212,23 @@ Growing the layout clones the active panel, so expanding a ``1 x 1`` grid to
|
||||
removes that file from the active panel only; the file stays available in the
|
||||
list for other panels.
|
||||
|
||||
Worked example: energy scan at two temperatures
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. figure:: images/lem2025-energy-scan.png
|
||||
:alt: Fitted magnetic field, Gaussian relaxation rate and initial asymmetry versus implantation energy for 85 nm Nb/Al2O3 at 3.8 K (blue) and 10 K (red).
|
||||
:width: 100%
|
||||
|
||||
Real Gaussian-cosine fits of a LEM 2025 energy scan on 85 nm Nb/Al₂O₃ at
|
||||
B ≈ 100 G. Data set 1 (runs 1014–1027, 3.8 K, blue) is superconducting and
|
||||
its field is screened below the applied value; data set 2 (runs 1033–1045,
|
||||
10 K, red) is in the normal state with a flat field. **B**, **σ**, and
|
||||
**A₀** share one panel each, with the two scans overlaid in the same
|
||||
blue/red pairing the parameter-plot window gives to two overlaid
|
||||
``*.dat`` files. This is a fit result, not a screenshot of the application.
|
||||
The exact fits, run files, and reproduction scripts are in
|
||||
``docs/examples/lem2025-energy-scan``.
|
||||
|
||||
Editing trace styles
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Reference in new issue
Block a user