musrfit/doc/html/mupp.html

240 lines
20 KiB
HTML

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>mupp - μSR Parameter Plotter &#8212; musrfit 1.5.2 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" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></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="_static/language_data.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files" href="msr2data.html" />
<link rel="prev" title="musredit: the GUI Based Interface to musrfit" href="musredit.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<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="msr2data.html" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="musredit.html" title="musredit: the GUI Based Interface to musrfit"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">musrfit 1.5.2 documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="mupp-mgrsr-parameter-plotter">
<span id="mupp"></span><span id="index-0"></span><h1>mupp - μSR Parameter Plotter<a class="headerlink" href="#mupp-mgrsr-parameter-plotter" title="Permalink to this headline"></a></h1>
<p><code class="docutils literal notranslate"><span class="pre">mupp</span></code> is a little helper program which allows to quickly plot a collection of msr-file parameters,
as for instance generated by <a class="reference internal" href="msr2data.html#msr2data"><span class="std std-ref">msr2data</span></a>. It can handle <code class="docutils literal notranslate"><span class="pre">db</span></code>- and <code class="docutils literal notranslate"><span class="pre">dat</span></code>-files.
Also a collection of <code class="docutils literal notranslate"><span class="pre">msr</span></code>-files can be invoked. <code class="docutils literal notranslate"><span class="pre">mupp</span></code> is heavily inspired by μView (see
<a class="reference external" href="http://musr.org/muview/">here</a>).</p>
<p><code class="docutils literal notranslate"><span class="pre">mupp</span></code> can be operated from within as graphical user interface or via a command line scripting interface.
The <code class="docutils literal notranslate"><span class="pre">mupp</span></code> GUI can be invoked either directly from the command line or from within <a class="reference internal" href="musredit.html#musredit-sec"><span class="std std-ref">musredit</span></a>.</p>
<div class="section" id="the-graphical-user-interface">
<span id="index-1"></span><h2>The Graphical User Interface<a class="headerlink" href="#the-graphical-user-interface" title="Permalink to this headline"></a></h2>
<p>A typical setting could look like this</p>
<img alt="_images/mupp-gui-0.svg" src="_images/mupp-gui-0.svg" /><ol class="arabic">
<li><p>shows the list of loaded collections. A collection is defined as <code class="docutils literal notranslate"><span class="pre">db</span></code>- or <code class="docutils literal notranslate"><span class="pre">dat</span></code>-file (typically the
output from <a class="reference internal" href="msr2data.html#msr2data"><span class="std std-ref">msr2data</span></a>). If you call the open-dialog and select a collection of
<code class="docutils literal notranslate"><span class="pre">msr</span></code>-files, <code class="docutils literal notranslate"><span class="pre">mupp</span></code> will call <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> and tries to generate a collection on-the-fly.</p></li>
<li><p>in this list, the data-tags of the currently selected collection is presented. The data-tags can be
directly dragged over to the <code class="docutils literal notranslate"><span class="pre">x</span></code>- and <code class="docutils literal notranslate"><span class="pre">y</span></code>-axis list. Another way is to select the data-tag
wished and click <code class="docutils literal notranslate"><span class="pre">add</span> <span class="pre">X</span></code> to add the selected data-tag to the <code class="docutils literal notranslate"><span class="pre">x</span></code>-axis list. Analogous it is done
for the <code class="docutils literal notranslate"><span class="pre">y</span></code>-axis.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">x</span></code>-axis list. The labels are followed by <code class="docutils literal notranslate"><span class="pre">(-X-)</span></code> where the number <code class="docutils literal notranslate"><span class="pre">X</span></code> corresponds to the
selection it corresponds to. The numbering of the collection is as given in the collection list.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">y</span></code>-axis list. The labels are followed by <code class="docutils literal notranslate"><span class="pre">(-X-)</span></code> where the number <code class="docutils literal notranslate"><span class="pre">X</span></code> corresponds to the
selection it corresponds to. The numbering of the collection is as given in the collection list.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">add</span> <span class="pre">X</span></code> allows to add the currently selected data-tag to the <code class="docutils literal notranslate"><span class="pre">x</span></code>-axis list.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">add</span> <span class="pre">Y</span></code> allows to add the currently selected data-tag to the <code class="docutils literal notranslate"><span class="pre">y</span></code>-axis list.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">remove</span> <span class="pre">X</span></code> will remove the selected <code class="docutils literal notranslate"><span class="pre">x</span></code>-axis tag.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">remove</span> <span class="pre">Y</span></code> will remove the selected <code class="docutils literal notranslate"><span class="pre">y</span></code>-axis tag.</p></li>
<li><p>Often one would like to compare trends of different settings. In the above example each collections
holds an energy scans for a given temperature. Each collection is measured at a different temperature.
Now, instead of adding <code class="docutils literal notranslate"><span class="pre">x</span></code>- and <code class="docutils literal notranslate"><span class="pre">y</span></code>-axis tags for each collection, you can do the following:
you add <code class="docutils literal notranslate"><span class="pre">x</span></code>- and <code class="docutils literal notranslate"><span class="pre">y</span></code>-axis data-tags for the first collection. Afterwards you select all the other
collections of interest and click on <code class="docutils literal notranslate"><span class="pre">Add</span> <span class="pre">Ditto</span></code>. <code class="docutils literal notranslate"><span class="pre">mupp</span></code> will then add the corresponding
<code class="docutils literal notranslate"><span class="pre">x</span></code>- and <code class="docutils literal notranslate"><span class="pre">y</span></code>-axis data-tags accordingly. This is less error prone and quicker!</p></li>
<li><p>Clicking the <code class="docutils literal notranslate"><span class="pre">Plot</span></code> button will invoke <code class="docutils literal notranslate"><span class="pre">mupp_plot</span></code> (a <code class="docutils literal notranslate"><span class="pre">ROOT</span></code> based application) which will
present the data, as shown here</p>
<a class="reference internal image-reference" href="_images/mupp-plot-0.svg"><img alt="_images/mupp-plot-0.svg" height="600px" src="_images/mupp-plot-0.svg" /></a>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">Remove</span> <span class="pre">Collection</span></code>: will remove the selected collection</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Refresh</span> <span class="pre">Collection</span></code>: will reload the collection (<code class="docutils literal notranslate"><span class="pre">db</span></code>- or <code class="docutils literal notranslate"><span class="pre">dat</span></code>-file). This is often useful
during beamtime where the collection is growing run-by-run.</p></li>
<li><p>This is the script command line. Currently it allows to perform the tasks without mouse gambling.
In the future much more commands are planed. See the <code class="docutils literal notranslate"><span class="pre">Help</span> <span class="pre">/</span> <span class="pre">Cmd's</span></code> for the currently available
commands.</p></li>
</ol>
</div>
<div class="section" id="the-scripting-interface">
<span id="index-2"></span><h2>The Scripting Interface<a class="headerlink" href="#the-scripting-interface" title="Permalink to this headline"></a></h2>
<p><code class="docutils literal notranslate"><span class="pre">mupp</span></code> can also be operated in a scripting like manner. The use cases are plot updates during run time,
or web-based interaction which requests figures. A script is invoked by the command line option <code class="docutils literal notranslate"><span class="pre">-s</span></code> (see
<a class="reference internal" href="#mupp-usage"><span class="std std-ref">mupp command line summary</span></a>. Currently the following scripting commands are available:</p>
<dl class="simple">
<dt><strong>loadPath &lt;dir&gt;</strong></dt><dd><p>set the load path to <code class="docutils literal notranslate"><span class="pre">&lt;dir&gt;</span></code>. Bash variables like $HOME are accepted. This is the path where to look for collection files (<code class="docutils literal notranslate"><span class="pre">db</span></code>- and <code class="docutils literal notranslate"><span class="pre">dat</span></code>-files).</p>
</dd>
<dt><strong>load &lt;coll&gt;</strong></dt><dd><p>will load the collection <code class="docutils literal notranslate"><span class="pre">&lt;coll&gt;</span></code>.</p>
</dd>
<dt><strong>selectAll</strong></dt><dd><p>will select all loaded collections. This means every plot of variable x/y will be carried out to <em>ALL</em> collections.</p>
</dd>
<dt><strong>select &lt;nn&gt;</strong></dt><dd><p>selects collection <code class="docutils literal notranslate"><span class="pre">&lt;nn&gt;</span></code>, where <code class="docutils literal notranslate"><span class="pre">&lt;nn&gt;</span></code> is either the <em>number</em> of the collections, or its <em>name</em>, <em>e.g.</em>
select YBCO-40nm-T5K-FC150mT-Escan.db.</p>
</dd>
<dt><strong>addX &lt;label&gt;</strong></dt><dd><p>add <code class="docutils literal notranslate"><span class="pre">&lt;label&gt;</span></code> as a <em>x</em>-variable. Only <em>one</em> is allowed.</p>
</dd>
<dt><strong>addY &lt;label(s)&gt;</strong></dt><dd><p>add <code class="docutils literal notranslate"><span class="pre">&lt;label(s)&gt;</span></code> as <em>y</em>-variable. <em>Multiple</em> labels are possible.</p>
</dd>
<dt><strong>savePath &lt;dir&gt;</strong></dt><dd><p>set the save path to <code class="docutils literal notranslate"><span class="pre">&lt;dir&gt;</span></code>. The place where the macros, and/or the plot output will be saved.</p>
</dd>
<dt><strong>plot &lt;fln&gt;</strong></dt><dd><p>where <code class="docutils literal notranslate"><span class="pre">&lt;fln&gt;</span></code> is the file name with extension under which the plot should be saved.</p>
</dd>
<dt><strong>macro &lt;fln&gt;</strong></dt><dd><p>where <code class="docutils literal notranslate"><span class="pre">&lt;fln&gt;</span></code> is the file name under which the root macro should be saved.</p>
</dd>
</dl>
<p>An example script file <code class="docutils literal notranslate"><span class="pre">field-vs-energy.txt</span></code> might look like this:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># This is a comment</span>
<span class="n">loadPath</span> <span class="o">./</span>
<span class="n">load</span> <span class="n">YBCO</span><span class="o">-</span><span class="mi">40</span><span class="n">nm</span><span class="o">-</span><span class="n">T5K</span><span class="o">-</span><span class="n">FC150mT</span><span class="o">-</span><span class="n">Escan</span><span class="o">.</span><span class="n">db</span>
<span class="n">load</span> <span class="n">YBCO</span><span class="o">-</span><span class="mi">40</span><span class="n">nm</span><span class="o">-</span><span class="n">T30K</span><span class="o">-</span><span class="n">FC150mT</span><span class="o">-</span><span class="n">Escan</span><span class="o">.</span><span class="n">db</span>
<span class="n">load</span> <span class="n">YBCO</span><span class="o">-</span><span class="mi">40</span><span class="n">nm</span><span class="o">-</span><span class="n">T60K</span><span class="o">-</span><span class="n">FC150mT</span><span class="o">-</span><span class="n">Escan</span><span class="o">.</span><span class="n">db</span>
<span class="n">load</span> <span class="n">YBCO</span><span class="o">-</span><span class="mi">40</span><span class="n">nm</span><span class="o">-</span><span class="n">T120K</span><span class="o">-</span><span class="n">FC150mT</span><span class="o">-</span><span class="n">Escan</span><span class="o">.</span><span class="n">db</span>
<span class="n">selectAll</span>
<span class="n">addX</span> <span class="n">dataE</span>
<span class="n">addY</span> <span class="n">Field</span>
<span class="n">savePath</span> <span class="o">./</span>
<span class="n">plot</span> <span class="n">FieldVsEnergy</span><span class="o">.</span><span class="n">pdf</span>
<span class="n">macro</span> <span class="n">FieldVsEnergy</span><span class="o">.</span><span class="n">C</span>
<span class="c1"># end</span>
</pre></div>
</div>
</div>
<div class="section" id="the-usage-summary">
<span id="mupp-usage"></span><span id="index-3"></span><h2>The Usage Summary<a class="headerlink" href="#the-usage-summary" title="Permalink to this headline"></a></h2>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>usage: mupp [OPTIONS] [[--path &lt;fit-param-path&gt;] &lt;fit-param-file-names&gt;]
OPTIONS:
-h, --help: this help
-v, --version: current mupp version
-s &lt;fln&gt;, --script &lt;fln&gt;: &lt;fln&gt; being a mupp script.
--path &lt;fit-param-path&gt;: path where to look for the &lt;fit-param-file-names&gt;
&lt;fit-param-file-names&gt;: list of file name(s) to be loaded.
allowed formats are: db, dat, msr
SCRIPT COMMANDS:
Lines starting with &#39;#&#39;, &#39;%&#39;, or &#39;//&#39; are comments and will be ignored.
The same is true for empty lines. Comments are also allowed at the end
for a command, i.e. loadPath ./ # the best place ever.
loadPath &lt;dir&gt; : set the load path to &lt;dir&gt;. Bash variables like
$HOME are accepted.
load &lt;coll&gt; : will load a collection &lt;coll&gt;. Currently *.db and *.dat
are handled.
selectAll : will select all loaded collections. Thie means every plot
of variable x/y will be carried out to ALL collections.
select &lt;nn&gt; : selects collection &lt;nn&gt;, where &lt;nn&gt; is either the number
of the collections, or its name, e.g.
select YBCO-40nm-T5K-FC150mT-Escan.db
addX &lt;label&gt; : add &lt;label&gt; as a x-variable. Only one is allowed.
addY &lt;label(s)&gt;: add &lt;label(s)&gt; as y-variable. Multiple labls are possible.
savePath &lt;dir&gt; : set the save path to &lt;dir&gt;. The place where the macros,
and/or the plot output will be saved.
plot &lt;fln&gt; : where &lt;fln&gt; is the file name with extension under which
the plot should be saved.
macro &lt;fln&gt; : where &lt;fln&gt; is the file name under which the root macro
should be saved.
</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">mupp - μSR Parameter Plotter</a><ul>
<li><a class="reference internal" href="#the-graphical-user-interface">The Graphical User Interface</a></li>
<li><a class="reference internal" href="#the-scripting-interface">The Scripting Interface</a></li>
<li><a class="reference internal" href="#the-usage-summary">The Usage Summary</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="musredit.html"
title="previous chapter"><code class="docutils literal notranslate"><span class="pre">musredit</span></code>: the GUI Based Interface to <code class="docutils literal notranslate"><span class="pre">musrfit</span></code></a></p>
<h4>Next topic</h4>
<p class="topless"><a href="msr2data.html"
title="next chapter">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/mupp.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<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="msr2data.html" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files"
>next</a> |</li>
<li class="right" >
<a href="musredit.html" title="musredit: the GUI Based Interface to musrfit"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">musrfit 1.5.2 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2020, Andreas Suter.
Last updated on Feb 04, 2020.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.1.2.
</div>
</body>
</html>