musrfit/doc/html/tutorial.html

455 lines
32 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Tutorial for musrfit &mdash; musrfit 1.7.4 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.7.4',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="top" title="musrfit 1.7.4 documentation" href="index.html" />
<link rel="next" title="User manual" href="user-manual.html" />
<link rel="prev" title="How to Cite musrfit?" href="cite.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="user-manual.html" title="User manual"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="cite.html" title="How to Cite musrfit?"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.7.4 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="tutorial-for-musrfit">
<span id="index-0"></span><h1>Tutorial for <tt class="docutils literal"><span class="pre">musrfit</span></tt><a class="headerlink" href="#tutorial-for-musrfit" title="Permalink to this headline"></a></h1>
<div class="section" id="single-histogram-fit-tutorial">
<h2>Single-histogram-fit tutorial<a class="headerlink" href="#single-histogram-fit-tutorial" title="Permalink to this headline"></a></h2>
<p>The μSR-data-analysis process using musrfit is based on so-called msr files. These files contain all
information needed for the analysis such as names of the data files, a theory function, fit and plot parameters,
and so on. It is the idea of this page to explain the basic use of an msr file and the different programs
of the <tt class="docutils literal"><span class="pre">musrfit</span></tt> suite using the example of a single-histogram fit to time-differential transverse-field
μSR data. For a complete description of all options please refer to the <a class="reference internal" href="user-manual.html#user-manual"><em>manual</em></a>.</p>
<p>The example deals with a diamagnetic sample that has been measured in an applied field of approximately 150 G in
the <a class="reference external" href="https://www.psi.ch/smus/gps">GPS spectrometer</a> at <a class="reference external" href="https://www.psi.ch">PSI</a> using the &#8220;transverse geometry&#8221;.
In this geometry the muon spin is rotated about 50° up and the field is applied parallel to the muon momentum.
Hence, the relevant positron counters (to detect the spin precession) are placed above (histogram 3), below (histogram 4) and right of (histogram 5) the sample. The run numbers start from 3110.</p>
<p>To analyze these data (in a simple way) one starts out from the msr file <tt class="docutils literal"><span class="pre">3110_tutorial.msr</span></tt> provided together
with the source-code distribution in the sub-directory <tt class="docutils literal"><span class="pre">doc/examples/</span></tt>. This ASCII file can be edited using any
text editor. For convenience the editor <tt class="docutils literal"><span class="pre">musredit</span></tt> is provided which offer some msr-file-specific functionalities
and additionally serve as front ends to the underlying programs. In the following it is assumed that the file is
open within <tt class="docutils literal"><span class="pre">musredit</span></tt>.</p>
<div class="section" id="the-msr-file">
<h3>The msr file<a class="headerlink" href="#the-msr-file" title="Permalink to this headline"></a></h3>
<p>The msr file itself is divided into different blocks; a full description of the format can be found <a class="reference internal" href="user-manual.html#msr-file-format"><em>here</em></a>.
In the file <tt class="docutils literal"><span class="pre">3110_tutorial.msr</span></tt> these blocks are successively:</p>
<p><a class="reference internal" href="user-manual.html#msr-title-block"><em>The title</em></a></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>sample XYZ
</pre></div>
</div>
<p>A descriptive title of the file.</p>
<p><a class="reference internal" href="user-manual.html#msr-fitparameter-block"><em>The FITPARAMETER block</em></a></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>FITPARAMETER
# No Name Value Step Pos_Error Boundaries
1 NormUp 4500 5 none 0 none
2 BgUp 200 1 none 0 none
3 PhaseUp 15 1 none
4 NormDown 4500 5 none 0 none
5 BgDown 200 1 none 0 none
6 PhaseDown 195 1 none
7 NormRight 600 5 none 0 none
8 BgRight 40 1 none 0 none
9 PhaseRight 285 1 none
10 AsymSig1 0.17 0.01 none 0 0.33
11 RateSig1 2.5 0.1 none 0 none
12 FieldSig1 100 1 none
13 AsymSig2 0.02 0.01 none 0 0.33
14 RateSig2 0.5 0.1 none
15 FieldSig2 150 1 none
</pre></div>
</div>
<p>The list of parameters used in the theory function to describe the set of data.
Each parameter has a number, a name, an initial value and an initial step (for
the fitting process). If a parameter should be fixed, the initial step is set
to 0. After a fit (see below), this block contains the determined parameter values
and uncertainties (in the <tt class="docutils literal"><span class="pre">Step</span></tt> column). If asymmetric errors are determined, these
will be listed in the <tt class="docutils literal"><span class="pre">Step</span></tt> column (negative) and the <tt class="docutils literal"><span class="pre">Pos_Error</span></tt> column (positive).
Optionally, lower and upper boundaries for the parameters can be specified as
shown above.</p>
<p>The meaning of the parameters above is explained in the following:</p>
<p>Since a <a class="reference internal" href="user-manual.html#single-histogram-fit"><em>single-histogram fit</em></a> should be done, some
histogram-specific parameters are needed. These are a normalization constant (parameter 1),
a parameter describing the background of uncorrelated events (parameter 2) and the initial
phase of the spin precession with respect to the detector (parameter 3). As stated above,
there are three histograms containing useful information (&#8220;Up&#8221;, &#8220;Down&#8221;, &#8220;Right&#8221;); hence,
this set of parameters has to be present for each of them (parameters 19).
The remaining parameters are used to model the decay asymmetry which is assumed to be equal
for all histograms. In this example one has two signals (<em>e.g.</em> from the sample and the
sample holder), each with an amplitude (parameters 10 and 13), a depolarization rate
(parameters 11 and 14) and a mean field (here given in Gauss, parameters 12 and 15).</p>
<p><a class="reference internal" href="user-manual.html#msr-theory-block"><em>The THEORY block</em></a></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>THEORY
asymmetry 10
simplExpo 11 (rate)
TFieldCos map1 fun1 (phase frequency)
+
asymmetry 13
simpleGss 14 (rate)
TFieldCos map1 fun2 (phase frequency)
</pre></div>
</div>
<p>The THEORY block is used to define a fit-parameter-dependent theory function used to model
the decay asymmetry. Different <a class="reference internal" href="user-manual.html#msr-theory-block"><em>predefined</em></a> and <a class="reference internal" href="user-manual.html#id38"><em>user-defined</em></a>
functions can be combined here. Theory lines following each other are <em>multiplied</em> and the <strong>+</strong> sign
is used to add different (here: two) signal contributions. The numbers are the parameter numbers
according to the <tt class="docutils literal"><span class="pre">FITPARAMETER</span> <span class="pre">block</span></tt>. <tt class="docutils literal"><span class="pre">map</span></tt> and <tt class="docutils literal"><span class="pre">fun</span></tt> are used to refer to
histogram-dependent parameters and to interrelate fit parameters, respectively (see below).</p>
<p><a class="reference internal" href="user-manual.html#msr-functions-block"><em>The FUNCTIONS block</em></a></p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">FUNCTIONS</span>
<span class="n">fun1</span> <span class="o">=</span> <span class="n">gamma_mu</span> <span class="o">*</span> <span class="n">par12</span>
<span class="n">fun2</span> <span class="o">=</span> <span class="n">gamma_mu</span> <span class="o">*</span> <span class="n">par15</span>
</pre></div>
</div>
<p>Here functions interrelating different fit parameters and predefined constants can be defined for
the use in the <tt class="docutils literal"><span class="pre">THEORY</span> <span class="pre">block</span></tt>. In the example, the functions are used to calculate the
muon-spin-precession frequencies for the given fields [<span class="math">\(\nu = \gamma_\mu B / (2\pi)\)</span>]. One
function is used for each signal. Altogether, the theory function defined above is
<span class="math">\(A(t) = p_{10} e^{-p_{11} t} \cos(\varphi_i \pi/180 + \gamma_\mu p_{12} t) + p_{13} e^{-(p_{14} t)^2/2} \cos(\varphi_i \pi/180 + \gamma_\mu p_{15} t)\)</span>, where the <em>p</em> are the parameters in the <tt class="docutils literal"><span class="pre">FITPARAMETER</span> <span class="pre">block</span></tt> and <span class="math">\(\varphi_i = p_3, p_6, p_9\)</span>
depending on the histogram as shall be seen later.</p>
<p><a class="reference internal" href="user-manual.html#msr-run-block"><em>The RUN block</em></a></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>RUN data/deltat_pta_gps_3110 PIM3 PSI PSI-BIN (name beamline institute data-file-format)
fittype 0 (single histogram fit)
norm 1
backgr.fit 2
map 3 0 0 0 0 0 0 0 0 0
forward 3
data 1 8000
t0 1
fit 0 4.9
packing 20
</pre></div>
</div>
<p>The RUN blocks are used to collect information on the data to be analyzed. Specifically, these are:</p>
<blockquote>
<div><div class="highlight-python"><div class="highlight"><pre><span></span>RUN data/deltat_pta_gps_3110 PIM3 PSI PSI-BIN (name beamline institute data-file-format)
</pre></div>
</div>
<p>The path to the data file and the file format (NEXUS, ROOT-NPP, ROOT-PPC, PSI-BIN, PSI-MDU, WKM, MUD, MDU-ASCII).</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>fittype 0 (single histogram fit)
</pre></div>
</div>
<p>the fit type (0 = single-histogram fit)</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>norm 1
</pre></div>
</div>
<p>the number of the fit parameter representing the normalization constant</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>backgr.fit 2
</pre></div>
</div>
<p>the number of the fit parameter representing the background</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>map 3 0 0 0 0 0 0 0 0 0
</pre></div>
</div>
<p>the definition of the <strong>maps</strong> used in the <tt class="docutils literal"><span class="pre">THEORY</span> <span class="pre">block</span></tt> — RUN-block-specific
parameters are given here; in this example, <strong>map1</strong> is substituted by <strong>parameter 3</strong>
in the <tt class="docutils literal"><span class="pre">THEORY</span> <span class="pre">block</span></tt> for this RUN block and <strong>map2</strong>, <strong>map3</strong>, and so on are undefined.</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>forward 3
</pre></div>
</div>
<p>the histogram number; in this example 3 corresponds to the histogram of the &#8220;Up&#8221; positron counter</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>data 1 8000
</pre></div>
</div>
<p>start and end bins of the range containing useful data in the histogram (to be adjusted, <em>e.g.</em> by using <tt class="docutils literal"><span class="pre">musrt0</span></tt>, see below)</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>t0 1
</pre></div>
</div>
<p>histogram bin corresponding to the time zero (muon implantation time) (to be adjusted, <em>e.g.</em> by <tt class="docutils literal"><span class="pre">musrt0</span></tt>, see below)</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>fit 0 4.9
</pre></div>
</div>
<p>start and end times (in μs) defining the fit range. <em>In case the fit range
exceeds the range of useful data (specified above using the data tag), eventually
this data range is used as fit range.</em></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>packing 20
</pre></div>
</div>
<p>the packing of the histograms (in histogram bins)</p>
<p>Since the data of three histograms is to be analyzed, the file contains not only one but
three RUN blocks — each defining the histogram-specific information following the example given above.</p>
</div></blockquote>
<p><a class="reference internal" href="user-manual.html#msr-commands-block"><em>The COMMAND block</em></a></p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">COMMANDS</span>
<span class="n">MINIMIZE</span>
<span class="n">MINOS</span>
<span class="n">SAVE</span>
</pre></div>
</div>
<p>In the <tt class="docutils literal"><span class="pre">COMMANDS</span> <span class="pre">block</span></tt>, a sequence of operations that should be performed is defined.
Here, the requested operations are the minimization of <span class="math">\(\chi^2\)</span> (MINIMIZE), the
calculation of <em>asymmetric errors</em> (MINOS) as well as saving the found parameter values
and uncertainties to the msr file (SAVE). A full description of the possible commands can
be found <a class="reference internal" href="user-manual.html#msr-commands-block"><em>here</em></a>.</p>
<p><a class="reference internal" href="user-manual.html#msr-fourier-block"><em>The FOURIER block</em></a></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>FOURIER
units Gauss # units either &#39;Gauss&#39;, &#39;MHz&#39;, or &#39;Mc/s&#39;
fourier_power 10
apodization WEAK # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE
phase par3
range 0.0 600.0
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">FOURIER</span> <span class="pre">block</span></tt> is used to define basic settings for the Fourier transform available
in <a class="reference internal" href="user-manual.html#musrview"><em>musrview</em></a>. These are:</p>
<blockquote>
<div><div class="highlight-python"><div class="highlight"><pre><span></span>units Gauss # units either &#39;Gauss&#39;, &#39;MHz&#39;, or &#39;Mc/s&#39;
</pre></div>
</div>
<p>the units of the Fourier domain</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>fourier_power 10
</pre></div>
</div>
<p>the number of data points used for the discrete transform, here <span class="math">\(2^{10}=1024\)</span>.</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>apodization WEAK # NONE, WEAK, MEDIUM, STRONG
</pre></div>
</div>
<p>the <a class="reference internal" href="user-manual.html#msr-fourier-block-apodization"><em>apodization</em></a> to be used</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE
</pre></div>
</div>
<p>what should be plotted (real part, imaginary part, and so on)</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>phase par3
</pre></div>
</div>
<p>the initial phase of the input data is given here in degrees. Optionally, a phase parameter
from the <tt class="docutils literal"><span class="pre">FITPARAMETER</span> <span class="pre">block</span></tt> can be given, here <strong>par3</strong> takes the value of <strong>parameter 3</strong>.</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>range 0.0 600.0
</pre></div>
</div>
<p>the start and end points of the range of the Fourier transform in the units specified above</p>
</div></blockquote>
<p><a class="reference internal" href="user-manual.html#msr-plot-block"><em>The PLOT block</em></a></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>PLOT 0 (single histo plot)
runs 1 2
range 0 4 -0.2 0.2
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">PLOT</span> <span class="pre">block</span></tt> defines which data (corresponding to the given RUN blocks) is plotted when
<a class="reference internal" href="user-manual.html#musrview"><em>musrview</em></a> is called. In the given example, a canvas would be drawn containing
the (life-time-corrected) data of the first two <tt class="docutils literal"><span class="pre">RUN</span> <span class="pre">blocks</span></tt> (&#8220;Up&#8221; and &#8220;Down&#8221; positron counters).
The abscissa would range from 0 to 4 μs, the axis of ordinates from -0.2 to 0.2.
It is possible to define more than one <tt class="docutils literal"><span class="pre">PLOT</span> <span class="pre">block</span></tt>. Each <tt class="docutils literal"><span class="pre">PLOT</span> <span class="pre">block</span></tt> corresponds to a
separate canvas. Therefore, the second <tt class="docutils literal"><span class="pre">PLOT</span> <span class="pre">block</span></tt> in the file</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>PLOT 0 (single histo plot)
runs 3
use_fit_ranges
</pre></div>
</div>
<p>produces an additional window containing the (not life-time-corrected) data of the third <tt class="docutils literal"><span class="pre">RUN</span> <span class="pre">block</span></tt>
(&#8220;Right&#8221; positron counter). The abscissa ranges from 0 to 4.9 μs (according to the fit range given
in the <tt class="docutils literal"><span class="pre">RUN</span> <span class="pre">block</span></tt>).</p>
<p><a class="reference internal" href="user-manual.html#msr-statistic-block"><em>The STATISTIC block</em></a></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>STATISTIC --- 2011-07-09 10:58:44
chisq = 1348.1764, NDF = 1146, chisq/NDF = 1.176419
</pre></div>
</div>
<p>This block is the last block of a msr file. It contains some information on the fit: the
date and time as well as the absolute and normalized values of <span class="math">\(\chi^2\)</span> and the
number of degrees of freedom in the fit.
These information only have a meaning if the fitting procedure has been executed at
least once and the fit has converged!</p>
</div>
<div class="section" id="determine-t0-and-the-data-range-using-musrt0">
<h3>Determine t0 and the data range using musrt0<a class="headerlink" href="#determine-t0-and-the-data-range-using-musrt0" title="Permalink to this headline"></a></h3>
<p>Before the given model can be fitted to the data, the data ranges and time zeros of the different
<tt class="docutils literal"><span class="pre">RUN</span> <span class="pre">blocks</span></tt> have to be set correctly. This can be achieved using <a class="reference internal" href="user-manual.html#musrt0"><em>musrt0</em></a>.
Starting this program by selecting the <tt class="docutils literal"><span class="pre">musrt0</span></tt> button in <tt class="docutils literal"><span class="pre">musredit</span></tt> or calling from a terminal</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ musrt0 3110_tutorial.msr
</pre></div>
</div>
<p>opens an interactive window plotting the data of the first RUN block:</p>
<img alt="_images/tutorial-musrt0-1.png" src="_images/tutorial-musrt0-1.png" />
<p>The green line (at bin 1) represents time zero, the blue lines the start (at bin 1) and end (at bin 8000)
of the data range and the optional red lines give the limits of the background range (if the background
shall not be determined by the fit). All lines can be either dragged to reasonable locations or set by
pressing the corresponding keyboard shortcuts. In the example the time zero can be set by pressing <strong>T</strong>
(which moves the green line to the bin containing the maximum number of counts), the start of the data
range should be set to about five bins later by zooming into the graph around bin 250 and pressing <strong>d</strong>
when the cursor is found at a suitable location:</p>
<img alt="_images/tutorial-musrt0-2.png" src="_images/tutorial-musrt0-2.png" />
<p>After all lines have been adjusted for the first histogram, one can go on to the second by pressing <strong>q</strong>.
This procedure is repeated until all ranges have been set correctly. When finished with the last histogram
the new t0 and data-range values will be written to the msr file. A full description of <tt class="docutils literal"><span class="pre">musrt0</span></tt> can be
found <a class="reference internal" href="user-manual.html#musrt0"><em>here</em></a>.</p>
</div>
<div class="section" id="fit-the-model-to-the-data-using-musrfit">
<h3>Fit the model to the data using <tt class="docutils literal"><span class="pre">musrfit</span></tt><a class="headerlink" href="#fit-the-model-to-the-data-using-musrfit" title="Permalink to this headline"></a></h3>
<p>Now that the basics of the msr file have been introduced and the necessary adjustments have been done one
can proceed with fitting the specified model to the data. This is done by selecting the <tt class="docutils literal"><span class="pre">musrfit</span></tt> icon
in <tt class="docutils literal"><span class="pre">musredit</span></tt> or calling from a terminal</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ musrfit 3110_tutorial.msr
</pre></div>
</div>
<p>After the fitting procedure has finished the msr file is updated and contains the newly determined values
of the fit parameters.</p>
</div>
<div class="section" id="view-the-data-and-the-fit-using-musrview">
<h3>View the data and the fit using <tt class="docutils literal"><span class="pre">musrview</span></tt><a class="headerlink" href="#view-the-data-and-the-fit-using-musrview" title="Permalink to this headline"></a></h3>
<p>The data and the corresponding fit can be visualized by choosing the <tt class="docutils literal"><span class="pre">musrview</span></tt> icon in <tt class="docutils literal"><span class="pre">musredit</span></tt> or
calling from a terminal</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ musrview 3110_tutorial.msr
</pre></div>
</div>
<p>This creates the windows according to the given PLOT blocks in the msr file:</p>
<img alt="_images/tutorial-musrview-1.png" src="_images/tutorial-musrview-1.png" />
<p>The basic features of <tt class="docutils literal"><span class="pre">musrview</span></tt> can be found in the <tt class="docutils literal"><span class="pre">Musrfit</span> <span class="pre">menu</span></tt>. They include:</p>
<ul class="simple">
<li>export the shown data and the model to an ASCII file with comma-separated values</li>
<li>presenting the difference between the shown data and the model (keyboard shortcut: <strong>d</strong>)</li>
<li>calculate and show the Fourier transform of the shown data (keyboard shortcut: <strong>f</strong>), <em>e.g.</em> for
the asymmetry of the &#8220;Up&#8221; and &#8220;Down&#8221; detectors:</li>
</ul>
<img alt="_images/tutorial-musrview-FT.png" src="_images/tutorial-musrview-FT.png" />
</div>
<div class="section" id="process-multiple-msr-files-using-msr2data">
<h3>Process multiple msr files using <tt class="docutils literal"><span class="pre">msr2data</span></tt><a class="headerlink" href="#process-multiple-msr-files-using-msr2data" title="Permalink to this headline"></a></h3>
<p>This short introduction is concluded by calling attention to the program <a class="reference internal" href="msr2data.html#msr2data"><em>msr2data</em></a>.
As the name indicates the main purpose of this program is to extract the <tt class="docutils literal"><span class="pre">FITPARAMETER</span></tt> block
information from multiple msr files with the same structure and to summarize them in a single
ASCII file (either in <tt class="docutils literal"><span class="pre">TRIUMF</span> <span class="pre">DB</span></tt> format or simple columns). However, as described in detail
in the manual, it is not only possible to collect data from msr files but also to create new
msr files from a template and to process these files using <tt class="docutils literal"><span class="pre">musrfit</span></tt> on the fly.</p>
<p>Assuming the successive runs <strong>3111</strong> through <strong>3114</strong> can be analyzed using the same model introduced
above for run <strong>3110</strong> (<em>e.g.</em> in the case one has done measurements at different temperatures) one can
use the file <tt class="docutils literal"><span class="pre">3110_tutorial.msr</span></tt> as template, generate the files <tt class="docutils literal"><span class="pre">3111_tutorial.msr</span></tt> through
<tt class="docutils literal"><span class="pre">3114_tutorial.msr</span></tt> with the corresponding updates in the RUN blocks, call for each one <tt class="docutils literal"><span class="pre">musrfit</span></tt>
and finally summarize the FITPARAMETER block information of all processed files in an ASCII output
file <tt class="docutils literal"><span class="pre">tutorial-T-dependence.dat</span></tt> (simple columns). If further information on the temperature or the
applied field is available in the data files these will be included as well in the resulting ASCII file.
From the terminal this would be done as follows:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ msr2data <span class="m">3110</span> <span class="m">3114</span> _tutorial fit-3110 -o tutorial-T-dependence.dat data
</pre></div>
</div>
<p>To achieve the same in <tt class="docutils literal"><span class="pre">musredit</span></tt> (in this snapshot in the <em>dark theme</em>) one selects the <tt class="docutils literal"><span class="pre">msr2data</span></tt> icon and fills the form accordingly:</p>
<img alt="_images/tutorial-musredit-msr2data.png" src="_images/tutorial-musredit-msr2data.png" />
</div>
<div class="section" id="further-reading">
<h3>Further reading<a class="headerlink" href="#further-reading" title="Permalink to this headline"></a></h3>
<p>This page only summarizes the very basic features and options of the programs contained in the <tt class="docutils literal"><span class="pre">musrfit</span></tt> suite.
For a complete description please refer to the manuals of <a class="reference internal" href="user-manual.html#musrfit"><em>musrfit</em></a> (including <a class="reference internal" href="user-manual.html#musrview"><em>musrview</em></a>,
<a class="reference internal" href="user-manual.html#musrt0"><em>musrt0</em></a>, and <a class="reference internal" href="user-manual.html#musrft"><em>musrFT</em></a>), <a class="reference internal" href="mupp.html#mupp"><em>mupp</em></a>, <a class="reference internal" href="musredit.html#musredit-sec"><em>musredit</em></a>, and <a class="reference internal" href="msr2data.html#msr2data"><em>msr2data</em></a>.</p>
</div>
</div>
<div class="section" id="asymmtery-fit-tutorial">
<h2>Asymmtery-fit tutorial<a class="headerlink" href="#asymmtery-fit-tutorial" title="Permalink to this headline"></a></h2>
<p>to be written yet.</p>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Tutorial for <tt class="docutils literal"><span class="pre">musrfit</span></tt></a><ul>
<li><a class="reference internal" href="#single-histogram-fit-tutorial">Single-histogram-fit tutorial</a><ul>
<li><a class="reference internal" href="#the-msr-file">The msr file</a></li>
<li><a class="reference internal" href="#determine-t0-and-the-data-range-using-musrt0">Determine t0 and the data range using musrt0</a></li>
<li><a class="reference internal" href="#fit-the-model-to-the-data-using-musrfit">Fit the model to the data using <tt class="docutils literal"><span class="pre">musrfit</span></tt></a></li>
<li><a class="reference internal" href="#view-the-data-and-the-fit-using-musrview">View the data and the fit using <tt class="docutils literal"><span class="pre">musrview</span></tt></a></li>
<li><a class="reference internal" href="#process-multiple-msr-files-using-msr2data">Process multiple msr files using <tt class="docutils literal"><span class="pre">msr2data</span></tt></a></li>
<li><a class="reference internal" href="#further-reading">Further reading</a></li>
</ul>
</li>
<li><a class="reference internal" href="#asymmtery-fit-tutorial">Asymmtery-fit tutorial</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="cite.html"
title="previous chapter">How to Cite <tt class="docutils literal"><span class="pre">musrfit</span></tt>?</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="user-manual.html"
title="next chapter">User manual</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/tutorial.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="user-manual.html" title="User manual"
>next</a> |</li>
<li class="right" >
<a href="cite.html" title="How to Cite musrfit?"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.7.4 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2021, Andreas Suter.
Last updated on Apr 09, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>
</html>