Merged muonspin/musrfit:root6 into master

This commit is contained in:
Zaher Salman 2020-02-05 09:42:37 +01:00
commit 2f5259d6e5
66 changed files with 24125 additions and 4997 deletions

View File

@ -5,7 +5,7 @@ if (CMAKE_VERSION GREATER_EQUAL 3.12)
cmake_policy(SET CMP0075 NEW)
endif (CMAKE_VERSION GREATER_EQUAL 3.12)
project(musrfit VERSION 1.5.1 LANGUAGES C CXX)
project(musrfit VERSION 1.5.2 LANGUAGES C CXX)
#--- musrfit specific options -------------------------------------------------
option(nexus "build optional NeXus support. Needed for ISIS" OFF)

View File

@ -12,6 +12,12 @@ or
https://bitbucket.org/muonspin/musrfit/commits/all
Release of V1.5.2, 2020/02/03
=============================
Implemented a SECTOR command. It allows to get chisq/maxLH information from
different time sector slots.
Release of V1.5.0, 2019/05/15
=============================

View File

@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: b0f54e143f8f1d163af95476812112f7
config: 08712e994533f427d7efeeb2574ca61a
tags: 645f666f9bcd5a90fca523b33c5a78b7

View File

@ -0,0 +1,60 @@
#---------------------------------------------------
# get compilation flags from root-config
ROOTCFLAGS = $(shell $(ROOTSYS)/bin/root-config --cflags)
#---------------------------------------------------
OS = LINUX
CXX = g++
CXXFLAGS = -O3 -Wall -Wno-trigraphs -fPIC
LOCALINCLUDE = .
ROOTINCLUDE = $(ROOTSYS)/include
INCLUDES = -I$(LOCALINCLUDE) -I$(ROOTINCLUDE)
LD = g++
LDFLAGS =
SOFLAGS = -O -shared
# the output from the root-config script:
CXXFLAGS += $(ROOTCFLAGS)
LDFLAGS +=
# some definitions: headers (used to generate *Dict* stuff), sources, objects,...
OBJS =
OBJS += TMyFunction.o TMyLibraryDict.o
SHLIB = libTMyLibrary.so
# make the shared lib:
#
all: $(SHLIB)
$(SHLIB): $(OBJS)
@echo "---> Building shared library $(SHLIB) ..."
/bin/rm -f $(SHLIB)
$(LD) $(OBJS) $(SOFLAGS) -o $(SHLIB)
@echo "done"
# clean up: remove all object file (and core files)
# semicolon needed to tell make there is no source
# for this target!
#
clean:; @rm -f $(OBJS) *Dict* core*
@echo "---> removing $(OBJS)"
#
$(OBJS): %.o: %.cpp
$(CXX) $(INCLUDES) $(CXXFLAGS) -c $<
# Generate the ROOT CINT dictionary
TMyLibraryDict.cpp: TMyFunction.h TMyLibraryLinkDef.h
@echo "Generating dictionary $@..."
rootcint -f $@ -c -p -I$(ROOTINCLUDE) $^
install: all
@echo "Installing shared lib: libTApproximation.so"
ifeq ($(OS),LINUX)
cp -pv $(SHLIB) $(ROOTSYS)/lib
cp -pv $(LOCALINCLUDE)/*.h $(ROOTSYS)/include
endif

View File

@ -0,0 +1,22 @@
.. include:: <isogrk1.txt>
.. index:: acknowledgment
.. _acknowledgment:
Acknowledgements
================
**Bastian M. Wojek**
I am very much indebted to BMW for his rigorous testing of ``musrfit``, his many useful suggestions, contributions, and for the
largest part of the user manual of ``musrfit`` which makes it accessible to a broader audience! Many thanks Bastian!
**Uldis Locans**
I am very much indebted to Uldis work on :ref:`DKS <setup-dks>` enabling the GPU support for ``musrfit``. His kind, calm, and
extremely competent way to deal with his projects as well as to deal with the chaos of physicists way to think is admirable. Many thanks Uldis!
**Zaher Salman**
Thanks for his beta-NMR and web-interface contributions to ``musrfit``!
**Robert Scheuermann**
Thanks for his constant contructive input on ``musrfit``!

View File

@ -0,0 +1,8 @@
.. include:: <isogrk1.txt>
.. index:: any2many
any2many - a Universal |mgr|\SR-file-format converter
=====================================================
``any2many`` allows to convert most |mgr|\SR-file-formats from one to the other.
For a detailed description see :ref:`here <any2many>`.

View File

@ -0,0 +1,9 @@
.. index:: bugtracking
.. _bugtracking:
Bugtracking
===========
For reporting bugs or requesting new features and improvements please use
the `bitbucket-repo <https://bitbucket.org/muonspin/musrfit/issues>`_ (preferred)
or send an e-mail to A. Suter at PSI.

View File

@ -0,0 +1,18 @@
.. include:: <isogrk1.txt>
.. index:: cite
.. _cite:
How to Cite ``musrfit``?
========================
Since quite some effort is going into the development and maintenance of the ``musrfit`` package, you should at least acknowledge it in your publication if you have used it to analyze your data. Even better of course is to cite it properly by the reference given beneath
* A.\ Suter, B.M. Wojek, "Musrfit: A Free Platform-Independent Framework for |mgr|\SR Data Analysis", Physics Procedia **30**, 69 (2012). `<http://dx.doi.org/10.1016/j.phpro.2012.04.042>`_
The GPU high speed ``musrfit`` version is utilizing ``DKS``. In case you are using this version, please also add the following citations
* A.\ Adelmann, U. Locans, A. Suter, "The Dynamic Kernel Scheduler—Part 1", Computer Physics Communications **207**, 83 (2016). `<https://doi.org/10.1016/j.cpc.2016.05.013>`_
* U.\ Locans, *et al.*, "Real-time computation of parameter fitting and image reconstruction using graphical processing units", Computer Physics Communications **215**, 71 (2017). `<https://doi.org/10.1016/j.cpc.2017.02.007>`_
* U.\ Locans and A.\ Suter, "Musrfit Real Time Parameter Fitting Using GPUs", JPS Conf. Proc. *21*, 011051 (2018). `<http://dx.doi.org/10.7566/JPSCP.21.011051>`_

View File

@ -0,0 +1,31 @@
.. musrfit docu documentation master file, created by
sphinx-quickstart on Sun Jun 17 11:00:32 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to the musrfit documentation!
=====================================
.. toctree::
:maxdepth: 2
cite
tutorial
user-manual
user-libs
setup-standard
setup-dks
musredit
mupp
msr2data
any2many
musr-root
acknowledgement
bugtracking
Indices and tables
==================
* :ref:`genindex`
* :ref:`search`

View File

@ -0,0 +1,374 @@
.. include:: <isogrk1.txt>
.. index:: msr2data
.. _msr2data:
msr2data - A Program for Automatically Processing Multiple ``musrfit`` msr Files
================================================================================
``msr2data`` (originally written by B. M. Wojek) is a program implemented in ``C++``. Its purpose is
to process multiple msr files (input files for ``musrfit``) with the same parameters and summarize the fitting
results either in a *TRIUMF DB* [#f1]_ or a *column ASCII* file. This allows essentially to
#. Collect the fit parameters.
#. Generate *new* input msr files based on old ones.
.. [#f1] For an abridged description of this format see `here <http://musr.org/xyfit/dbformat.html>`_. The DB files
produced by ``msr2data`` can be viewed for instance with :ref:`mupp <mupp>` or |mgr|\View `see here <http://musr.org/muview/>`_, however,
they are not completely backward-compatible to the original ``db language`` since the parameter names can be longer than five or
six characters! In order to establish this backward compatibility (if needed) the user has to ensure the correct length of the
parameter names in the msr files!
.. _msr2data-basic-usage:
Basic Types of Usage
--------------------
Apart from numerous :ref:`optional parameters <msr2data-opt-param>` that might be set, in principle there are four different ways of calling ``msr2data``.
These differ in how the list of runs which should be processed is supplied:
**msr2data <run> <extension> [optional parameters]**
A single run number.
**msr2data <firstRunNo> <lastRunNo> <extension> [optional parameters]**
An interval of run numbers is specified through the first and the last run number. The condition ``<firstRunNo>`` < ``<lastRunNo>`` is not necessary.
**msr2data \[ <runList> \] <extension> [optional parameters]**
Where ``<runList>`` is one or a combination of the following:
#. ``<run0>, <run1>, <run2>, ... <runN>`` : run numbers, *e.g.* 123 124,
#. ``<run0>-<runN>`` : a range, *e.g.* 123-125 -> 123 124 125,
#. ``<run0>:<runN>:<step>`` : a sequence, *e.g.* 123:127:2 -> 123 125 127. ``<step>`` has to be a positive integer.
#. A ``<runList>`` can also combine (1)-(3), *e.g.* 123 128-130 133, etc.
**msr2data <runListFileName> <extension> [optional parameters]**
An ASCII file containing a list of run numbers and optional external parameters is passed to ``msr2data``. For the structure of the ASCII file
see :ref:`below <run-list-file_structure>`.
All four basic types of calling ``msr2data`` contain the *mandatory* file-name ``<extension>`` passed right after the list of runs. The meaning of
this ``<extension>`` should become clear after giving examples for all four cases:
.. code-block:: bash
$ msr2data 8472 _tf_h13
generates the DB file ``out.db`` (can be changed by using the -o option) from ``8472_tf_h13.msr``.
.. code-block:: bash
$ msr2data 8472 8474 _tf_h13
generates the DB file ``out.db`` (can be changed by using the -o option) from ``8472_tf_h13.msr``, ``8473_tf_h13.msr``, and ``8474_tf_h13.msr``.
.. code-block:: bash
$ msr2data [8472 8470] _tf_h13
generates the DB file ``out.db`` (can be changed by using the -o option) from ``8472_tf_h13.msr`` and ``8470_tf_h13.msr``.
.. code-block:: bash
$ msr2data [8470:8474:2] _tf_h13
generates the DB file ``out.db`` (can be changed by using the -o option) from ``8470_tf_h13.msr``, ``8472_tf_h13.msr``, and ``8474_tf_h13.msr``.
.. _run-list-file_structure:
Run List File Structure
+++++++++++++++++++++++
.. code-block:: bash
$ msr2data run.list _tf_h13
generates the DB file ``out.db`` (can be changed by using the -o option) from all runs listed in the ASCII file ``run.list`` in the working directory.
In this file it is also possible to include *external* parameters which should be put in the resulting DB file. The structure of the ``run.list`` is the following:
::
RUN VAR1 VAR2 VAR3 ...
8460 200 27.1 46.2 ...
8472 205 27.1 46.3 ...
8453 210 27.2 45.9 ...
· · · ·
· · · ·
· · · ·
*The first not commented and not empty line determines the parameter names and labels and has to be present!*
It is allowed to add comments (with a preceding '#') or empty lines to the run-list file.
The following should be mentioned together with the above examples:
* The output files in the examples above are only newly created if they did *not* exist before invoking ``msr2data``.
If the files were already present the msr file data would be appended!
* If the files have been newly created, also the DB file header is written. If the files were present before, only
the data blocks are appended. The output of the header can either be forced or completely suppressed with the ``header``
and ``noheader`` options as shall be seen later.
* If the ``musrfit`` output files do not have an ``<extension>`` as specified above like ``8472.msr`` one has to call ``msr2data`` like in the following example:
.. code-block:: bash
$ msr2data 8472 8460 ""
.. _msr2data-opt-param:
Optional Parameters
-------------------
As mentioned already above there are some optional parameters which change the behavior of ``msr2data`` and can be passed in any order. Here is a complete list:
**data**
The output file format is changed to a simple column ASCII file (default output file name: out.dat).
**new**
An existing output file is deleted before new information is written to it.
**header**
Force the output of the file header even if the output file was present before.
**noheader**
The output of the file header is suppressed—also if the output file is newly created.
If either both or none of the header options are given, ``msr2data`` writes the file header only to new files
and it solely appends the data blocks to an existing output file assuming that the header is present already.
**nosummary**
There will be no attempt to read additional information like the temperature or the applied magnetic field from
the data files even if these information were present there.
**paramList <param>**
option used to select the parameters which shall be exported. ``<param>`` is a list of parameter numbers to be exported.
Allowed lists are: ``<startNo>-<endNo>``, *e.g.* ``1-16`` will export parameters 1 to 16. Space separated numbers, *e.g.:* ``1 3 5``.
A combination of both is possible, *e.g.* ``1-16 19 31 62``, and so on.
**-o<outputFileName>, -o <outputFileName>**
The processed data will be written to the file ``<outputFileName>`` instead of the default ``out.db`` or ``out.dat``.
If ``<outputFileName>`` is equal to none (case-insensitive) the parameter data are not appended to any output file.
**fit**
Additionally to the final data collection ``msr2data`` will invoke ``musrfit`` to fit the specified runs.
All msr files are assumed to be present, none is newly generated!
**fit-<template>[!]**
Additionally to the final data collection ``msr2data`` will generate msr files for the runs specified in the list
of runs and invoke :ref:`musrfit <musrfit>` for performing fits of the data. As template for the first run the file
``<template><extension>.msr`` (or if not available: ``<template><extension>.mlog``) is used; the subsequent input
files will be created using the msr output of the last processed runs ("chain fit"). However, if for all runs only
the given template should be used one has to append an exclamation mark (**!**) to the ``<template>``.
**msr-<template>**
The same as ``fit-<template>[!]``, *without* calling ``musrfit`` and the final data collection, *i.e.* only the msr files for the given runs are generated.
**-k**
If specified together with the ``fit-<template>`` option, the :ref:`- -keep-mn2-output <musrfit>` option is passed to ``musrfit``.
In the case no fits should be done, this option is ignored.
**-t**
In case this option is given additionally to the ``fit-<template> option``, ``musrfit`` is called with
the :ref:`- -title-from-data-file <musrfit>` option. If no fitting is done, this option is ignored.
**Examples:**
In order to illustrate the usage of these parameters a few examples with explanations are given below:
.. code-block:: bash
$ msr2data 8400 8460 _tf_h13 -oABC.db fit-8472
Using ``8472_tf_h13.msr`` as first template, ``msr2data`` generates subsequent msr input files ``8400_tf_h13.msr`` through ``8460_tf_h13.msr``,
calls ``musrfit`` to perform a fit of these files and collects the results of the fits together with the DB header in the new file ``ABC.db``.
Additionally, some information about external parameters like the temperature will be passed to ``ABC.db`` if it is present in the data files.
.. code-block:: bash
$ msr2data [8500 8502-8504 8507] _zf fit-8472 noheader nosummary -o DEF.db
Using ``8472_zf.msr`` as first template, ``msr2data`` generates subsequent msr input files ``8500_zf.msr``, ``8502_zf.msr``, ``8503_zf.msr``,
``8504_zf.msr``, and ``8507_zf.msr``, calls ``musrfit`` to perform a fit of these files and collects the results of the fits in the file ``DEF.db``
*without* writing the DB file header or attempting to read additional information from the data files.
.. code-block:: bash
$ msr2data 8595 8585 "" noheader fit-8472! -oGHI.dat data nosummary -k
Using ``8472.msr`` as template for all runs, ``msr2data`` generates the msr input files ``8595.msr`` through ``8585.msr``, calls ``musrfit`` with
the option ``--keep-mn2-ouput`` to perform a fit of these files and collects the results of the fits in the column-structured ASCII file ``GHI.dat``
*without* writing any file header or attempting to read additional information from the data files.
.. code-block:: bash
$ msr2data 8472 8475 "" fit -o none
Take the *given* msr files ``8472.msr`` through ``8475.msr`` and call ``musrfit`` *without* finally summarizing the results.
.. code-block:: bash
$ msr2data 8472 8475 _tf_h13 msr-8471!
Using ``8471_tf_h13.msr`` as template for all runs, ``msr2data`` generates the msr input files ``8472_tf_h13.msr`` through ``8475_tf_h13.msr``.
*No fitting will be performed and no DB or ASCII output will be generated!*
.. code-block:: bash
$ msr2data [8472 8475-8479] _tf_h13 paramList 1-16 data -o bestData.dat
Will collect the parameters 1 to 16 from the msr-files ``8472_tf_h13.msr``, ``8475_tf_h13.msr``, ``8476_tf_h13.msr``, ``8477_tf_h13.msr``, ``8478_tf_h13.msr``,
and ``8479_tf_h13.msr`` and write these parameters into a column like output file ``bestData.dat``.
.. index:: msr2-data-global-mode
The Global Mode
---------------
Apart from all the options described :ref:`above <msr2data-opt-param>` there is another program option: **global**.
This option changes the general behavior of ``msr2data`` in that way that instead of processing one msr file for each
run it combines all specified runs in *one single msr file* with the possibility to define common parameters for all
runs as well as run-specific parameters. When writing the obtained parameters to a DB file or a column-structured
ASCII file that single msr file is read and the parameters valid for each run are extracted. The global option can be
used in conjunction with any of the described invocations of ``msr2data`` and together with all options stated :ref:`above <msr2data-opt-param>`.
File Generation
+++++++++++++++
The general idea of this mode is to generate a global msr file on the basis of a working single-run msr file. For this
purpose a single-run template containing information about common and run-specific parameters should be created. These
parameters are identified through their parameter names:
**run-specific parameters**
these parameters are tagged with the current run number in the format ``%0Xu``, *i.e.* ``X`` digits with leading zeros,
at the end of the parameter name, *e.g.* for a 4-digit-formatted run number ``alpha0123`` if the run number was 123 or
for a 8-digit-formatted run number ``alpha00123456`` if the run number was 123456. ``X`` has to be at least 4.
**common parameters**
all parameters that are not run specific
The :ref:`FITPARAMETER block <msr-fitparameter-block>` of an exemplary template file ``8472_example.msr`` could therefore look like:
::
FITPARAMETER
# No Name Value Step Pos_Error Boundaries
1 Phase 35.8359 -3.94496 3.93749
2 Asy8472 0.04501 -0.00208 0.00211 0 0.33
3 Field 143.212 -0.27960 0.27885 100 200
4 Rate8472 0.14245 -0.02501 0.02279 0 1
Here the parameters **2** and **4** would be treated as *run-specific* whereas the parameters **1** and **3** would be *common* to the original and all newly added runs.
Normally, within the template file there should *not* appear explicitly any run-specific parameters in the :ref:`THEORY <msr-theory-block>` and
:ref:`FUNCTIONS <msr-functions-block>` blocks. If however, those parameters are met, ``msr2data`` will try to substitute them by mapped parameters
and add them accordingly to the map contained in each :ref:`RUN block <msr-run-block>`.
When ``msr2data`` is called to generate a global msr file, *e.g.*
.. code-block:: bash
$ msr2data 8471 8470 _example msr-8472 global
a new msr file ``8471+global_example.msr`` is created. As can be seen in the example, the name of the global msr file always starts with the
first specified run number followed by the ``+global`` identifier and the template ``<extension>``. The example's global FITPARAMETER block would be:
::
FITPARAMETER
# No Name Value Step Pos_Error Boundaries
# Common parameters for all runs
1 Phase 35.8359 -3.94496 3.93749
2 Field 143.212 -0.27960 0.27885 100 200
# Specific parameters for run 8471
3 Asy8471 0.04501 -0.00208 0.00211 0 0.33
4 Rate8471 0.14245 -0.02501 0.02279 0 1
# Specific parameters for run 8470
5 Asy8470 0.04501 -0.00208 0.00211 0 0.33
6 Rate8470 0.14245 -0.02501 0.02279 0 1
This shows that the fit parameters are reorganized in a way that the common parameters appear at the beginning of the parameter list and they are
followed by copies of the parameters specific to each run (in the specified order!). Additionally, for each specified run new RUN blocks are
created — for each run as many as found for the template run.
During this reorganization all the affected parameter occurrences are changed accordingly!
.. note::
Please be aware of the fact that comments in the template msr file are *not* propagated to the newly generated global msr file!
.. index:: msr2data-global-param-extraction
Parameter Extraction
++++++++++++++++++++
After fitting some model to the specified data the fit parameters can be extracted from the global msr file to a DB or column-structured ASCII file;
as usual this includes also parameters stored in the run data files or externally specified parameters given in a :ref:`run-list file <run-list-file_structure>`.
In order to reach this goal the global msr file has to obey certain rules:
* The order of the parameters has to match the one described above, meaning the common parameters are listed first followed by
the same number of parameters specific to each run tagged by the according run numbers at the end of the parameter names and
having the same order as the specified list of runs.
* The RUN blocks have to be ordered according to the list of runs to be processed.
Following these rules -- which is achieved most easily by generating the global msr file using ``msr2data`` as shown above -- the parameters can be extracted *e.g.* like
.. code-block:: bash
$ msr2data 8471 8470 _example global data -o globalFit.dat
This will read in the file ``8471+global_example.msr``, extract for each run all relevant parameters from the msr file as well as
from the according data files (if available) and append all of them in columns to the ASCII file ``globalFit.dat``.
.. index:: msr2data-global-extended
The Extended Global Mode
++++++++++++++++++++++++
If a new global input file is generated, it is also possible to do an automatic pre-analysis for each single run using the specified template first;
afterwards the run-specific parameters of these single-run msr files are collected into the global msr file. In special cases this might be useful
to obtain a better set of starting values for the parameters, however, in most cases it will not replace the "manual review" of the generated global
input file. The option is activated by choosing the keyword **global+**. For example
.. code-block:: bash
$ msr2data 8471 8470 _example global+ msr-8472
Here, ``8472_example.msr`` is first used as template to generate the file ``8471-OneRunFit_example.msr``, then ``musrfit`` is called for it, the result
is used to generate ``8470-OneRunFit_example.msr`` and ``musrfit`` is called for that file. Finally, the global fit file ``8471+global_example.msr`` is
produced — including the fit results of the ``OneRunFit`` files for the run-specific parameters.
By appending an exclamation mark **!** to the **global+** option, the given template will be used for every new file generation (similar to the fit option
explained before). The **+[!]** extension will be ignored, if no new global input file is generated.
The single run msr files are *not* deleted at the moment. The information contained in them might be useful for some people. Of course the data can also
be collected by ``msr2data``. *E.g.* in order to produce a DB file ``OneRunFits.db`` one could call
.. code-block:: bash
$ msr2data 8471 8470 -OneRunFit_example -o OneRunFits.db
.. note::
Please be aware that the program in this mode *always* generates new single-run msr files and *always* calls ``musrfit`` for them. In case there are
already single-run fits present, these cannot be used in conjunction with this option. The program on purpose behaves in this way in order to ensure
the file integrity and correct parameter order within these files.
Known Limitations
-----------------
* The indexing run number of the msr file has to be at the begin of every filename.
* Within the data file name the ``RUN#`` has the format ``%0Xu``, *i.e.* ``X`` digits with leading zeros, and has to be the rightmost number given in this
format in the file name. ``X`` has to be at least 4. The highest treatable run number is :math:`2^{32}-1 = 4294967295`.
* In order to keep ``msr2data`` working properly the msr files should only contain *one* STATISTIC block at the end of the file and *one* FITPARAMETER block
right after the TITLE — ``musrfit`` itself allows to have more creative msr files...
* The msr-file generation from a template takes only care of runs given on the *first* line of a ``RUN block``. :ref:`ADDRUN <msr-addrun>` statements are simply
copied! Since this is most probably *not* what one likes to do, it is suggested *not* to use the ``fit-<template>`` and ``msr-<template>`` options if
ADDRUN statements were present in the template file.
* ``msr2data`` will write only up to two successive empty lines in newly generated msr files. In case more subsequent empty lines are encountered in a template file,
these are not copied! Actually, this measure is not a limitation but has been introduced to keep the msr files in a reasonable shape.
The Graphical User Interface for msr2data Provided by musredit
--------------------------------------------------------------
:ref:`musredit <musredit-sec>`, designed especially for the manipulation of ``musrfit`` msr files and graphical front ends to ``musrfit``, offer an almost
self-explanatory graphical user interface to ``msr2data`` depicted below:
.. image:: ../images/msr2data-GUI.*
1. and 2. Choose one of the ways to specify your list of runs as described under :ref:`basic usage <msr2data-basic-usage>`.
3. Give the file extension here, *e.g.* ``_zf`` for files like ``8472_zf.msr``. If the files do not have an extension this
field stays empty. ``musredit`` takes care of passing the "" to ``msr2data`` as mentioned above.
4. Activates the ``fit-<template>`` option if ``<template>`` is entered. In case the option ``Chain Fit`` is *not* set the
given template will be used for the input-file generation for all runs to be fitted — otherwise the output of the first
fit serves as template for the second and so on. The template field stays empty if *no* fits should be performed!
5. Activates the ``-o <outputFileName>`` option if ``<outputFileName>`` is entered. If nothing is entered the default output file ``out.db`` or ``out.dat`` is used.
The options tags correspond essentially to the description in :ref:`optional parameters <msr2data-opt-param>`.

View File

@ -0,0 +1,166 @@
.. include:: <isogrk1.txt>
.. index:: mupp
.. _mupp:
mupp - |mgr|\SR Parameter Plotter
=================================
``mupp`` is a little helper program which allows to quickly plot a collection of msr-file parameters,
as for instance generated by :ref:`msr2data <msr2data>`. It can handle ``db``- and ``dat``-files.
Also a collection of ``msr``-files can be invoked. ``mupp`` is heavily inspired by |mgr|\View (see
`here <http://musr.org/muview/>`_).
``mupp`` can be operated from within as graphical user interface or via a command line scripting interface.
The ``mupp`` GUI can be invoked either directly from the command line or from within :ref:`musredit <musredit-sec>`.
.. index:: mupp-gui
The Graphical User Interface
----------------------------
A typical setting could look like this
.. image:: ../images/mupp-gui-0.*
1. shows the list of loaded collections. A collection is defined as ``db``- or ``dat``-file (typically the
output from :ref:`msr2data <msr2data>`). If you call the open-dialog and select a collection of
``msr``-files, ``mupp`` will call ``msr2data`` and tries to generate a collection on-the-fly.
2. in this list, the data-tags of the currently selected collection is presented. The data-tags can be
directly dragged over to the ``x``- and ``y``-axis list. Another way is to select the data-tag
wished and click ``add X`` to add the selected data-tag to the ``x``-axis list. Analogous it is done
for the ``y``-axis.
3. ``x``-axis list. The labels are followed by ``(-X-)`` where the number ``X`` corresponds to the
selection it corresponds to. The numbering of the collection is as given in the collection list.
4. ``y``-axis list. The labels are followed by ``(-X-)`` where the number ``X`` corresponds to the
selection it corresponds to. The numbering of the collection is as given in the collection list.
5. ``add X`` allows to add the currently selected data-tag to the ``x``-axis list.
6. ``add Y`` allows to add the currently selected data-tag to the ``y``-axis list.
7. ``remove X`` will remove the selected ``x``-axis tag.
8. ``remove Y`` will remove the selected ``y``-axis tag.
9. 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 ``x``- and ``y``-axis tags for each collection, you can do the following:
you add ``x``- and ``y``-axis data-tags for the first collection. Afterwards you select all the other
collections of interest and click on ``Add Ditto``. ``mupp`` will then add the corresponding
``x``- and ``y``-axis data-tags accordingly. This is less error prone and quicker!
10. Clicking the ``Plot`` button will invoke ``mupp_plot`` (a ``ROOT`` based application) which will
present the data, as shown here
.. image:: ../images/mupp-plot-0.*
:height: 600px
11. ``Remove Collection``: will remove the selected collection
12. ``Refresh Collection``: will reload the collection (``db``- or ``dat``-file). This is often useful
during beamtime where the collection is growing run-by-run.
13. 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 ``Help / Cmd's`` for the currently available
commands.
.. index:: mupp-scripting
The Scripting Interface
-----------------------
``mupp`` 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 ``-s`` (see
:ref:`mupp command line summary <mupp-usage>`. Currently the following scripting commands are available:
**loadPath <dir>**
set the load path to ``<dir>``. Bash variables like $HOME are accepted. This is the path where to look for collection files (``db``- and ``dat``-files).
**load <coll>**
will load the collection ``<coll>``.
**selectAll**
will select all loaded collections. This means every plot of variable x/y will be carried out to *ALL* collections.
**select <nn>**
selects collection ``<nn>``, where ``<nn>`` is either the *number* of the collections, or its *name*, *e.g.*
select YBCO-40nm-T5K-FC150mT-Escan.db.
**addX <label>**
add ``<label>`` as a *x*-variable. Only *one* is allowed.
**addY <label(s)>**
add ``<label(s)>`` as *y*-variable. *Multiple* labels are possible.
**savePath <dir>**
set the save path to ``<dir>``. The place where the macros, and/or the plot output will be saved.
**plot <fln>**
where ``<fln>`` is the file name with extension under which the plot should be saved.
**macro <fln>**
where ``<fln>`` is the file name under which the root macro should be saved.
An example script file ``field-vs-energy.txt`` might look like this:
::
# This is a comment
loadPath ./
load YBCO-40nm-T5K-FC150mT-Escan.db
load YBCO-40nm-T30K-FC150mT-Escan.db
load YBCO-40nm-T60K-FC150mT-Escan.db
load YBCO-40nm-T120K-FC150mT-Escan.db
selectAll
addX dataE
addY Field
savePath ./
plot FieldVsEnergy.pdf
macro FieldVsEnergy.C
# end
.. index:: mupp-usage
.. _mupp-usage:
The Usage Summary
-----------------
::
usage: mupp [OPTIONS] [[--path <fit-param-path>] <fit-param-file-names>]
OPTIONS:
-h, --help: this help
-v, --version: current mupp version
-s <fln>, --script <fln>: <fln> being a mupp script.
--path <fit-param-path>: path where to look for the <fit-param-file-names>
<fit-param-file-names>: list of file name(s) to be loaded.
allowed formats are: db, dat, msr
SCRIPT COMMANDS:
Lines starting with '#', '%', or '//' 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 <dir> : set the load path to <dir>. Bash variables like
$HOME are accepted.
load <coll> : will load a collection <coll>. 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 <nn> : selects collection <nn>, where <nn> is either the number
of the collections, or its name, e.g.
select YBCO-40nm-T5K-FC150mT-Escan.db
addX <label> : add <label> as a x-variable. Only one is allowed.
addY <label(s)>: add <label(s)> as y-variable. Multiple labls are possible.
savePath <dir> : set the save path to <dir>. The place where the macros,
and/or the plot output will be saved.
plot <fln> : where <fln> is the file name with extension under which
the plot should be saved.
macro <fln> : where <fln> is the file name under which the root macro
should be saved.

View File

@ -0,0 +1,681 @@
.. include:: <isogrk1.txt>
.. index:: MusrRoot
.. _MusrRoot:
MusrRoot - an Extensible Open File Format for |mgr|\SR
======================================================
Until 2011 different |mgr|\SR file formats were used within PSI. The bulk-|mgr|\SR instruments were
writing their data in the ``PSI-BIN`` file format, which is a fixed binary format with rather stringent
limitations. The LE-|mgr|\SR (LEM) instrument was using a ROOT (CERN) based file format which was tightly
tailored to the special needs of the LEM instrument. This situation was unsatisfactorily and hence it
was decided to move forward to a open file format called ``MusrRoot`` to be described in the following.
Some Basics Concerning ROOT Files
---------------------------------
The |mgr|\SR data acquisition systems at PSI are utilizing MIDAS (see `Midas Home Page <https://midas.triumf.ca/MidasWiki/index.php/Main_Page>`_).
The MIDAS analyzer, which is responsible to build histograms, especially the |mgr|\SR decay histograms, makes
it very easy to build ROOT (see `ROOT/CERN home page <https://root.cern.ch>`_ ) histogram objects (these
are ``TH1F`` objects for |mgr|\SR decay histograms). ROOT is a ``C++`` object-oriented data mining and
analysis frame work. These histograms can be collected and saved in ROOT files (``TFile``). In order to ease
the understanding of the upcoming definitions, a few ROOT related things shall be summaries here. For details
concerning the ROOT frame work documentation please check `ROOT/CERN Users Guide(s) <https://root.cern.ch/root-user-guides-and-manuals>`_
and `ROOT/CERN Reference Guide <https://root.cern.ch/guides/reference-guide>`_.
ROOT files (``TFile``) are binary files which can hold any kind of objects. A ``TFile`` is organized similarly
to a directory structure of an operating system. Within the ROOT framework, there is a ``TFile`` browser available
which allows to inspect these files. This browser (``TBrowser``) will show all object saved in the ``TFile`` directly,
if they derive from ``TObject``.
The ``MusrRoot`` file format to be described below is only using a small subset of possible ROOT objects, namely:
* ``TFolder``: this are the top level objects in the ``MusrRoot`` file.
* ``TH1F``: Hold the |mgr|-decay-histograms.
* ``TObjArray``: Holding collection of header information.
* ``TObjString``: Holding the content of any header information.
Since all these objects are deriving form ``TObject``, they will be directly accessible via the ``TBrowser``-object.
For instance, the |mgr|-decay-histograms can be directly plotted, are even fitted, out of the box.
MusrRoot an Extensible Open File Format for |mgr|\SR
----------------------------------------------------
As mentioned before, ROOT files are open-file-format files meaning that they can contain more entries (and most probably will) than the ones specified in the following. The specified ones will be the mandatory ones for all instruments. Before defining all mandatory entries, the MusrRoot file structure shall be sketched.
The MusrRoot file structure looks like:
::
histos ---|
|- DecayAnaModule ---|
| |- hDecay001
| |- hDecay002
| ...
|
|- SCAnaModule ---|
... |- hSampleTemperature
|- hSampleMagneticField
...
RunHeader ---|
|- RunInfo
|- DetectorInfo ---|
| |- Detector001
| |- Detector002
| ...
|
|- SampleEnvironmentInfo
|- MagneticFieldEnvironmentInfo
|- BeamlineInfo
...
where ``hDecay001``, etc. are ROOT histograms (to be more specific: ``TH1F``), containing the |mgr|\SR decay histograms. There can be as many as needed, especially there is no limitation about their length. The histogram object names will be ``hDecayXXX``, where ``XXX`` (leading zero int, *i.e.* ``%03d``
in ``C/C++`` notation, starting with '1') is the histogram number. The title and name of the histogram (see description of the ``TH1F`` ROOT class) contains the label of the histogram, like 'top', 'forward', etc. How many of these histograms are present is accessible through the ``RunInfo`` folder in which the necessary header information are found (details see next sections). The folder ``SCAnaModule`` contains histograms of some of the slow-control parameters, as for instance the sample temperature versus time, the applied field versus time, etc. Again the label of the histogram will give more specific information about its content.
Run Information Contained in ``RunHeader``
++++++++++++++++++++++++++++++++++++++++++
The ``RunHeader`` contains all needed meta-information to describe a |mgr|\SR-run. The list of the minimal number of required "folders" of the ``RunHeader`` is given in the following structure:
::
RunHeader (TFolder) ---|
|- RunInfo (TObjArray)
|- DetectorInfo (TObjArray)
|- SampleEnvironmentInfo (TObjArray)
|- MagneticFieldEnvironmentInfo (TObjArray)
|- BeamlineInfo (TObjArray)
In brackets the object type is given. ``RunInfo`` contains most information relevant for the user and will be itemized in :ref:`RunInfo Overview <musr-root-overview>` and :ref:`RunInfo Required <run-info-required>`. ``DetectorInfo`` contains detector specific information, like detector name, time zero bin, etc. (details is found under :ref:`DetectorInfo Required <detector-info-required>`). ``SampleEnvironmentInfo`` (details under :ref:`SampleEnvironmentInfo Required <sample-environment-info-required>`), and ``MagneticFieldEnvironmentInfo`` (details under :ref:`MagneticFieldEnvironmentInfo Required <magnetic-field-environment-info-required>`) store additional, more detailed information concerning the sample environment. ``BeamlineInfo`` stores beamline relevant information (details under :ref:`BeamlineInfo Required <beamline-info-required>`).
Before elaborating more on the required items within this structure, a few words on the ROOT types used here: ``RunHeader`` is a ``TFolder`` object. All the "sub-directory" entries are of type ``TObjArray`` and collect items of type ``TObjString`` or other ``TObjArray`` (*i.e.* sub-directories and sub-sub-directories, etc.).
.. index:: MusrRoot-Overview
.. _musr-root-overview:
``RunInfo`` Overview
^^^^^^^^^^^^^^^^^^^^
======================== ============================ =====================================================
Name Internal Type Comment
======================== ============================ =====================================================
Version ``TString`` GIT version of ``TMusrRunHeader``
Generic Validator URL ``TString`` URL of the generic ``MusrRoot`` validation xsd-file.
Specific Validator URL ``TString`` URL of the instrument specific validation xsd-file.
Generator ``TString`` Program which wrote the ``MusrRoot`` file, *e.g.* ``nemu_analyzer``
File Name ``TString`` File name of the ``MusrRoot`` file, *e.g.* ``deltat_tdc_gps_4295.root``
Run Title ``TString``
Run Number ``Int_t``
Run Start Time ``TString`` ISO 8601 date time
Run Stop Time ``TString`` ISO 8601 date time
Run Duration ``TMusrRunPhysicalQuantity`` run duration in sec
Laboratory ``TString`` *e.g.* PSI
Instrument ``TString`` *e.g.* GPS
Muon Beam Momentum ``TMusrRunPhysicalQuantity`` *e.g.* 28.1 MeV/c
Muon Species ``TString`` positive, or negative muon
Muon Source ``TString`` *e.g.* Target E - Low Energy Muons or "Target M" ...
Setup ``TString``
Comment ``TString``
Sample Name ``TString``
Sample Temperature ``TMusrRunPhysicalQuantity`` *e.g.* 3.21 +- 0.05 K; SP: 3.2; CF1
Sample Magnetic Field ``TMusrRunPhysicalQuantity`` *e.g.* 350.002 +- 0.005 G; SP: 350; WXY
No of Histos ``Int_t``
Time Resolution ``TMusrRunPhysicalQuantity`` *e.g.* 0.1953125 ns
RedGreen Offsets ``TIntVector`` *e.g.* 0; 20
======================== ============================ =====================================================
These entries should be clear except for the ``RedGreen Offsets`` and the column "Internal Type" which shortly will be discussed before specifying the content of the other required folders.
#. ``RedGreen Offsets``: in case experiments are performed with external stimuli, there will be a collection of related histograms.
For instance for electrical field experiments, there will be histograms for field on/off, doubling the number of needed histograms.
In order to distinguish them easier in the data file, the ``RedGreen Offsets`` were introduced. One selection of histograms
(assuming for the moment 8 detectors) will be numbered from 1 to 8 (lets say the field off ones). The other set of histograms
(field on in this example) will then start with 21 through 28 (see table above). The same will be true for the detector information
(see :ref:`DetectorInfo Required <detector-info-required>`). The entry ``No of Histos`` will only give 8 for the given example,
meaning that red/green multiplication is defined rather via ``RedGreen Offsets`` than the number of histograms.
#. Internal Types: in order to ease the handling of the ``MusrRoot`` run header, a class ``TMusrRunHeader`` is available which deals
with it. The "Internal Type" specified, corresponds to the internal representation in within this class. In the ``MusrRoot`` file
these entries are all saved as browsable ROOT strings (``TObjStringv). The only special type is ``TMusrRunPhysicalQuantity`` which
is introduced to deal with physical quantities. They always can be represented in the following way:
::
<property name> <value> +- <estimated error> <unit>; SP: <demand>; <description>
Not all of these values are needed to be given and depending on which are given, the representation in the ``MusrRootv file will be different (handled by ``TMusrRunHeader``). Examples are given in the comment column of the table above. For details see :ref:`TMusrRunPhysicalQuantity - Possible Representations <musr-run-physical-quantity>`.
A mock-up ``TBrowser`` print-out would look like the one shown in the following figure. You might notice, that at the end of each entry you find a ``-@X``, where ``X`` is a number. This is an encoding of the internal type of the entry and is the price to be payed not using derived types. The next section will explain this in much more detail.
.. image:: ../images/MusrRoot-RunInfo.*
``TMusrRunHeader`` mock up. The red shaded entries are of type ``TMusrRunPhysicalQuantity``
.. _musr-run-header-concept:
TMusrRunHeader Concept
----------------------
The different |mgr|\SR instruments need different information to be written into the data file (next to the most important ones: the histograms). The above defined properties are the *minimal number of required* ones. There are different possible approaches to deal with it on the implementation level.
* A base class dealing with *minimal* required standard is defined. Afterwards for each instrument a class
is derived which is extending the base class to the needs of the instrument.
* The base class is defined in a more abstract way, and some external, text-based description is given which defines the details of the instrument.
Even though the first approach is very clean, it would mean a lot of maintenance work. The 2nd approach is slightly more demanding for the handling class (``TMusrRunHeader`` and helper classes), but having the advantage of easy maintainability and expandability. The idea is that all header information can be classified into 7 groups (see previous and following section(s))
#. Strings, represented by ``TString``
#. Integers, represented by ``Int_t``
#. Floating point numbers, represented by ``Double_t``
#. Physical quantities, represented by :ref:`TMusrRunPhysicalQuantity - Possible Representations <musr-run-physical-quantity>`
#. Collection of strings, represented by ``TStringVector``
#. Collection of integers, represented by ``TIntVector``
#. Collection of floating point numbers, represented by ``TDoubleVector``
These properties can be collected by themselves in form of vectors. This way any needed information can be written into the ROOT file. The class ``TMusrRunHeader`` is implementing this run header concept. In following section code snippets will be discussed, showing how this is used on level of the ``MIDAS`` analyzer, ``musrfit`` reader routine, and ``any2many`` conversion routines. The section :ref:`Validation <musr-root-validation>` will discuss how to validate ``MusrRoot`` files.
User Interface for MusrRoot Run Header
++++++++++++++++++++++++++++++++++++++
There are two things needed to deal with the ``MusrRoot`` run header, namely writing it and reading it. I will start with the writing as will be done in the ``MIDAS`` analyzer.
Writing a MusrRoot Run Header
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
An example program ``write_musrRoot_runHeader`` which is writing a full run header is part of the ``musrfit`` package. Here I will concentrate just on the most essential parts. First one needs an instance of ``TMusrRunHeader``
.. code-block:: c++
TMusrRunHeader *header = new TMusrRunHeader();
TMusrRunPhysicalQuantity prop;
``header`` is the instance of ``TMusrRunHeader``. ``prop`` is an instance of ``TMusrRunPhysicalQuantity`` which will be needed further down in the description. In the next step some run header entries will be added
.. code-block:: c++
header->Set("RunInfo/File Name", "deltat_tdc_gps_2871.root");
header->Set("RunInfo/Run Title", "here comes the run title");
header->Set("RunInfo/Run Number", 2871);
Adding information is done via the multiple overloaded ``Set(<pathName>,<value>)`` method. Here ``<pathName>`` is a string representing the "path" like representation in the ``MusrRoot`` file structure, followed by the "value" to be set, *e.g.* "=File Name=". ``<value>`` can be any of the types listed at the beginning of :ref:`Sec. TMusrRunHeader Concept <musr-run-header-concept>`. Here a few examples how to set ``TMusrRunPhysicalQuantity``.
.. code-block:: c++
prop.Set("Sample Temperature", 3.2, 3.21, 0.05, "K", "CF1");
header->Set("RunInfo/Sample Temperature", prop);
prop.Set("Time Resolution", 0.1953125, "ns", "TDC 9999");
header->Set("RunInfo/Time Resolution", prop);
prop.Set("CF3", MRH_UNDEFINED, 3.27, 0.09, "K", "strange temperature");
header->Set("SampleEnvironmentInfo/CF3", prop);
Here ``TMusrRunPhysicalQuantity`` objects are fed via the use of the overloaded set-method. For details see :ref:`TMusrRunPhysicalQuantity - Possible Representations <musr-run-physical-quantity>`.
To set some property within "sub-sub-directories" it would like this:
.. code-block:: c++
header->Set("DetectorInfo/Detector001/Time Zero Bin", 3419.0);
To write the whole run header into a file would look something like this:
.. code-block:: c++
TFile *f = new TFile(fileName, "RECREATE", "write_musrRoot_runHeader");
if (f->IsZombie()) {
delete f;
return -1;
}
// create the needed TFolder object
TFolder *runHeader = new TFolder("RunHeader", "MusrRoot Run Header Info");
// create the "directory" structure
if (header->FillFolder(runHeader)) {
runHeader->Write(); // write run header to file
}
f->Close();
Reading a MusrRoot Run Header
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The following code snippet shows how the extract the full run header from the ``MusrRoot`` file.
.. code-block:: c++
TFile *f = new TFile(fileName, "READ", "read_musrRoot_runHeader");
if (f->IsZombie()) {
delete f;
return -1;
}
TFolder *runHeader = 0;
f->GetObject("RunHeader", runHeader);
if (runHeader == 0) {
cerr << endl << ">> **ERROR** Couldn't get top folder RunHeader";
closeFile(f);
return -1;
}
TMusrRunHeader *header = new TMusrRunHeader(fileName);
if (!header->ExtractAll(runHeader)) {
cerr << endl << ">> **ERROR** couldn't extract all RunHeader information";
closeFile(f);
return -1;
}
f->Close();
delete f;
The routine ``ExtractAll(TFolder *runHeader)`` decodes all the ``TObjString`` objects and fills internal data structures. This means when reading a MusrRoot -file the above handling is always needed. After the ``ExtractAll`` call, parameters can be extracted via the getter routines available. For instance to read the Run Number, the code would look like
.. code-block:: c++
Bool_t ok;
Int_t ival;
header->Get("RunInfo/Run Number", ival, ok);
if (ok)
cout << endl << "Run Number: " << ival;
else
cout << endl << "**ERROR** Couldn't obtain the 'Run Number'.";
Reading a ``TMusrRunPhysicalQuantity`` object, *e.g.* the sample temperature looks like this
.. code-block:: c++
TMusrRunPhysicalQuantity prop;
header->Get("RunInfo/Sample Temperature", prop, ok);
if (ok) {
cout << endl << "Sample Temperature: " << prop.GetValue() << " +- ";
cout << prop.GetError() << " " << prop.GetUnit().Data();
cout << "; SP: " << prop.GetDemand() << "; " << prop.GetDescription().Data();
} else {
cout << endl << "**ERROR** Couldn't obtain the 'Sample Temperature'.";
}
.. index:: MusrRoot-Validation
.. _musr-root-validation:
Validation of a MusrRoot File
+++++++++++++++++++++++++++++
Since ``MusrRoot`` is an open and extensible file format a mechanism is needed to validate that a given file is indeed holding the minimum of required entries. To check this the following scheme is implemented in the program ``musrRootValidation``:
.. image:: ../images/MusrRootValidationScheme.*
``MusrRoot`` validation scheme
In the following this validation scheme will be discussed as it is implemented in ``musrRootValidation``:
#. It is checked if the given file name is a ``TFile``
#. The file structure is recursively parsed and mapped into an temporary XML file. XML is used
since there are ample of parser and validation frameworks at hand. For details check any decent
book about XML. Here the ``libxml2`` is used, because also ROOT is requiring it.
#. In a next step the XML file (holding the structure of the supposed ``MusrRoot`` file is validated
against a XML schema. The minimum of required entries is described by ``MusrRoot.xsd`` which is
part of ``musrfit`` but also available from the PSI/LMU web-page.
#. If the schema validation is successful additional semantic checks (like is the number of decay
histograms the same as the number of detector entries, etc.) will be preformed.
This validation scheme is useful for people which define instrument specific extensions of the base ``MusrRoot``, as for instance the LEM instrument at PSI. It is also useful for people writing file converters in order to cross check if the generated file is valid.
.. _run-info-required:
RunInfo (Required)
------------------
========================== ============================= =====================================================
Name Internal Type Comment
========================== ============================= =====================================================
Version ``TString`` GIT version of ``TMusrRunHeader``
Generic Validator URL ``TString`` URL of the generic ``MusrRoot`` validation xsd-file.
*e.g.* `<http://lmu.web.psi.ch/facilities/software/MusrRoot/Validation/MusrRoot.xsd>`_
Specific Validator URL ``TString`` URL of the instrument specific validation xsd-file.
*e.g.* for LEM: `<http://lmu.web.psi.ch/facilities/software/MusrRoot/Validation/MusrRootLEM.xsd>`_
Generator ``TString`` Program which wrote the ``MusrRoot`` file, *e.g.* ``nemu_analyzer``
File Name ``TString`` File name of the ``MusrRoot`` file, *e.g.* ``deltat_tdc_gps_4295.root``
Run Title ``TString``
Run Number ``Int_t``
Run Start Time ``TString`` ISO 8601 date time
Run Stop Time ``TString`` ISO 8601 date time
Run Duration ``TMusrRunPhysicalQuantity`` run duration in sec
Laboratory ``TString`` *e.g.* PSI
Instrument ``TString`` *e.g.* GPS
Muon Beam Momentum ``TMusrRunPhysicalQuantity`` *e.g.* 28.1 MeV/c
Muon Species ``TString`` poitive or negative muon
Muon Source ``TString`` *e.g.* "Target E - Low Energy Muons" or "Target M" ...
Setup ``TString``
Comment ``TString``
Sample Name ``TString``
Sample Temperature ``TMusrRunPhysicalQuantity`` *e.g.* 3.21 +- 0.05 K; SP: 3.2; CF1
Sample Magnetic Field ``TMusrRunPhysicalQuantity`` *e.g.* 350.002 +- 0.005 G; SP: 350; WEW
No of Histos ``Int_t``
Time Resolution ``TMusrRunPhysicalQuantity`` *e.g.* 0.1953125 ns
RedGreen Offsets ``TIntVector`` *e.g.* 0; 20
========================== ============================= =====================================================
.. _detector-info-required:
DetectorInfo (Required)
-----------------------
The ``DetectorInfo`` is organized in a sub-tree like
::
DetectorInfo ---|
|- Detector001
|- Detector002
...
For each histogram in the ``histos/DecayAnaModule`` corresponds detector entry here.
The numbering of the detectors has to correspond the its histogram, *e.g.* ``hDecay023 <=> Detector023``, *i.e.* potentially discontinuous to show red / green breaks.
``Detector<XXX>`` has the elements
========================== ============================= =====================================================
Name Internal Type Comment
========================== ============================= =====================================================
Name ``TString`` detector name, *e.g.* Left-NPP
Histo Number ``Int_t`` histogram number. This number corresponds to the histogram
number in the ``histos/DecayAnaModule`` sub-tree.
Histo Length ``Int_t`` length of the histogram (in bins)
Time Zero Bin ``Double_t`` The type is ``Double_t`` since for the high-field spectrometer
at PSI an ``Int_t`` representation would be not good enough.
First Good Bin ``Int_t``
Last Good Bin ``Int_t``
========================== ============================= =====================================================
.. _sample-environment-info-required:
SampleEnvironmentInfo (Required)
--------------------------------
Here only a single entry is required, namely
========================== ============================= =====================================================
Name Internal Type Comment
========================== ============================= =====================================================
Cryo ``TString`` name of the used cryostat/oven, *e.g.* ``Konti-2``
========================== ============================= =====================================================
.. _magnetic-field-environment-info-required:
MagneticFieldEnvironmentInfo (Required)
---------------------------------------
Here only a single entry is required, namely
========================== ============================= =====================================================
Name Internal Type Comment
========================== ============================= =====================================================
Magnet Name ``TString`` name of the used magnet, *e.g.* ``WEW``.
In case of ZF measurements, there might be an entry like ZF.
========================== ============================= =====================================================
.. _beamline-info-required:
BeamlineInfo (Required)
-----------------------
Here only a single entry is required, namely
========================== ============================= =====================================================
Name Internal Type Comment
========================== ============================= =====================================================
Name ``TString`` name of the beamline, *e.g.* ``piM3.2``
========================== ============================= =====================================================
Exhaustive MusrRoot Tree Including Everything Required
------------------------------------------------------
Here it is assumed that there are hypothetical *red / green data* with electric field on/off and light on/off,
and hence 4 data sets per detector, and 8 detectors of the instrument: ``left/forward``, ``top/forward``, ``right/forward``,
``bottom/forward``, ``left/backward``, ``top/backward``, ``right/backward``, ``bottom/backward``. To show the whole
tree structure, it will be split in the representation afterwards, but keep in mind: this will be all part of a
single ``MusrRoot`` file. I will add comments in the tree structure by the symbol ``#``. Lets start with the |mgr|\SR data histograms:
::
histos -|
|- DecayAnaModule -|
|- hDecay001 # left/forward, electric field off, light off
|- hDecay002 # top/forward, electric field off, light off
|- hDecay003 # right/forward, electric field off, light off
|- hDecay004 # bottom/forward, electric field off, light off
...
|- hDecay007 # right/backward, electric field off, light off
|- hDecay008 # bottom/backward, electric field off, light off
|- hDecay011 # left/forward, electric field on, light off
|- hDecay012 # top/forward, electric field on, light off
|- hDecay013 # right/forward, electric field on, light off
|- hDecay014 # bottom/forward, electric field on, light off
...
|- hDecay017 # right/backward, electric field on, light off
|- hDecay018 # bottom/backward, electric field on, light off
|- hDecay021 # left/forward, electric field off, light on
|- hDecay022 # top/forward, electric field off, light on
|- hDecay023 # right/forward, electric field off, light on
|- hDecay024 # bottom/forward, electric field off, light on
...
|- hDecay027 # right/backward, electric field off, light on
|- hDecay028 # bottom/backward, electric field off, light on
|- hDecay031 # left/forward, electric field on, light on
|- hDecay032 # top/forward, electric field on, light on
|- hDecay033 # right/forward, electric field on, light on
|- hDecay034 # bottom/forward, electric field on, light on
...
|- hDecay037 # right/backward, electric field on, light on
|- hDecay038 # bottom/backward, electric field on, light on
...
*Comments*: as can be seen the histograms are continuous numbered until there is a red / green mode switch where
the histogram number "jumps" (*e.g.* from ``008`` to ``011``). In order to fill in the different red / green
histograms an offset is added (here 10, 20, and 30).
Next the whole ``RunHeader``. Here the information will be grouped in different folders collecting related information,
like general run info, detector info, sample and magnetic field environment info, beamline info, etc.
::
RunInfo:
000 - Version: $Id: TMusrRunHeader.cpp 5092 2012-03-13 07:47:00Z nemu $ -@0
001 - Generic Validator URL: http://lmu.web.psi.ch/facilities/software/MusrRoot/Validation/MusrRoot.xsd -@0
002 - Specific Validator URL: http://lmu.web.psi.ch/facilities/software/MusrRoot/Validation/MusrRootLEM.xsd -@0
003 - Generator: nemu_analyzer -@0
004 - File Name: lem12_his_0234.root -@0
005 - Run Title: here comes the run title -@0
006 - Run Number: 234 -@1
007 - Run Start Time: 2012-04-19 14:25:22 -@0
008 - Run Stop Time: 2012-04-19 19:13:47 -@0
009 - Run Duration: 17305 sec -@3
010 - Laboratory: PSI -@0
011 - Instrument: LEM -@0
012 - Muon Beam Momentum: 28.1 MeV/c -@3
013 - Muon Species: positive muon -@0
014 - Muon Source: target E -@0
015 - Setup: a very special setup -@0
016 - Comment: nothing more to be said -@0
017 - Sample Name: the best ever -@0
018 - Sample Temperature: 3.21 +- 0.05 K; SP: 3.2 -@3
019 - Sample Magnetic Field: 350.002 +- 0.005 G; SP: 350 -@3
020 - No of Histos: 8 -@1
021 - Time Resolution: 0.1953125 ns; TDC 9999 -@3
022 - RedGreen Offsets: 0; 10; 20; 30
DetectorInfo:
Detector001:
023 - Name: Left/Forward - electric field off, light off -@0
024 - Histo Number: 1 -@1
025 - Histo Length: 66661 -@1
026 - Time Zero Bin: 3419.000000 -@2
027 - First Good Bin: 3419 -@1
028 - Last Good Bin: 66661 -@1
Detector002:
029 - Name: Top/Forward - electric field off, light off -@0
030 - Histo Number: 2 -@1
031 - Histo Length: 66661 -@1
032 - Time Zero Bin: 3419.000000 -@2
033 - First Good Bin: 3419 -@1
034 - Last Good Bin: 66661 -@1
...
Detector038:
213 - Name: Bottom/Backward - electric field on, light on -@0
214 - Histo Number: 38 -@1
215 - Histo Length: 66661 -@1
216 - Time Zero Bin: 3419.000000 -@2
217 - First Good Bin: 3419 -@1
218 - Last Good Bin: 66661 -@1
SampleEnvironmentInfo:
219 - Cryo: Konti-1 -@0
220 - Insert: X123 -@0
221 - Orientation: c-axis perp spin, perp field. spin perp field -@0
MagneticFieldEnvironmentInfo:
222 - Magnet Name: WEW -@0
223 - Current: 17.34 A -@3
BeamlineInfo:
224 - Name: muE4 -@0
ScalerInfo:
225 - Ip: 12332123 -@1
RunSummary:
0000 - Wed Oct 5 01:30:37 2011 Run 2856 started.
0001 - Wed Oct 5 02:02:51 2011 Run 2856 stopped.
0002 -
0003 - LCO, T=170.02(K), wTF ~30(G)/5.18(A), Tr/Sa=15.02/8.50(kV), E=5.63(keV), LEDb off, BP off
0004 - =========================================================================================
0005 -
0006 - #BUC---- B e g i n of User Comment ------ Do not edit this line
0007 - #EUC---- E n d of User Comment ------ Do not edit this line
0008 -
0009 - ====================== E v e n t definition =========================
0010 -
0011 - Events:
0012 - Event_0: (BC)-MCP1-(e+); Event_1:( BC)-TD-MCP2-(e+); Event_2: LEmuSR, (BC)-TD-e
...
*Comment*: the last sub-tree ``RunSummary`` is not following ``TMusrRunHeader`` rule ``<number> - <label>: <value> -@<type>``.
It is added in the instrument analyzer directly by other means than the ``TMusrRunHeader::Set``-method. This is no problem!
Since ``RunSummary`` is not part of the required ``MusrRoot``-file. One is quite free in adding any ROOT based information here.
.. index:: MusrRoot-TMusrRunPhysicalQuantity
.. _musr-run-physical-quantity:
TMusrRunPhysicalQuantity - Possible Representations
---------------------------------------------------
A physical property can be described as
::
<property name>: <value> +- <estimated error> <unit>; SP: <demand>; <description>
where ``<property name>`` is the name of the quantity, *e.g.* Sample Temperature, ``<value>`` the value
of the quantity, ``<estimated error>`` the error estimate, *e.g.* the standard deviation, ``<unit>`` the unit,
*e.g.* K, ``<demand>`` a demand value, *e.g.* the set point of the temperature. ``<description>`` is a
possible additional comment for this quantity.
.. note::
Not *all* of these quantities are always needed. The list of handled combination are given
hereafter together with the ``C++`` code snipped how to set it. It is assumed that ``TMusrRunPhysicalQuantity prop;``
is somewhere defined.
**Possibility 1**
::
<property name>: <value> <unit> [; <description>]
Code snippet:
.. code-block:: c++
prop.Set("Muon Beam Momentum", 28.1, "MeV/c");
header->Set("RunInfo/Muon Beam Momentum", prop);
prop.Set("Time Resolution", 0.1953125, "ns", "TDC 9999");
header->Set("RunInfo/Time Resolution", prop);
Result in the ``RunHeader/RunInfo``:
::
011 - Muon Beam Momentum: 28.1 MeV/c -@3
013 - Time Resolution: 0.1953125 ns; TDC 9999 -@3
The number on front of the token (*e.g.* ``011`` in front of Muon Beam Momentum) will depend on the position where
the entry has been added. The last token, ``-@3``, is the encoding of the type: here ``TMusrRunPhysicalQuantity``.
**Possibility 2**
::
<property name>: <val> +- <err> <unit>[; <description>]
Code snippet:
.. code-block:: c++
prop.Set("CF3", MRH_UNDEFINED, 3.27, 0.09, "K", "strange temperature");
header->Set("SampleEnvironmentInfo/CF3", prop);
Result in the ``RunHeader/SampleEnvironmentInfo``:
::
033 - CF3: 3.27 +- 0.09 K; strange temperature -@3
**Possibility 3**
::
<property name>: <val> <unit>; SP: <demand>[; <description>]
Code snippet:
.. code-block:: c++
prop.Set("CF4", 3.25, 3.28, "K");
header->Set("SampleEnvironmentInfo/CF4", prop);
prop.Set("CF5", 3.26, 3.29, "K", "another strange temperature");
header->Set("SampleEnvironmentInfo/CF5", prop);
Result in the ``RunHeader/SampleEnvironmentInfo``:
::
034 - CF4: 3.28 K; SP: 3.25 -@3
035 - CF5: 3.29 K; SP: 3.26; another strange temperature -@3
**Possibility 4**
::
<property name>: <value> +- <estimated error> <unit>; SP: <demand>; <description>
Code snippet:
.. code-block:: c++
prop.Set("Sample Magnetic Field", 350.0, 350.002, 0.005, "G", "WXY");
header->Set("RunInfo/Sample Magnetic Field", prop);
Result in the ``RunHeader/SampleEnvironmentInfo``:
::
017 - Sample Magnetic Field: 350.002 +- 0.005 G; SP: 350.0; WXY -@3

View File

@ -0,0 +1,515 @@
.. include:: <isogrk1.txt>
.. index:: musredit
.. _musredit-sec:
``musredit``: the GUI Based Interface to ``musrfit``
====================================================
Introduction
------------
.. _Qt: https://qt.io
``musredit`` is an editor which also provide a graphical user interface to the programs contained in the ``musrfit`` suite and are intended
to help the user handle ``musrfit`` msr files. It is implemented in ``C++`` and use the `Qt`_ framework. ``musredit`` is based on Qt 4.6 or Qt 5.6 (or above).
The Qt 5.6 version of ``musredit`` will be actively developed, whereas the Qt 4.x version will only get bug fixing and eventually will be dropped.
On this documentation page only the features related to ``musrfit`` are described — the basic editor functions which should be self-explanatory are *not*.
``musrgui`` is an outdated early version of ``musredit`` and will not described anymore. If still in use, the user is urged to switch to ``musredit``.
.. note::
Before going on using ``musredit`` it is strongly recommended to read the :ref:`manual of musrfit <user-manual>` first!
Available Executable, Configuration Files and their Basic Usage
----------------------------------------------------------------
musredit (musrgui)
++++++++++++++++++
``musredit`` (``musrgui``) is the editor executable. If called from within a shell it accepts a few optional parameters:
**<msr-files>**
File names of the msr files that should be opened in separate editor tabs on startup of ``musredit``.
**- -help**
Displays a small help notice in the shell explaining the basic usage of the program.
**- -version**
Prints the version number of ``musredit``.
If called without any parameters an empty editor window opens.
.. index:: musredit_startup
musredit_startup.xml
++++++++++++++++++++
``musredit_startup.xml`` is the configuration file located under ``$HOME\.musrfit\musredit``. It is also possible to have another version
of this file in the working directory which then will be used!
In this file the following ``XML`` tags are allowed to define settings and might proof useful for all users of ``musredit``:
**<general></general>**
set the default paths to executable and files in this environment
**<exec_path>PATH_TO_EXEC</exec_path>**
set the path ``PATH_TO_EXEC`` where the executable ``musrfit``, ``musrview``, ``musrt0``, etc. can be found (inside the ``<general>`` environment)
**<default_save_path>SAVE_PATH</default_save_path>**
specify the path ``SAVE_PATH`` where ``musredit`` point by default when opening and saving msr files (inside the ``<general>`` environment). Default is the current directory.
**<msr_default_file_path>MSR_DEF_PATH</msr_default_file_path>**
set the path ``MSR_DEF_PATH`` where the default msr files provided by ``musredit`` are stored (inside the ``<general>`` environment)
**<timeout>3600</timeout>**
timeout in seconds after which :ref:`musrview <musrview>` canvas will automatically quit. A value of 0 or
a negative number will keep the ``musrview`` canvas open without self-determination.
**<keep_minuit2_output>y/n</keep_minuit2_output>**
flag indicating if the ``MINUIT2`` output shall be kept per msr-file ('y') or only for the current msr-file ('n').
**<dump_ascii>y/n</dump_ascii>**
flag indicating if ``musrfit`` shall dump fit data into ascii format. See help of :ref:`musrfit <musrfit>`.
**<dump_root>y/n</dump_root>**
flag indicating if ``musrfit`` shall dump fit data into root format. See help of :ref:`musrfit <musrfit>`.
**<title_from_data_file>y/n</title_from_data_file>**
specify if ``musrfit`` should be called with the ``-t`` option by default (inside the ``<general>`` environment)
**<chisq_pre_run_block>y/n</chisq_pre_run_block>**
flag indicating if per-run chisq shall be written into the msr-output-file.
**<estimate_n0>y/n</estimate_n0>**
flag indicating if for a single histogram fit :math:`N_0` shall be estimated before the fit procedure starts.
**<musrview_show_fourier>y/n</musrview_show_fourier>**
flag indicating if ``musrview`` will directly present the Fourier transform rather than the time domain data.
**<musrview_show_avg>y/n</musrview_show_avg>**
flag indicating if ``musrview`` will directly present averaged data, typically used for Fourier power spectra.
**<enable_musrt0>y/n</enable_musrt0>**
specify if :ref:`musrt0 <musrt0>` can be called from within ``musredit`` (inside the ``<general>`` environment)
**<font_settings></font_settings>**
set the default font in this environment
**<font_name>FONT</font_name>**
specify the name of the font ``FONT`` to be used by default in ``musredit`` (inside the ``<font_settings>`` environment)
**<font_size>N</font_size>**
specify the size ``N`` of the font to be used by default in ``musredit`` (inside the ``<font_settings>`` environment)
**<msr_file_defaults></msr_file_defaults>**
put the default settings for newly created msr files in this environment
**<beamline>BL</beamline>**
set the name of the muon beamline ``BL`` here (inside a ``<msr_file_defaults>`` environment)
**<institute>INST</institute>**
set the name of the facility ``INST`` where the beamline ``BL`` is located. Valid settings are ``PSI``, ``RAL``, ``JPARC``, and ``TRIUMF`` (inside a ``<msr_file_defaults>`` environment)
**<file_format>FF</file_format>**
specify the default data file format ``FF`` here. Valid formats are ``NEXUS``, ``MUSR-ROOT``, ``ROOT-NPP``, ``ROOT-PPC``, ``PSI-BIN``, ``PSI-MDU``, ``MDU-ASCII``, ``WKM``, ``MUD``, ``ASCII``, and ``DB`` (inside a ``<msr_file_defaults>`` environment)
**<lifetime_correction>y/n</lifetime_correction>**
choose if by default the ``lifetimecorrection`` option should be set (inside a ``<msr_file_defaults>`` environment)
**<msr2data_defaults></msr2data_defaults>**
define the default options for calling :ref:`msr2data <msr2data>` in this environment; the options set here are ticked by default in the graphical interface of ``musredit``.
**<chain_fit>y/n</chain_fit>**
(un)set the chain fit (!) option (inside a ``<msr2data_defaults>`` environment)
**<write_data_header>y/n</write_data_header>**
(un)set the noheader option (inside a ``<msr2data_defaults>`` environment)
**<ignore_data_header_info>y/n</ignore_data_header_info>**
(un)set the nosummary option (inside a ``<msr2data_defaults>`` environment)
**<keep_minuit2_output>y/n</keep_minuit2_output>**
(un)set the ``-k`` option (inside a ``<msr2data_defaults>`` environment)
**<write_column_data>y/n</write_column_data>**
(un)set the ``data`` option (inside a ``<msr2data_defaults>`` environment)
**<create_msr_file_only>y/n</create_msr_file_only>**
(un)set the ``msr`` option in case a template run is specified (inside a ``<msr2data_defaults>`` environment)
**<fit_only>y/n</fit_only>**
(un)set the ``fit`` option in case no template run is specified (inside a ``<msr2data_defaults>`` environment)
**<global>y/n</global>**
(un)set the ``global`` option (inside a ``<msr2data_defaults>`` environment)
**<global_plus>y/n</global_plus>**
(un)set the ``global+`` option (inside a ``<msr2data_defaults>`` environment)
**<recreate_data_file>y/n</recreate_data_file>**
(un)set the ``musredit`` option for recreating the output file (inside a ``<msr2data_defaults>`` environment)
**<open_file_after_fitting>y/n</open_file_after_fitting>**
(un)set the ``musredit`` option for opening msr files after fitting (inside a ``<msr2data_defaults>`` environment)
Additionally, there are some settings defined in this XML file which should be only changed by experienced users who like to add new features to ``musredit``:
**<help_section></help_section>**
define various help messages in this environment
**<musr_web_X>LINK</musr_web_X>**
define the ``LINK`` to the help page ``musr_web_X``, where ``X`` is ``main``, ``title``, ``parameters``, ``theory``, ``functions``, ``run``,
``command``, ``fourier``, ``plot``, ``statistics``, ``msr2data``, or ``musrFT`` (inside a ``<help_section>`` environment)
**<func_pixmap_path>PIX_PATH</func_pixmap_path>**
set the path ``PIX_PATH`` to LaTeX pixmaps visualizing the various supported theory functions
**<theory_functions></theory_functions>**
define the functions for a msr file's :ref:`THEORY block <msr-theory-block>` according to the correct syntax in this environment
**<func></func>**
specify a function here (inside a ``<theory_functions>`` environment)
**<name>NAME</name>**
the ``NAME`` of the function in the msr file (inside a ``<func>`` environment)
**<comment>COMMENT</comment>**
description of the used parameters (inside a ``<func>`` environment)
**<label>LABEL</label>**
``LABEL`` of the function in the ``musredit`` menu (inside a ``<func>`` environment)
**<pixmap>PIXMAP</pixmap>**
LaTeX picture used to describe the function and stored in the ``PIX_PATH`` (inside a ``<func>`` environment)
**<params>N</params>**
number of parameters ``N`` used by the function (inside a ``<func>`` environment)
An example of the ``musredit_startup.xml`` looks like:
.. code-block:: xml
<?xml version="1.0" encoding="UTF-8"?>
<musredit_startup xmlns="http://lmu.web.psi.ch/musrfit/user/MUSR/MusrGui.html">
<comment>
This is handling default setting parameters for the musredit.
</comment>
<general>
<exec_path>/usr/local/root/bin</exec_path>
<default_save_path>./</default_save_path>
<msr_default_file_path>/usr/local/root/share/doc/musrfit/templates</msr_default_file_path>
<timeout>3600</timeout>
<keep_minuit2_output>n</keep_minuit2_output>
<dump_ascii>n</dump_ascii>
<dump_root>n</dump_root>
<title_from_data_file>y</title_from_data_file>
<chisq_per_run_block>n</chisq_per_run_block>
<estimate_n0>y</estimate_n0>
<musrview_show_fourier>n</musrview_show_fourier>
<musrview_show_avg>n</musrview_show_avg>
<enable_musrt0>y</enable_musrt0>
</general>
<recent_files>
<path_file_name>/usr/local/root/share/doc/musrfit/examples/test-histo-PSI-BIN.msr</path_file_name>
</recent_files>
<help_section>
<musr_web_main>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html</musr_web_main>
<musr_web_title>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#TheTitle</musr_web_title>
<musr_web_parameters>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#TheFitparameterBlock</musr_web_parameters>
<musr_web_theory>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#TheTheoryBlock</musr_web_theory>
<musr_web_functions>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#TheFunctionsBlock</musr_web_functions>
<musr_web_run>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#TheRunBlock</musr_web_run>
<musr_web_command>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#TheCommandsBlock</musr_web_command>
<musr_web_fourier>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#TheFourierBlock</musr_web_fourier>
<musr_web_plot>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#ThePlotBlock</musr_web_plot>
<musr_web_statistic>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#TheStatisticBlock</musr_web_statistic>
<musr_web_msr2data>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/Msr2Data.html</musr_web_msr2data>
<musr_web_musrFT>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#A_2.3_musrFT</musr_web_musrFT>
</help_section>
<font_settings>
<font_name>Monospace</font_name>
<font_size>12</font_size>
</font_settings>
<msr_file_defaults>
<beamline>mue4</beamline>
<institute>psi</institute>
<file_format>musr-root</file_format>
<lifetime_correction>y</lifetime_correction>
</msr_file_defaults>
<msr2data_defaults>
<chain_fit>y</chain_fit>
<write_data_header>y</write_data_header>
<ignore_data_header_info>n</ignore_data_header_info>
<keep_minuit2_output>n</keep_minuit2_output>
<write_column_data>n</write_column_data>
<recreate_data_file>n</recreate_data_file>
<open_file_after_fitting>y</open_file_after_fitting>
<create_msr_file_only>n</create_msr_file_only>
<fit_only>n</fit_only>
<global>n</global>
<global_plus>n</global_plus>
</msr2data_defaults>
<func_pixmap_path>/usr/local/root/share/doc/musrfit/latex_images</func_pixmap_path>
<theory_functions>
<func>
<name>asymmetry</name>
<comment></comment>
<label>Asymmetry</label>
<pixmap>asymmetry.png</pixmap>
<params>1</params>
</func>
<func>
<name>statGssKT</name>
<comment>(rate)</comment>
<label>static Gauss KT</label>
<pixmap>statGssKT.png</pixmap>
<params>1</params>
</func>
</theory_functions>
</musredit_startup>
.. index:: musredit-features
musredit Features
-----------------
The features of ``musrfit`` which can be accessed by the graphical front ends ``musredit`` will be described in the following. All functions
can either be called by choosing them from the *MusrFit menu*, by clicking the respective button in the *MusrFit bar*, or by using a *keyboard shortcut*.
**musrWiz**
.. image:: ../images/musrWiz.*
``musrWiz`` is a helper programs which allows to create a msr-file from scratch without too much a priori knowledge. For details see :ref:`musrWiz <musrWiz>`.
.. index:: musrWiz
.. _musrWiz:
**Calculate Chisq**
.. image:: ../images/musrchisq.*
Calls ``musrfit`` with the option ``-c``, *i.e.* calculates the :math:`\chi^2` or log max-likelihood for the active msr file tab. Shortcut-key: ``Alt+C``.
The equivalent call on the command line would be
.. code-block:: bash
$ musrfit -c <msr-file>
**Fit**
.. image:: ../images/musrfit.*
Calls ``musrfit`` for fitting of the active msr file in the currently active tab. Shortcut-key: ``Alt+F``.
The equivalent call on the command line could look like
.. code-block:: bash
$ musrfit <msr-file> [optional parameters]
The optional parameters may be chosen under :ref:`Preferences <musredit-prefs>`. For further information refer to the manual of :ref:`musrfit <user-manual>`.
**Swap Msr <-> Mlog**
.. image:: ../images/musrswap.*
Swap the msr and mlog files. *E.g.*, for a file called ``8472_zf.msr``, this is copied to ``8472_zf.mlog`` and vice versa. Shortcut-key: ``Alt+S``.
**Set Steps**
.. image:: ../images/musrStep.*
``musrStep`` allows to adjust the step size, *i.e.* the initial steps for the fitter. Shortcut-key: ``Alt+P``.
**Msr2Data**
.. image:: ../images/msr2data.*
Opens a graphical interface to the ``msr2data`` program described in detail in its :ref:`own manual <msr2data>`. Shortcut-key: ``Alt+2``.
**mupp**
.. image:: ../images/mupp.*
Application which allows to plot ``*.db`` and ``*.dat`` parameter files. Shortcut-key: ``Alt+U``.
For a detailed description see the :ref:`mupp docu <mupp>`.
**View**
.. image:: ../images/musrview.*
Calls ``musrview`` from the active tab of ``musredit``. For more details see the :ref:`musrview <musrview>` docu. Shortcut-key: ``Alt+V``.
The equivalent call on the command line could look like
.. code-block:: bash
$ musrview <msr-file> [optional parameters]
**T0**
.. image:: ../images/musrt0-icon.*
Calls ``musrt0`` which allows to set the ``T0`` values for all the runs. For more details see the :ref:`musrt0 <musrt0>` docu.
The equivalent call on the command line could look like
.. code-block:: bash
$ musrt0 <msr-file> [optional parameters]
**Raw Fourier**
.. image:: ../images/musrFT.*
Calls ``musrFT`` which allows to perform a Fourier transform of the raw data. For more details see the :ref:`musrFT <musrFT>` docu.
The equivalent call on the command line could look like
.. code-block:: bash
$ musrFT <msr-file> [optional parameters]
.. _musredit-prefs:
**Preferences**
.. image:: ../images/musrprefs.*
Opens a window in which the optional parameters that should be passed to musrfit can be chosen.
For further information refer to the manual of :ref:`musrfit <musrfit>`.
**Dump Header**
.. image:: ../images/musrdump.*
Opens a file dialog which allows to select a |mgr|\SR data file. When this file can be read, the run header info is dumped into a dialog window.
Essentially this calls ``dump_header`` internally.
musrWiz
-------
``musrWiz`` is a helper program which allows to easily create the necessary msr-file needed as an input for ``musrfit``.
``musrWiz`` is still in it's early stage; not all options are already implemented and here and there you will likely find some bugs.
From ``musredit`` it can be accessed via the MusrFit menu or the wand
.. image:: ../images/musredit-musrWiz.*
The ``musrWiz`` GUI is organized in a couple of different dialogues which some information needs to be provided by the user.
In the following these different dialogues will be discussed briefly.
.. index:: musrWiz-Introduction
musrWiz-Introduction
++++++++++++++++++++
The introduction dialogue
.. image:: ../images/musrWiz-Intro.*
#. an explicit msr-file name can be provided here. More often the msr-file name is generated out of the run number.
#. year of the run data.
#. run number. If no explicit msr-file is provided, the run number together with fit type and type of measurement will be used to generate the msr-file name.
#. from the pull down menu the institute (for which a necessary ``xml``-file is provided) has to be choosen.
#. from the pull down menu the the instrument can be chosen.
#. the fit type has to be chosen. Possible fit types are: ``Single Histo`` / ``Single Histo RRF`` / ``Asymmetry`` / ``Asymmetry RRF`` / ``Mu Minus`` / ``None muSR``
#. type of measurement is essentially needed for the grouping of the detectors. Possible are: ``ZF`` for zero field measurements / ``TF`` for transverse field measurements / ``LF`` for longitudinal field measurements.
Depending on the choice and instrument some additional question might be asked, *e.g.* which magnet has been used.
#. ``T0``'s: this last menu defines from where to get the t0's. The options are: ``from data file``, *i.e.* the t0 are assumed to be correctly set
in the provided data file ``call musrT0``, *i.e.* after the msr-file is generated, ``musrt0`` will be called which allows the user to find the
proper t0 from the prompt peak ``enter here`` will provide a pop-up menu where the t0 parameter can be given explicitly.
If all this information have been provided ``Next>`` will lead you the the theory dialogue.
.. index:: musrWiz-Theory
musrWiz - Theory
++++++++++++++++
The theory dialogue is used to define the fitting function. There are two ways of using it:
#. choose a template theory function. This option has the advantage that the next steps will be very easy because
within the template almost everything is already pre-defined. The disadvantage is that you are not free in setting
up your theory function as you would like to have.
#. freely write your theory function. The advantage here is that you can customize your theory function at your needs.
This will come at the cost that you also will need to define ``maps``, ``functions``, etc. yourself. The good thing
though is that at the very end you can save this as a template for future re-use.
First the template path will be described. The theory dialogue looks like this
.. image:: ../images/musrWiz-Theory.*
#. This is a text edit field were you can enter the theory fit function as you would like to have it. In the example
given the theory reads :math:`p1 \exp(-p2\, t) \cos(2 \pi\, f1 + m1)`, where ``pX`` stands for parameter, ``fX`` for function,
``mX`` for map, and ``X`` for the corresponding number.
#. The ``Clear All`` button will clear whatever you entered in the text field above.
#. This pull-down menu allows to select a theory function which will be added to the text field above by pressing
the ``Add`` button. Pre defined theory function starting with a ``T`` are templates rather than only theory function strings.
#. The ``Add`` button is used to add the chosen theory function / template from the pull-down menu to its left.
#. The ``Check`` button is used to make a syntactical check of whatever is written in the text edit field.
.. index:: musrWiz-Functions
musrWiz - Functions
+++++++++++++++++++
In the Functions dialogue all the necessary functions can be entered. A function operates *only* on fitting parameters.
This is different to the theory function which operates on the fitting parameters and the time. The dialogue looks like this
.. image:: ../images/musrWiz-Functions.*
#. a text edit field in which the various needed functions can be entered. In case a template theory is used, the appropriate function should be shown here and *no* editing will be needed here.
#. pressing ``Show Theory`` button will pop-up a little window showing the previously entered theory function. This is handy when defining its own theory, *i.e.* not working with a template.
.. image:: ../images/musrWiz-Functions-and-Theory.*
.. index:: musrWiz-Maps
musrWiz - Maps
++++++++++++++
.. image:: ../images/musrWiz-Maps.*
The map dialogue will list the maps previously used in the theory and functions blocks/dialogues before. Again, if a template is used, nothing needs to be entered here.
#. The ``Show Theory`` button allows to show the currently defined theory and the functions.
.. index:: musrWiz-FitParam
musrWiz - Fit Parameters
++++++++++++++++++++++++
.. image:: ../images/musrWiz-FitParam.*
In the fit parameter dialogue all parameter names can be defined. Furthermore the starting values for the parameters, the step
(initial step size for the parameter fit), and any boundaries can be defined here.
#. The ``Show Theory`` button allows to show the currently defined theory and the functions.
.. index:: musrWiz-FitInfo
musrWiz - Fit Info
++++++++++++++++++
Collects all the ``musrfit`` and ``MINUIT2`` specific fit commands.
.. image:: ../images/musrWiz-FitInfo.*
#. allows to define the time fit range (start time, end time).
#. packing defines how many bins of the original data shall be combined (added, also called re-binning).
#. in this text field to fitting commands are given (see the ``MINUIT`` and :ref:`musrfit <msr-commands-block>` manual for details).
.. index:: musrWiz-Create
musrWiz - Create
++++++++++++++++
Collects the last necessary information before creating the msr-file.
.. image:: ../images/musrWiz-Create.*
#. shows the path where the msr-file will be saved. If you would like to save it somewhere else press the ``Save As (msr-file path)`` button.
#. pressing this button will allow you to find the path where to save the msr-file.
#. pressing this button will save to current configuration as a template for future re-use.
.. index:: musrStep
musrStep
--------
``musrStep`` is a little helper program which allows to reset the initial step size. This sometimes comes very handy if working on an instrument
with many detectors after a fit slightly went wrong leaving you with a far too small initial step size for further iterations. To edit all the steps
individually is tedious and error prone. Here ``musrStep`` can help.
.. image:: ../images/musrStep-GUI.*
When invoking ``musrStep`` the above dialogue will popup
#. shows the relevant parts of the FITPARAMETER block. The only editable column is step.
#. ``Check Specific`` will popup a dialogue where a template string can be entered, *e.g.* ``Asym``. As a result all fit parameters containing the template string will be selected.
#. ``Check All`` will select all fit parameters.
#. ``Uncheck All`` will unselect all fit parameters.
#. ``Modify Automatic`` will change all the step values automatically. It basically sets all the step sizes to 1% of
the corresponding fit parameter value, except the phases where the step will be set to a value of 5 degrees.
#. ``Modify Selected`` will start the dialogue shown beneath. Follow the description there.
#. ``Save&Quit`` will save the current step values, close the dialogue and reload the modified msr-file.
#. ``Cancel`` will cancel the ``musrStep`` dialogue without modifying anything.
.. image:: ../images/musrStep-Modify-Selected.*
When clicking on ``Modify Selected`` the above dialogue will be presented. It allows to manipulate all selected fit parameter step values according to the following rules
#. ``Scale by Factor`` will scale the step value by the factor given in the field (2). If the ``Absolute Value`` check box is selected, rather than scaling the factor value will be used to modify the step value.
#. scaling factor or absolute value to modify the step values of the selected fit parameters.
#. checking the ``Absolute Value`` check box will change the meaning from *Scale by Factor* to *Copy Factor Value*.
#. ``Scale Automatically`` will modify the step values of the selected fit parameters according to the rules described before.
#. ``Cancel`` will cancel the dialogue.

View File

@ -0,0 +1,275 @@
:tocdepth: 3
.. include:: <isogrk1.txt>
.. index:: dks
.. _setup-dks:
Setting up ``musrfit`` / ``DKS``: High Speed Fitting with GPU's
===============================================================
In the years 2016/2017 we explored ways to speed up current fitting frameworks, especially ``musrfit.``
This allows now to analyze histogram sets of high field spectrometers like ``HAL-9500`` at PSI without
the *error-prone* RRF fitting (see U. Locans and A. Suter,
`musrfit - Real Time Parameter Fitting Using GPU <http://dx.doi.org/10.7566/JPSCP.21.011051>`_, and the
Memo from A. Suter, "Rotating Reference Frame Fits", in the ``musrfit`` source code). At the same time
it can help to speed-up elaborate global fits tremendously, and dealing properly with muonium. It also
allows Apple macOS users to speed up their fitting code on the CPU. Currently it is not straight forward
to get ``musrfit`` multi-threaded under macOS since Apple doesn't be default support ``OpenMP``. ``DKS``
enables ``musrfit`` to utilize ``OpenCL`` instead which is present on macOS by default.
.. warning::
Before you run into the shop to buy a gamer graphic card or a Tesla card, make sure that you have an
appropriate server with a sufficiently strong power supply!
.. note::
However, the current ``musrfit/DKS`` version doesn't yet support all theory functions on the GPU.
In case the theory function is not yet available for the GPU, ``musrfit`` will fall back to the CPU implementation.
Conceptually the setup of ``musrfit/DKS`` is as following:
#. install the latest hardware driver for your graphic card.
#. install the GPU SDK which enables number crunching (``CUDA`` for NVIDIA, ``OpenCL`` for AMD)
#. install ``DKS``
#. install the ``musrfit`` version which is ``DKS`` ready
In the following the description for the installation of ``musrfit/DKS`` for the following systems will be discussed in some more detail:
* NVIDIA Tesla K40c
* AMD Graphic Card (Radeon R9 390X)
* macOS in order to get ``OpenCL`` support
The usage of ``musrfit`` with GPU acceleration and ``OpenCL`` support is described in the
:ref:`User manual of the μSR data analysis software musrfit <user-manual>`. The additional
``musrfit/DKS`` are found :ref:`here <msr-commands-block-dks>`.
.. index:: dks-setup-tesla
Setting up ``musrfit/DKS`` for a Tesla K40c (NVIDIA)
----------------------------------------------------
It is assumed that the Tesla K40c is already physically installed on your system. For now I only
will discuss to set it up for a Linux based system. In order to check that your operating systems
see the card, enter the following command in the terminal:
.. code-block:: bash
$ lspci | grep NVIDIA
The response should look something like
::
05:00.0 3D controller: NVIDIA Corporation GK110BGL [Tesla K40c] (rev a1)
which means that the OS physically recognizes your card.
Driver Installation for the Tesla K40c
++++++++++++++++++++++++++++++++++++++
Next, you will need to download and install the driver for your card. Select the proper operating system,
card, etc. from the `NVIDIA download center <http://www.nvidia.com/Download/index.aspx?lang=en-us>`_. At PSI
we are running currently Red Hat Enterprise Linux 7.x (RHEL) for which we will get a ``rpm`` (something like
``nvidia-diag-driver-local-repo-rhel7-375.66-1.x86_64.rpm``). Install it and make sure there is no conflict
with the nouveau driver of the system.
.. index:: cuda-install
Installation of CUDA
++++++++++++++++++++
Download the `CUDA SDK <https://developer.nvidia.com/cuda-downloads>`_ form NVIDIA for your system. Again,
for the RHEL 7.x this is an ``rpm``. After the installation of the rpm you should reboot your machine.
Afterwards you are ready for the installation of ``DKS``.
.. index:: dks-install
Installation of DKS
+++++++++++++++++++
For the following list of commands the ``'$'`` will be given as the command prompt. *Do not enter it!*
Also some comments will be added starting with a ``'#'`` which can be omitted. They are only there to
explain what is going on. ``DKS`` stands for Dynamical Kernel Scheduler and provides a thin interface
allowing host applications to incorporate GPU's and other hardware accelerators.
Details can be found in the papers listed :ref:`here <cite>`, or on the `DKS wiki page <https://gitlab.psi.ch/uldis_l/DKS/wikis/home>`_.
In brief the installation should be something like this:
.. code-block:: bash
# go to whatever directory you would like to clone/install DKS
# For macOS DKS will likely to got to $HOME/Applications to be consistent with the musrfit docu for macOS
$ cd $HOME/Apps
$ git clone https://gitlab.psi.ch/uldis_l/DKS.git
$ cd DKS
$ mkdir build
$ cd build
$ cmake ../ -DENABLE_MUSR=1 -DCMAKE_INSTALL_PREFIX=../exec
$ cmake --build ./ --clean-first
$ make install
Since ``DKS`` is installed in a non-standard path, a couple of additional small steps are required.
This will be different for Linux compared to macOS.
For **Linux:**
add the ``DKS`` library path to ``/etc/ld.so.conf.d/musrfit-x86_64.conf`` and execute as super user
.. code-block:: bash
$ /sbin/ldconfig
For **macOS:**
add the ``DKS`` path to ``$HOME/.profile``:
.. code-block:: bash
export DKS=$HOME/Applications/DKS/exec
export LD_LIBRARY_PATH=$DKS/lib:$LD_LIBRARY_PATH
launchctl setenv DKS $DKS
launchctl setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH
.. _musrfit-dks-install:
Installation of musrfit for DKS
+++++++++++++++++++++++++++++++
Most of the installation steps are the same as described for ``musrfit`` without GPU support.
Here only the differences are explained. First checkout ``musrfit``, then you will need to
switch the working branch which is done by
.. code-block:: bash
$ cd $HOME/Apps/musrfit
$ git checkout dks6
Install via cmake
^^^^^^^^^^^^^^^^^
There is on more configuration switch
**-Ddks=<value>**
it allows to enable/disable ``DKS`` support. The default is ``<value>=1``, *i.e.* enabled. To disable use ``<value>=0``.
For a typical setup on a RHEL or macOS system it could look like this
.. code-block:: bash
$ cmake ../ -DCMAKE_INSTALL_PREFIX=$ROOTSYS -DASlibs=1 -DBMWlibs=1 -Dnexus=1 -Ddks=1
After
.. code-block:: bash
$ cmake --build ./ --clean-first -- -j8
$ make install
and updating the shared library lookup table (*only* needed for Linux)
.. code-block:: bash
$ /sbin/ldconfig # as superuser / root
you are done with the setup.
.. index:: dks-setup-amd-graphic-card
Setting up ``musrfit/DKS`` for a AMD Graphic Card (Radeon R9 390X)
------------------------------------------------------------------
Driver Installation for an AMD Graphic Card, *e.g.* Radeon R9 390X
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This will depend slightly on the AMD Card and operating system. Here I will summaries how it was done
on a RHEL (Linux) system using a Radeon R9 390X.
It is assumed that the Radeon R9 390X is already physically installed on your system. For now I only
will discuss to set it up for a Linux based system. In order to check that your operating systems see
the card, enter the following command in the terminal:
.. code-block:: bash
$ lspci | grep AMD
The response should look something like
::
84:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii XT / Grenada XT [Radeon R9 290X/390X] (rev 80)
which means that the OS physically recognizes your card.
For RHEL7.x the AMDGPU-PRO driver should be used. It can be downloaded from `AMD <http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-RedHat-Install.aspx>`_. Unpack the driver
.. code-block:: bash
$ tar -Jxvf amdgpu-pro-17.10-414273.tar.xz
$ cd amdgpu-pro-17.10-414273
Install the driver as root
.. code-block:: bash
$ ./amdgpu-pro-install --compute -y
Here I assume that the AMD graphic card is only used for computation. You need to add the following command
in order that the user **blabla** (change this to the appropriate user name) can access the GPU (otherwise
only root works):
.. code-block:: bash
$ /sbin/usermod -a -G video blabla
Reboot the machine.
AMD APP Software Development Kit (SDK) to enable ``OpenCL`` support
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The AMD APP Software Development Kit (SDK) is a complete development platform created by AMD to allow you to
quickly and easily develop applications accelerated by AMD APP technology. The SDK provides samples, documentation,
and other materials to quickly get you started leveraging accelerated compute using ``OpenCL`` or ``C++ AMP`` in your
``C/C++`` applications.
Download the AMD APP SDK 3.0 from `AMD-SDK <http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/>`_.
Extract the installer
.. code-block:: bash
$ tar -xvjf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2
Run the installer
.. code-block:: bash
$ ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh
This will install the AMD APP SDK to ``/opt/AMDAPPSDK-3.0/`` where you can find the ``OpenCL`` include
and library files, as well as documentation and sample code. The install guide for AMD OpenCL SDK can
be found at `AMD SDK Installation Notes <http://developer.amd.com/wordpress/media/2012/10/AMD_APP_SDK_InstallationNotes.pdf>`_.
Installation of DKS and musrfit
+++++++++++++++++++++++++++++++
To install ``DKS`` and ``musrfit`` follow the instructions :ref:`above <musrfit-dks-install>`.
.. index:: dks-opencl-macOS
Setting up ``musrfit/DKS`` for macOS for OpenCL support
-------------------------------------------------------
Since Apple is not providing an out-of-the-box ``OpenMP`` support on their macOS compiler framework (Xcode),
typically ``musrfit`` is just running *single threaded*. Here ``DKS`` can help since it delivers ``OpenCL``
support which is present on macOS. Hence, if you would like to run ``musrfit`` multi-threaded the easiest
way is to use ``DKS``.
Since there is no graphic card involved, you do not need any graphic card driver of additional SDK.
The only thing you need ``DKS`` and the proper ``musrfit`` version.
The installation instruction for ``DKS/musrfit`` can be found :ref:`here <musrfit-dks-install>`.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,417 @@
.. include:: <isogrk1.txt>
.. index:: tutorial
Tutorial for ``musrfit``
========================
Single-histogram-fit tutorial
-----------------------------
The |mgr|\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 ``musrfit`` suite using the example of a single-histogram fit to time-differential transverse-field
|mgr|\SR data. For a complete description of all options please refer to the :ref:`manual <user-manual>`.
The example deals with a diamagnetic sample that has been measured in an applied field of approximately 150 G in
the `GPS spectrometer <https://www.psi.ch/smus/gps>`_ at `PSI <https://www.psi.ch>`_ using the "transverse geometry".
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.
To analyze these data (in a simple way) one starts out from the msr file ``3110_tutorial.msr`` provided together
with the source-code distribution in the sub-directory ``doc/examples/``. This ASCII file can be edited using any
text editor. For convenience the editor ``musredit`` 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 ``musredit``.
The msr file
++++++++++++
The msr file itself is divided into different blocks; a full description of the format can be found :ref:`here <msr-file-format>`.
In the file ``3110_tutorial.msr`` these blocks are successively:
:ref:`The title <msr-title-block>`
::
sample XYZ
A descriptive title of the file.
:ref:`The FITPARAMETER block <msr-fitparameter-block>`
::
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
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 ``Step`` column). If asymmetric errors are determined, these
will be listed in the ``Step`` column (negative) and the ``Pos_Error`` column (positive).
Optionally, lower and upper boundaries for the parameters can be specified as
shown above.
The meaning of the parameters above is explained in the following:
Since a :ref:`single-histogram fit <single-histogram-fit>` 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 ("Up", "Down", "Right"); 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 (*e.g.* 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).
:ref:`The THEORY block <msr-theory-block>`
::
THEORY
asymmetry 10
simplExpo 11 (rate)
TFieldCos map1 fun1 (phase frequency)
+
asymmetry 13
simpleGss 14 (rate)
TFieldCos map1 fun2 (phase frequency)
The THEORY block is used to define a fit-parameter-dependent theory function used to model
the decay asymmetry. Different :ref:`predefined <msr-theory-block>` and :ref:`user-defined <user-functions>`
functions can be combined here. Theory lines following each other are *multiplied* and the **+** sign
is used to add different (here: two) signal contributions. The numbers are the parameter numbers
according to the ``FITPARAMETER block``. ``map`` and ``fun`` are used to refer to
histogram-dependent parameters and to interrelate fit parameters, respectively (see below).
:ref:`The FUNCTIONS block <msr-functions-block>`
::
FUNCTIONS
fun1 = gamma_mu * par12
fun2 = gamma_mu * par15
Here functions interrelating different fit parameters and predefined constants can be defined for
the use in the ``THEORY block``. In the example, the functions are used to calculate the
muon-spin-precession frequencies for the given fields [:math:`\nu = \gamma_\mu B / (2\pi)`]. One
function is used for each signal. Altogether, the theory function defined above is
: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)`, where the *p* are the parameters in the ``FITPARAMETER block`` and :math:`\varphi_i = p_3, p_6, p_9`
depending on the histogram as shall be seen later.
:ref:`The RUN block <msr-run-block>`
::
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
The RUN blocks are used to collect information on the data to be analyzed. Specifically, these are:
::
RUN data/deltat_pta_gps_3110 PIM3 PSI PSI-BIN (name beamline institute data-file-format)
The path to the data file and the file format (NEXUS, ROOT-NPP, ROOT-PPC, PSI-BIN, PSI-MDU, WKM, MUD, MDU-ASCII).
::
fittype 0 (single histogram fit)
the fit type (0 = single-histogram fit)
::
norm 1
the number of the fit parameter representing the normalization constant
::
backgr.fit 2
the number of the fit parameter representing the background
::
map 3 0 0 0 0 0 0 0 0 0
the definition of the **maps** used in the ``THEORY block`` — RUN-block-specific
parameters are given here; in this example, **map1** is substituted by **parameter 3**
in the ``THEORY block`` for this RUN block and **map2**, **map3**, and so on are undefined.
::
forward 3
the histogram number; in this example 3 corresponds to the histogram of the "Up" positron counter
::
data 1 8000
start and end bins of the range containing useful data in the histogram (to be adjusted, *e.g.* by using ``musrt0``, see below)
::
t0 1
histogram bin corresponding to the time zero (muon implantation time) (to be adjusted, *e.g.* by ``musrt0``, see below)
::
fit 0 4.9
start and end times (in |mgr|\s) defining the fit range. *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.*
::
packing 20
the packing of the histograms (in histogram bins)
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.
:ref:`The COMMAND block <msr-commands-block>`
::
COMMANDS
MINIMIZE
MINOS
SAVE
In the ``COMMANDS block``, a sequence of operations that should be performed is defined.
Here, the requested operations are the minimization of :math:`\chi^2` (MINIMIZE), the
calculation of *asymmetric errors* (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 :ref:`here <msr-commands-block>`.
:ref:`The FOURIER block <msr-fourier-block>`
::
FOURIER
units Gauss # units either 'Gauss', 'MHz', or 'Mc/s'
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
The ``FOURIER block`` is used to define basic settings for the Fourier transform available
in :ref:`musrview <musrview>`. These are:
::
units Gauss # units either 'Gauss', 'MHz', or 'Mc/s'
the units of the Fourier domain
::
fourier_power 10
the number of data points used for the discrete transform, here :math:`2^{10}=1024`.
::
apodization WEAK # NONE, WEAK, MEDIUM, STRONG
the :ref:`apodization <msr-fourier-block-apodization>` to be used
::
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE
what should be plotted (real part, imaginary part, and so on)
::
phase par3
the initial phase of the input data is given here in degrees. Optionally, a phase parameter
from the ``FITPARAMETER block`` can be given, here **par3** takes the value of **parameter 3**.
::
range 0.0 600.0
the start and end points of the range of the Fourier transform in the units specified above
:ref:`The PLOT block <msr-plot-block>`
::
PLOT 0 (single histo plot)
runs 1 2
range 0 4 -0.2 0.2
The ``PLOT block`` defines which data (corresponding to the given RUN blocks) is plotted when
:ref:`musrview <musrview>` is called. In the given example, a canvas would be drawn containing
the (life-time-corrected) data of the first two ``RUN blocks`` ("Up" and "Down" positron counters).
The abscissa would range from 0 to 4 |mgr|\s, the axis of ordinates from -0.2 to 0.2.
It is possible to define more than one ``PLOT block``. Each ``PLOT block`` corresponds to a
separate canvas. Therefore, the second ``PLOT block`` in the file
::
PLOT 0 (single histo plot)
runs 3
use_fit_ranges
produces an additional window containing the (not life-time-corrected) data of the third ``RUN block``
("Right" positron counter). The abscissa ranges from 0 to 4.9 |mgr|\s (according to the fit range given
in the ``RUN block``).
:ref:`The STATISTIC block <msr-statistic-block>`
::
STATISTIC --- 2011-07-09 10:58:44
chisq = 1348.1764, NDF = 1146, chisq/NDF = 1.176419
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 :math:`\chi^2` 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!
Determine t0 and the data range using musrt0
++++++++++++++++++++++++++++++++++++++++++++
Before the given model can be fitted to the data, the data ranges and time zeros of the different
``RUN blocks`` have to be set correctly. This can be achieved using :ref:`musrt0 <musrt0>`.
Starting this program by selecting the ``musrt0`` button in ``musredit`` or calling from a terminal
.. code-block:: bash
$ musrt0 3110_tutorial.msr
opens an interactive window plotting the data of the first RUN block:
.. image:: ../images/tutorial-musrt0-1.*
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 **T**
(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 **d**
when the cursor is found at a suitable location:
.. image:: ../images/tutorial-musrt0-2.*
After all lines have been adjusted for the first histogram, one can go on to the second by pressing **q**.
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 ``musrt0`` can be
found :ref:`here <musrt0>`.
Fit the model to the data using ``musrfit``
+++++++++++++++++++++++++++++++++++++++++++
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 ``musrfit`` icon
in ``musredit`` or calling from a terminal
.. code-block:: bash
$ musrfit 3110_tutorial.msr
After the fitting procedure has finished the msr file is updated and contains the newly determined values
of the fit parameters.
View the data and the fit using ``musrview``
++++++++++++++++++++++++++++++++++++++++++++
The data and the corresponding fit can be visualized by choosing the ``musrview`` icon in ``musredit`` or
calling from a terminal
.. code-block:: bash
$ musrview 3110_tutorial.msr
This creates the windows according to the given PLOT blocks in the msr file:
.. image:: ../images/tutorial-musrview-1.*
The basic features of ``musrview`` can be found in the ``Musrfit menu``. They include:
* export the shown data and the model to an ASCII file with comma-separated values
* presenting the difference between the shown data and the model (keyboard shortcut: **d**)
* calculate and show the Fourier transform of the shown data (keyboard shortcut: **f**), *e.g.* for
the asymmetry of the "Up" and "Down" detectors:
.. image:: ../images/tutorial-musrview-FT.*
Process multiple msr files using ``msr2data``
+++++++++++++++++++++++++++++++++++++++++++++
This short introduction is concluded by calling attention to the program :ref:`msr2data <msr2data>`.
As the name indicates the main purpose of this program is to extract the ``FITPARAMETER`` block
information from multiple msr files with the same structure and to summarize them in a single
ASCII file (either in ``TRIUMF DB`` 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 ``musrfit`` on the fly.
Assuming the successive runs **3111** through **3114** can be analyzed using the same model introduced
above for run **3110** (*e.g.* in the case one has done measurements at different temperatures) one can
use the file ``3110_tutorial.msr`` as template, generate the files ``3111_tutorial.msr`` through
``3114_tutorial.msr`` with the corresponding updates in the RUN blocks, call for each one ``musrfit``
and finally summarize the FITPARAMETER block information of all processed files in an ASCII output
file ``tutorial-T-dependence.dat`` (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:
.. code-block:: bash
$ msr2data 3110 3114 _tutorial fit-3110 -o tutorial-T-dependence.dat data
To achieve the same in ``musredit`` (in this snapshot in the *dark theme*) one selects the ``msr2data`` icon and fills the form accordingly:
.. image:: ../images/tutorial-musredit-msr2data.*
Further reading
+++++++++++++++
This page only summarizes the very basic features and options of the programs contained in the ``musrfit`` suite.
For a complete description please refer to the manuals of :ref:`musrfit <musrfit>` (including :ref:`musrview <musrview>`,
:ref:`musrt0 <musrt0>`, and :ref:`musrFT <musrFT>`), :ref:`mupp <mupp>`, :ref:`musredit <musredit-sec>`, and :ref:`msr2data <msr2data>`.
Asymmtery-fit tutorial
----------------------
to be written yet.

View File

@ -0,0 +1,747 @@
:tocdepth: 3
.. include:: <isogrk1.txt>
.. index:: user-libs
.. _user-libs:
Documentation of user libs (user functions)
===========================================
.. index:: BMW-libs
.. _BMW-libs:
Meissner-Profiles / Vortex-Lattice related functions (BMW libs)
---------------------------------------------------------------
.. index:: libFitPofB
libFitPofB
++++++++++
Introduction
^^^^^^^^^^^^
``libFitPofB`` is a collection of ``C++`` classes using the ``musrfit`` :ref:`user-functions <user-functions>`
interface in order to facilitate the usage in conjunction with ``musrfit``. The classes contained in this
library generally implement calculations of one-dimensional static magnetic field distributions
:math:`p(B)` which lead to the muon-spin depolarization functions
.. math::
{\cal P}(t) = \int p(B) \cos(\gamma_\mu B t + \varphi) dB,
where :math:`\gamma_\mu = 2 \pi \times 135.54` MHz/T is the gyromagnetic ratio of the muon and :math:`\varphi`
is the initial phase of the muon spins with respect to the positron detector. At the moment the only available
implementations deal with field distributions measured in local isotropic superconductors, either by means of
low-energy |mgr|\SR (see `<https://www.psi.ch/smus/lem>`_) in the Meissner state or by bulk |mgr|\SR in the mixed state.
In the following the basic usage of the library in ``musrfit`` is explained—the calculations by themselves are only
outlined. For further information please refer to the original literature and/or the source code of the implementation.
.. note::
In order to supply certain information needed for the calculations but not suited to be stored in the ``musrfit``
msr files an ``XML`` configuration file in the working directory is used. For details, see below.
.. note::
The implementations in this library heavily rely on `FFTW3 <http://fftw.org/>`_. In principle, it always checks what
is the best way to do efficient Fourier transforms for a given machine before the transforms are actually done. If
repeatedly Fourier transforms of the same (sizable) length should be done, it might be worth storing the once
obtained information in an external file and just load it the next time this information is needed
(`wisdom handling <http://fftw.org/fftw3_doc/Wisdom.html>`_). In case this feature shall be used, a valid wisdom
file has to be specified in the ``XML`` file.
.. note::
The model functions described in the following do generally *not behave nicely* in conjunction with ``MINUIT``
function minimizations (or maximizations). The analysis process at the moment in most cases involves some
tedious trial-and-error procedure, where the displayed MINUIT information as always deserves attention.
This is especially true if small effects should be analyzed (*e.g.* small diamagnetic shifts in superconductors).
The parameter uncertainty in many cases has to be estimated independently. Due to these limitations, also
the use of the fit option of ``msr2data`` *cannot* be advised.
.. note::
If these classes still prove useful and results obtained through them are part of scientific publications,
an acknowledgment of the use of the library is appreciated.
LE-|mgr|\SR
^^^^^^^^^^^
.. index:: 1D-London-Meissner
One-dimensional London model for the Meissner state of isotropic superconductors
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
The models for analyzing LE-|mgr|\SR data assume the magnetic induction :math:`B(z)` to vary only in the
dimension parallel to the momentum of the incident muons. In such a case the magnetic field distribution is given by
.. math::
p(B) = n(z) \left| \frac{dB(z)}{dz} \right|^{-1}
where :math:`n(z)` is the muon implantation profile simulated by ``TRIM.SP``.
Assuming an array of *N* isotropic local superconductors with a total thickness *d* in the Meissner state
the magnetic induction is given by solving the 1D London equation
.. math::
\frac{\partial^2}{\partial z^2}B_i(z) = \frac{1}{\lambda_i^2}B_i(z)
for each layer *i* taking into account the boundary conditions (F. London, Superfluids: Macroscopic Theory of Superconductivity, Dover (1961), p. 34)
.. math::
B_1(0) = B_N(d) = \mu_0H
B_i(d_i) = B_{i+1}(d_i)
\lambda_i^2B_i'(z)\Big\vert_{z=d_i} = \lambda_{i+1}^2B_{i+1}'(z)\Big\vert_{z=d_i},
where the :math:`d_i` specify the interfaces between two adjacent layers and :math:`\lambda_i` is
the magnetic field penetration depth in the constituent :math:`i`.
The calculation of the field distribution has been set up for a superconducting half-space as well
as superconducting thin films with up to three superconducting layers with different penetration depths.
The muon-spin depolarization functions are calculated using the following lines in the ``THEORY`` block
of a ``musrfit`` msr file:
.. index:: TLondon1DHS
**Superconducting half-space**
::
userFcn libFitPofB TLondon1DHS 1 2 3 4 5
The parameters are:
#. phase (deg)
#. muon implantation energy as specified in the :ref:`XML startup <BMWlibs-XML>` file (keV)
#. applied field (G)
#. thickness of the dead layer (nm)
#. magnetic field penetration depth (nm)
.. index:: TLondon1D1L
**Superconducting thin film (one layer)**
::
userFcn libFitPofB TLondon1D1L 1 2 3 4 5 6 [a b]
The mandatory parameters are:
#. phase (deg)
#. muon implantation energy as specified in the :ref:`XML startup <BMWlibs-XML>` file (keV)
#. applied field (G)
#. thickness of the dead layer (nm)
#. thickness of the actually superconducting layer (nm)
#. magnetic field penetration depth (nm)
The optional parameters are:
a. fraction f\ :sub:`1` of muons in the thin film contributing to the signal (0 ≤ f\ :sub:`1` ≤ 1)
b. fraction f\ :sub:`s` of muons in the substrate contributing to the signal (0 ≤ f\ :sub:`s` ≤ 1)
.. index:: TLondon1D2L
**Superconducting thin-film bilayer heterostructure**
::
userFcn libFitPofB TLondon1D2L 1 2 3 4 5 6 7 8 [a b c]
The mandatory parameters are:
#. phase (deg)
#. muon implantation energy as specified in the :ref:`XML startup <BMWlibs-XML>` file (keV)
#. applied field (G)
#. thickness of the dead layer (nm)
#. thickness of the actually superconducting first layer (nm)
#. thickness of the actually superconducting second layer (nm)
#. magnetic field penetration depth of the first layer (nm)
#. magnetic field penetration depth of the second layer (nm)
The optional parameters are:
a. fraction f\ :sub:`1` of muons in the dead and first layer contributing to the signal (0 ≤ f\ :sub:`1` ≤ 1)
b. fraction f\ :sub:`2` of muons in the second layer contributing to the signal (0 ≤ f\ :sub:`2` ≤ 1)
c. fraction f\ :sub:`s` of muons in the substrate contributing to the signal (0 ≤ f\ :sub:`s` ≤ 1)
.. index:: TLondon1D3L
**Superconducting thin-film trilayer heterostructure**
::
userFcn libFitPofB TLondon1D3L 1 2 3 4 5 6 7 8 9 10 [a b c d]
The mandatory parameters are:
#. phase (deg)
#. muon implantation energy as specified in the :ref:`XML startup <BMWlibs-XML>` file (keV)
#. applied field (G)
#. thickness of the dead layer (nm)
#. thickness of the actually superconducting first layer (nm)
#. thickness of the actually superconducting second layer (nm)
#. thickness of the actually superconducting third layer (nm)
#. magnetic field penetration depth of the first layer (nm)
#. magnetic field penetration depth of the second layer (nm)
#. magnetic field penetration depth of the third layer (nm)
The optional parameters are:
a. fraction f\ :sub:`1` of muons in the dead and first layer contributing to the signal (0 ≤ f\ :sub:`1` ≤ 1)
b. fraction f\ :sub:`2` of muons in the second layer contributing to the signal (0 ≤ f\ :sub:`2` ≤ 1)
c. fraction f\ :sub:`3` of muons in the third layer contributing to the signal (0 ≤ f\ :sub:`3` ≤ 1)
d. fraction f\ :sub:`s` of muons in the substrate contributing to the signal (0 ≤ f\ :sub:`s` ≤ 1)
Bulk |mgr|\SR
^^^^^^^^^^^^^
.. index:: Vortex-State-Isotropic
Field distributions in the mixed state of isotropic superconductors
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
When investigating superconductors in the mixed state by means of conventional |mgr|\SR a
two-dimensional flux-line lattice is probed randomly by the muons. The spatial field
distributions within such an ordered lattice are modeled using the Fourier series
.. math::
B(\mathbf{r}) = \langle B \rangle \sum\limits_{\mathbf{K}}B_{\mathbf{K}}\exp(-\imath\mathbf{K}\mathbf{r}),
where :math:`\mathbf{r}=(x,y)`, **K** are the reciprocal lattice vectors of a two-dimensional
vortex lattice and the :math:`B_{\mathbf{K}}` are the Fourier coefficients depending on the
magnetic penetration depth :math:`\lambda` and the superconducting coherence length :math:`\xi`.
The :math:`B_{\mathbf{K}}` for some specific models are as follows:
**London model with Gaussian cutoff** (E.H. Brandt, `J. Low Temp. Phys. 73, 355 (1988) <http://dx.doi.org/10.1007/BF00683568>`_.)
.. math::
B_{\mathbf{K}} = \frac{\exp\left({-K^2\xi^2/2}\right)}{1 + K^2\lambda^2}
**Modified London model** (T.M. Riseman *et al.*, `Phys. Rev. B 52, 10569 (1995) <http://dx.doi.org/10.1103/PhysRevB.52.10569>`_.)
.. math::
B_{\mathbf{K}} = \frac{\exp\left({-K^2\xi^2/2(1-b)}\right)}{1 + K^2\lambda^2/(1-b)},
where :math:`b = \langle B \rangle / (\mu_0 H_{\rm c2})`.
**Analytical Ginzburg-Landau model** ( A. Yaouanc, P. Dalmas de Réotier and E.H. Brandt, `Phys. Rev. B 55, 11107 (1997) <http://dx.doi.org/10.1103/PhysRevB.55.11107>`_)
.. math::
B_{\mathbf{K}} = \frac{f_{\infty}K_1\left(\frac{\xi_v}{\lambda}\sqrt{f_{\infty}^2+\lambda^2K^2}\right)}{K_1\left(\frac{\xi_v}{\lambda}f_{\infty}\right)\sqrt{f_{\infty}^2+\lambda^2K^2}},
where :math:`f_{\infty} = 1 - b^4,~\xi_v = \xi\left(\sqrt{2}-{3\xi}/\left({4\lambda}\right)\right)\sqrt{(1+b^4)(1-2b(1-b)^2)}` and
:math:`K_1` is a modified Bessel function.
Apart from the mentioned analytic models the **numerical Ginzburg-Landau model** (`E.H. Brandt, Phys. Rev. B 68, 054506 (2003). <http://dx.doi.org/10.1103/PhysRevB.68.054506>`_) is available. In this case :math:`B(\mathbf{r})` is obtained by an iterative minimization of the free energy of the vortex lattice.
**Concerning the applicability (e.g. field regions) of each of the mentioned models please refer to the original publications!**
At the moment, the calculation of the field distribution has been implemented for *triangular* flux-line lattices.
The number of grid lines in which the inter-vortex distance is divided for the calculations to be specified through
the :ref:`XML startup <BMWlibs-XML>`.
The muon-spin depolarization functions finally are calculated using the following lines in the THEORY block of a ``musrfit`` msr file:
.. index:: Vortex-Gaussian-CutOff
**2D triangular vortex lattice, London model with Gaussian cutoff**
::
userFcn libFitPofB TBulkTriVortexLondon 1 2 3 4
The parameters are:
#. phase (deg)
#. mean magnetic induction (G)
#. magnetic penetration depth (nm)
#. Ginzburg-Landau coherence length (nm)
.. index:: Vortex-London-modified
**2D triangular vortex lattice, modified London model**
::
userFcn libFitPofB TBulkTriVortexML 1 2 3 4
The parameters are:
#. phase (deg)
#. mean magnetic induction (G)
#. magnetic penetration depth (nm)
#. Ginzburg-Landau coherence length (nm)
.. index:: Vortex-Analytic-GL
**2D triangular vortex lattice, analytic Ginzburg-Landau model**
::
userFcn libFitPofB TBulkTriVortexAGL 1 2 3 4
The parameters are:
#. phase (deg)
#. mean magnetic induction (G)
#. magnetic penetration depth (nm)
#. Ginzburg-Landau coherence length (nm)
.. index:: Vortex-Numeric-GL
**2D triangular vortex lattice, numerical Ginzburg-Landau model**
::
userFcn libFitPofB TBulkTriVortexNGL 1 2 3 4
The parameters are:
#. phase (deg)
#. mean magnetic induction (G)
#. magnetic penetration depth (nm)
#. Ginzburg-Landau coherence length (nm)
.. note::
In order to improve the convergence of ``MIGRAD`` it has proven useful to use the log-likelihood
maximization instead of the :math:`\chi^2` minimization routines and to choose sufficiently large
initial steps for the parameters. Calling ``MINOS`` in conjunction with these functions is futile.
Therefore, the :ref:`COMMANDS block <msr-commands-block>` of the msr file could look like:
::
COMMANDS
STRATEGY 2
MAX_LIKELIHOOD
MIGRAD
HESSE
SAVE
.. index:: BMWlibs-XML
.. _BMWlibs-XML:
The XML startup file
^^^^^^^^^^^^^^^^^^^^
``BMW_startup.xml`` is a configuration file located in the working directory. In this file some settings
like the time and field resolution of the calculations as well as the present muon implantation profiles
for a LE-|mgr|\SR analysis have to be defined. The following XML tags are allowed to define settings:
**<debug>ONE_OR_ZERO</debug>**
activate the debugging output of the settings read from the XML file by setting 1, deactivate it with 0.
**<wisdom>PATH_TO_FILE</wisdom>**
specify the ``PATH_TO_FILE`` to an `FFTW3 wisdom file <http://fftw.org/fftw3_doc/Wisdom.html#Wisdom>`_
that should be used; if the ``PATH_TO_FILE`` is invalid, no ``FFTW3`` wisdom will be used.
**<delta_t>ResT</delta_t>**
set the time resolution ``ResT`` for the calculated depolarization function in microseconds.
**<delta_B>ResB</delta_B>**
set the field resolution ``ResB`` for the calculated field distribution in Gauss.
**<VortexLattice></VortexLattice>**
set the parameters used for the calculation of the spatial field distribution of a vortex lattice.
**<N_VortexGrid>N</N_VortexGrid>**
specify the number of points **N** (in each of the two dimensions) for which the fields within the
vortex lattice are calculated (inside a **<VortexLattice>** environment)
**<LEM></LEM>**
set the parameters used for the calculation of LE-|mgr|\SR field distributions
**<data_path>DATA_PATH_PREFIX</data_path>**
specify the ``DATA_PATH_PREFIX`` to the ``TRIM.SP`` implantation profiles (inside a **<LEM>** environment)
**<N_theory>N_THEORY</N_theory>**
specify the number of points **N_THEORY** for which *B(z)* is calculated (inside a **<LEM>** environment)
The specification of this number is not needed if the calculation of the inverse of *B(z)* is implemented!
**<energy_list></energy_list>**
set the energies for which ``TRIM.SP`` implantation profiles are available (inside a **<LEM>** environment)
**<energy_label>LABEL</energy_label>**
specify the **LABEL** within the file name of a available ``TRIM.SP`` ``RGE`` file (inside a **<energy_list>** environment)
The expected name of the ``RGE`` file will be: ``DATA_PATH_PREFIX + LABEL + .rge``
**<energy>E</energy>**
specify the muon energy *E* (in keV) belonging to the ``TRIM.SP`` ``RGE`` file given above (inside a **<energy_list>** environment)
An example XML file looks as follows:
.. code-block:: xml
<?xml version="1.0" encoding="UTF-8"?>
<BMW>
<debug>0</debug>
<wisdom>/home/user/WordsOfWisdom.dat</wisdom>
<delta_t>0.01</delta_t>
<delta_B>0.5</delta_B>
<VortexLattice>
<N_VortexGrid>1024</N_VortexGrid>
</VortexLattice>
<LEM>
<data_path>/home/user/TrimSP/some-sample-</data_path>
<N_theory>5000</N_theory>
<energy_list>
<energy_label>02_0</energy_label>
<energy>2.0</energy>
<energy_label>03_0</energy_label>
<energy>3.0</energy>
<energy_label>03_6</energy_label>
<energy>3.6</energy>
<energy_label>05_0</energy_label>
<energy>5.0</energy>
<energy_label>05_3</energy_label>
<energy>5.3</energy>
</energy_list>
</LEM>
</BMW>
Nonlocal superconductivity related Meissner screening functions (AS libs)
-------------------------------------------------------------------------
To be written yet ...
.. index:: BNMR-libs
.. _BNMR-libs:
Functions to analyze |bgr|-NMR data (BNMR libs)
-------------------------------------------------------------------------
This is a collection of ``C++`` classes using the ``musrfit`` :ref:`user-functions <user-functions>`
interface in order to facilitate the usage in conjunction with ``musrfit``. It consists of two libraries:
* ``libBNMR`` contains functions to fit spin lattice relaxation (SLR) data.
* ``libLineProfile`` contains functions to fit resonance lineshapes.
.. note::
Currently it is recommended to read in the data in ASCII format as a non-|mgr|\SR fit :ref:`(fit type 8) <non-musr-fit>`.
.. index:: libBNMR
libBNMR
++++++++++
In |bgr|-NMR the SLR is usually measured by implanting a pulse of :math:`^8`\ Li with a length :math:`t_0` into the sample.
The asymmetry is measured both during the pulse and afterwards. For a a general spin relaxation function :math:`f(t)` the time evolution of the asymmetry is then given by [`Z. Salman, et al., PRL 96, 147601 (2006) <http://dx.doi.org/10.1103/PhysRevLett.96.147601>`_]:
.. index:: SLR
.. _SLR:
.. math::
P(t) = \left\{\begin{matrix}
\frac{\int_0^t e^{-(t-t')/\tau_{\mathrm{Li}}}f(t-t')dt'}{\int_0^t e^{-t'/\tau_{\mathrm{Li}}}dt' } & t\leq t_0\\[6pt]
\frac{\int_0^{t_0}e^{-(t_0-t')/\tau_{\mathrm{Li}}}f(t-t')dt'}{\int_0^{t_0}e^{-t'/\tau_{\mathrm{Li}}}dt'} & t> t_0,
\end{matrix}\right.
where :math:`\tau_{\mathrm{Li}}=1.21`\ s is the :math:`^8`\ Li lifetime.
Functions
^^^^^^^^^^^^
The ``libBNMR`` library currently contains the following functions:
.. index:: ExpRlx
**Exponential relaxation**
::
userFcn libBNMR ExpRlx 1 2
The parameters are:
#. pulse length :math:`t_0` (s)
#. relaxation rate :math:`\lambda` (s\ :math:`^{-1}`\ )
This function implements :math:`f(t)=e^{-\lambda t}`.
.. index:: SExpRlx
**Stretched exponential relaxation**
::
userFcn libBNMR SExpRlx 1 2 3
The parameters are:
#. pulse length :math:`t_0` (s)
#. relaxation rate :math:`\lambda` (s\ :math:`^{-1}`\ )
#. stretching exponent :math:`\beta`
This function implements :math:`f(t)=e^{-(\lambda t)^{\beta}}`.
.. index:: libLineProfile
libLineProfile
+++++++++++++++++
In addition to some simple line shapes ``libLineProfile`` contains functions to fit chemical shift anisotropies in the powder average.
Their functional form can be found in `M. Mehring, Principles of High Resolution NMR in Solids (Springer 1983) <http://dx.doi.org/10.1007/978-3-642-68756-3_2>`_.
For an axially symmetric interaction it is given by:
.. index:: Iax
.. _Iax:
.. math::
I_{\mathrm ax}(f)=\left\{\begin{matrix} \frac{1}{2\sqrt{(f_\parallel-f_\perp)(f-f_\perp)}}& f\in(f_\perp,f_\parallel)\cup(f_\parallel,f_\perp)\\[6pt] 0 & \text{otherwise}\end{matrix} \right.
where :math:`f_\parallel` and :math:`f_\perp` are the frequencies that would be observed if the field is oriented paralell or perpendicular to the symmetry axis, respectively.
| In case of a completely anisotropic interaction, the powder average can be described by the frequencies along the three principle axis :math:`f_1,f_2,f_3`.
| Assume without loss of generality that :math:`f_1<f_2<f_3`, then
.. index:: Ianiso
.. _Ianiso:
.. math::
I(f)&=\left\{\begin{matrix}
\frac{K(m)}{\pi\sqrt{(f-f_1)(f_3-f_2)}},& f_3\geq f>f_2 \\[9pt]
\frac{K(m)}{\pi\sqrt{(f_3-f)(f_2-f_1)}},& f_2>f\geq f_1\\[9pt]
0 & \text{otherwise}
\end{matrix} \right. \\
\\
m&=\left\{\begin{matrix}
\frac{(f_2-f_1)(f_3-f)}{(f_3-f_2)(f-f_1)},& f_3\geq f>f_2 \\[6pt]
\frac{(f-f_1)(f_3-f_2)}{(f_3-f)(f_2-f_1)},& f_2>f\geq f_1\\[6pt]
\end{matrix} \right. \\
\\
K(m)&=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},
:math:`K(m)` is the complete elliptic integral of the first kind.
Functions
^^^^^^^^^^^^
The ``libLineProfile`` library currently contains the following functions:
.. index:: LineGauss
**Gaussian**
::
userFcn libLineProfile LineGauss 1 2
The parameters are:
#. center of the line :math:`f_0`
#. FWHM of the line :math:`\sigma`
| The height of the peak is 1.
| The functional form is given by
.. math::
A(f)=e^{-\frac{4\ln 2 (f-f_0)^2}{ \sigma^2}}
.. index:: LineLorentzian
**Lorentzian**
::
userFcn libLineProfile LineLorentzian 1 2
The parameters are:
#. center of the line :math:`f_0`
#. FWHM of the line :math:`w`
| The height of the peak is 1.
| The functional form is given by
.. math::
A(f)= \frac{w^2}{4(f-f_0)^2+w^2}
.. index:: LineLaplace
**Laplacian**
::
userFcn libLineProfile LineLaplace 1 2
The parameters are:
#. center of the line :math:`f_0`
#. FWHM of the line :math:`w`
| The height of the peak is 1.
| The functional form is given by
.. math::
A(f)=e^{-2\ln 2 \left|\frac{f-f_0}{w}\right|}
.. index:: LineSkewLorentzian
**Skewed Lorentzian**
::
userFcn libLineProfile LineSkewLorentzian 1 2 3
The parameters are:
#. center of the line :math:`f_0`
#. width of the line :math:`w`
#. skewness parameter :math:`a`
| The height of the peak is 1.
| The functional form is given by
.. math::
A(f)= \frac{w w_a}{4(f-f_0)^2+w_a^2}, \quad w_a=\frac{2w}{1+e^{a(f-f_0)}}
.. index:: LineSkewLorentzian2
**Skewed Lorentzian 2**
::
userFcn libLineProfile LineSkewLorentzian2 1 2 3
The parameters are:
#. center of the line :math:`f_0`
#. width left of the center :math:`w_1`
#. width right of the center :math:`w_2`
| The height of the peak is 1.
| The functional form is given by
.. math::
A(f)= \left\{\begin{matrix}\frac{{w_1}^2}{4{(f-f_0)}^2+{w_1}^2},&f\leq f_0\\[9pt] \frac{{w_2}^2}{4{(f-f_0)}^2+{w_2}^2},&f>f_0\end{matrix}\right.
.. index:: PowderLineAxialLor
**Powder average of an axially symmetric interaction convoluted with a Lorentzian**
::
userFcn libLineProfile PowderLineAxialLor 1 2 3
The parameters are:
#. frequency for the field oriented paralell to the symmetry axis :math:`f_\parallel`
#. frequency for the field oriented perpendicular to the symmetry axis :math:`f_\parallel`
#. FWHM of the Lorentzian :math:`w`
| The height of the peak is :math:`\sim`\ 1.
| The functional form is given by
.. math::
A(f)= I_{\mathrm ax}(f)\circledast\left( \frac{w^2}{4f^2+w^2} \right)
with :math:`I_{\mathrm ax}(f)` defined :ref:`above <Iax>`.
.. index:: PowderLineAxialGss
**Powder average of an axially symmetric interaction convoluted with a Gaussian**
::
userFcn libLineProfile PowderLineAxialGss 1 2 3
The parameters are:
#. frequency for the field oriented paralell to the symmetry axis :math:`f_\parallel`
#. frequency for the field oriented perpendicular to the symmetry axis :math:`f_\parallel`
#. FWHM of the Gaussian :math:`\sigma`
| The height of the peak is :math:`\sim`\ 1.
| The functional form is given by
.. math::
A(f)= I_{\mathrm ax}(f)\circledast\left( e^{-\frac{4\ln 2 (f-f_0)^2}{ \sigma^2}} \right)
with :math:`I_{\mathrm ax}(f)` defined :ref:`above <Iax>`.
.. index:: PowderLineAsymLor
**Powder average of an anisotropic interaction convoluted with a Lorentzian**
::
userFcn libLineProfile PowderLineAsymLor 1 2 3 4
The parameters are:
#. :math:`f_1`
#. :math:`f_1`
#. :math:`f_3` frequencies along the principal axes
#. FWHM of the Lorentzian :math:`w`
| The height of the peak is :math:`\sim`\ 1.
| The functional form is given by
.. math::
A(f)= I(f)\circledast\left( \frac{w^2}{4f^2+w^2} \right)
with :math:`I(f)` defined :ref:`above <Ianiso>`. Note that :math:`f_1<f_2<f_3` is not required by the code.
.. index:: PowderLineAsymGss
**Powder average of an anisotropic interaction convoluted with a Gaussian**
::
userFcn libLineProfile PowderLineAsymGss 1 2 3 4
The parameters are:
#. :math:`f_1`
#. :math:`f_1`
#. :math:`f_3` frequencies along the principal axes
#. FWHM of the Gaussian :math:`\sigma`
| The height of the peak is :math:`\sim`\ 1.
| The functional form is given by
.. math::
A(f)= I(f)\circledast\left( e^{-\frac{4\ln 2 (f-f_0)^2}{ \sigma^2}} \right)
with :math:`I(f)` defined :ref:`above <Ianiso>`. Note that :math:`f_1<f_2<f_3` is not required by the code.

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@ -52,6 +52,8 @@ div.sphinxsidebar {
width: 230px;
margin-left: -100%;
font-size: 90%;
word-wrap: break-word;
overflow-wrap : break-word;
}
div.sphinxsidebar ul {
@ -79,14 +81,26 @@ div.sphinxsidebar input {
font-size: 1em;
}
div.sphinxsidebar #searchbox form.search {
overflow: hidden;
}
div.sphinxsidebar #searchbox input[type="text"] {
width: 170px;
float: left;
width: 80%;
padding: 0.25em;
box-sizing: border-box;
}
div.sphinxsidebar #searchbox input[type="submit"] {
width: 30px;
float: left;
width: 20%;
border-left: none;
padding: 0.25em;
box-sizing: border-box;
}
img {
border: 0;
max-width: 100%;
@ -124,6 +138,8 @@ ul.keywordmatches li.goodmatch a {
table.contentstable {
width: 90%;
margin-left: auto;
margin-right: auto;
}
table.contentstable p.biglink {
@ -151,9 +167,14 @@ table.indextable td {
vertical-align: top;
}
table.indextable dl, table.indextable dd {
table.indextable ul {
margin-top: 0;
margin-bottom: 0;
list-style-type: none;
}
table.indextable > tbody > tr > td > ul {
padding-left: 0em;
}
table.indextable tr.pcap {
@ -185,19 +206,51 @@ div.genindex-jumpbox {
padding: 0.4em;
}
/* -- domain module index --------------------------------------------------- */
table.modindextable td {
padding: 2px;
border-collapse: collapse;
}
/* -- general body styles --------------------------------------------------- */
div.body {
min-width: 450px;
max-width: 800px;
}
div.body p, div.body dd, div.body li, div.body blockquote {
-moz-hyphens: auto;
-ms-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
}
a.headerlink {
visibility: hidden;
}
a.brackets:before,
span.brackets > a:before{
content: "[";
}
a.brackets:after,
span.brackets > a:after {
content: "]";
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink {
dt:hover > a.headerlink,
caption:hover > a.headerlink,
p.caption:hover > a.headerlink,
div.code-block-caption:hover > a.headerlink {
visibility: visible;
}
@ -209,10 +262,6 @@ div.body td {
text-align: left;
}
.field-list ul {
padding-left: 1em;
}
.first {
margin-top: 0 !important;
}
@ -240,6 +289,12 @@ img.align-center, .figure.align-center, object.align-center {
margin-right: auto;
}
img.align-default, .figure.align-default {
display: block;
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left;
}
@ -248,6 +303,10 @@ img.align-center, .figure.align-center, object.align-center {
text-align: center;
}
.align-default {
text-align: center;
}
.align-right {
text-align: right;
}
@ -314,6 +373,23 @@ table.docutils {
border-collapse: collapse;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
table.align-default {
margin-left: auto;
margin-right: auto;
}
table caption span.caption-number {
font-style: italic;
}
table caption span.caption-text {
}
table.docutils td, table.docutils th {
padding: 1px 8px 1px 5px;
border-top: 0;
@ -322,10 +398,6 @@ table.docutils td, table.docutils th {
border-bottom: 1px solid #aaa;
}
table.field-list td, table.field-list th {
border: 0 !important;
}
table.footnote td, table.footnote th {
border: 0 !important;
}
@ -344,6 +416,63 @@ table.citation td {
border-bottom: none;
}
th > p:first-child,
td > p:first-child {
margin-top: 0px;
}
th > p:last-child,
td > p:last-child {
margin-bottom: 0px;
}
/* -- figures --------------------------------------------------------------- */
div.figure {
margin: 0.5em;
padding: 0.5em;
}
div.figure p.caption {
padding: 0.3em;
}
div.figure p.caption span.caption-number {
font-style: italic;
}
div.figure p.caption span.caption-text {
}
/* -- field list styles ----------------------------------------------------- */
table.field-list td, table.field-list th {
border: 0 !important;
}
.field-list ul {
margin: 0;
padding-left: 1em;
}
.field-list p {
margin: 0;
}
.field-name {
-moz-hyphens: manual;
-ms-hyphens: manual;
-webkit-hyphens: manual;
hyphens: manual;
}
/* -- hlist styles ---------------------------------------------------------- */
table.hlist td {
vertical-align: top;
}
/* -- other body styles ----------------------------------------------------- */
ol.arabic {
@ -366,11 +495,57 @@ ol.upperroman {
list-style: upper-roman;
}
li > p:first-child {
margin-top: 0px;
}
li > p:last-child {
margin-bottom: 0px;
}
dl.footnote > dt,
dl.citation > dt {
float: left;
}
dl.footnote > dd,
dl.citation > dd {
margin-bottom: 0em;
}
dl.footnote > dd:after,
dl.citation > dd:after {
content: "";
clear: both;
}
dl.field-list {
display: flex;
flex-wrap: wrap;
}
dl.field-list > dt {
flex-basis: 20%;
font-weight: bold;
word-break: break-word;
}
dl.field-list > dt:after {
content: ":";
}
dl.field-list > dd {
flex-basis: 70%;
padding-left: 1em;
margin-left: 0em;
margin-bottom: 0em;
}
dl {
margin-bottom: 15px;
}
dd p {
dd > p:first-child {
margin-top: 0px;
}
@ -384,28 +559,27 @@ dd {
margin-left: 30px;
}
dt:target, .highlighted {
dt:target, span.highlighted {
background-color: #fbe54e;
}
rect.highlighted {
fill: #fbe54e;
}
dl.glossary dt {
font-weight: bold;
font-size: 1.1em;
}
.field-list ul {
margin: 0;
padding-left: 1em;
}
.field-list p {
margin: 0;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.versionmodified {
font-style: italic;
}
@ -444,6 +618,12 @@ dl.glossary dt {
font-style: oblique;
}
.classifier:before {
font-style: normal;
margin: 0.5em;
content: ":";
}
abbr, acronym {
border-bottom: dotted 1px;
cursor: help;
@ -456,6 +636,13 @@ pre {
overflow-y: hidden; /* fixes display issues on Chrome browsers */
}
span.pre {
-moz-hyphens: none;
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
}
td.linenos pre {
padding: 5px 0px;
border: 0;
@ -471,22 +658,51 @@ table.highlighttable td {
padding: 0 0.5em 0 0.5em;
}
tt.descname {
div.code-block-caption {
padding: 2px 5px;
font-size: small;
}
div.code-block-caption code {
background-color: transparent;
}
div.code-block-caption + div > div.highlight > pre {
margin-top: 0;
}
div.code-block-caption span.caption-number {
padding: 0.1em 0.3em;
font-style: italic;
}
div.code-block-caption span.caption-text {
}
div.literal-block-wrapper {
padding: 1em 1em 0;
}
div.literal-block-wrapper div.highlight {
margin: 0;
}
code.descname {
background-color: transparent;
font-weight: bold;
font-size: 1.2em;
}
tt.descclassname {
code.descclassname {
background-color: transparent;
}
tt.xref, a tt {
code.xref, a code {
background-color: transparent;
font-weight: bold;
}
h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
background-color: transparent;
}
@ -518,6 +734,16 @@ span.eqno {
float: right;
}
span.eqno a.headerlink {
position: relative;
left: 0px;
z-index: 1;
}
div.math:hover a.headerlink {
visibility: visible;
}
/* -- printout stylesheet --------------------------------------------------- */
@media print {

View File

@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for all documentation.
*
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@ -45,7 +45,7 @@ jQuery.urlencode = encodeURIComponent;
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s == 'undefined')
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
@ -66,31 +66,80 @@ jQuery.getQueryParameters = function(s) {
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node) {
if (node.nodeType == 3) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
var span = document.createElement("span");
span.className = className;
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this);
highlight(this, addItems);
});
}
}
return this.each(function() {
highlight(this);
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};
/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}
/**
* Small JavaScript module for the documentation.
*/
@ -100,27 +149,30 @@ var Documentation = {
this.fixFirefoxAnchorBug();
this.highlightSearchWords();
this.initIndexTable();
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
this.initOnKeyListeners();
}
},
/**
* i18n support
*/
TRANSLATIONS : {},
PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
LOCALE : 'unknown',
// gettext and ngettext don't access this so that the functions
// can safely bound to a different name (_ = Documentation.gettext)
gettext : function(string) {
var translated = Documentation.TRANSLATIONS[string];
if (typeof translated == 'undefined')
if (typeof translated === 'undefined')
return string;
return (typeof translated == 'string') ? translated : translated[0];
return (typeof translated === 'string') ? translated : translated[0];
},
ngettext : function(singular, plural, n) {
var translated = Documentation.TRANSLATIONS[singular];
if (typeof translated == 'undefined')
if (typeof translated === 'undefined')
return (n == 1) ? singular : plural;
return translated[Documentation.PLURALEXPR(n)];
},
@ -152,6 +204,7 @@ var Documentation = {
/**
* workaround a firefox stupidity
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
*/
fixFirefoxAnchorBug : function() {
if (document.location.hash && $.browser.mozilla)
@ -190,7 +243,7 @@ var Documentation = {
var src = $(this).attr('src');
var idnum = $(this).attr('id').substr(7);
$('tr.cg-' + idnum).toggle();
if (src.substr(-9) == 'minus.png')
if (src.substr(-9) === 'minus.png')
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
else
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
@ -222,11 +275,34 @@ var Documentation = {
var path = document.location.pathname;
var parts = path.split(/\//);
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
if (this == '..')
if (this === '..')
parts.pop();
});
var url = parts.join('/');
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
},
initOnKeyListeners: function() {
$(document).keyup(function(event) {
var activeElementType = document.activeElement.tagName;
// don't navigate when in search box or textarea
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') {
switch (event.keyCode) {
case 37: // left
var prevHref = $('link[rel="prev"]').prop('href');
if (prevHref) {
window.location.href = prevHref;
return false;
}
case 39: // right
var nextHref = $('link[rel="next"]').prop('href');
if (nextHref) {
window.location.href = nextHref;
return false;
}
}
}
});
}
};

View File

@ -0,0 +1,10 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '1.5.2',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

After

Width:  |  Height:  |  Size: 286 B

10253
doc/html/_static/jquery-3.2.1.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,297 @@
/*
* language_data.js
* ~~~~~~~~~~~~~~~~
*
* This script contains the language-specific data used by searchtools.js,
* namely the list of stopwords, stemmer, scorer and splitter.
*
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
/* Non-minified version JS is _stemmer.js if file is provided */
/**
* Porter Stemmer
*/
var Stemmer = function() {
var step2list = {
ational: 'ate',
tional: 'tion',
enci: 'ence',
anci: 'ance',
izer: 'ize',
bli: 'ble',
alli: 'al',
entli: 'ent',
eli: 'e',
ousli: 'ous',
ization: 'ize',
ation: 'ate',
ator: 'ate',
alism: 'al',
iveness: 'ive',
fulness: 'ful',
ousness: 'ous',
aliti: 'al',
iviti: 'ive',
biliti: 'ble',
logi: 'log'
};
var step3list = {
icate: 'ic',
ative: '',
alize: 'al',
iciti: 'ic',
ical: 'ic',
ful: '',
ness: ''
};
var c = "[^aeiou]"; // consonant
var v = "[aeiouy]"; // vowel
var C = c + "[^aeiouy]*"; // consonant sequence
var V = v + "[aeiou]*"; // vowel sequence
var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
var s_v = "^(" + C + ")?" + v; // vowel in stem
this.stemWord = function (w) {
var stem;
var suffix;
var firstch;
var origword = w;
if (w.length < 3)
return w;
var re;
var re2;
var re3;
var re4;
firstch = w.substr(0,1);
if (firstch == "y")
w = firstch.toUpperCase() + w.substr(1);
// Step 1a
re = /^(.+?)(ss|i)es$/;
re2 = /^(.+?)([^s])s$/;
if (re.test(w))
w = w.replace(re,"$1$2");
else if (re2.test(w))
w = w.replace(re2,"$1$2");
// Step 1b
re = /^(.+?)eed$/;
re2 = /^(.+?)(ed|ing)$/;
if (re.test(w)) {
var fp = re.exec(w);
re = new RegExp(mgr0);
if (re.test(fp[1])) {
re = /.$/;
w = w.replace(re,"");
}
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1];
re2 = new RegExp(s_v);
if (re2.test(stem)) {
w = stem;
re2 = /(at|bl|iz)$/;
re3 = new RegExp("([^aeiouylsz])\\1$");
re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re2.test(w))
w = w + "e";
else if (re3.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
else if (re4.test(w))
w = w + "e";
}
}
// Step 1c
re = /^(.+?)y$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(s_v);
if (re.test(stem))
w = stem + "i";
}
// Step 2
re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step2list[suffix];
}
// Step 3
re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step3list[suffix];
}
// Step 4
re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
re2 = /^(.+?)(s|t)(ion)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
if (re.test(stem))
w = stem;
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1] + fp[2];
re2 = new RegExp(mgr1);
if (re2.test(stem))
w = stem;
}
// Step 5
re = /^(.+?)e$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
re2 = new RegExp(meq1);
re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
w = stem;
}
re = /ll$/;
re2 = new RegExp(mgr1);
if (re.test(w) && re2.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
// and turn initial Y back to y
if (firstch == "y")
w = firstch.toLowerCase() + w.substr(1);
return w;
}
}
var splitChars = (function() {
var result = {};
var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702,
2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971,
2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345,
3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761,
3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823,
4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125,
8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695,
11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587,
43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141];
var i, j, start, end;
for (i = 0; i < singles.length; i++) {
result[singles[i]] = true;
}
var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709],
[722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161],
[1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568],
[1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807],
[1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047],
[2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383],
[2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450],
[2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547],
[2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673],
[2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820],
[2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946],
[2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023],
[3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173],
[3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332],
[3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481],
[3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718],
[3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791],
[3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095],
[4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205],
[4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687],
[4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968],
[4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869],
[5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102],
[6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271],
[6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592],
[6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822],
[6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167],
[7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959],
[7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143],
[8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318],
[8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483],
[8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101],
[10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567],
[11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292],
[12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444],
[12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783],
[12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311],
[19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511],
[42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774],
[42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071],
[43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263],
[43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519],
[43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647],
[43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967],
[44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295],
[57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274],
[64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007],
[65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381],
[65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]];
for (i = 0; i < ranges.length; i++) {
start = ranges[i][0];
end = ranges[i][1];
for (j = start; j <= end; j++) {
result[j] = true;
}
}
return result;
})();
function splitQuery(query) {
var result = [];
var start = -1;
for (var i = 0; i < query.length; i++) {
if (splitChars[query.charCodeAt(i)]) {
if (start !== -1) {
result.push(query.slice(start, i));
start = -1;
}
} else if (start === -1) {
start = i;
}
}
if (start !== -1) {
result.push(query.slice(start));
}
return result;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 90 B

View File

@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- nature theme.
*
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@ -16,7 +16,7 @@
body {
font-family: Arial, sans-serif;
font-size: 100%;
background-color: #111;
background-color: #fff;
color: #555;
margin: 0;
padding: 0;
@ -125,10 +125,11 @@ div.sphinxsidebar input {
font-size: 1em;
}
div.sphinxsidebar input[type=text]{
div.sphinxsidebar .searchformwrapper {
margin-left: 20px;
margin-right: 20px;
}
/* -- body styles ----------------------------------------------------------- */
a {
@ -226,7 +227,7 @@ pre {
-moz-box-shadow: 1px 1px 1px #d8d8d8;
}
tt {
code {
background-color: #ecf0f3;
color: #222;
/* padding: 1px 2px; */
@ -242,4 +243,10 @@ div.viewcode-block:target {
background-color: #f4debf;
border-top: 1px solid #ac9;
border-bottom: 1px solid #ac9;
}
div.code-block-caption {
background-color: #ddd;
color: #222;
border: 1px solid #C6C9CB;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 90 B

View File

@ -1,229 +1,53 @@
/*
* searchtools.js_t
* searchtools.js
* ~~~~~~~~~~~~~~~~
*
* Sphinx JavaScript utilties for the full-text search.
* Sphinx JavaScript utilities for the full-text search.
*
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
if (!Scorer) {
/**
* Simple result scoring code.
*/
var Scorer = {
// Implement the following function to further tweak the score for each result
// The function takes a result array [filename, title, anchor, descr, score]
// and returns the new score.
/*
score: function(result) {
return result[4];
},
*/
/**
* Porter Stemmer
*/
var Stemmer = function() {
// query matches the full name of an object
objNameMatch: 11,
// or matches in the last dotted part of the object name
objPartialMatch: 6,
// Additive scores depending on the priority of the object
objPrio: {0: 15, // used to be importantResults
1: 5, // used to be objectResults
2: -5}, // used to be unimportantResults
// Used when the priority is not in the mapping.
objPrioDefault: 0,
var step2list = {
ational: 'ate',
tional: 'tion',
enci: 'ence',
anci: 'ance',
izer: 'ize',
bli: 'ble',
alli: 'al',
entli: 'ent',
eli: 'e',
ousli: 'ous',
ization: 'ize',
ation: 'ate',
ator: 'ate',
alism: 'al',
iveness: 'ive',
fulness: 'ful',
ousness: 'ous',
aliti: 'al',
iviti: 'ive',
biliti: 'ble',
logi: 'log'
// query found in title
title: 15,
partialTitle: 7,
// query found in terms
term: 5,
partialTerm: 2
};
var step3list = {
icate: 'ic',
ative: '',
alize: 'al',
iciti: 'ic',
ical: 'ic',
ful: '',
ness: ''
};
var c = "[^aeiou]"; // consonant
var v = "[aeiouy]"; // vowel
var C = c + "[^aeiouy]*"; // consonant sequence
var V = v + "[aeiou]*"; // vowel sequence
var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
var s_v = "^(" + C + ")?" + v; // vowel in stem
this.stemWord = function (w) {
var stem;
var suffix;
var firstch;
var origword = w;
if (w.length < 3)
return w;
var re;
var re2;
var re3;
var re4;
firstch = w.substr(0,1);
if (firstch == "y")
w = firstch.toUpperCase() + w.substr(1);
// Step 1a
re = /^(.+?)(ss|i)es$/;
re2 = /^(.+?)([^s])s$/;
if (re.test(w))
w = w.replace(re,"$1$2");
else if (re2.test(w))
w = w.replace(re2,"$1$2");
// Step 1b
re = /^(.+?)eed$/;
re2 = /^(.+?)(ed|ing)$/;
if (re.test(w)) {
var fp = re.exec(w);
re = new RegExp(mgr0);
if (re.test(fp[1])) {
re = /.$/;
w = w.replace(re,"");
}
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1];
re2 = new RegExp(s_v);
if (re2.test(stem)) {
w = stem;
re2 = /(at|bl|iz)$/;
re3 = new RegExp("([^aeiouylsz])\\1$");
re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re2.test(w))
w = w + "e";
else if (re3.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
else if (re4.test(w))
w = w + "e";
}
}
// Step 1c
re = /^(.+?)y$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(s_v);
if (re.test(stem))
w = stem + "i";
}
// Step 2
re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step2list[suffix];
}
// Step 3
re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step3list[suffix];
}
// Step 4
re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
re2 = /^(.+?)(s|t)(ion)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
if (re.test(stem))
w = stem;
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1] + fp[2];
re2 = new RegExp(mgr1);
if (re2.test(stem))
w = stem;
}
// Step 5
re = /^(.+?)e$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
re2 = new RegExp(meq1);
re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
w = stem;
}
re = /ll$/;
re2 = new RegExp(mgr1);
if (re.test(w) && re2.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
// and turn initial Y back to y
if (firstch == "y")
w = firstch.toLowerCase() + w.substr(1);
return w;
}
}
/**
* Simple result scoring code.
*/
var Scorer = {
// Implement the following function to further tweak the score for each result
// The function takes a result array [filename, title, anchor, descr, score]
// and returns the new score.
/*
score: function(result) {
return result[4];
},
*/
// query matches the full name of an object
objNameMatch: 11,
// or matches in the last dotted part of the object name
objPartialMatch: 6,
// Additive scores depending on the priority of the object
objPrio: {0: 15, // used to be importantResults
1: 5, // used to be objectResults
2: -5}, // used to be unimportantResults
// Used when the priority is not in the mapping.
objPrioDefault: 0,
// query found in title
title: 15,
// query found in terms
term: 5
};
if (!splitQuery) {
function splitQuery(query) {
return query.split(/\s+/);
}
}
/**
* Search Module
@ -234,6 +58,14 @@ var Search = {
_queued_query : null,
_pulse_status : -1,
htmlToText : function(htmlString) {
var htmlElement = document.createElement('span');
htmlElement.innerHTML = htmlString;
$(htmlElement).find('.headerlink').remove();
docContent = $(htmlElement).find('[role=main]')[0];
return docContent.textContent || docContent.innerText;
},
init : function() {
var params = $.getQueryParameters();
if (params.q) {
@ -298,7 +130,7 @@ var Search = {
this.out = $('#search-results');
this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
this.dots = $('<span></span>').appendTo(this.title);
this.status = $('<p style="display: none"></p>').appendTo(this.out);
this.status = $('<p class="search-summary">&nbsp;</p>').appendTo(this.out);
this.output = $('<ul class="search"/>').appendTo(this.out);
$('#search-progress').text(_('Preparing search...'));
@ -316,14 +148,13 @@ var Search = {
*/
query : function(query) {
var i;
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
// stem the searchterms and add them to the correct list
var stemmer = new Stemmer();
var searchterms = [];
var excluded = [];
var hlterms = [];
var tmp = query.split(/\s+/);
var tmp = splitQuery(query);
var objectterms = [];
for (i = 0; i < tmp.length; i++) {
if (tmp[i] !== "") {
@ -337,6 +168,10 @@ var Search = {
}
// stem the word
var word = stemmer.stemWord(tmp[i].toLowerCase());
// prevent stemmer from cutting word smaller than two chars
if(word.length < 3 && tmp[i].length >= 3) {
word = tmp[i];
}
var toAppend;
// select the correct list
if (word[0] == '-') {
@ -373,8 +208,7 @@ var Search = {
}
// lookup as search terms in fulltext
results = results.concat(this.performTermsSearch(searchterms, excluded, terms, Scorer.term))
.concat(this.performTermsSearch(searchterms, excluded, titleterms, Scorer.title));
results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms));
// let the scorer override scores with a custom scoring function
if (Scorer.score) {
@ -435,11 +269,11 @@ var Search = {
displayNextItem();
});
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
$.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[0] + '.txt',
$.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX,
dataType: "text",
complete: function(jqxhr, textstatus) {
var data = jqxhr.responseText;
if (data !== '') {
if (data !== '' && data !== undefined) {
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
}
Search.output.append(listItem);
@ -474,6 +308,7 @@ var Search = {
*/
performObjectSearch : function(object, otherterms) {
var filenames = this._index.filenames;
var docnames = this._index.docnames;
var objects = this._index.objects;
var objnames = this._index.objnames;
var titles = this._index.titles;
@ -484,12 +319,13 @@ var Search = {
for (var prefix in objects) {
for (var name in objects[prefix]) {
var fullname = (prefix ? prefix + '.' : '') + name;
if (fullname.toLowerCase().indexOf(object) > -1) {
var fullnameLower = fullname.toLowerCase()
if (fullnameLower.indexOf(object) > -1) {
var score = 0;
var parts = fullname.split('.');
var parts = fullnameLower.split('.');
// check for different match types: exact matches of full name or
// "last name" (i.e. last dotted part)
if (fullname == object || parts[parts.length - 1] == object) {
if (fullnameLower == object || parts[parts.length - 1] == object) {
score += Scorer.objNameMatch;
// matches in last name
} else if (parts[parts.length - 1].indexOf(object) > -1) {
@ -527,7 +363,7 @@ var Search = {
} else {
score += Scorer.objPrioDefault;
}
results.push([filenames[match[0]], fullname, '#'+anchor, descr, score]);
results.push([docnames[match[0]], fullname, '#'+anchor, descr, score, filenames[match[0]]]);
}
}
}
@ -538,23 +374,61 @@ var Search = {
/**
* search for full-text terms in the index
*/
performTermsSearch : function(searchterms, excluded, terms, score) {
performTermsSearch : function(searchterms, excluded, terms, titleterms) {
var docnames = this._index.docnames;
var filenames = this._index.filenames;
var titles = this._index.titles;
var i, j, file, files;
var i, j, file;
var fileMap = {};
var scoreMap = {};
var results = [];
// perform the search on the required terms
for (i = 0; i < searchterms.length; i++) {
var word = searchterms[i];
// no match but word was a required one
if ((files = terms[word]) === undefined)
break;
if (files.length === undefined) {
files = [files];
var files = [];
var _o = [
{files: terms[word], score: Scorer.term},
{files: titleterms[word], score: Scorer.title}
];
// add support for partial matches
if (word.length > 2) {
for (var w in terms) {
if (w.match(word) && !terms[word]) {
_o.push({files: terms[w], score: Scorer.partialTerm})
}
}
for (var w in titleterms) {
if (w.match(word) && !titleterms[word]) {
_o.push({files: titleterms[w], score: Scorer.partialTitle})
}
}
}
// no match but word was a required one
if ($u.every(_o, function(o){return o.files === undefined;})) {
break;
}
// found search word in contents
$u.each(_o, function(o) {
var _files = o.files;
if (_files === undefined)
return
if (_files.length === undefined)
_files = [_files];
files = files.concat(_files);
// set score for the word in each file to Scorer.term
for (j = 0; j < _files.length; j++) {
file = _files[j];
if (!(file in scoreMap))
scoreMap[file] = {}
scoreMap[file][word] = o.score;
}
});
// create the mapping
for (j = 0; j < files.length; j++) {
file = files[j];
@ -570,13 +444,19 @@ var Search = {
var valid = true;
// check if all requirements are matched
if (fileMap[file].length != searchterms.length)
continue;
var filteredTermCount = // as search terms with length < 3 are discarded: ignore
searchterms.filter(function(term){return term.length > 2}).length
if (
fileMap[file].length != searchterms.length &&
fileMap[file].length != filteredTermCount
) continue;
// ensure that none of the excluded terms is in the search result
for (i = 0; i < excluded.length; i++) {
if (terms[excluded[i]] == file ||
$u.contains(terms[excluded[i]] || [], file)) {
titleterms[excluded[i]] == file ||
$u.contains(terms[excluded[i]] || [], file) ||
$u.contains(titleterms[excluded[i]] || [], file)) {
valid = false;
break;
}
@ -584,7 +464,10 @@ var Search = {
// if we have still a valid result we can add it to the result list
if (valid) {
results.push([filenames[file], titles[file], '', null, score]);
// select one (max) score for the file.
// for better ranking, we should calculate ranking by using words statistics like basic tf-idf...
var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]}));
results.push([docnames[file], titles[file], '', null, score, filenames[file]]);
}
}
return results;
@ -594,10 +477,11 @@ var Search = {
* helper function to return a node containing the
* search summary for a given text. keywords is a list
* of stemmed words, hlwords is the list of normal, unstemmed
* words. the first one is used to find the occurance, the
* words. the first one is used to find the occurrence, the
* latter for highlighting it.
*/
makeSearchSummary : function(text, keywords, hlwords) {
makeSearchSummary : function(htmlText, keywords, hlwords) {
var text = Search.htmlToText(htmlText);
var textLower = text.toLowerCase();
var start = 0;
$.each(keywords, function() {
@ -619,4 +503,4 @@ var Search = {
$(document).ready(function() {
Search.init();
});
});

View File

@ -0,0 +1,999 @@
// Underscore.js 1.3.1
// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore is freely distributable under the MIT license.
// Portions of Underscore are inspired or borrowed from Prototype,
// Oliver Steele's Functional, and John Resig's Micro-Templating.
// For all details and documentation:
// http://documentcloud.github.com/underscore
(function() {
// Baseline setup
// --------------
// Establish the root object, `window` in the browser, or `global` on the server.
var root = this;
// Save the previous value of the `_` variable.
var previousUnderscore = root._;
// Establish the object that gets returned to break out of a loop iteration.
var breaker = {};
// Save bytes in the minified (but not gzipped) version:
var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
// Create quick reference variables for speed access to core prototypes.
var slice = ArrayProto.slice,
unshift = ArrayProto.unshift,
toString = ObjProto.toString,
hasOwnProperty = ObjProto.hasOwnProperty;
// All **ECMAScript 5** native function implementations that we hope to use
// are declared here.
var
nativeForEach = ArrayProto.forEach,
nativeMap = ArrayProto.map,
nativeReduce = ArrayProto.reduce,
nativeReduceRight = ArrayProto.reduceRight,
nativeFilter = ArrayProto.filter,
nativeEvery = ArrayProto.every,
nativeSome = ArrayProto.some,
nativeIndexOf = ArrayProto.indexOf,
nativeLastIndexOf = ArrayProto.lastIndexOf,
nativeIsArray = Array.isArray,
nativeKeys = Object.keys,
nativeBind = FuncProto.bind;
// Create a safe reference to the Underscore object for use below.
var _ = function(obj) { return new wrapper(obj); };
// Export the Underscore object for **Node.js**, with
// backwards-compatibility for the old `require()` API. If we're in
// the browser, add `_` as a global object via a string identifier,
// for Closure Compiler "advanced" mode.
if (typeof exports !== 'undefined') {
if (typeof module !== 'undefined' && module.exports) {
exports = module.exports = _;
}
exports._ = _;
} else {
root['_'] = _;
}
// Current version.
_.VERSION = '1.3.1';
// Collection Functions
// --------------------
// The cornerstone, an `each` implementation, aka `forEach`.
// Handles objects with the built-in `forEach`, arrays, and raw objects.
// Delegates to **ECMAScript 5**'s native `forEach` if available.
var each = _.each = _.forEach = function(obj, iterator, context) {
if (obj == null) return;
if (nativeForEach && obj.forEach === nativeForEach) {
obj.forEach(iterator, context);
} else if (obj.length === +obj.length) {
for (var i = 0, l = obj.length; i < l; i++) {
if (i in obj && iterator.call(context, obj[i], i, obj) === breaker) return;
}
} else {
for (var key in obj) {
if (_.has(obj, key)) {
if (iterator.call(context, obj[key], key, obj) === breaker) return;
}
}
}
};
// Return the results of applying the iterator to each element.
// Delegates to **ECMAScript 5**'s native `map` if available.
_.map = _.collect = function(obj, iterator, context) {
var results = [];
if (obj == null) return results;
if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
each(obj, function(value, index, list) {
results[results.length] = iterator.call(context, value, index, list);
});
if (obj.length === +obj.length) results.length = obj.length;
return results;
};
// **Reduce** builds up a single result from a list of values, aka `inject`,
// or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
_.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
var initial = arguments.length > 2;
if (obj == null) obj = [];
if (nativeReduce && obj.reduce === nativeReduce) {
if (context) iterator = _.bind(iterator, context);
return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
}
each(obj, function(value, index, list) {
if (!initial) {
memo = value;
initial = true;
} else {
memo = iterator.call(context, memo, value, index, list);
}
});
if (!initial) throw new TypeError('Reduce of empty array with no initial value');
return memo;
};
// The right-associative version of reduce, also known as `foldr`.
// Delegates to **ECMAScript 5**'s native `reduceRight` if available.
_.reduceRight = _.foldr = function(obj, iterator, memo, context) {
var initial = arguments.length > 2;
if (obj == null) obj = [];
if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
if (context) iterator = _.bind(iterator, context);
return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
}
var reversed = _.toArray(obj).reverse();
if (context && !initial) iterator = _.bind(iterator, context);
return initial ? _.reduce(reversed, iterator, memo, context) : _.reduce(reversed, iterator);
};
// Return the first value which passes a truth test. Aliased as `detect`.
_.find = _.detect = function(obj, iterator, context) {
var result;
any(obj, function(value, index, list) {
if (iterator.call(context, value, index, list)) {
result = value;
return true;
}
});
return result;
};
// Return all the elements that pass a truth test.
// Delegates to **ECMAScript 5**'s native `filter` if available.
// Aliased as `select`.
_.filter = _.select = function(obj, iterator, context) {
var results = [];
if (obj == null) return results;
if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
each(obj, function(value, index, list) {
if (iterator.call(context, value, index, list)) results[results.length] = value;
});
return results;
};
// Return all the elements for which a truth test fails.
_.reject = function(obj, iterator, context) {
var results = [];
if (obj == null) return results;
each(obj, function(value, index, list) {
if (!iterator.call(context, value, index, list)) results[results.length] = value;
});
return results;
};
// Determine whether all of the elements match a truth test.
// Delegates to **ECMAScript 5**'s native `every` if available.
// Aliased as `all`.
_.every = _.all = function(obj, iterator, context) {
var result = true;
if (obj == null) return result;
if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
each(obj, function(value, index, list) {
if (!(result = result && iterator.call(context, value, index, list))) return breaker;
});
return result;
};
// Determine if at least one element in the object matches a truth test.
// Delegates to **ECMAScript 5**'s native `some` if available.
// Aliased as `any`.
var any = _.some = _.any = function(obj, iterator, context) {
iterator || (iterator = _.identity);
var result = false;
if (obj == null) return result;
if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
each(obj, function(value, index, list) {
if (result || (result = iterator.call(context, value, index, list))) return breaker;
});
return !!result;
};
// Determine if a given value is included in the array or object using `===`.
// Aliased as `contains`.
_.include = _.contains = function(obj, target) {
var found = false;
if (obj == null) return found;
if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
found = any(obj, function(value) {
return value === target;
});
return found;
};
// Invoke a method (with arguments) on every item in a collection.
_.invoke = function(obj, method) {
var args = slice.call(arguments, 2);
return _.map(obj, function(value) {
return (_.isFunction(method) ? method || value : value[method]).apply(value, args);
});
};
// Convenience version of a common use case of `map`: fetching a property.
_.pluck = function(obj, key) {
return _.map(obj, function(value){ return value[key]; });
};
// Return the maximum element or (element-based computation).
_.max = function(obj, iterator, context) {
if (!iterator && _.isArray(obj)) return Math.max.apply(Math, obj);
if (!iterator && _.isEmpty(obj)) return -Infinity;
var result = {computed : -Infinity};
each(obj, function(value, index, list) {
var computed = iterator ? iterator.call(context, value, index, list) : value;
computed >= result.computed && (result = {value : value, computed : computed});
});
return result.value;
};
// Return the minimum element (or element-based computation).
_.min = function(obj, iterator, context) {
if (!iterator && _.isArray(obj)) return Math.min.apply(Math, obj);
if (!iterator && _.isEmpty(obj)) return Infinity;
var result = {computed : Infinity};
each(obj, function(value, index, list) {
var computed = iterator ? iterator.call(context, value, index, list) : value;
computed < result.computed && (result = {value : value, computed : computed});
});
return result.value;
};
// Shuffle an array.
_.shuffle = function(obj) {
var shuffled = [], rand;
each(obj, function(value, index, list) {
if (index == 0) {
shuffled[0] = value;
} else {
rand = Math.floor(Math.random() * (index + 1));
shuffled[index] = shuffled[rand];
shuffled[rand] = value;
}
});
return shuffled;
};
// Sort the object's values by a criterion produced by an iterator.
_.sortBy = function(obj, iterator, context) {
return _.pluck(_.map(obj, function(value, index, list) {
return {
value : value,
criteria : iterator.call(context, value, index, list)
};
}).sort(function(left, right) {
var a = left.criteria, b = right.criteria;
return a < b ? -1 : a > b ? 1 : 0;
}), 'value');
};
// Groups the object's values by a criterion. Pass either a string attribute
// to group by, or a function that returns the criterion.
_.groupBy = function(obj, val) {
var result = {};
var iterator = _.isFunction(val) ? val : function(obj) { return obj[val]; };
each(obj, function(value, index) {
var key = iterator(value, index);
(result[key] || (result[key] = [])).push(value);
});
return result;
};
// Use a comparator function to figure out at what index an object should
// be inserted so as to maintain order. Uses binary search.
_.sortedIndex = function(array, obj, iterator) {
iterator || (iterator = _.identity);
var low = 0, high = array.length;
while (low < high) {
var mid = (low + high) >> 1;
iterator(array[mid]) < iterator(obj) ? low = mid + 1 : high = mid;
}
return low;
};
// Safely convert anything iterable into a real, live array.
_.toArray = function(iterable) {
if (!iterable) return [];
if (iterable.toArray) return iterable.toArray();
if (_.isArray(iterable)) return slice.call(iterable);
if (_.isArguments(iterable)) return slice.call(iterable);
return _.values(iterable);
};
// Return the number of elements in an object.
_.size = function(obj) {
return _.toArray(obj).length;
};
// Array Functions
// ---------------
// Get the first element of an array. Passing **n** will return the first N
// values in the array. Aliased as `head`. The **guard** check allows it to work
// with `_.map`.
_.first = _.head = function(array, n, guard) {
return (n != null) && !guard ? slice.call(array, 0, n) : array[0];
};
// Returns everything but the last entry of the array. Especcialy useful on
// the arguments object. Passing **n** will return all the values in
// the array, excluding the last N. The **guard** check allows it to work with
// `_.map`.
_.initial = function(array, n, guard) {
return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
};
// Get the last element of an array. Passing **n** will return the last N
// values in the array. The **guard** check allows it to work with `_.map`.
_.last = function(array, n, guard) {
if ((n != null) && !guard) {
return slice.call(array, Math.max(array.length - n, 0));
} else {
return array[array.length - 1];
}
};
// Returns everything but the first entry of the array. Aliased as `tail`.
// Especially useful on the arguments object. Passing an **index** will return
// the rest of the values in the array from that index onward. The **guard**
// check allows it to work with `_.map`.
_.rest = _.tail = function(array, index, guard) {
return slice.call(array, (index == null) || guard ? 1 : index);
};
// Trim out all falsy values from an array.
_.compact = function(array) {
return _.filter(array, function(value){ return !!value; });
};
// Return a completely flattened version of an array.
_.flatten = function(array, shallow) {
return _.reduce(array, function(memo, value) {
if (_.isArray(value)) return memo.concat(shallow ? value : _.flatten(value));
memo[memo.length] = value;
return memo;
}, []);
};
// Return a version of the array that does not contain the specified value(s).
_.without = function(array) {
return _.difference(array, slice.call(arguments, 1));
};
// Produce a duplicate-free version of the array. If the array has already
// been sorted, you have the option of using a faster algorithm.
// Aliased as `unique`.
_.uniq = _.unique = function(array, isSorted, iterator) {
var initial = iterator ? _.map(array, iterator) : array;
var result = [];
_.reduce(initial, function(memo, el, i) {
if (0 == i || (isSorted === true ? _.last(memo) != el : !_.include(memo, el))) {
memo[memo.length] = el;
result[result.length] = array[i];
}
return memo;
}, []);
return result;
};
// Produce an array that contains the union: each distinct element from all of
// the passed-in arrays.
_.union = function() {
return _.uniq(_.flatten(arguments, true));
};
// Produce an array that contains every item shared between all the
// passed-in arrays. (Aliased as "intersect" for back-compat.)
_.intersection = _.intersect = function(array) {
var rest = slice.call(arguments, 1);
return _.filter(_.uniq(array), function(item) {
return _.every(rest, function(other) {
return _.indexOf(other, item) >= 0;
});
});
};
// Take the difference between one array and a number of other arrays.
// Only the elements present in just the first array will remain.
_.difference = function(array) {
var rest = _.flatten(slice.call(arguments, 1));
return _.filter(array, function(value){ return !_.include(rest, value); });
};
// Zip together multiple lists into a single array -- elements that share
// an index go together.
_.zip = function() {
var args = slice.call(arguments);
var length = _.max(_.pluck(args, 'length'));
var results = new Array(length);
for (var i = 0; i < length; i++) results[i] = _.pluck(args, "" + i);
return results;
};
// If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
// we need this function. Return the position of the first occurrence of an
// item in an array, or -1 if the item is not included in the array.
// Delegates to **ECMAScript 5**'s native `indexOf` if available.
// If the array is large and already in sort order, pass `true`
// for **isSorted** to use binary search.
_.indexOf = function(array, item, isSorted) {
if (array == null) return -1;
var i, l;
if (isSorted) {
i = _.sortedIndex(array, item);
return array[i] === item ? i : -1;
}
if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item);
for (i = 0, l = array.length; i < l; i++) if (i in array && array[i] === item) return i;
return -1;
};
// Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
_.lastIndexOf = function(array, item) {
if (array == null) return -1;
if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) return array.lastIndexOf(item);
var i = array.length;
while (i--) if (i in array && array[i] === item) return i;
return -1;
};
// Generate an integer Array containing an arithmetic progression. A port of
// the native Python `range()` function. See
// [the Python documentation](http://docs.python.org/library/functions.html#range).
_.range = function(start, stop, step) {
if (arguments.length <= 1) {
stop = start || 0;
start = 0;
}
step = arguments[2] || 1;
var len = Math.max(Math.ceil((stop - start) / step), 0);
var idx = 0;
var range = new Array(len);
while(idx < len) {
range[idx++] = start;
start += step;
}
return range;
};
// Function (ahem) Functions
// ------------------
// Reusable constructor function for prototype setting.
var ctor = function(){};
// Create a function bound to a given object (assigning `this`, and arguments,
// optionally). Binding with arguments is also known as `curry`.
// Delegates to **ECMAScript 5**'s native `Function.bind` if available.
// We check for `func.bind` first, to fail fast when `func` is undefined.
_.bind = function bind(func, context) {
var bound, args;
if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
if (!_.isFunction(func)) throw new TypeError;
args = slice.call(arguments, 2);
return bound = function() {
if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
ctor.prototype = func.prototype;
var self = new ctor;
var result = func.apply(self, args.concat(slice.call(arguments)));
if (Object(result) === result) return result;
return self;
};
};
// Bind all of an object's methods to that object. Useful for ensuring that
// all callbacks defined on an object belong to it.
_.bindAll = function(obj) {
var funcs = slice.call(arguments, 1);
if (funcs.length == 0) funcs = _.functions(obj);
each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
return obj;
};
// Memoize an expensive function by storing its results.
_.memoize = function(func, hasher) {
var memo = {};
hasher || (hasher = _.identity);
return function() {
var key = hasher.apply(this, arguments);
return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
};
};
// Delays a function for the given number of milliseconds, and then calls
// it with the arguments supplied.
_.delay = function(func, wait) {
var args = slice.call(arguments, 2);
return setTimeout(function(){ return func.apply(func, args); }, wait);
};
// Defers a function, scheduling it to run after the current call stack has
// cleared.
_.defer = function(func) {
return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
};
// Returns a function, that, when invoked, will only be triggered at most once
// during a given window of time.
_.throttle = function(func, wait) {
var context, args, timeout, throttling, more;
var whenDone = _.debounce(function(){ more = throttling = false; }, wait);
return function() {
context = this; args = arguments;
var later = function() {
timeout = null;
if (more) func.apply(context, args);
whenDone();
};
if (!timeout) timeout = setTimeout(later, wait);
if (throttling) {
more = true;
} else {
func.apply(context, args);
}
whenDone();
throttling = true;
};
};
// Returns a function, that, as long as it continues to be invoked, will not
// be triggered. The function will be called after it stops being called for
// N milliseconds.
_.debounce = function(func, wait) {
var timeout;
return function() {
var context = this, args = arguments;
var later = function() {
timeout = null;
func.apply(context, args);
};
clearTimeout(timeout);
timeout = setTimeout(later, wait);
};
};
// Returns a function that will be executed at most one time, no matter how
// often you call it. Useful for lazy initialization.
_.once = function(func) {
var ran = false, memo;
return function() {
if (ran) return memo;
ran = true;
return memo = func.apply(this, arguments);
};
};
// Returns the first function passed as an argument to the second,
// allowing you to adjust arguments, run code before and after, and
// conditionally execute the original function.
_.wrap = function(func, wrapper) {
return function() {
var args = [func].concat(slice.call(arguments, 0));
return wrapper.apply(this, args);
};
};
// Returns a function that is the composition of a list of functions, each
// consuming the return value of the function that follows.
_.compose = function() {
var funcs = arguments;
return function() {
var args = arguments;
for (var i = funcs.length - 1; i >= 0; i--) {
args = [funcs[i].apply(this, args)];
}
return args[0];
};
};
// Returns a function that will only be executed after being called N times.
_.after = function(times, func) {
if (times <= 0) return func();
return function() {
if (--times < 1) { return func.apply(this, arguments); }
};
};
// Object Functions
// ----------------
// Retrieve the names of an object's properties.
// Delegates to **ECMAScript 5**'s native `Object.keys`
_.keys = nativeKeys || function(obj) {
if (obj !== Object(obj)) throw new TypeError('Invalid object');
var keys = [];
for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;
return keys;
};
// Retrieve the values of an object's properties.
_.values = function(obj) {
return _.map(obj, _.identity);
};
// Return a sorted list of the function names available on the object.
// Aliased as `methods`
_.functions = _.methods = function(obj) {
var names = [];
for (var key in obj) {
if (_.isFunction(obj[key])) names.push(key);
}
return names.sort();
};
// Extend a given object with all the properties in passed-in object(s).
_.extend = function(obj) {
each(slice.call(arguments, 1), function(source) {
for (var prop in source) {
obj[prop] = source[prop];
}
});
return obj;
};
// Fill in a given object with default properties.
_.defaults = function(obj) {
each(slice.call(arguments, 1), function(source) {
for (var prop in source) {
if (obj[prop] == null) obj[prop] = source[prop];
}
});
return obj;
};
// Create a (shallow-cloned) duplicate of an object.
_.clone = function(obj) {
if (!_.isObject(obj)) return obj;
return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
};
// Invokes interceptor with the obj, and then returns obj.
// The primary purpose of this method is to "tap into" a method chain, in
// order to perform operations on intermediate results within the chain.
_.tap = function(obj, interceptor) {
interceptor(obj);
return obj;
};
// Internal recursive comparison function.
function eq(a, b, stack) {
// Identical objects are equal. `0 === -0`, but they aren't identical.
// See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
if (a === b) return a !== 0 || 1 / a == 1 / b;
// A strict comparison is necessary because `null == undefined`.
if (a == null || b == null) return a === b;
// Unwrap any wrapped objects.
if (a._chain) a = a._wrapped;
if (b._chain) b = b._wrapped;
// Invoke a custom `isEqual` method if one is provided.
if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);
if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);
// Compare `[[Class]]` names.
var className = toString.call(a);
if (className != toString.call(b)) return false;
switch (className) {
// Strings, numbers, dates, and booleans are compared by value.
case '[object String]':
// Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
// equivalent to `new String("5")`.
return a == String(b);
case '[object Number]':
// `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
// other numeric values.
return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
case '[object Date]':
case '[object Boolean]':
// Coerce dates and booleans to numeric primitive values. Dates are compared by their
// millisecond representations. Note that invalid dates with millisecond representations
// of `NaN` are not equivalent.
return +a == +b;
// RegExps are compared by their source patterns and flags.
case '[object RegExp]':
return a.source == b.source &&
a.global == b.global &&
a.multiline == b.multiline &&
a.ignoreCase == b.ignoreCase;
}
if (typeof a != 'object' || typeof b != 'object') return false;
// Assume equality for cyclic structures. The algorithm for detecting cyclic
// structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
var length = stack.length;
while (length--) {
// Linear search. Performance is inversely proportional to the number of
// unique nested structures.
if (stack[length] == a) return true;
}
// Add the first object to the stack of traversed objects.
stack.push(a);
var size = 0, result = true;
// Recursively compare objects and arrays.
if (className == '[object Array]') {
// Compare array lengths to determine if a deep comparison is necessary.
size = a.length;
result = size == b.length;
if (result) {
// Deep compare the contents, ignoring non-numeric properties.
while (size--) {
// Ensure commutative equality for sparse arrays.
if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;
}
}
} else {
// Objects with different constructors are not equivalent.
if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;
// Deep compare objects.
for (var key in a) {
if (_.has(a, key)) {
// Count the expected number of properties.
size++;
// Deep compare each member.
if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break;
}
}
// Ensure that both objects contain the same number of properties.
if (result) {
for (key in b) {
if (_.has(b, key) && !(size--)) break;
}
result = !size;
}
}
// Remove the first object from the stack of traversed objects.
stack.pop();
return result;
}
// Perform a deep comparison to check if two objects are equal.
_.isEqual = function(a, b) {
return eq(a, b, []);
};
// Is a given array, string, or object empty?
// An "empty" object has no enumerable own-properties.
_.isEmpty = function(obj) {
if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
for (var key in obj) if (_.has(obj, key)) return false;
return true;
};
// Is a given value a DOM element?
_.isElement = function(obj) {
return !!(obj && obj.nodeType == 1);
};
// Is a given value an array?
// Delegates to ECMA5's native Array.isArray
_.isArray = nativeIsArray || function(obj) {
return toString.call(obj) == '[object Array]';
};
// Is a given variable an object?
_.isObject = function(obj) {
return obj === Object(obj);
};
// Is a given variable an arguments object?
_.isArguments = function(obj) {
return toString.call(obj) == '[object Arguments]';
};
if (!_.isArguments(arguments)) {
_.isArguments = function(obj) {
return !!(obj && _.has(obj, 'callee'));
};
}
// Is a given value a function?
_.isFunction = function(obj) {
return toString.call(obj) == '[object Function]';
};
// Is a given value a string?
_.isString = function(obj) {
return toString.call(obj) == '[object String]';
};
// Is a given value a number?
_.isNumber = function(obj) {
return toString.call(obj) == '[object Number]';
};
// Is the given value `NaN`?
_.isNaN = function(obj) {
// `NaN` is the only value for which `===` is not reflexive.
return obj !== obj;
};
// Is a given value a boolean?
_.isBoolean = function(obj) {
return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
};
// Is a given value a date?
_.isDate = function(obj) {
return toString.call(obj) == '[object Date]';
};
// Is the given value a regular expression?
_.isRegExp = function(obj) {
return toString.call(obj) == '[object RegExp]';
};
// Is a given value equal to null?
_.isNull = function(obj) {
return obj === null;
};
// Is a given variable undefined?
_.isUndefined = function(obj) {
return obj === void 0;
};
// Has own property?
_.has = function(obj, key) {
return hasOwnProperty.call(obj, key);
};
// Utility Functions
// -----------------
// Run Underscore.js in *noConflict* mode, returning the `_` variable to its
// previous owner. Returns a reference to the Underscore object.
_.noConflict = function() {
root._ = previousUnderscore;
return this;
};
// Keep the identity function around for default iterators.
_.identity = function(value) {
return value;
};
// Run a function **n** times.
_.times = function (n, iterator, context) {
for (var i = 0; i < n; i++) iterator.call(context, i);
};
// Escape a string for HTML interpolation.
_.escape = function(string) {
return (''+string).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;');
};
// Add your own custom functions to the Underscore object, ensuring that
// they're correctly added to the OOP wrapper as well.
_.mixin = function(obj) {
each(_.functions(obj), function(name){
addToWrapper(name, _[name] = obj[name]);
});
};
// Generate a unique integer id (unique within the entire client session).
// Useful for temporary DOM ids.
var idCounter = 0;
_.uniqueId = function(prefix) {
var id = idCounter++;
return prefix ? prefix + id : id;
};
// By default, Underscore uses ERB-style template delimiters, change the
// following template settings to use alternative delimiters.
_.templateSettings = {
evaluate : /<%([\s\S]+?)%>/g,
interpolate : /<%=([\s\S]+?)%>/g,
escape : /<%-([\s\S]+?)%>/g
};
// When customizing `templateSettings`, if you don't want to define an
// interpolation, evaluation or escaping regex, we need one that is
// guaranteed not to match.
var noMatch = /.^/;
// Within an interpolation, evaluation, or escaping, remove HTML escaping
// that had been previously added.
var unescape = function(code) {
return code.replace(/\\\\/g, '\\').replace(/\\'/g, "'");
};
// JavaScript micro-templating, similar to John Resig's implementation.
// Underscore templating handles arbitrary delimiters, preserves whitespace,
// and correctly escapes quotes within interpolated code.
_.template = function(str, data) {
var c = _.templateSettings;
var tmpl = 'var __p=[],print=function(){__p.push.apply(__p,arguments);};' +
'with(obj||{}){__p.push(\'' +
str.replace(/\\/g, '\\\\')
.replace(/'/g, "\\'")
.replace(c.escape || noMatch, function(match, code) {
return "',_.escape(" + unescape(code) + "),'";
})
.replace(c.interpolate || noMatch, function(match, code) {
return "'," + unescape(code) + ",'";
})
.replace(c.evaluate || noMatch, function(match, code) {
return "');" + unescape(code).replace(/[\r\n\t]/g, ' ') + ";__p.push('";
})
.replace(/\r/g, '\\r')
.replace(/\n/g, '\\n')
.replace(/\t/g, '\\t')
+ "');}return __p.join('');";
var func = new Function('obj', '_', tmpl);
if (data) return func(data, _);
return function(data) {
return func.call(this, data, _);
};
};
// Add a "chain" function, which will delegate to the wrapper.
_.chain = function(obj) {
return _(obj).chain();
};
// The OOP Wrapper
// ---------------
// If Underscore is called as a function, it returns a wrapped object that
// can be used OO-style. This wrapper holds altered versions of all the
// underscore functions. Wrapped objects may be chained.
var wrapper = function(obj) { this._wrapped = obj; };
// Expose `wrapper.prototype` as `_.prototype`
_.prototype = wrapper.prototype;
// Helper function to continue chaining intermediate results.
var result = function(obj, chain) {
return chain ? _(obj).chain() : obj;
};
// A method to easily add functions to the OOP wrapper.
var addToWrapper = function(name, func) {
wrapper.prototype[name] = function() {
var args = slice.call(arguments);
unshift.call(args, this._wrapped);
return result(func.apply(_, args), this._chain);
};
};
// Add all of the Underscore functions to the wrapper object.
_.mixin(_);
// Add all mutator Array functions to the wrapper.
each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
var method = ArrayProto[name];
wrapper.prototype[name] = function() {
var wrapped = this._wrapped;
method.apply(wrapped, arguments);
var length = wrapped.length;
if ((name == 'shift' || name == 'splice') && length === 0) delete wrapped[0];
return result(wrapped, this._chain);
};
});
// Add all accessor Array functions to the wrapper.
each(['concat', 'join', 'slice'], function(name) {
var method = ArrayProto[name];
wrapper.prototype[name] = function() {
return result(method.apply(this._wrapped, arguments), this._chain);
};
});
// Start chaining a wrapped Underscore object.
wrapper.prototype.chain = function() {
this._chain = true;
return this;
};
// Extracts the result from a wrapped and chained object.
wrapper.prototype.value = function() {
return this._wrapped;
};
}).call(this);

View File

@ -1,35 +1,24 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Acknowledgements &mdash; musrfit 1.5.1 documentation</title>
<meta charset="utf-8" />
<title>Acknowledgements &#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">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.5.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<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="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="top" title="musrfit 1.5.1 documentation" href="index.html" />
<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="Bugtracking" href="bugtracking.html" />
<link rel="prev" title="MusrRoot - an Extensible Open File Format for μSR" href="musr-root.html" />
</head>
<body>
<div class="related">
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -41,28 +30,28 @@
<li class="right" >
<a href="musr-root.html" title="MusrRoot - an Extensible Open File Format for μSR"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
<div class="body" role="main">
<div class="section" id="acknowledgements">
<span id="acknowledgment"></span><span id="index-0"></span><h1>Acknowledgements<a class="headerlink" href="#acknowledgements" title="Permalink to this headline"></a></h1>
<dl class="docutils">
<dt><strong>Bastian M. Wojek</strong></dt>
<dd>I am very much indebted to BMW for his rigorous testing of <tt class="docutils literal"><span class="pre">musrfit</span></tt>, his many useful suggestions, contributions, and for the
largest part of the user manual of <tt class="docutils literal"><span class="pre">musrfit</span></tt> which makes it accessible to a broader audience! Many thanks Bastian!</dd>
<dt><strong>Uldis Locans</strong></dt>
<dd>I am very much indebted to Uldis work on <a class="reference internal" href="setup-dks.html#setup-dks"><em>DKS</em></a> enabling the GPU support for <tt class="docutils literal"><span class="pre">musrfit</span></tt>. His kind, calm, and
extremely competent way to deal with his projects as well as to deal with the chaos of physicists way to think is admirable. Many thanks Uldis!</dd>
<dt><strong>Zaher Salman</strong></dt>
<dd>Thanks for his beta-NMR and web-interface contributions to <tt class="docutils literal"><span class="pre">musrfit</span></tt>!</dd>
<dt><strong>Robert Scheuermann</strong></dt>
<dd>Thanks for his constant contructive input on <tt class="docutils literal"><span class="pre">musrfit</span></tt>!</dd>
<dl class="simple">
<dt><strong>Bastian M. Wojek</strong></dt><dd><p>I am very much indebted to BMW for his rigorous testing of <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>, his many useful suggestions, contributions, and for the
largest part of the user manual of <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> which makes it accessible to a broader audience! Many thanks Bastian!</p>
</dd>
<dt><strong>Uldis Locans</strong></dt><dd><p>I am very much indebted to Uldis work on <a class="reference internal" href="setup-dks.html#setup-dks"><span class="std std-ref">DKS</span></a> enabling the GPU support for <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>. His kind, calm, and
extremely competent way to deal with his projects as well as to deal with the chaos of physicists way to think is admirable. Many thanks Uldis!</p>
</dd>
<dt><strong>Zaher Salman</strong></dt><dd><p>Thanks for his beta-NMR and web-interface contributions to <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>!</p>
</dd>
<dt><strong>Robert Scheuermann</strong></dt><dd><p>Thanks for his constant contructive input on <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>!</p>
</dd>
</dl>
</div>
@ -70,7 +59,7 @@ extremely competent way to deal with his projects as well as to deal with the ch
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="musr-root.html"
@ -78,29 +67,28 @@ extremely competent way to deal with his projects as well as to deal with the ch
<h4>Next topic</h4>
<p class="topless"><a href="bugtracking.html"
title="next chapter">Bugtracking</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/acknowledgement.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/acknowledgement.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" />
<input type="text" name="q" aria-labelledby="searchlabel" />
<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>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -112,13 +100,13 @@ extremely competent way to deal with his projects as well as to deal with the ch
<li class="right" >
<a href="musr-root.html" title="MusrRoot - an Extensible Open File Format for μSR"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
&copy; Copyright 2019, Andreas Suter.
Last updated on Jul 24, 2019.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
<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>

View File

@ -1,35 +1,24 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>any2many - a Universal μSR-file-format converter &mdash; musrfit 1.5.1 documentation</title>
<meta charset="utf-8" />
<title>any2many - a Universal μSR-file-format converter &#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">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.5.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<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="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="top" title="musrfit 1.5.1 documentation" href="index.html" />
<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="MusrRoot - an Extensible Open File Format for μSR" href="musr-root.html" />
<link rel="prev" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files" href="msr2data.html" />
</head>
<body>
<div class="related">
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -41,56 +30,55 @@
<li class="right" >
<a href="msr2data.html" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
<div class="body" role="main">
<div class="section" id="any2many-a-universal-mgrsr-file-format-converter">
<span id="index-0"></span><h1>any2many - a Universal μSR-file-format converter<a class="headerlink" href="#any2many-a-universal-mgrsr-file-format-converter" title="Permalink to this headline"></a></h1>
<p><tt class="docutils literal"><span class="pre">any2many</span></tt> allows to convert most μSR-file-formats from one to the other.
For a detailed description see <a class="reference internal" href="user-manual.html#any2many"><em>here</em></a>.</p>
<p><code class="docutils literal notranslate"><span class="pre">any2many</span></code> allows to convert most μSR-file-formats from one to the other.
For a detailed description see <a class="reference internal" href="user-manual.html#any2many"><span class="std std-ref">here</span></a>.</p>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="msr2data.html"
title="previous chapter">msr2data - A Program for Automatically Processing Multiple <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr Files</a></p>
title="previous chapter">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="musr-root.html"
title="next chapter">MusrRoot - an Extensible Open File Format for μSR</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/any2many.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/any2many.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" />
<input type="text" name="q" aria-labelledby="searchlabel" />
<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>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -102,13 +90,13 @@ For a detailed description see <a class="reference internal" href="user-manual.h
<li class="right" >
<a href="msr2data.html" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
&copy; Copyright 2019, Andreas Suter.
Last updated on Jul 24, 2019.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
<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>

View File

@ -1,34 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bugtracking &mdash; musrfit 1.5.1 documentation</title>
<meta charset="utf-8" />
<title>Bugtracking &#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">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.5.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<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="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="top" title="musrfit 1.5.1 documentation" href="index.html" />
<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="prev" title="Acknowledgements" href="acknowledgement.html" />
</head>
<body>
<div class="related">
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -37,14 +26,14 @@
<li class="right" >
<a href="acknowledgement.html" title="Acknowledgements"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
<div class="body" role="main">
<div class="section" id="bugtracking">
<span id="index-0"></span><span id="id1"></span><h1>Bugtracking<a class="headerlink" href="#bugtracking" title="Permalink to this headline"></a></h1>
@ -57,34 +46,33 @@ or send an e-mail to A. Suter at PSI.</p>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="acknowledgement.html"
title="previous chapter">Acknowledgements</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/bugtracking.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/bugtracking.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" />
<input type="text" name="q" aria-labelledby="searchlabel" />
<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>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -93,13 +81,13 @@ or send an e-mail to A. Suter at PSI.</p>
<li class="right" >
<a href="acknowledgement.html" title="Acknowledgements"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
&copy; Copyright 2019, Andreas Suter.
Last updated on Jul 24, 2019.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
<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>

View File

@ -1,35 +1,24 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>How to Cite musrfit? &mdash; musrfit 1.5.1 documentation</title>
<meta charset="utf-8" />
<title>How to Cite musrfit? &#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">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.5.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<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="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="top" title="musrfit 1.5.1 documentation" href="index.html" />
<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="Tutorial for musrfit" href="tutorial.html" />
<link rel="prev" title="Welcome to the musrfit documentation!" href="index.html" />
</head>
<body>
<div class="related">
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -41,29 +30,29 @@
<li class="right" >
<a href="index.html" title="Welcome to the musrfit documentation!"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
<div class="body" role="main">
<div class="section" id="how-to-cite-musrfit">
<span id="cite"></span><span id="index-0"></span><h1>How to Cite <tt class="docutils literal"><span class="pre">musrfit</span></tt>?<a class="headerlink" href="#how-to-cite-musrfit" title="Permalink to this headline"></a></h1>
<p>Since quite some effort is going into the development and maintenance of the <tt class="docutils literal"><span class="pre">musrfit</span></tt> package, you should at least acknowledge it in your publication if you have used it to analyze your data. Even better of course is to cite it properly by the reference given beneath</p>
<span id="cite"></span><span id="index-0"></span><h1>How to Cite <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>?<a class="headerlink" href="#how-to-cite-musrfit" title="Permalink to this headline"></a></h1>
<p>Since quite some effort is going into the development and maintenance of the <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> package, you should at least acknowledge it in your publication if you have used it to analyze your data. Even better of course is to cite it properly by the reference given beneath</p>
<blockquote>
<div><ul class="simple">
<li>A. Suter, B.M. Wojek, &#8220;Musrfit: A Free Platform-Independent Framework for μSR Data Analysis&#8221;, Physics Procedia <strong>30</strong>, 69 (2012). <a class="reference external" href="http://dx.doi.org/10.1016/j.phpro.2012.04.042">http://dx.doi.org/10.1016/j.phpro.2012.04.042</a></li>
<li><p>A. Suter, B.M. Wojek, “Musrfit: A Free Platform-Independent Framework for μSR Data Analysis”, Physics Procedia <strong>30</strong>, 69 (2012). <a class="reference external" href="http://dx.doi.org/10.1016/j.phpro.2012.04.042">http://dx.doi.org/10.1016/j.phpro.2012.04.042</a></p></li>
</ul>
</div></blockquote>
<p>The GPU high speed <tt class="docutils literal"><span class="pre">musrfit</span></tt> version is utilizing <tt class="docutils literal"><span class="pre">DKS</span></tt>. In case you are using this version, please also add the following citations</p>
<p>The GPU high speed <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> version is utilizing <code class="docutils literal notranslate"><span class="pre">DKS</span></code>. In case you are using this version, please also add the following citations</p>
<blockquote>
<div><ul class="simple">
<li>A. Adelmann, U. Locans, A. Suter, &#8220;The Dynamic Kernel Scheduler—Part 1&#8221;, Computer Physics Communications <strong>207</strong>, 83 (2016). <a class="reference external" href="https://doi.org/10.1016/j.cpc.2016.05.013">https://doi.org/10.1016/j.cpc.2016.05.013</a></li>
<li>U. Locans, <em>et al.</em>, &#8220;Real-time computation of parameter fitting and image reconstruction using graphical processing units&#8221;, Computer Physics Communications <strong>215</strong>, 71 (2017). <a class="reference external" href="https://doi.org/10.1016/j.cpc.2017.02.007">https://doi.org/10.1016/j.cpc.2017.02.007</a></li>
<li>U.Locans and A.Suter, &#8220;Musrfit Real Time Parameter Fitting Using GPUs&#8221;, JPS Conf. Proc. <em>21</em>, 011051 (2018). <a class="reference external" href="http://dx.doi.org/10.7566/JPSCP.21.011051">http://dx.doi.org/10.7566/JPSCP.21.011051</a></li>
<li><p>A. Adelmann, U. Locans, A. Suter, “The Dynamic Kernel Scheduler—Part 1”, Computer Physics Communications <strong>207</strong>, 83 (2016). <a class="reference external" href="https://doi.org/10.1016/j.cpc.2016.05.013">https://doi.org/10.1016/j.cpc.2016.05.013</a></p></li>
<li><p>U. Locans, <em>et al.</em>, Real-time computation of parameter fitting and image reconstruction using graphical processing units, Computer Physics Communications <strong>215</strong>, 71 (2017). <a class="reference external" href="https://doi.org/10.1016/j.cpc.2017.02.007">https://doi.org/10.1016/j.cpc.2017.02.007</a></p></li>
<li><p>U.Locans and A.Suter, “Musrfit Real Time Parameter Fitting Using GPUs”, JPS Conf. Proc. <em>21</em>, 011051 (2018). <a class="reference external" href="http://dx.doi.org/10.7566/JPSCP.21.011051">http://dx.doi.org/10.7566/JPSCP.21.011051</a></p></li>
</ul>
</div></blockquote>
</div>
@ -72,37 +61,36 @@
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="index.html"
title="previous chapter">Welcome to the musrfit documentation!</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="tutorial.html"
title="next chapter">Tutorial for <tt class="docutils literal"><span class="pre">musrfit</span></tt></a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/cite.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
title="next chapter">Tutorial for <code class="docutils literal notranslate"><span class="pre">musrfit</span></code></a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/cite.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" />
<input type="text" name="q" aria-labelledby="searchlabel" />
<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>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -114,13 +102,13 @@
<li class="right" >
<a href="index.html" title="Welcome to the musrfit documentation!"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
&copy; Copyright 2019, Andreas Suter.
Last updated on Jul 24, 2019.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
<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>

File diff suppressed because it is too large Load Diff

View File

@ -1,34 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome to the musrfit documentation! &mdash; musrfit 1.5.1 documentation</title>
<meta charset="utf-8" />
<title>Welcome to the musrfit documentation! &#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">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.5.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<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="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="top" title="musrfit 1.5.1 documentation" href="#" />
<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="How to Cite musrfit?" href="cite.html" />
</head>
<body>
<div class="related">
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -37,21 +26,21 @@
<li class="right" >
<a href="cite.html" title="How to Cite musrfit?"
accesskey="N">next</a> |</li>
<li><a href="#">musrfit 1.5.1 documentation</a> &raquo;</li>
<li class="nav-item nav-item-0"><a href="#">musrfit 1.5.2 documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="body" role="main">
<div class="section" id="welcome-to-the-musrfit-documentation">
<h1>Welcome to the musrfit documentation!<a class="headerlink" href="#welcome-to-the-musrfit-documentation" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="cite.html">How to Cite <tt class="docutils literal"><span class="pre">musrfit</span></tt>?</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial for <tt class="docutils literal"><span class="pre">musrfit</span></tt></a><ul>
<li class="toctree-l1"><a class="reference internal" href="cite.html">How to Cite <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>?</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial for <code class="docutils literal notranslate"><span class="pre">musrfit</span></code></a><ul>
<li class="toctree-l2"><a class="reference internal" href="tutorial.html#single-histogram-fit-tutorial">Single-histogram-fit tutorial</a></li>
<li class="toctree-l2"><a class="reference internal" href="tutorial.html#asymmtery-fit-tutorial">Asymmtery-fit tutorial</a></li>
</ul>
@ -61,7 +50,7 @@
<li class="toctree-l2"><a class="reference internal" href="user-manual.html#available-executables-configuration-files-and-their-basic-usage">Available Executables, Configuration Files and their Basic Usage</a></li>
<li class="toctree-l2"><a class="reference internal" href="user-manual.html#description-of-the-msr-file-format">Description of the msr File Format</a></li>
<li class="toctree-l2"><a class="reference internal" href="user-manual.html#fit-types">Fit Types</a></li>
<li class="toctree-l2"><a class="reference internal" href="user-manual.html#id22">User Functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="user-manual.html#id38">User Functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="user-manual.html#technical-description-of-the-musrfit-framework">Technical Description of the musrfit framework</a></li>
</ul>
</li>
@ -71,7 +60,7 @@
<li class="toctree-l2"><a class="reference internal" href="user-libs.html#functions-to-analyze-bgr-nmr-data-bnmr-libs">Functions to analyze β-NMR data (BNMR libs)</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="setup-standard.html">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> on Different Platforms</a><ul>
<li class="toctree-l1"><a class="reference internal" href="setup-standard.html">Setting up <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> on Different Platforms</a><ul>
<li class="toctree-l2"><a class="reference internal" href="setup-standard.html#supported-operating-systems-and-software-requirements">Supported Operating Systems and Software Requirements</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup-standard.html#os-restrictions">OS Restrictions</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup-standard.html#gnu-linux">GNU/Linux</a></li>
@ -79,13 +68,13 @@
<li class="toctree-l2"><a class="reference internal" href="setup-standard.html#mac-os-x-macos">Mac OS X / macOS</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="setup-dks.html">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> / <tt class="docutils literal"><span class="pre">DKS</span></tt>: High Speed Fitting with GPU&#8217;s</a><ul>
<li class="toctree-l2"><a class="reference internal" href="setup-dks.html#setting-up-musrfit-dks-for-a-tesla-k40c-nvidia">Setting up <tt class="docutils literal"><span class="pre">musrfit/DKS</span></tt> for a Tesla K40c (NVIDIA)</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup-dks.html#setting-up-musrfit-dks-for-a-amd-graphic-card-radeon-r9-390x">Setting up <tt class="docutils literal"><span class="pre">musrfit/DKS</span></tt> for a AMD Graphic Card (Radeon R9 390X)</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup-dks.html#setting-up-musrfit-dks-for-macos-for-opencl-support">Setting up <tt class="docutils literal"><span class="pre">musrfit/DKS</span></tt> for macOS for OpenCL support</a></li>
<li class="toctree-l1"><a class="reference internal" href="setup-dks.html">Setting up <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> / <code class="docutils literal notranslate"><span class="pre">DKS</span></code>: High Speed Fitting with GPUs</a><ul>
<li class="toctree-l2"><a class="reference internal" href="setup-dks.html#setting-up-musrfit-dks-for-a-tesla-k40c-nvidia">Setting up <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> for a Tesla K40c (NVIDIA)</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup-dks.html#setting-up-musrfit-dks-for-a-amd-graphic-card-radeon-r9-390x">Setting up <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> for a AMD Graphic Card (Radeon R9 390X)</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup-dks.html#setting-up-musrfit-dks-for-macos-for-opencl-support">Setting up <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> for macOS for OpenCL support</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="musredit.html"><tt class="docutils literal"><span class="pre">musredit</span></tt>: the GUI Based Interface to <tt class="docutils literal"><span class="pre">musrfit</span></tt></a><ul>
<li class="toctree-l1"><a class="reference internal" href="musredit.html"><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><ul>
<li class="toctree-l2"><a class="reference internal" href="musredit.html#introduction">Introduction</a></li>
<li class="toctree-l2"><a class="reference internal" href="musredit.html#available-executable-configuration-files-and-their-basic-usage">Available Executable, Configuration Files and their Basic Usage</a></li>
<li class="toctree-l2"><a class="reference internal" href="musredit.html#musredit-features">musredit Features</a></li>
@ -99,7 +88,7 @@
<li class="toctree-l2"><a class="reference internal" href="mupp.html#the-usage-summary">The Usage Summary</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr Files</a><ul>
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a><ul>
<li class="toctree-l2"><a class="reference internal" href="msr2data.html#basic-types-of-usage">Basic Types of Usage</a></li>
<li class="toctree-l2"><a class="reference internal" href="msr2data.html#optional-parameters">Optional Parameters</a></li>
<li class="toctree-l2"><a class="reference internal" href="msr2data.html#the-global-mode">The Global Mode</a></li>
@ -129,8 +118,8 @@
<div class="section" id="indices-and-tables">
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline"></a></h1>
<ul class="simple">
<li><a class="reference internal" href="genindex.html"><em>Index</em></a></li>
<li><a class="reference internal" href="search.html"><em>Search Page</em></a></li>
<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
</ul>
</div>
@ -138,9 +127,9 @@
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="#">Table Of Contents</a></h3>
<h3><a href="#">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Welcome to the musrfit documentation!</a></li>
<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
@ -148,30 +137,29 @@
<h4>Next topic</h4>
<p class="topless"><a href="cite.html"
title="next chapter">How to Cite <tt class="docutils literal"><span class="pre">musrfit</span></tt>?</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/index.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
title="next chapter">How to Cite <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>?</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/index.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" />
<input type="text" name="q" aria-labelledby="searchlabel" />
<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>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -180,13 +168,13 @@
<li class="right" >
<a href="cite.html" title="How to Cite musrfit?"
>next</a> |</li>
<li><a href="#">musrfit 1.5.1 documentation</a> &raquo;</li>
<li class="nav-item nav-item-0"><a href="#">musrfit 1.5.2 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2019, Andreas Suter.
Last updated on Jan 30, 2020.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
<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>

View File

@ -1,35 +1,24 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>msr2data - A Program for Automatically Processing Multiple musrfit msr Files &mdash; musrfit 1.5.1 documentation</title>
<meta charset="utf-8" />
<title>msr2data - A Program for Automatically Processing Multiple musrfit msr Files &#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">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.5.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<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="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="top" title="musrfit 1.5.1 documentation" href="index.html" />
<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="any2many - a Universal μSR-file-format converter" href="any2many.html" />
<link rel="prev" title="mupp - μSR Parameter Plotter" href="mupp.html" />
</head>
<body>
<div class="related">
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -41,82 +30,80 @@
<li class="right" >
<a href="mupp.html" title="mupp - μSR Parameter Plotter"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
<div class="body" role="main">
<div class="section" id="msr2data-a-program-for-automatically-processing-multiple-musrfit-msr-files">
<span id="msr2data"></span><span id="index-0"></span><h1>msr2data - A Program for Automatically Processing Multiple <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr Files<a class="headerlink" href="#msr2data-a-program-for-automatically-processing-multiple-musrfit-msr-files" title="Permalink to this headline"></a></h1>
<p><tt class="docutils literal"><span class="pre">msr2data</span></tt> (originally written by B. M. Wojek) is a program implemented in <tt class="docutils literal"><span class="pre">C++</span></tt>. Its purpose is
to process multiple msr files (input files for <tt class="docutils literal"><span class="pre">musrfit</span></tt>) with the same parameters and summarize the fitting
results either in a <em>TRIUMF DB</em> <a class="footnote-reference" href="#f1" id="id1">[1]</a> or a <em>column ASCII</em> file. This allows essentially to</p>
<span id="msr2data"></span><span id="index-0"></span><h1>msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files<a class="headerlink" href="#msr2data-a-program-for-automatically-processing-multiple-musrfit-msr-files" title="Permalink to this headline"></a></h1>
<p><code class="docutils literal notranslate"><span class="pre">msr2data</span></code> (originally written by B. M. Wojek) is a program implemented in <code class="docutils literal notranslate"><span class="pre">C++</span></code>. Its purpose is
to process multiple msr files (input files for <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>) with the same parameters and summarize the fitting
results either in a <em>TRIUMF DB</em> <a class="footnote-reference brackets" href="#f1" id="id1">1</a> or a <em>column ASCII</em> file. This allows essentially to</p>
<ol class="arabic simple">
<li>Collect the fit parameters.</li>
<li>Generate <em>new</em> input msr files based on old ones.</li>
<li><p>Collect the fit parameters.</p></li>
<li><p>Generate <em>new</em> input msr files based on old ones.</p></li>
</ol>
<table class="docutils footnote" frame="void" id="f1" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td>For an abridged description of this format see <a class="reference external" href="http://musr.org/xyfit/dbformat.html">here</a>. The DB files
produced by <tt class="docutils literal"><span class="pre">msr2data</span></tt> can be viewed for instance with <a class="reference internal" href="mupp.html#mupp"><em>mupp</em></a> or μView <a class="reference external" href="http://musr.org/muview/">see here</a>, however,
they are not completely backward-compatible to the original <tt class="docutils literal"><span class="pre">db</span> <span class="pre">language</span></tt> since the parameter names can be longer than five or
<dl class="footnote brackets">
<dt class="label" id="f1"><span class="brackets"><a class="fn-backref" href="#id1">1</a></span></dt>
<dd><p>For an abridged description of this format see <a class="reference external" href="http://musr.org/xyfit/dbformat.html">here</a>. The DB files
produced by <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> can be viewed for instance with <a class="reference internal" href="mupp.html#mupp"><span class="std std-ref">mupp</span></a> or μView <a class="reference external" href="http://musr.org/muview/">see here</a>, however,
they are not completely backward-compatible to the original <code class="docutils literal notranslate"><span class="pre">db</span> <span class="pre">language</span></code> since the parameter names can be longer than five or
six characters! In order to establish this backward compatibility (if needed) the user has to ensure the correct length of the
parameter names in the msr files!</td></tr>
</tbody>
</table>
parameter names in the msr files!</p>
</dd>
</dl>
<div class="section" id="basic-types-of-usage">
<span id="msr2data-basic-usage"></span><h2>Basic Types of Usage<a class="headerlink" href="#basic-types-of-usage" title="Permalink to this headline"></a></h2>
<p>Apart from numerous <a class="reference internal" href="#msr2data-opt-param"><em>optional parameters</em></a> that might be set, in principle there are four different ways of calling <tt class="docutils literal"><span class="pre">msr2data</span></tt>.
<p>Apart from numerous <a class="reference internal" href="#msr2data-opt-param"><span class="std std-ref">optional parameters</span></a> that might be set, in principle there are four different ways of calling <code class="docutils literal notranslate"><span class="pre">msr2data</span></code>.
These differ in how the list of runs which should be processed is supplied:</p>
<dl class="docutils">
<dt><strong>msr2data &lt;run&gt; &lt;extension&gt; [optional parameters]</strong></dt>
<dd>A single run number.</dd>
<dt><strong>msr2data &lt;firstRunNo&gt; &lt;lastRunNo&gt; &lt;extension&gt; [optional parameters]</strong></dt>
<dd>An interval of run numbers is specified through the first and the last run number. The condition <tt class="docutils literal"><span class="pre">&lt;firstRunNo&gt;</span></tt> &lt; <tt class="docutils literal"><span class="pre">&lt;lastRunNo&gt;</span></tt> is not necessary.</dd>
<dt><strong>msr2data [ &lt;runList&gt; ] &lt;extension&gt; [optional parameters]</strong></dt>
<dd><p class="first">Where <tt class="docutils literal"><span class="pre">&lt;runList&gt;</span></tt> is one or a combination of the following:</p>
<ol class="last arabic simple">
<li><tt class="docutils literal"><span class="pre">&lt;run0&gt;,</span> <span class="pre">&lt;run1&gt;,</span> <span class="pre">&lt;run2&gt;,</span> <span class="pre">...</span> <span class="pre">&lt;runN&gt;</span></tt> : run numbers, <em>e.g.</em> 123 124,</li>
<li><tt class="docutils literal"><span class="pre">&lt;run0&gt;-&lt;runN&gt;</span></tt> : a range, <em>e.g.</em> 123-125 -&gt; 123 124 125,</li>
<li><tt class="docutils literal"><span class="pre">&lt;run0&gt;:&lt;runN&gt;:&lt;step&gt;</span></tt> : a sequence, <em>e.g.</em> 123:127:2 -&gt; 123 125 127. <tt class="docutils literal"><span class="pre">&lt;step&gt;</span></tt> has to be a positive integer.</li>
<li>A <tt class="docutils literal"><span class="pre">&lt;runList&gt;</span></tt> can also combine (1)-(3), <em>e.g.</em> 123 128-130 133, etc.</li>
<dl class="simple">
<dt><strong>msr2data &lt;run&gt; &lt;extension&gt; [optional parameters]</strong></dt><dd><p>A single run number.</p>
</dd>
<dt><strong>msr2data &lt;firstRunNo&gt; &lt;lastRunNo&gt; &lt;extension&gt; [optional parameters]</strong></dt><dd><p>An interval of run numbers is specified through the first and the last run number. The condition <code class="docutils literal notranslate"><span class="pre">&lt;firstRunNo&gt;</span></code> &lt; <code class="docutils literal notranslate"><span class="pre">&lt;lastRunNo&gt;</span></code> is not necessary.</p>
</dd>
<dt><strong>msr2data [ &lt;runList&gt; ] &lt;extension&gt; [optional parameters]</strong></dt><dd><p>Where <code class="docutils literal notranslate"><span class="pre">&lt;runList&gt;</span></code> is one or a combination of the following:</p>
<ol class="arabic simple">
<li><p><code class="docutils literal notranslate"><span class="pre">&lt;run0&gt;,</span> <span class="pre">&lt;run1&gt;,</span> <span class="pre">&lt;run2&gt;,</span> <span class="pre">...</span> <span class="pre">&lt;runN&gt;</span></code> : run numbers, <em>e.g.</em> 123 124,</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">&lt;run0&gt;-&lt;runN&gt;</span></code> : a range, <em>e.g.</em> 123-125 -&gt; 123 124 125,</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">&lt;run0&gt;:&lt;runN&gt;:&lt;step&gt;</span></code> : a sequence, <em>e.g.</em> 123:127:2 -&gt; 123 125 127. <code class="docutils literal notranslate"><span class="pre">&lt;step&gt;</span></code> has to be a positive integer.</p></li>
<li><p>A <code class="docutils literal notranslate"><span class="pre">&lt;runList&gt;</span></code> can also combine (1)-(3), <em>e.g.</em> 123 128-130 133, etc.</p></li>
</ol>
</dd>
<dt><strong>msr2data &lt;runListFileName&gt; &lt;extension&gt; [optional parameters]</strong></dt>
<dd>An ASCII file containing a list of run numbers and optional external parameters is passed to <tt class="docutils literal"><span class="pre">msr2data</span></tt>. For the structure of the ASCII file
see <a class="reference internal" href="#run-list-file-structure"><em>below</em></a>.</dd>
<dt><strong>msr2data &lt;runListFileName&gt; &lt;extension&gt; [optional parameters]</strong></dt><dd><p>An ASCII file containing a list of run numbers and optional external parameters is passed to <code class="docutils literal notranslate"><span class="pre">msr2data</span></code>. For the structure of the ASCII file
see <a class="reference internal" href="#run-list-file-structure"><span class="std std-ref">below</span></a>.</p>
</dd>
</dl>
<p>All four basic types of calling <tt class="docutils literal"><span class="pre">msr2data</span></tt> contain the <em>mandatory</em> file-name <tt class="docutils literal"><span class="pre">&lt;extension&gt;</span></tt> passed right after the list of runs. The meaning of
this <tt class="docutils literal"><span class="pre">&lt;extension&gt;</span></tt> should become clear after giving examples for all four cases:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8472</span> _tf_h13
<p>All four basic types of calling <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> contain the <em>mandatory</em> file-name <code class="docutils literal notranslate"><span class="pre">&lt;extension&gt;</span></code> passed right after the list of runs. The meaning of
this <code class="docutils literal notranslate"><span class="pre">&lt;extension&gt;</span></code> should become clear after giving examples for all four cases:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8472</span> _tf_h13
</pre></div>
</div>
<p>generates the DB file <tt class="docutils literal"><span class="pre">out.db</span></tt> (can be changed by using the -o option) from <tt class="docutils literal"><span class="pre">8472_tf_h13.msr</span></tt>.</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8472</span> <span class="m">8474</span> _tf_h13
<p>generates the DB file <code class="docutils literal notranslate"><span class="pre">out.db</span></code> (can be changed by using the -o option) from <code class="docutils literal notranslate"><span class="pre">8472_tf_h13.msr</span></code>.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8472</span> <span class="m">8474</span> _tf_h13
</pre></div>
</div>
<p>generates the DB file <tt class="docutils literal"><span class="pre">out.db</span></tt> (can be changed by using the -o option) from <tt class="docutils literal"><span class="pre">8472_tf_h13.msr</span></tt>, <tt class="docutils literal"><span class="pre">8473_tf_h13.msr</span></tt>, and <tt class="docutils literal"><span class="pre">8474_tf_h13.msr</span></tt>.</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ msr2data <span class="o">[</span><span class="m">8472</span> <span class="m">8470</span><span class="o">]</span> _tf_h13
<p>generates the DB file <code class="docutils literal notranslate"><span class="pre">out.db</span></code> (can be changed by using the -o option) from <code class="docutils literal notranslate"><span class="pre">8472_tf_h13.msr</span></code>, <code class="docutils literal notranslate"><span class="pre">8473_tf_h13.msr</span></code>, and <code class="docutils literal notranslate"><span class="pre">8474_tf_h13.msr</span></code>.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ msr2data <span class="o">[</span><span class="m">8472</span> <span class="m">8470</span><span class="o">]</span> _tf_h13
</pre></div>
</div>
<p>generates the DB file <tt class="docutils literal"><span class="pre">out.db</span></tt> (can be changed by using the -o option) from <tt class="docutils literal"><span class="pre">8472_tf_h13.msr</span></tt> and <tt class="docutils literal"><span class="pre">8470_tf_h13.msr</span></tt>.</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ msr2data <span class="o">[</span><span class="m">8470</span>:8474:2<span class="o">]</span> _tf_h13
<p>generates the DB file <code class="docutils literal notranslate"><span class="pre">out.db</span></code> (can be changed by using the -o option) from <code class="docutils literal notranslate"><span class="pre">8472_tf_h13.msr</span></code> and <code class="docutils literal notranslate"><span class="pre">8470_tf_h13.msr</span></code>.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ msr2data <span class="o">[</span><span class="m">8470</span>:8474:2<span class="o">]</span> _tf_h13
</pre></div>
</div>
<p>generates the DB file <tt class="docutils literal"><span class="pre">out.db</span></tt> (can be changed by using the -o option) from <tt class="docutils literal"><span class="pre">8470_tf_h13.msr</span></tt>, <tt class="docutils literal"><span class="pre">8472_tf_h13.msr</span></tt>, and <tt class="docutils literal"><span class="pre">8474_tf_h13.msr</span></tt>.</p>
<p>generates the DB file <code class="docutils literal notranslate"><span class="pre">out.db</span></code> (can be changed by using the -o option) from <code class="docutils literal notranslate"><span class="pre">8470_tf_h13.msr</span></code>, <code class="docutils literal notranslate"><span class="pre">8472_tf_h13.msr</span></code>, and <code class="docutils literal notranslate"><span class="pre">8474_tf_h13.msr</span></code>.</p>
<div class="section" id="run-list-file-structure">
<span id="id2"></span><h3>Run List File Structure<a class="headerlink" href="#run-list-file-structure" title="Permalink to this headline"></a></h3>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ msr2data run.list _tf_h13
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ msr2data run.list _tf_h13
</pre></div>
</div>
<p>generates the DB file <tt class="docutils literal"><span class="pre">out.db</span></tt> (can be changed by using the -o option) from all runs listed in the ASCII file <tt class="docutils literal"><span class="pre">run.list</span></tt> in the working directory.
In this file it is also possible to include <em>external</em> parameters which should be put in the resulting DB file. The structure of the <tt class="docutils literal"><span class="pre">run.list</span></tt> is the following:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>RUN VAR1 VAR2 VAR3 ...
<p>generates the DB file <code class="docutils literal notranslate"><span class="pre">out.db</span></code> (can be changed by using the -o option) from all runs listed in the ASCII file <code class="docutils literal notranslate"><span class="pre">run.list</span></code> in the working directory.
In this file it is also possible to include <em>external</em> parameters which should be put in the resulting DB file. The structure of the <code class="docutils literal notranslate"><span class="pre">run.list</span></code> is the following:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>RUN VAR1 VAR2 VAR3 ...
8460 200 27.1 46.2 ...
8472 205 27.1 46.3 ...
8453 210 27.2 45.9 ...
@ -126,18 +113,16 @@ In this file it is also possible to include <em>external</em> parameters which s
</pre></div>
</div>
<p><em>The first not commented and not empty line determines the parameter names and labels and has to be present!</em></p>
<p>It is allowed to add comments (with a preceding &#8216;#&#8217;) or empty lines to the run-list file.</p>
<p>It is allowed to add comments (with a preceding #) or empty lines to the run-list file.</p>
<p>The following should be mentioned together with the above examples:</p>
<ul>
<li><p class="first">The output files in the examples above are only newly created if they did <em>not</em> exist before invoking <tt class="docutils literal"><span class="pre">msr2data</span></tt>.
If the files were already present the msr file data would be appended!</p>
</li>
<li><p class="first">If the files have been newly created, also the DB file header is written. If the files were present before, only
the data blocks are appended. The output of the header can either be forced or completely suppressed with the <tt class="docutils literal"><span class="pre">header</span></tt>
and <tt class="docutils literal"><span class="pre">noheader</span></tt> options as shall be seen later.</p>
</li>
<li><p class="first">If the <tt class="docutils literal"><span class="pre">musrfit</span></tt> output files do not have an <tt class="docutils literal"><span class="pre">&lt;extension&gt;</span></tt> as specified above like <tt class="docutils literal"><span class="pre">8472.msr</span></tt> one has to call <tt class="docutils literal"><span class="pre">msr2data</span></tt> like in the following example:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8472</span> <span class="m">8460</span> <span class="s2">&quot;&quot;</span>
<li><p>The output files in the examples above are only newly created if they did <em>not</em> exist before invoking <code class="docutils literal notranslate"><span class="pre">msr2data</span></code>.
If the files were already present the msr file data would be appended!</p></li>
<li><p>If the files have been newly created, also the DB file header is written. If the files were present before, only
the data blocks are appended. The output of the header can either be forced or completely suppressed with the <code class="docutils literal notranslate"><span class="pre">header</span></code>
and <code class="docutils literal notranslate"><span class="pre">noheader</span></code> options as shall be seen later.</p></li>
<li><p>If the <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> output files do not have an <code class="docutils literal notranslate"><span class="pre">&lt;extension&gt;</span></code> as specified above like <code class="docutils literal notranslate"><span class="pre">8472.msr</span></code> one has to call <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> like in the following example:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8472</span> <span class="m">8460</span> <span class="s2">&quot;&quot;</span>
</pre></div>
</div>
</li>
@ -146,138 +131,138 @@ and <tt class="docutils literal"><span class="pre">noheader</span></tt> options
</div>
<div class="section" id="optional-parameters">
<span id="msr2data-opt-param"></span><h2>Optional Parameters<a class="headerlink" href="#optional-parameters" title="Permalink to this headline"></a></h2>
<p>As mentioned already above there are some optional parameters which change the behavior of <tt class="docutils literal"><span class="pre">msr2data</span></tt> and can be passed in any order. Here is a complete list:</p>
<dl class="docutils">
<dt><strong>data</strong></dt>
<dd>The output file format is changed to a simple column ASCII file (default output file name: out.dat).</dd>
<dt><strong>new</strong></dt>
<dd>An existing output file is deleted before new information is written to it.</dd>
<dt><strong>header</strong></dt>
<dd>Force the output of the file header even if the output file was present before.</dd>
<dt><strong>noheader</strong></dt>
<dd>The output of the file header is suppressed—also if the output file is newly created.
If either both or none of the header options are given, <tt class="docutils literal"><span class="pre">msr2data</span></tt> writes the file header only to new files
and it solely appends the data blocks to an existing output file assuming that the header is present already.</dd>
<dt><strong>nosummary</strong></dt>
<dd>There will be no attempt to read additional information like the temperature or the applied magnetic field from
the data files even if these information were present there.</dd>
<dt><strong>paramList &lt;param&gt;</strong></dt>
<dd>option used to select the parameters which shall be exported. <tt class="docutils literal"><span class="pre">&lt;param&gt;</span></tt> is a list of parameter numbers to be exported.
Allowed lists are: <tt class="docutils literal"><span class="pre">&lt;startNo&gt;-&lt;endNo&gt;</span></tt>, <em>e.g.</em> <tt class="docutils literal"><span class="pre">1-16</span></tt> will export parameters 1 to 16. Space separated numbers, <em>e.g.:</em> <tt class="docutils literal"><span class="pre">1</span> <span class="pre">3</span> <span class="pre">5</span></tt>.
A combination of both is possible, <em>e.g.</em> <tt class="docutils literal"><span class="pre">1-16</span> <span class="pre">19</span> <span class="pre">31</span> <span class="pre">62</span></tt>, and so on.</dd>
<dt><strong>-o&lt;outputFileName&gt;, -o &lt;outputFileName&gt;</strong></dt>
<dd>The processed data will be written to the file <tt class="docutils literal"><span class="pre">&lt;outputFileName&gt;</span></tt> instead of the default <tt class="docutils literal"><span class="pre">out.db</span></tt> or <tt class="docutils literal"><span class="pre">out.dat</span></tt>.
If <tt class="docutils literal"><span class="pre">&lt;outputFileName&gt;</span></tt> is equal to none (case-insensitive) the parameter data are not appended to any output file.</dd>
<dt><strong>fit</strong></dt>
<dd>Additionally to the final data collection <tt class="docutils literal"><span class="pre">msr2data</span></tt> will invoke <tt class="docutils literal"><span class="pre">musrfit</span></tt> to fit the specified runs.
All msr files are assumed to be present, none is newly generated!</dd>
<dt><strong>fit-&lt;template&gt;[!]</strong></dt>
<dd>Additionally to the final data collection <tt class="docutils literal"><span class="pre">msr2data</span></tt> will generate msr files for the runs specified in the list
of runs and invoke <a class="reference internal" href="user-manual.html#musrfit"><em>musrfit</em></a> for performing fits of the data. As template for the first run the file
<tt class="docutils literal"><span class="pre">&lt;template&gt;&lt;extension&gt;.msr</span></tt> (or if not available: <tt class="docutils literal"><span class="pre">&lt;template&gt;&lt;extension&gt;.mlog</span></tt>) is used; the subsequent input
files will be created using the msr output of the last processed runs (&#8220;chain fit&#8221;). However, if for all runs only
the given template should be used one has to append an exclamation mark (<strong>!</strong>) to the <tt class="docutils literal"><span class="pre">&lt;template&gt;</span></tt>.</dd>
<dt><strong>msr-&lt;template&gt;</strong></dt>
<dd>The same as <tt class="docutils literal"><span class="pre">fit-&lt;template&gt;[!]</span></tt>, <em>without</em> calling <tt class="docutils literal"><span class="pre">musrfit</span></tt> and the final data collection, <em>i.e.</em> only the msr files for the given runs are generated.</dd>
<dt><strong>-k</strong></dt>
<dd>If specified together with the <tt class="docutils literal"><span class="pre">fit-&lt;template&gt;</span></tt> option, the <a class="reference internal" href="user-manual.html#musrfit"><em>- -keep-mn2-output</em></a> option is passed to <tt class="docutils literal"><span class="pre">musrfit</span></tt>.
In the case no fits should be done, this option is ignored.</dd>
<dt><strong>-t</strong></dt>
<dd>In case this option is given additionally to the <tt class="docutils literal"><span class="pre">fit-&lt;template&gt;</span> <span class="pre">option</span></tt>, <tt class="docutils literal"><span class="pre">musrfit</span></tt> is called with
the <a class="reference internal" href="user-manual.html#musrfit"><em>- -title-from-data-file</em></a> option. If no fitting is done, this option is ignored.</dd>
<p>As mentioned already above there are some optional parameters which change the behavior of <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> and can be passed in any order. Here is a complete list:</p>
<dl class="simple">
<dt><strong>data</strong></dt><dd><p>The output file format is changed to a simple column ASCII file (default output file name: out.dat).</p>
</dd>
<dt><strong>new</strong></dt><dd><p>An existing output file is deleted before new information is written to it.</p>
</dd>
<dt><strong>header</strong></dt><dd><p>Force the output of the file header even if the output file was present before.</p>
</dd>
<dt><strong>noheader</strong></dt><dd><p>The output of the file header is suppressed—also if the output file is newly created.
If either both or none of the header options are given, <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> writes the file header only to new files
and it solely appends the data blocks to an existing output file assuming that the header is present already.</p>
</dd>
<dt><strong>nosummary</strong></dt><dd><p>There will be no attempt to read additional information like the temperature or the applied magnetic field from
the data files even if these information were present there.</p>
</dd>
<dt><strong>paramList &lt;param&gt;</strong></dt><dd><p>option used to select the parameters which shall be exported. <code class="docutils literal notranslate"><span class="pre">&lt;param&gt;</span></code> is a list of parameter numbers to be exported.
Allowed lists are: <code class="docutils literal notranslate"><span class="pre">&lt;startNo&gt;-&lt;endNo&gt;</span></code>, <em>e.g.</em> <code class="docutils literal notranslate"><span class="pre">1-16</span></code> will export parameters 1 to 16. Space separated numbers, <em>e.g.:</em> <code class="docutils literal notranslate"><span class="pre">1</span> <span class="pre">3</span> <span class="pre">5</span></code>.
A combination of both is possible, <em>e.g.</em> <code class="docutils literal notranslate"><span class="pre">1-16</span> <span class="pre">19</span> <span class="pre">31</span> <span class="pre">62</span></code>, and so on.</p>
</dd>
<dt><strong>-o&lt;outputFileName&gt;, -o &lt;outputFileName&gt;</strong></dt><dd><p>The processed data will be written to the file <code class="docutils literal notranslate"><span class="pre">&lt;outputFileName&gt;</span></code> instead of the default <code class="docutils literal notranslate"><span class="pre">out.db</span></code> or <code class="docutils literal notranslate"><span class="pre">out.dat</span></code>.
If <code class="docutils literal notranslate"><span class="pre">&lt;outputFileName&gt;</span></code> is equal to none (case-insensitive) the parameter data are not appended to any output file.</p>
</dd>
<dt><strong>fit</strong></dt><dd><p>Additionally to the final data collection <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> will invoke <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> to fit the specified runs.
All msr files are assumed to be present, none is newly generated!</p>
</dd>
<dt><strong>fit-&lt;template&gt;[!]</strong></dt><dd><p>Additionally to the final data collection <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> will generate msr files for the runs specified in the list
of runs and invoke <a class="reference internal" href="user-manual.html#musrfit"><span class="std std-ref">musrfit</span></a> for performing fits of the data. As template for the first run the file
<code class="docutils literal notranslate"><span class="pre">&lt;template&gt;&lt;extension&gt;.msr</span></code> (or if not available: <code class="docutils literal notranslate"><span class="pre">&lt;template&gt;&lt;extension&gt;.mlog</span></code>) is used; the subsequent input
files will be created using the msr output of the last processed runs (“chain fit”). However, if for all runs only
the given template should be used one has to append an exclamation mark (<strong>!</strong>) to the <code class="docutils literal notranslate"><span class="pre">&lt;template&gt;</span></code>.</p>
</dd>
<dt><strong>msr-&lt;template&gt;</strong></dt><dd><p>The same as <code class="docutils literal notranslate"><span class="pre">fit-&lt;template&gt;[!]</span></code>, <em>without</em> calling <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> and the final data collection, <em>i.e.</em> only the msr files for the given runs are generated.</p>
</dd>
<dt><strong>-k</strong></dt><dd><p>If specified together with the <code class="docutils literal notranslate"><span class="pre">fit-&lt;template&gt;</span></code> option, the <a class="reference internal" href="user-manual.html#musrfit"><span class="std std-ref">- -keep-mn2-output</span></a> option is passed to <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>.
In the case no fits should be done, this option is ignored.</p>
</dd>
<dt><strong>-t</strong></dt><dd><p>In case this option is given additionally to the <code class="docutils literal notranslate"><span class="pre">fit-&lt;template&gt;</span> <span class="pre">option</span></code>, <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> is called with
the <a class="reference internal" href="user-manual.html#musrfit"><span class="std std-ref">- -title-from-data-file</span></a> option. If no fitting is done, this option is ignored.</p>
</dd>
</dl>
<p><strong>Examples:</strong></p>
<p>In order to illustrate the usage of these parameters a few examples with explanations are given below:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8400</span> <span class="m">8460</span> _tf_h13 -oABC.db fit-8472
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8400</span> <span class="m">8460</span> _tf_h13 -oABC.db fit-8472
</pre></div>
</div>
<p>Using <tt class="docutils literal"><span class="pre">8472_tf_h13.msr</span></tt> as first template, <tt class="docutils literal"><span class="pre">msr2data</span></tt> generates subsequent msr input files <tt class="docutils literal"><span class="pre">8400_tf_h13.msr</span></tt> through <tt class="docutils literal"><span class="pre">8460_tf_h13.msr</span></tt>,
calls <tt class="docutils literal"><span class="pre">musrfit</span></tt> to perform a fit of these files and collects the results of the fits together with the DB header in the new file <tt class="docutils literal"><span class="pre">ABC.db</span></tt>.
Additionally, some information about external parameters like the temperature will be passed to <tt class="docutils literal"><span class="pre">ABC.db</span></tt> if it is present in the data files.</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ msr2data <span class="o">[</span><span class="m">8500</span> <span class="m">8502</span>-8504 <span class="m">8507</span><span class="o">]</span> _zf fit-8472 noheader nosummary -o DEF.db
<p>Using <code class="docutils literal notranslate"><span class="pre">8472_tf_h13.msr</span></code> as first template, <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> generates subsequent msr input files <code class="docutils literal notranslate"><span class="pre">8400_tf_h13.msr</span></code> through <code class="docutils literal notranslate"><span class="pre">8460_tf_h13.msr</span></code>,
calls <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> to perform a fit of these files and collects the results of the fits together with the DB header in the new file <code class="docutils literal notranslate"><span class="pre">ABC.db</span></code>.
Additionally, some information about external parameters like the temperature will be passed to <code class="docutils literal notranslate"><span class="pre">ABC.db</span></code> if it is present in the data files.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ msr2data <span class="o">[</span><span class="m">8500</span> <span class="m">8502</span>-8504 <span class="m">8507</span><span class="o">]</span> _zf fit-8472 noheader nosummary -o DEF.db
</pre></div>
</div>
<p>Using <tt class="docutils literal"><span class="pre">8472_zf.msr</span></tt> as first template, <tt class="docutils literal"><span class="pre">msr2data</span></tt> generates subsequent msr input files <tt class="docutils literal"><span class="pre">8500_zf.msr</span></tt>, <tt class="docutils literal"><span class="pre">8502_zf.msr</span></tt>, <tt class="docutils literal"><span class="pre">8503_zf.msr</span></tt>,
<tt class="docutils literal"><span class="pre">8504_zf.msr</span></tt>, and <tt class="docutils literal"><span class="pre">8507_zf.msr</span></tt>, calls <tt class="docutils literal"><span class="pre">musrfit</span></tt> to perform a fit of these files and collects the results of the fits in the file <tt class="docutils literal"><span class="pre">DEF.db</span></tt>
<p>Using <code class="docutils literal notranslate"><span class="pre">8472_zf.msr</span></code> as first template, <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> generates subsequent msr input files <code class="docutils literal notranslate"><span class="pre">8500_zf.msr</span></code>, <code class="docutils literal notranslate"><span class="pre">8502_zf.msr</span></code>, <code class="docutils literal notranslate"><span class="pre">8503_zf.msr</span></code>,
<code class="docutils literal notranslate"><span class="pre">8504_zf.msr</span></code>, and <code class="docutils literal notranslate"><span class="pre">8507_zf.msr</span></code>, calls <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> to perform a fit of these files and collects the results of the fits in the file <code class="docutils literal notranslate"><span class="pre">DEF.db</span></code>
<em>without</em> writing the DB file header or attempting to read additional information from the data files.</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8595</span> <span class="m">8585</span> <span class="s2">&quot;&quot;</span> noheader fit-8472! -oGHI.dat data nosummary -k
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8595</span> <span class="m">8585</span> <span class="s2">&quot;&quot;</span> noheader fit-8472! -oGHI.dat data nosummary -k
</pre></div>
</div>
<p>Using <tt class="docutils literal"><span class="pre">8472.msr</span></tt> as template for all runs, <tt class="docutils literal"><span class="pre">msr2data</span></tt> generates the msr input files <tt class="docutils literal"><span class="pre">8595.msr</span></tt> through <tt class="docutils literal"><span class="pre">8585.msr</span></tt>, calls <tt class="docutils literal"><span class="pre">musrfit</span></tt> with
the option <tt class="docutils literal"><span class="pre">--keep-mn2-ouput</span></tt> to perform a fit of these files and collects the results of the fits in the column-structured ASCII file <tt class="docutils literal"><span class="pre">GHI.dat</span></tt>
<p>Using <code class="docutils literal notranslate"><span class="pre">8472.msr</span></code> as template for all runs, <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> generates the msr input files <code class="docutils literal notranslate"><span class="pre">8595.msr</span></code> through <code class="docutils literal notranslate"><span class="pre">8585.msr</span></code>, calls <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> with
the option <code class="docutils literal notranslate"><span class="pre">--keep-mn2-ouput</span></code> to perform a fit of these files and collects the results of the fits in the column-structured ASCII file <code class="docutils literal notranslate"><span class="pre">GHI.dat</span></code>
<em>without</em> writing any file header or attempting to read additional information from the data files.</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8472</span> <span class="m">8475</span> <span class="s2">&quot;&quot;</span> fit -o none
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8472</span> <span class="m">8475</span> <span class="s2">&quot;&quot;</span> fit -o none
</pre></div>
</div>
<p>Take the <em>given</em> msr files <tt class="docutils literal"><span class="pre">8472.msr</span></tt> through <tt class="docutils literal"><span class="pre">8475.msr</span></tt> and call <tt class="docutils literal"><span class="pre">musrfit</span></tt> <em>without</em> finally summarizing the results.</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8472</span> <span class="m">8475</span> _tf_h13 msr-8471!
<p>Take the <em>given</em> msr files <code class="docutils literal notranslate"><span class="pre">8472.msr</span></code> through <code class="docutils literal notranslate"><span class="pre">8475.msr</span></code> and call <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> <em>without</em> finally summarizing the results.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8472</span> <span class="m">8475</span> _tf_h13 msr-8471!
</pre></div>
</div>
<p>Using <tt class="docutils literal"><span class="pre">8471_tf_h13.msr</span></tt> as template for all runs, <tt class="docutils literal"><span class="pre">msr2data</span></tt> generates the msr input files <tt class="docutils literal"><span class="pre">8472_tf_h13.msr</span></tt> through <tt class="docutils literal"><span class="pre">8475_tf_h13.msr</span></tt>.
<p>Using <code class="docutils literal notranslate"><span class="pre">8471_tf_h13.msr</span></code> as template for all runs, <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> generates the msr input files <code class="docutils literal notranslate"><span class="pre">8472_tf_h13.msr</span></code> through <code class="docutils literal notranslate"><span class="pre">8475_tf_h13.msr</span></code>.
<em>No fitting will be performed and no DB or ASCII output will be generated!</em></p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ msr2data <span class="o">[</span><span class="m">8472</span> <span class="m">8475</span>-8479<span class="o">]</span> _tf_h13 paramList <span class="m">1</span>-16 data -o bestData.dat
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ msr2data <span class="o">[</span><span class="m">8472</span> <span class="m">8475</span>-8479<span class="o">]</span> _tf_h13 paramList <span class="m">1</span>-16 data -o bestData.dat
</pre></div>
</div>
<p>Will collect the parameters 1 to 16 from the msr-files <tt class="docutils literal"><span class="pre">8472_tf_h13.msr</span></tt>, <tt class="docutils literal"><span class="pre">8475_tf_h13.msr</span></tt>, <tt class="docutils literal"><span class="pre">8476_tf_h13.msr</span></tt>, <tt class="docutils literal"><span class="pre">8477_tf_h13.msr</span></tt>, <tt class="docutils literal"><span class="pre">8478_tf_h13.msr</span></tt>,
and <tt class="docutils literal"><span class="pre">8479_tf_h13.msr</span></tt> and write these parameters into a column like output file <tt class="docutils literal"><span class="pre">bestData.dat</span></tt>.</p>
<p>Will collect the parameters 1 to 16 from the msr-files <code class="docutils literal notranslate"><span class="pre">8472_tf_h13.msr</span></code>, <code class="docutils literal notranslate"><span class="pre">8475_tf_h13.msr</span></code>, <code class="docutils literal notranslate"><span class="pre">8476_tf_h13.msr</span></code>, <code class="docutils literal notranslate"><span class="pre">8477_tf_h13.msr</span></code>, <code class="docutils literal notranslate"><span class="pre">8478_tf_h13.msr</span></code>,
and <code class="docutils literal notranslate"><span class="pre">8479_tf_h13.msr</span></code> and write these parameters into a column like output file <code class="docutils literal notranslate"><span class="pre">bestData.dat</span></code>.</p>
</div>
<div class="section" id="the-global-mode">
<span id="index-1"></span><h2>The Global Mode<a class="headerlink" href="#the-global-mode" title="Permalink to this headline"></a></h2>
<p>Apart from all the options described <a class="reference internal" href="#msr2data-opt-param"><em>above</em></a> there is another program option: <strong>global</strong>.
This option changes the general behavior of <tt class="docutils literal"><span class="pre">msr2data</span></tt> in that way that instead of processing one msr file for each
<p>Apart from all the options described <a class="reference internal" href="#msr2data-opt-param"><span class="std std-ref">above</span></a> there is another program option: <strong>global</strong>.
This option changes the general behavior of <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> in that way that instead of processing one msr file for each
run it combines all specified runs in <em>one single msr file</em> with the possibility to define common parameters for all
runs as well as run-specific parameters. When writing the obtained parameters to a DB file or a column-structured
ASCII file that single msr file is read and the parameters valid for each run are extracted. The global option can be
used in conjunction with any of the described invocations of <tt class="docutils literal"><span class="pre">msr2data</span></tt> and together with all options stated <a class="reference internal" href="#msr2data-opt-param"><em>above</em></a>.</p>
used in conjunction with any of the described invocations of <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> and together with all options stated <a class="reference internal" href="#msr2data-opt-param"><span class="std std-ref">above</span></a>.</p>
<div class="section" id="file-generation">
<h3>File Generation<a class="headerlink" href="#file-generation" title="Permalink to this headline"></a></h3>
<p>The general idea of this mode is to generate a global msr file on the basis of a working single-run msr file. For this
purpose a single-run template containing information about common and run-specific parameters should be created. These
parameters are identified through their parameter names:</p>
<dl class="docutils">
<dt><strong>run-specific parameters</strong></dt>
<dd>these parameters are tagged with the current run number in the format <tt class="docutils literal"><span class="pre">%0Xu</span></tt>, <em>i.e.</em> <tt class="docutils literal"><span class="pre">X</span></tt> digits with leading zeros,
at the end of the parameter name, <em>e.g.</em> for a 4-digit-formatted run number <tt class="docutils literal"><span class="pre">alpha0123</span></tt> if the run number was 123 or
for a 8-digit-formatted run number <tt class="docutils literal"><span class="pre">alpha00123456</span></tt> if the run number was 123456. <tt class="docutils literal"><span class="pre">X</span></tt> has to be at least 4.</dd>
<dt><strong>common parameters</strong></dt>
<dd>all parameters that are not run specific</dd>
<dl class="simple">
<dt><strong>run-specific parameters</strong></dt><dd><p>these parameters are tagged with the current run number in the format <code class="docutils literal notranslate"><span class="pre">%0Xu</span></code>, <em>i.e.</em> <code class="docutils literal notranslate"><span class="pre">X</span></code> digits with leading zeros,
at the end of the parameter name, <em>e.g.</em> for a 4-digit-formatted run number <code class="docutils literal notranslate"><span class="pre">alpha0123</span></code> if the run number was 123 or
for a 8-digit-formatted run number <code class="docutils literal notranslate"><span class="pre">alpha00123456</span></code> if the run number was 123456. <code class="docutils literal notranslate"><span class="pre">X</span></code> has to be at least 4.</p>
</dd>
<dt><strong>common parameters</strong></dt><dd><p>all parameters that are not run specific</p>
</dd>
</dl>
<p>The <a class="reference internal" href="user-manual.html#msr-fitparameter-block"><em>FITPARAMETER block</em></a> of an exemplary template file <tt class="docutils literal"><span class="pre">8472_example.msr</span></tt> could therefore look like:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>FITPARAMETER
# No Name Value Step Pos_Error Boundaries
1 Phase 35.8359 -3.94496 3.93749
2 Asy8472 0.04501 -0.00208 0.00211 0 0.33
3 Field 143.212 -0.27960 0.27885 100 200
4 Rate8472 0.14245 -0.02501 0.02279 0 1
<p>The <a class="reference internal" href="user-manual.html#msr-fitparameter-block"><span class="std std-ref">FITPARAMETER block</span></a> of an exemplary template file <code class="docutils literal notranslate"><span class="pre">8472_example.msr</span></code> could therefore look like:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">FITPARAMETER</span>
<span class="c1"># No Name Value Step Pos_Error Boundaries</span>
<span class="mi">1</span> <span class="n">Phase</span> <span class="mf">35.8359</span> <span class="o">-</span><span class="mf">3.94496</span> <span class="mf">3.93749</span>
<span class="mi">2</span> <span class="n">Asy8472</span> <span class="mf">0.04501</span> <span class="o">-</span><span class="mf">0.00208</span> <span class="mf">0.00211</span> <span class="mi">0</span> <span class="mf">0.33</span>
<span class="mi">3</span> <span class="n">Field</span> <span class="mf">143.212</span> <span class="o">-</span><span class="mf">0.27960</span> <span class="mf">0.27885</span> <span class="mi">100</span> <span class="mi">200</span>
<span class="mi">4</span> <span class="n">Rate8472</span> <span class="mf">0.14245</span> <span class="o">-</span><span class="mf">0.02501</span> <span class="mf">0.02279</span> <span class="mi">0</span> <span class="mi">1</span>
</pre></div>
</div>
<p>Here the parameters <strong>2</strong> and <strong>4</strong> would be treated as <em>run-specific</em> whereas the parameters <strong>1</strong> and <strong>3</strong> would be <em>common</em> to the original and all newly added runs.</p>
<p>Normally, within the template file there should <em>not</em> appear explicitly any run-specific parameters in the <a class="reference internal" href="user-manual.html#msr-theory-block"><em>THEORY</em></a> and
<a class="reference internal" href="user-manual.html#msr-functions-block"><em>FUNCTIONS</em></a> blocks. If however, those parameters are met, <tt class="docutils literal"><span class="pre">msr2data</span></tt> will try to substitute them by mapped parameters
and add them accordingly to the map contained in each <a class="reference internal" href="user-manual.html#msr-run-block"><em>RUN block</em></a>.</p>
<p>When <tt class="docutils literal"><span class="pre">msr2data</span></tt> is called to generate a global msr file, <em>e.g.</em></p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8471</span> <span class="m">8470</span> _example msr-8472 global
<p>Normally, within the template file there should <em>not</em> appear explicitly any run-specific parameters in the <a class="reference internal" href="user-manual.html#msr-theory-block"><span class="std std-ref">THEORY</span></a> and
<a class="reference internal" href="user-manual.html#msr-functions-block"><span class="std std-ref">FUNCTIONS</span></a> blocks. If however, those parameters are met, <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> will try to substitute them by mapped parameters
and add them accordingly to the map contained in each <a class="reference internal" href="user-manual.html#msr-run-block"><span class="std std-ref">RUN block</span></a>.</p>
<p>When <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> is called to generate a global msr file, <em>e.g.</em></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8471</span> <span class="m">8470</span> _example msr-8472 global
</pre></div>
</div>
<p>a new msr file <tt class="docutils literal"><span class="pre">8471+global_example.msr</span></tt> is created. As can be seen in the example, the name of the global msr file always starts with the
first specified run number followed by the <tt class="docutils literal"><span class="pre">+global</span></tt> identifier and the template <tt class="docutils literal"><span class="pre">&lt;extension&gt;</span></tt>. The example&#8217;s global FITPARAMETER block would be:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>FITPARAMETER
# No Name Value Step Pos_Error Boundaries
<p>a new msr file <code class="docutils literal notranslate"><span class="pre">8471+global_example.msr</span></code> is created. As can be seen in the example, the name of the global msr file always starts with the
first specified run number followed by the <code class="docutils literal notranslate"><span class="pre">+global</span></code> identifier and the template <code class="docutils literal notranslate"><span class="pre">&lt;extension&gt;</span></code>. The examples global FITPARAMETER block would be:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">FITPARAMETER</span>
<span class="c1"># No Name Value Step Pos_Error Boundaries</span>
# Common parameters for all runs
<span class="c1"># Common parameters for all runs</span>
1 Phase 35.8359 -3.94496 3.93749
2 Field 143.212 -0.27960 0.27885 100 200
<span class="mi">1</span> <span class="n">Phase</span> <span class="mf">35.8359</span> <span class="o">-</span><span class="mf">3.94496</span> <span class="mf">3.93749</span>
<span class="mi">2</span> <span class="n">Field</span> <span class="mf">143.212</span> <span class="o">-</span><span class="mf">0.27960</span> <span class="mf">0.27885</span> <span class="mi">100</span> <span class="mi">200</span>
# Specific parameters for run 8471
<span class="c1"># Specific parameters for run 8471</span>
3 Asy8471 0.04501 -0.00208 0.00211 0 0.33
4 Rate8471 0.14245 -0.02501 0.02279 0 1
<span class="mi">3</span> <span class="n">Asy8471</span> <span class="mf">0.04501</span> <span class="o">-</span><span class="mf">0.00208</span> <span class="mf">0.00211</span> <span class="mi">0</span> <span class="mf">0.33</span>
<span class="mi">4</span> <span class="n">Rate8471</span> <span class="mf">0.14245</span> <span class="o">-</span><span class="mf">0.02501</span> <span class="mf">0.02279</span> <span class="mi">0</span> <span class="mi">1</span>
# Specific parameters for run 8470
<span class="c1"># Specific parameters for run 8470</span>
5 Asy8470 0.04501 -0.00208 0.00211 0 0.33
6 Rate8470 0.14245 -0.02501 0.02279 0 1
<span class="mi">5</span> <span class="n">Asy8470</span> <span class="mf">0.04501</span> <span class="o">-</span><span class="mf">0.00208</span> <span class="mf">0.00211</span> <span class="mi">0</span> <span class="mf">0.33</span>
<span class="mi">6</span> <span class="n">Rate8470</span> <span class="mf">0.14245</span> <span class="o">-</span><span class="mf">0.02501</span> <span class="mf">0.02279</span> <span class="mi">0</span> <span class="mi">1</span>
</pre></div>
</div>
<p>This shows that the fit parameters are reorganized in a way that the common parameters appear at the beginning of the parameter list and they are
@ -285,50 +270,50 @@ followed by copies of the parameters specific to each run (in the specified orde
created — for each run as many as found for the template run.</p>
<p>During this reorganization all the affected parameter occurrences are changed accordingly!</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Please be aware of the fact that comments in the template msr file are <em>not</em> propagated to the newly generated global msr file!</p>
<p class="admonition-title">Note</p>
<p>Please be aware of the fact that comments in the template msr file are <em>not</em> propagated to the newly generated global msr file!</p>
</div>
</div>
<div class="section" id="parameter-extraction">
<span id="index-2"></span><h3>Parameter Extraction<a class="headerlink" href="#parameter-extraction" title="Permalink to this headline"></a></h3>
<p>After fitting some model to the specified data the fit parameters can be extracted from the global msr file to a DB or column-structured ASCII file;
as usual this includes also parameters stored in the run data files or externally specified parameters given in a <a class="reference internal" href="#run-list-file-structure"><em>run-list file</em></a>.
as usual this includes also parameters stored in the run data files or externally specified parameters given in a <a class="reference internal" href="#run-list-file-structure"><span class="std std-ref">run-list file</span></a>.
In order to reach this goal the global msr file has to obey certain rules:</p>
<ul class="simple">
<li>The order of the parameters has to match the one described above, meaning the common parameters are listed first followed by
<li><p>The order of the parameters has to match the one described above, meaning the common parameters are listed first followed by
the same number of parameters specific to each run tagged by the according run numbers at the end of the parameter names and
having the same order as the specified list of runs.</li>
<li>The RUN blocks have to be ordered according to the list of runs to be processed.</li>
having the same order as the specified list of runs.</p></li>
<li><p>The RUN blocks have to be ordered according to the list of runs to be processed.</p></li>
</ul>
<p>Following these rules &#8211; which is achieved most easily by generating the global msr file using <tt class="docutils literal"><span class="pre">msr2data</span></tt> as shown above &#8211; the parameters can be extracted <em>e.g.</em> like</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8471</span> <span class="m">8470</span> _example global data -o globalFit.dat
<p>Following these rules which is achieved most easily by generating the global msr file using <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> as shown above the parameters can be extracted <em>e.g.</em> like</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8471</span> <span class="m">8470</span> _example global data -o globalFit.dat
</pre></div>
</div>
<p>This will read in the file <tt class="docutils literal"><span class="pre">8471+global_example.msr</span></tt>, extract for each run all relevant parameters from the msr file as well as
from the according data files (if available) and append all of them in columns to the ASCII file <tt class="docutils literal"><span class="pre">globalFit.dat</span></tt>.</p>
<p>This will read in the file <code class="docutils literal notranslate"><span class="pre">8471+global_example.msr</span></code>, extract for each run all relevant parameters from the msr file as well as
from the according data files (if available) and append all of them in columns to the ASCII file <code class="docutils literal notranslate"><span class="pre">globalFit.dat</span></code>.</p>
</div>
<div class="section" id="the-extended-global-mode">
<span id="index-3"></span><h3>The Extended Global Mode<a class="headerlink" href="#the-extended-global-mode" title="Permalink to this headline"></a></h3>
<p>If a new global input file is generated, it is also possible to do an automatic pre-analysis for each single run using the specified template first;
afterwards the run-specific parameters of these single-run msr files are collected into the global msr file. In special cases this might be useful
to obtain a better set of starting values for the parameters, however, in most cases it will not replace the &#8220;manual review&#8221; of the generated global
to obtain a better set of starting values for the parameters, however, in most cases it will not replace the “manual review” of the generated global
input file. The option is activated by choosing the keyword <strong>global+</strong>. For example</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8471</span> <span class="m">8470</span> _example global+ msr-8472
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8471</span> <span class="m">8470</span> _example global+ msr-8472
</pre></div>
</div>
<p>Here, <tt class="docutils literal"><span class="pre">8472_example.msr</span></tt> is first used as template to generate the file <tt class="docutils literal"><span class="pre">8471-OneRunFit_example.msr</span></tt>, then <tt class="docutils literal"><span class="pre">musrfit</span></tt> is called for it, the result
is used to generate <tt class="docutils literal"><span class="pre">8470-OneRunFit_example.msr</span></tt> and <tt class="docutils literal"><span class="pre">musrfit</span></tt> is called for that file. Finally, the global fit file <tt class="docutils literal"><span class="pre">8471+global_example.msr</span></tt> is
produced — including the fit results of the <tt class="docutils literal"><span class="pre">OneRunFit</span></tt> files for the run-specific parameters.</p>
<p>Here, <code class="docutils literal notranslate"><span class="pre">8472_example.msr</span></code> is first used as template to generate the file <code class="docutils literal notranslate"><span class="pre">8471-OneRunFit_example.msr</span></code>, then <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> is called for it, the result
is used to generate <code class="docutils literal notranslate"><span class="pre">8470-OneRunFit_example.msr</span></code> and <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> is called for that file. Finally, the global fit file <code class="docutils literal notranslate"><span class="pre">8471+global_example.msr</span></code> is
produced — including the fit results of the <code class="docutils literal notranslate"><span class="pre">OneRunFit</span></code> files for the run-specific parameters.</p>
<p>By appending an exclamation mark <strong>!</strong> to the <strong>global+</strong> option, the given template will be used for every new file generation (similar to the fit option
explained before). The <strong>+[!]</strong> extension will be ignored, if no new global input file is generated.
The single run msr files are <em>not</em> deleted at the moment. The information contained in them might be useful for some people. Of course the data can also
be collected by <tt class="docutils literal"><span class="pre">msr2data</span></tt>. <em>E.g.</em> in order to produce a DB file <tt class="docutils literal"><span class="pre">OneRunFits.db</span></tt> one could call</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8471</span> <span class="m">8470</span> -OneRunFit_example -o OneRunFits.db
be collected by <code class="docutils literal notranslate"><span class="pre">msr2data</span></code>. <em>E.g.</em> in order to produce a DB file <code class="docutils literal notranslate"><span class="pre">OneRunFits.db</span></code> one could call</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ msr2data <span class="m">8471</span> <span class="m">8470</span> -OneRunFit_example -o OneRunFits.db
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Please be aware that the program in this mode <em>always</em> generates new single-run msr files and <em>always</em> calls <tt class="docutils literal"><span class="pre">musrfit</span></tt> for them. In case there are
<p class="admonition-title">Note</p>
<p>Please be aware that the program in this mode <em>always</em> generates new single-run msr files and <em>always</em> calls <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> for them. In case there are
already single-run fits present, these cannot be used in conjunction with this option. The program on purpose behaves in this way in order to ensure
the file integrity and correct parameter order within these files.</p>
</div>
@ -337,34 +322,34 @@ the file integrity and correct parameter order within these files.</p>
<div class="section" id="known-limitations">
<h2>Known Limitations<a class="headerlink" href="#known-limitations" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li>The indexing run number of the msr file has to be at the begin of every filename.</li>
<li>Within the data file name the <tt class="docutils literal"><span class="pre">RUN#</span></tt> has the format <tt class="docutils literal"><span class="pre">%0Xu</span></tt>, <em>i.e.</em> <tt class="docutils literal"><span class="pre">X</span></tt> digits with leading zeros, and has to be the rightmost number given in this
format in the file name. <tt class="docutils literal"><span class="pre">X</span></tt> has to be at least 4. The highest treatable run number is <span class="math">\(2^{32}-1 = 4294967295\)</span>.</li>
<li>In order to keep <tt class="docutils literal"><span class="pre">msr2data</span></tt> working properly the msr files should only contain <em>one</em> STATISTIC block at the end of the file and <em>one</em> FITPARAMETER block
right after the TITLE — <tt class="docutils literal"><span class="pre">musrfit</span></tt> itself allows to have more creative msr files...</li>
<li>The msr-file generation from a template takes only care of runs given on the <em>first</em> line of a <tt class="docutils literal"><span class="pre">RUN</span> <span class="pre">block</span></tt>. <a class="reference internal" href="user-manual.html#msr-addrun"><em>ADDRUN</em></a> statements are simply
copied! Since this is most probably <em>not</em> what one likes to do, it is suggested <em>not</em> to use the <tt class="docutils literal"><span class="pre">fit-&lt;template&gt;</span></tt> and <tt class="docutils literal"><span class="pre">msr-&lt;template&gt;</span></tt> options if
ADDRUN statements were present in the template file.</li>
<li><tt class="docutils literal"><span class="pre">msr2data</span></tt> will write only up to two successive empty lines in newly generated msr files. In case more subsequent empty lines are encountered in a template file,
these are not copied! Actually, this measure is not a limitation but has been introduced to keep the msr files in a reasonable shape.</li>
<li><p>The indexing run number of the msr file has to be at the begin of every filename.</p></li>
<li><p>Within the data file name the <code class="docutils literal notranslate"><span class="pre">RUN#</span></code> has the format <code class="docutils literal notranslate"><span class="pre">%0Xu</span></code>, <em>i.e.</em> <code class="docutils literal notranslate"><span class="pre">X</span></code> digits with leading zeros, and has to be the rightmost number given in this
format in the file name. <code class="docutils literal notranslate"><span class="pre">X</span></code> has to be at least 4. The highest treatable run number is <span class="math notranslate nohighlight">\(2^{32}-1 = 4294967295\)</span>.</p></li>
<li><p>In order to keep <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> working properly the msr files should only contain <em>one</em> STATISTIC block at the end of the file and <em>one</em> FITPARAMETER block
right after the TITLE — <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> itself allows to have more creative msr files…</p></li>
<li><p>The msr-file generation from a template takes only care of runs given on the <em>first</em> line of a <code class="docutils literal notranslate"><span class="pre">RUN</span> <span class="pre">block</span></code>. <a class="reference internal" href="user-manual.html#msr-addrun"><span class="std std-ref">ADDRUN</span></a> statements are simply
copied! Since this is most probably <em>not</em> what one likes to do, it is suggested <em>not</em> to use the <code class="docutils literal notranslate"><span class="pre">fit-&lt;template&gt;</span></code> and <code class="docutils literal notranslate"><span class="pre">msr-&lt;template&gt;</span></code> options if
ADDRUN statements were present in the template file.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">msr2data</span></code> will write only up to two successive empty lines in newly generated msr files. In case more subsequent empty lines are encountered in a template file,
these are not copied! Actually, this measure is not a limitation but has been introduced to keep the msr files in a reasonable shape.</p></li>
</ul>
</div>
<div class="section" id="the-graphical-user-interface-for-msr2data-provided-by-musredit">
<h2>The Graphical User Interface for msr2data Provided by musredit<a class="headerlink" href="#the-graphical-user-interface-for-msr2data-provided-by-musredit" title="Permalink to this headline"></a></h2>
<p><a class="reference internal" href="musredit.html#musredit-sec"><em>musredit</em></a>, designed especially for the manipulation of <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr files and graphical front ends to <tt class="docutils literal"><span class="pre">musrfit</span></tt>, offer an almost
self-explanatory graphical user interface to <tt class="docutils literal"><span class="pre">msr2data</span></tt> depicted below:</p>
<img src="_images/msr2data-GUI.svg" /><ol class="arabic simple">
<li>and 2. Choose one of the ways to specify your list of runs as described under <a class="reference internal" href="#msr2data-basic-usage"><em>basic usage</em></a>.</li>
<p><a class="reference internal" href="musredit.html#musredit-sec"><span class="std std-ref">musredit</span></a>, designed especially for the manipulation of <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr files and graphical front ends to <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>, offer an almost
self-explanatory graphical user interface to <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> depicted below:</p>
<img alt="_images/msr2data-GUI.svg" src="_images/msr2data-GUI.svg" /><ol class="arabic simple">
<li><p>and 2. Choose one of the ways to specify your list of runs as described under <a class="reference internal" href="#msr2data-basic-usage"><span class="std std-ref">basic usage</span></a>.</p></li>
</ol>
<ol class="arabic simple" start="3">
<li>Give the file extension here, <em>e.g.</em> <tt class="docutils literal"><span class="pre">_zf</span></tt> for files like <tt class="docutils literal"><span class="pre">8472_zf.msr</span></tt>. If the files do not have an extension this
field stays empty. <tt class="docutils literal"><span class="pre">musredit</span></tt> takes care of passing the &#8220;&#8221; to <tt class="docutils literal"><span class="pre">msr2data</span></tt> as mentioned above.</li>
<li>Activates the <tt class="docutils literal"><span class="pre">fit-&lt;template&gt;</span></tt> option if <tt class="docutils literal"><span class="pre">&lt;template&gt;</span></tt> is entered. In case the option <tt class="docutils literal"><span class="pre">Chain</span> <span class="pre">Fit</span></tt> is <em>not</em> set the
<li><p>Give the file extension here, <em>e.g.</em> <code class="docutils literal notranslate"><span class="pre">_zf</span></code> for files like <code class="docutils literal notranslate"><span class="pre">8472_zf.msr</span></code>. If the files do not have an extension this
field stays empty. <code class="docutils literal notranslate"><span class="pre">musredit</span></code> takes care of passing the “” to <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> as mentioned above.</p></li>
<li><p>Activates the <code class="docutils literal notranslate"><span class="pre">fit-&lt;template&gt;</span></code> option if <code class="docutils literal notranslate"><span class="pre">&lt;template&gt;</span></code> is entered. In case the option <code class="docutils literal notranslate"><span class="pre">Chain</span> <span class="pre">Fit</span></code> is <em>not</em> set the
given template will be used for the input-file generation for all runs to be fitted — otherwise the output of the first
fit serves as template for the second and so on. The template field stays empty if <em>no</em> fits should be performed!</li>
<li>Activates the <tt class="docutils literal"><span class="pre">-o</span> <span class="pre">&lt;outputFileName&gt;</span></tt> option if <tt class="docutils literal"><span class="pre">&lt;outputFileName&gt;</span></tt> is entered. If nothing is entered the default output file <tt class="docutils literal"><span class="pre">out.db</span></tt> or <tt class="docutils literal"><span class="pre">out.dat</span></tt> is used.</li>
fit serves as template for the second and so on. The template field stays empty if <em>no</em> fits should be performed!</p></li>
<li><p>Activates the <code class="docutils literal notranslate"><span class="pre">-o</span> <span class="pre">&lt;outputFileName&gt;</span></code> option if <code class="docutils literal notranslate"><span class="pre">&lt;outputFileName&gt;</span></code> is entered. If nothing is entered the default output file <code class="docutils literal notranslate"><span class="pre">out.db</span></code> or <code class="docutils literal notranslate"><span class="pre">out.dat</span></code> is used.</p></li>
</ol>
<p>The options tags correspond essentially to the description in <a class="reference internal" href="#msr2data-opt-param"><em>optional parameters</em></a>.</p>
<p>The options tags correspond essentially to the description in <a class="reference internal" href="#msr2data-opt-param"><span class="std std-ref">optional parameters</span></a>.</p>
</div>
</div>
@ -372,11 +357,11 @@ fit serves as template for the second and so on. The template field stays empty
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">msr2data - A Program for Automatically Processing Multiple <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr Files</a><ul>
<li><a class="reference internal" href="#">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a><ul>
<li><a class="reference internal" href="#basic-types-of-usage">Basic Types of Usage</a><ul>
<li><a class="reference internal" href="#run-list-file-structure">Run List File Structure</a></li>
</ul>
@ -400,29 +385,28 @@ fit serves as template for the second and so on. The template field stays empty
<h4>Next topic</h4>
<p class="topless"><a href="any2many.html"
title="next chapter">any2many - a Universal μSR-file-format converter</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/msr2data.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/msr2data.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" />
<input type="text" name="q" aria-labelledby="searchlabel" />
<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>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -434,13 +418,13 @@ fit serves as template for the second and so on. The template field stays empty
<li class="right" >
<a href="mupp.html" title="mupp - μSR Parameter Plotter"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
&copy; Copyright 2019, Andreas Suter.
Last updated on Jul 24, 2019.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
<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>

View File

@ -1,35 +1,24 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>mupp - μSR Parameter Plotter &mdash; musrfit 1.5.1 documentation</title>
<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">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.5.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<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="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="top" title="musrfit 1.5.1 documentation" href="index.html" />
<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">
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -41,125 +30,113 @@
<li class="right" >
<a href="musredit.html" title="musredit: the GUI Based Interface to musrfit"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
<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><tt class="docutils literal"><span class="pre">mupp</span></tt> 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"><em>msr2data</em></a>. It can handle <tt class="docutils literal"><span class="pre">db</span></tt>- and <tt class="docutils literal"><span class="pre">dat</span></tt>-files.
Also a collection of <tt class="docutils literal"><span class="pre">msr</span></tt>-files can be invoked. <tt class="docutils literal"><span class="pre">mupp</span></tt> is heavily inspired by μView (see
<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><tt class="docutils literal"><span class="pre">mupp</span></tt> can be operated from within as graphical user interface or via a command line scripting interface.
The <tt class="docutils literal"><span class="pre">mupp</span></tt> GUI can be invoked either directly from the command line or from within <a class="reference internal" href="musredit.html#musredit-sec"><em>musredit</em></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 src="_images/mupp-gui-0.svg" /><ol class="arabic">
<li><p class="first">shows the list of loaded collections. A collection is defined as <tt class="docutils literal"><span class="pre">db</span></tt>- or <tt class="docutils literal"><span class="pre">dat</span></tt>-file (typically the
output from <a class="reference internal" href="msr2data.html#msr2data"><em>msr2data</em></a>). If you call the open-dialog and select a collection of
<tt class="docutils literal"><span class="pre">msr</span></tt>-files, <tt class="docutils literal"><span class="pre">mupp</span></tt> will call <tt class="docutils literal"><span class="pre">msr2data</span></tt> and tries to generate a collection on-the-fly.</p>
</li>
<li><p class="first">in this list, the data-tags of the currently selected collection is presented. The data-tags can be
directly dragged over to the <tt class="docutils literal"><span class="pre">x</span></tt>- and <tt class="docutils literal"><span class="pre">y</span></tt>-axis list. Another way is to select the data-tag
wished and click <tt class="docutils literal"><span class="pre">add</span> <span class="pre">X</span></tt> to add the selected data-tag to the <tt class="docutils literal"><span class="pre">x</span></tt>-axis list. Analogous it is done
for the <tt class="docutils literal"><span class="pre">y</span></tt>-axis.</p>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">x</span></tt>-axis list. The labels are followed by <tt class="docutils literal"><span class="pre">(-X-)</span></tt> where the number <tt class="docutils literal"><span class="pre">X</span></tt> corresponds to the
selection it corresponds to. The numbering of the collection is as given in the collection list.</p>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">y</span></tt>-axis list. The labels are followed by <tt class="docutils literal"><span class="pre">(-X-)</span></tt> where the number <tt class="docutils literal"><span class="pre">X</span></tt> corresponds to the
selection it corresponds to. The numbering of the collection is as given in the collection list.</p>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">add</span> <span class="pre">X</span></tt> allows to add the currently selected data-tag to the <tt class="docutils literal"><span class="pre">x</span></tt>-axis list.</p>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">add</span> <span class="pre">Y</span></tt> allows to add the currently selected data-tag to the <tt class="docutils literal"><span class="pre">y</span></tt>-axis list.</p>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">remove</span> <span class="pre">X</span></tt> will remove the selected <tt class="docutils literal"><span class="pre">x</span></tt>-axis tag.</p>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">remove</span> <span class="pre">Y</span></tt> will remove the selected <tt class="docutils literal"><span class="pre">y</span></tt>-axis tag.</p>
</li>
<li><p class="first">Often one would like to compare trends of different settings. In the above example each collections
<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 <tt class="docutils literal"><span class="pre">x</span></tt>- and <tt class="docutils literal"><span class="pre">y</span></tt>-axis tags for each collection, you can do the following:
you add <tt class="docutils literal"><span class="pre">x</span></tt>- and <tt class="docutils literal"><span class="pre">y</span></tt>-axis data-tags for the first collection. Afterwards you select all the other
collections of interest and click on <tt class="docutils literal"><span class="pre">Add</span> <span class="pre">Ditto</span></tt>. <tt class="docutils literal"><span class="pre">mupp</span></tt> will then add the corresponding
<tt class="docutils literal"><span class="pre">x</span></tt>- and <tt class="docutils literal"><span class="pre">y</span></tt>-axis data-tags accordingly. This is less error prone and quicker!</p>
</li>
<li><p class="first">Clicking the <tt class="docutils literal"><span class="pre">Plot</span></tt> button will invoke <tt class="docutils literal"><span class="pre">mupp_plot</span></tt> (a <tt class="docutils literal"><span class="pre">ROOT</span></tt> based application) which will
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 height="600px" src="_images/mupp-plot-0.svg" /></a>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">Remove</span> <span class="pre">Collection</span></tt>: will remove the selected collection</p>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">Refresh</span> <span class="pre">Collection</span></tt>: will reload the collection (<tt class="docutils literal"><span class="pre">db</span></tt>- or <tt class="docutils literal"><span class="pre">dat</span></tt>-file). This is often useful
during beamtime where the collection is growing run-by-run.</p>
</li>
<li><p class="first">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 <tt class="docutils literal"><span class="pre">Help</span> <span class="pre">/</span> <span class="pre">Cmd's</span></tt> for the currently available
commands.</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><tt class="docutils literal"><span class="pre">mupp</span></tt> 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 <tt class="docutils literal"><span class="pre">-s</span></tt> (see
<a class="reference internal" href="#mupp-usage"><em>mupp command line summary</em></a>. Currently the following scripting commands are available:</p>
<dl class="docutils">
<dt><strong>loadPath &lt;dir&gt;</strong></dt>
<dd>set the load path to <tt class="docutils literal"><span class="pre">&lt;dir&gt;</span></tt>. Bash variables like $HOME are accepted. This is the path where to look for collection files (<tt class="docutils literal"><span class="pre">db</span></tt>- and <tt class="docutils literal"><span class="pre">dat</span></tt>-files).</dd>
<dt><strong>load &lt;coll&gt;</strong></dt>
<dd>will load the collection <tt class="docutils literal"><span class="pre">&lt;coll&gt;</span></tt>.</dd>
<dt><strong>selectAll</strong></dt>
<dd>will select all loaded collections. This means every plot of variable x/y will be carried out to <em>ALL</em> collections.</dd>
<dt><strong>select &lt;nn&gt;</strong></dt>
<dd>selects collection <tt class="docutils literal"><span class="pre">&lt;nn&gt;</span></tt>, where <tt class="docutils literal"><span class="pre">&lt;nn&gt;</span></tt> 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.</dd>
<dt><strong>addX &lt;label&gt;</strong></dt>
<dd>add <tt class="docutils literal"><span class="pre">&lt;label&gt;</span></tt> as a <em>x</em>-variable. Only <em>one</em> is allowed.</dd>
<dt><strong>addY &lt;label(s)&gt;</strong></dt>
<dd>add <tt class="docutils literal"><span class="pre">&lt;label(s)&gt;</span></tt> as <em>y</em>-variable. <em>Multiple</em> labels are possible.</dd>
<dt><strong>savePath &lt;dir&gt;</strong></dt>
<dd>set the save path to <tt class="docutils literal"><span class="pre">&lt;dir&gt;</span></tt>. The place where the macros, and/or the plot output will be saved.</dd>
<dt><strong>plot &lt;fln&gt;</strong></dt>
<dd>where <tt class="docutils literal"><span class="pre">&lt;fln&gt;</span></tt> is the file name with extension under which the plot should be saved.</dd>
<dt><strong>macro &lt;fln&gt;</strong></dt>
<dd>where <tt class="docutils literal"><span class="pre">&lt;fln&gt;</span></tt> is the file name under which the root macro should be saved.</dd>
<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 <tt class="docutils literal"><span class="pre">field-vs-energy.txt</span></tt> might look like this:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span># This is a comment
<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>
loadPath ./
<span class="n">loadPath</span> <span class="o">./</span>
load YBCO-40nm-T5K-FC150mT-Escan.db
load YBCO-40nm-T30K-FC150mT-Escan.db
load YBCO-40nm-T60K-FC150mT-Escan.db
load YBCO-40nm-T120K-FC150mT-Escan.db
<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>
selectAll
<span class="n">selectAll</span>
addX dataE
addY Field
<span class="n">addX</span> <span class="n">dataE</span>
<span class="n">addY</span> <span class="n">Field</span>
savePath ./
plot FieldVsEnergy.pdf
<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>
macro FieldVsEnergy.C
<span class="n">macro</span> <span class="n">FieldVsEnergy</span><span class="o">.</span><span class="n">C</span>
# end
<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-python"><div class="highlight"><pre><span></span>usage: mupp [OPTIONS] [[--path &lt;fit-param-path&gt;] &lt;fit-param-file-names&gt;]
<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
@ -200,9 +177,9 @@ SCRIPT COMMANDS:
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<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>
@ -214,33 +191,32 @@ SCRIPT COMMANDS:
<h4>Previous topic</h4>
<p class="topless"><a href="musredit.html"
title="previous chapter"><tt class="docutils literal"><span class="pre">musredit</span></tt>: the GUI Based Interface to <tt class="docutils literal"><span class="pre">musrfit</span></tt></a></p>
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 <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr Files</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/mupp.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
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" />
<input type="text" name="q" aria-labelledby="searchlabel" />
<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>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -252,13 +228,13 @@ SCRIPT COMMANDS:
<li class="right" >
<a href="musredit.html" title="musredit: the GUI Based Interface to musrfit"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
&copy; Copyright 2019, Andreas Suter.
Last updated on Jul 24, 2019.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
<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>

File diff suppressed because it is too large Load Diff

View File

@ -1,35 +1,24 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>musredit: the GUI Based Interface to musrfit &mdash; musrfit 1.5.1 documentation</title>
<meta charset="utf-8" />
<title>musredit: the GUI Based Interface to musrfit &#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">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.5.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<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="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="top" title="musrfit 1.5.1 documentation" href="index.html" />
<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="mupp - μSR Parameter Plotter" href="mupp.html" />
<link rel="prev" title="Setting up musrfit / DKS: High Speed Fitting with GPUs" href="setup-dks.html" />
</head>
<body>
<div class="related">
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -41,167 +30,160 @@
<li class="right" >
<a href="setup-dks.html" title="Setting up musrfit / DKS: High Speed Fitting with GPUs"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
<div class="body" role="main">
<div class="section" id="musredit-the-gui-based-interface-to-musrfit">
<span id="musredit-sec"></span><span id="index-0"></span><h1><tt class="docutils literal"><span class="pre">musredit</span></tt>: the GUI Based Interface to <tt class="docutils literal"><span class="pre">musrfit</span></tt><a class="headerlink" href="#musredit-the-gui-based-interface-to-musrfit" title="Permalink to this headline"></a></h1>
<span id="musredit-sec"></span><span id="index-0"></span><h1><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 class="headerlink" href="#musredit-the-gui-based-interface-to-musrfit" title="Permalink to this headline"></a></h1>
<div class="section" id="introduction">
<h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline"></a></h2>
<p><tt class="docutils literal"><span class="pre">musredit</span></tt> is an editor which also provide a graphical user interface to the programs contained in the <tt class="docutils literal"><span class="pre">musrfit</span></tt> suite and are intended
to help the user handle <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr files. It is implemented in <tt class="docutils literal"><span class="pre">C++</span></tt> and use the <a class="reference external" href="https://qt.io">Qt</a> framework. <tt class="docutils literal"><span class="pre">musredit</span></tt> is based on Qt 4.6 or Qt 5.6 (or above).
The Qt 5.6 version of <tt class="docutils literal"><span class="pre">musredit</span></tt> will be actively developed, whereas the Qt 4.x version will only get bug fixing and eventually will be dropped.
On this documentation page only the features related to <tt class="docutils literal"><span class="pre">musrfit</span></tt> are described — the basic editor functions which should be self-explanatory are <em>not</em>.
<tt class="docutils literal"><span class="pre">musrgui</span></tt> is an outdated early version of <tt class="docutils literal"><span class="pre">musredit</span></tt> and will not described anymore. If still in use, the user is urged to switch to <tt class="docutils literal"><span class="pre">musredit</span></tt>.</p>
<p><code class="docutils literal notranslate"><span class="pre">musredit</span></code> is an editor which also provide a graphical user interface to the programs contained in the <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> suite and are intended
to help the user handle <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr files. It is implemented in <code class="docutils literal notranslate"><span class="pre">C++</span></code> and use the <a class="reference external" href="https://qt.io">Qt</a> framework. <code class="docutils literal notranslate"><span class="pre">musredit</span></code> is based on Qt 4.6 or Qt 5.6 (or above).
The Qt 5.6 version of <code class="docutils literal notranslate"><span class="pre">musredit</span></code> will be actively developed, whereas the Qt 4.x version will only get bug fixing and eventually will be dropped.
On this documentation page only the features related to <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> are described — the basic editor functions which should be self-explanatory are <em>not</em>.
<code class="docutils literal notranslate"><span class="pre">musrgui</span></code> is an outdated early version of <code class="docutils literal notranslate"><span class="pre">musredit</span></code> and will not described anymore. If still in use, the user is urged to switch to <code class="docutils literal notranslate"><span class="pre">musredit</span></code>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Before going on using <tt class="docutils literal"><span class="pre">musredit</span></tt> it is strongly recommended to read the <a class="reference internal" href="user-manual.html#user-manual"><em>manual of musrfit</em></a> first!</p>
<p class="admonition-title">Note</p>
<p>Before going on using <code class="docutils literal notranslate"><span class="pre">musredit</span></code> it is strongly recommended to read the <a class="reference internal" href="user-manual.html#user-manual"><span class="std std-ref">manual of musrfit</span></a> first!</p>
</div>
</div>
<div class="section" id="available-executable-configuration-files-and-their-basic-usage">
<h2>Available Executable, Configuration Files and their Basic Usage<a class="headerlink" href="#available-executable-configuration-files-and-their-basic-usage" title="Permalink to this headline"></a></h2>
<div class="section" id="musredit-musrgui">
<h3>musredit (musrgui)<a class="headerlink" href="#musredit-musrgui" title="Permalink to this headline"></a></h3>
<p><tt class="docutils literal"><span class="pre">musredit</span></tt> (<tt class="docutils literal"><span class="pre">musrgui</span></tt>) is the editor executable. If called from within a shell it accepts a few optional parameters:</p>
<dl class="docutils">
<dt><strong>&lt;msr-files&gt;</strong></dt>
<dd>File names of the msr files that should be opened in separate editor tabs on startup of <tt class="docutils literal"><span class="pre">musredit</span></tt>.</dd>
<dt><strong>- -help</strong></dt>
<dd>Displays a small help notice in the shell explaining the basic usage of the program.</dd>
<dt><strong>- -version</strong></dt>
<dd>Prints the version number of <tt class="docutils literal"><span class="pre">musredit</span></tt>.</dd>
<p><code class="docutils literal notranslate"><span class="pre">musredit</span></code> (<code class="docutils literal notranslate"><span class="pre">musrgui</span></code>) is the editor executable. If called from within a shell it accepts a few optional parameters:</p>
<dl class="simple">
<dt><strong>&lt;msr-files&gt;</strong></dt><dd><p>File names of the msr files that should be opened in separate editor tabs on startup of <code class="docutils literal notranslate"><span class="pre">musredit</span></code>.</p>
</dd>
<dt><strong>- -help</strong></dt><dd><p>Displays a small help notice in the shell explaining the basic usage of the program.</p>
</dd>
<dt><strong>- -version</strong></dt><dd><p>Prints the version number of <code class="docutils literal notranslate"><span class="pre">musredit</span></code>.</p>
</dd>
</dl>
<p>If called without any parameters an empty editor window opens.</p>
</div>
<div class="section" id="musredit-startup-xml">
<span id="index-1"></span><h3>musredit_startup.xml<a class="headerlink" href="#musredit-startup-xml" title="Permalink to this headline"></a></h3>
<p><tt class="docutils literal"><span class="pre">musredit_startup.xml</span></tt> is the configuration file located under <tt class="docutils literal"><span class="pre">$HOME\.musrfit\musredit</span></tt>. It is also possible to have another version
<p><code class="docutils literal notranslate"><span class="pre">musredit_startup.xml</span></code> is the configuration file located under <code class="docutils literal notranslate"><span class="pre">$HOME\.musrfit\musredit</span></code>. It is also possible to have another version
of this file in the working directory which then will be used!</p>
<p>In this file the following <tt class="docutils literal"><span class="pre">XML</span></tt> tags are allowed to define settings and might proof useful for all users of <tt class="docutils literal"><span class="pre">musredit</span></tt>:</p>
<dl class="docutils">
<dt><strong>&lt;general&gt;&lt;/general&gt;</strong></dt>
<dd><p class="first">set the default paths to executable and files in this environment</p>
<dl class="last docutils">
<dt><strong>&lt;exec_path&gt;PATH_TO_EXEC&lt;/exec_path&gt;</strong></dt>
<dd>set the path <tt class="docutils literal"><span class="pre">PATH_TO_EXEC</span></tt> where the executable <tt class="docutils literal"><span class="pre">musrfit</span></tt>, <tt class="docutils literal"><span class="pre">musrview</span></tt>, <tt class="docutils literal"><span class="pre">musrt0</span></tt>, etc. can be found (inside the <tt class="docutils literal"><span class="pre">&lt;general&gt;</span></tt> environment)</dd>
<dt><strong>&lt;default_save_path&gt;SAVE_PATH&lt;/default_save_path&gt;</strong></dt>
<dd>specify the path <tt class="docutils literal"><span class="pre">SAVE_PATH</span></tt> where <tt class="docutils literal"><span class="pre">musredit</span></tt> point by default when opening and saving msr files (inside the <tt class="docutils literal"><span class="pre">&lt;general&gt;</span></tt> environment). Default is the current directory.</dd>
<dt><strong>&lt;msr_default_file_path&gt;MSR_DEF_PATH&lt;/msr_default_file_path&gt;</strong></dt>
<dd>set the path <tt class="docutils literal"><span class="pre">MSR_DEF_PATH</span></tt> where the default msr files provided by <tt class="docutils literal"><span class="pre">musredit</span></tt> are stored (inside the <tt class="docutils literal"><span class="pre">&lt;general&gt;</span></tt> environment)</dd>
<dt><strong>&lt;timeout&gt;3600&lt;/timeout&gt;</strong></dt>
<dd>timeout in seconds after which <a class="reference internal" href="user-manual.html#musrview"><em>musrview</em></a> canvas will automatically quit. A value of 0 or
a negative number will keep the <tt class="docutils literal"><span class="pre">musrview</span></tt> canvas open without self-determination.</dd>
<dt><strong>&lt;keep_minuit2_output&gt;y/n&lt;/keep_minuit2_output&gt;</strong></dt>
<dd>flag indicating if the <tt class="docutils literal"><span class="pre">MINUIT2</span></tt> output shall be kept per msr-file (&#8216;y&#8217;) or only for the current msr-file (&#8216;n&#8217;).</dd>
<dt><strong>&lt;dump_ascii&gt;y/n&lt;/dump_ascii&gt;</strong></dt>
<dd>flag indicating if <tt class="docutils literal"><span class="pre">musrfit</span></tt> shall dump fit data into ascii format. See help of <a class="reference internal" href="user-manual.html#musrfit"><em>musrfit</em></a>.</dd>
<dt><strong>&lt;dump_root&gt;y/n&lt;/dump_root&gt;</strong></dt>
<dd>flag indicating if <tt class="docutils literal"><span class="pre">musrfit</span></tt> shall dump fit data into root format. See help of <a class="reference internal" href="user-manual.html#musrfit"><em>musrfit</em></a>.</dd>
<dt><strong>&lt;title_from_data_file&gt;y/n&lt;/title_from_data_file&gt;</strong></dt>
<dd>specify if <tt class="docutils literal"><span class="pre">musrfit</span></tt> should be called with the <tt class="docutils literal"><span class="pre">-t</span></tt> option by default (inside the <tt class="docutils literal"><span class="pre">&lt;general&gt;</span></tt> environment)</dd>
<dt><strong>&lt;chisq_pre_run_block&gt;y/n&lt;/chisq_pre_run_block&gt;</strong></dt>
<dd>flag indicating if per-run chisq shall be written into the msr-output-file.</dd>
<dt><strong>&lt;estimate_n0&gt;y/n&lt;/estimate_n0&gt;</strong></dt>
<dd>flag indicating if for a single histogram fit <span class="math">\(N_0\)</span> shall be estimated before the fit procedure starts.</dd>
<dt><strong>&lt;musrview_show_fourier&gt;y/n&lt;/musrview_show_fourier&gt;</strong></dt>
<dd>flag indicating if <tt class="docutils literal"><span class="pre">musrview</span></tt> will directly present the Fourier transform rather than the time domain data.</dd>
<dt><strong>&lt;musrview_show_avg&gt;y/n&lt;/musrview_show_avg&gt;</strong></dt>
<dd>flag indicating if <tt class="docutils literal"><span class="pre">musrview</span></tt> will directly present averaged data, typically used for Fourier power spectra.</dd>
<dt><strong>&lt;enable_musrt0&gt;y/n&lt;/enable_musrt0&gt;</strong></dt>
<dd>specify if <a class="reference internal" href="user-manual.html#musrt0"><em>musrt0</em></a> can be called from within <tt class="docutils literal"><span class="pre">musredit</span></tt> (inside the <tt class="docutils literal"><span class="pre">&lt;general&gt;</span></tt> environment)</dd>
<p>In this file the following <code class="docutils literal notranslate"><span class="pre">XML</span></code> tags are allowed to define settings and might proof useful for all users of <code class="docutils literal notranslate"><span class="pre">musredit</span></code>:</p>
<dl>
<dt><strong>&lt;general&gt;&lt;/general&gt;</strong></dt><dd><p>set the default paths to executable and files in this environment</p>
<dl class="simple">
<dt><strong>&lt;exec_path&gt;PATH_TO_EXEC&lt;/exec_path&gt;</strong></dt><dd><p>set the path <code class="docutils literal notranslate"><span class="pre">PATH_TO_EXEC</span></code> where the executable <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>, <code class="docutils literal notranslate"><span class="pre">musrview</span></code>, <code class="docutils literal notranslate"><span class="pre">musrt0</span></code>, etc. can be found (inside the <code class="docutils literal notranslate"><span class="pre">&lt;general&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;default_save_path&gt;SAVE_PATH&lt;/default_save_path&gt;</strong></dt><dd><p>specify the path <code class="docutils literal notranslate"><span class="pre">SAVE_PATH</span></code> where <code class="docutils literal notranslate"><span class="pre">musredit</span></code> point by default when opening and saving msr files (inside the <code class="docutils literal notranslate"><span class="pre">&lt;general&gt;</span></code> environment). Default is the current directory.</p>
</dd>
<dt><strong>&lt;msr_default_file_path&gt;MSR_DEF_PATH&lt;/msr_default_file_path&gt;</strong></dt><dd><p>set the path <code class="docutils literal notranslate"><span class="pre">MSR_DEF_PATH</span></code> where the default msr files provided by <code class="docutils literal notranslate"><span class="pre">musredit</span></code> are stored (inside the <code class="docutils literal notranslate"><span class="pre">&lt;general&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;timeout&gt;3600&lt;/timeout&gt;</strong></dt><dd><p>timeout in seconds after which <a class="reference internal" href="user-manual.html#musrview"><span class="std std-ref">musrview</span></a> canvas will automatically quit. A value of 0 or
a negative number will keep the <code class="docutils literal notranslate"><span class="pre">musrview</span></code> canvas open without self-determination.</p>
</dd>
<dt><strong>&lt;keep_minuit2_output&gt;y/n&lt;/keep_minuit2_output&gt;</strong></dt><dd><p>flag indicating if the <code class="docutils literal notranslate"><span class="pre">MINUIT2</span></code> output shall be kept per msr-file (y) or only for the current msr-file (n).</p>
</dd>
<dt><strong>&lt;dump_ascii&gt;y/n&lt;/dump_ascii&gt;</strong></dt><dd><p>flag indicating if <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> shall dump fit data into ascii format. See help of <a class="reference internal" href="user-manual.html#musrfit"><span class="std std-ref">musrfit</span></a>.</p>
</dd>
<dt><strong>&lt;dump_root&gt;y/n&lt;/dump_root&gt;</strong></dt><dd><p>flag indicating if <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> shall dump fit data into root format. See help of <a class="reference internal" href="user-manual.html#musrfit"><span class="std std-ref">musrfit</span></a>.</p>
</dd>
<dt><strong>&lt;title_from_data_file&gt;y/n&lt;/title_from_data_file&gt;</strong></dt><dd><p>specify if <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> should be called with the <code class="docutils literal notranslate"><span class="pre">-t</span></code> option by default (inside the <code class="docutils literal notranslate"><span class="pre">&lt;general&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;chisq_pre_run_block&gt;y/n&lt;/chisq_pre_run_block&gt;</strong></dt><dd><p>flag indicating if per-run chisq shall be written into the msr-output-file.</p>
</dd>
<dt><strong>&lt;estimate_n0&gt;y/n&lt;/estimate_n0&gt;</strong></dt><dd><p>flag indicating if for a single histogram fit <span class="math notranslate nohighlight">\(N_0\)</span> shall be estimated before the fit procedure starts.</p>
</dd>
<dt><strong>&lt;musrview_show_fourier&gt;y/n&lt;/musrview_show_fourier&gt;</strong></dt><dd><p>flag indicating if <code class="docutils literal notranslate"><span class="pre">musrview</span></code> will directly present the Fourier transform rather than the time domain data.</p>
</dd>
<dt><strong>&lt;musrview_show_avg&gt;y/n&lt;/musrview_show_avg&gt;</strong></dt><dd><p>flag indicating if <code class="docutils literal notranslate"><span class="pre">musrview</span></code> will directly present averaged data, typically used for Fourier power spectra.</p>
</dd>
<dt><strong>&lt;enable_musrt0&gt;y/n&lt;/enable_musrt0&gt;</strong></dt><dd><p>specify if <a class="reference internal" href="user-manual.html#musrt0"><span class="std std-ref">musrt0</span></a> can be called from within <code class="docutils literal notranslate"><span class="pre">musredit</span></code> (inside the <code class="docutils literal notranslate"><span class="pre">&lt;general&gt;</span></code> environment)</p>
</dd>
</dl>
</dd>
<dt><strong>&lt;font_settings&gt;&lt;/font_settings&gt;</strong></dt>
<dd><p class="first">set the default font in this environment</p>
<dl class="last docutils">
<dt><strong>&lt;font_name&gt;FONT&lt;/font_name&gt;</strong></dt>
<dd>specify the name of the font <tt class="docutils literal"><span class="pre">FONT</span></tt> to be used by default in <tt class="docutils literal"><span class="pre">musredit</span></tt> (inside the <tt class="docutils literal"><span class="pre">&lt;font_settings&gt;</span></tt> environment)</dd>
<dt><strong>&lt;font_size&gt;N&lt;/font_size&gt;</strong></dt>
<dd>specify the size <tt class="docutils literal"><span class="pre">N</span></tt> of the font to be used by default in <tt class="docutils literal"><span class="pre">musredit</span></tt> (inside the <tt class="docutils literal"><span class="pre">&lt;font_settings&gt;</span></tt> environment)</dd>
<dt><strong>&lt;font_settings&gt;&lt;/font_settings&gt;</strong></dt><dd><p>set the default font in this environment</p>
<dl class="simple">
<dt><strong>&lt;font_name&gt;FONT&lt;/font_name&gt;</strong></dt><dd><p>specify the name of the font <code class="docutils literal notranslate"><span class="pre">FONT</span></code> to be used by default in <code class="docutils literal notranslate"><span class="pre">musredit</span></code> (inside the <code class="docutils literal notranslate"><span class="pre">&lt;font_settings&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;font_size&gt;N&lt;/font_size&gt;</strong></dt><dd><p>specify the size <code class="docutils literal notranslate"><span class="pre">N</span></code> of the font to be used by default in <code class="docutils literal notranslate"><span class="pre">musredit</span></code> (inside the <code class="docutils literal notranslate"><span class="pre">&lt;font_settings&gt;</span></code> environment)</p>
</dd>
</dl>
</dd>
<dt><strong>&lt;msr_file_defaults&gt;&lt;/msr_file_defaults&gt;</strong></dt>
<dd><p class="first">put the default settings for newly created msr files in this environment</p>
<dl class="last docutils">
<dt><strong>&lt;beamline&gt;BL&lt;/beamline&gt;</strong></dt>
<dd>set the name of the muon beamline <tt class="docutils literal"><span class="pre">BL</span></tt> here (inside a <tt class="docutils literal"><span class="pre">&lt;msr_file_defaults&gt;</span></tt> environment)</dd>
<dt><strong>&lt;institute&gt;INST&lt;/institute&gt;</strong></dt>
<dd>set the name of the facility <tt class="docutils literal"><span class="pre">INST</span></tt> where the beamline <tt class="docutils literal"><span class="pre">BL</span></tt> is located. Valid settings are <tt class="docutils literal"><span class="pre">PSI</span></tt>, <tt class="docutils literal"><span class="pre">RAL</span></tt>, <tt class="docutils literal"><span class="pre">JPARC</span></tt>, and <tt class="docutils literal"><span class="pre">TRIUMF</span></tt> (inside a <tt class="docutils literal"><span class="pre">&lt;msr_file_defaults&gt;</span></tt> environment)</dd>
<dt><strong>&lt;file_format&gt;FF&lt;/file_format&gt;</strong></dt>
<dd>specify the default data file format <tt class="docutils literal"><span class="pre">FF</span></tt> here. Valid formats are <tt class="docutils literal"><span class="pre">NEXUS</span></tt>, <tt class="docutils literal"><span class="pre">MUSR-ROOT</span></tt>, <tt class="docutils literal"><span class="pre">ROOT-NPP</span></tt>, <tt class="docutils literal"><span class="pre">ROOT-PPC</span></tt>, <tt class="docutils literal"><span class="pre">PSI-BIN</span></tt>, <tt class="docutils literal"><span class="pre">PSI-MDU</span></tt>, <tt class="docutils literal"><span class="pre">MDU-ASCII</span></tt>, <tt class="docutils literal"><span class="pre">WKM</span></tt>, <tt class="docutils literal"><span class="pre">MUD</span></tt>, <tt class="docutils literal"><span class="pre">ASCII</span></tt>, and <tt class="docutils literal"><span class="pre">DB</span></tt> (inside a <tt class="docutils literal"><span class="pre">&lt;msr_file_defaults&gt;</span></tt> environment)</dd>
<dt><strong>&lt;lifetime_correction&gt;y/n&lt;/lifetime_correction&gt;</strong></dt>
<dd>choose if by default the <tt class="docutils literal"><span class="pre">lifetimecorrection</span></tt> option should be set (inside a <tt class="docutils literal"><span class="pre">&lt;msr_file_defaults&gt;</span></tt> environment)</dd>
<dt><strong>&lt;msr_file_defaults&gt;&lt;/msr_file_defaults&gt;</strong></dt><dd><p>put the default settings for newly created msr files in this environment</p>
<dl class="simple">
<dt><strong>&lt;beamline&gt;BL&lt;/beamline&gt;</strong></dt><dd><p>set the name of the muon beamline <code class="docutils literal notranslate"><span class="pre">BL</span></code> here (inside a <code class="docutils literal notranslate"><span class="pre">&lt;msr_file_defaults&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;institute&gt;INST&lt;/institute&gt;</strong></dt><dd><p>set the name of the facility <code class="docutils literal notranslate"><span class="pre">INST</span></code> where the beamline <code class="docutils literal notranslate"><span class="pre">BL</span></code> is located. Valid settings are <code class="docutils literal notranslate"><span class="pre">PSI</span></code>, <code class="docutils literal notranslate"><span class="pre">RAL</span></code>, <code class="docutils literal notranslate"><span class="pre">JPARC</span></code>, and <code class="docutils literal notranslate"><span class="pre">TRIUMF</span></code> (inside a <code class="docutils literal notranslate"><span class="pre">&lt;msr_file_defaults&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;file_format&gt;FF&lt;/file_format&gt;</strong></dt><dd><p>specify the default data file format <code class="docutils literal notranslate"><span class="pre">FF</span></code> here. Valid formats are <code class="docutils literal notranslate"><span class="pre">NEXUS</span></code>, <code class="docutils literal notranslate"><span class="pre">MUSR-ROOT</span></code>, <code class="docutils literal notranslate"><span class="pre">ROOT-NPP</span></code>, <code class="docutils literal notranslate"><span class="pre">ROOT-PPC</span></code>, <code class="docutils literal notranslate"><span class="pre">PSI-BIN</span></code>, <code class="docutils literal notranslate"><span class="pre">PSI-MDU</span></code>, <code class="docutils literal notranslate"><span class="pre">MDU-ASCII</span></code>, <code class="docutils literal notranslate"><span class="pre">WKM</span></code>, <code class="docutils literal notranslate"><span class="pre">MUD</span></code>, <code class="docutils literal notranslate"><span class="pre">ASCII</span></code>, and <code class="docutils literal notranslate"><span class="pre">DB</span></code> (inside a <code class="docutils literal notranslate"><span class="pre">&lt;msr_file_defaults&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;lifetime_correction&gt;y/n&lt;/lifetime_correction&gt;</strong></dt><dd><p>choose if by default the <code class="docutils literal notranslate"><span class="pre">lifetimecorrection</span></code> option should be set (inside a <code class="docutils literal notranslate"><span class="pre">&lt;msr_file_defaults&gt;</span></code> environment)</p>
</dd>
</dl>
</dd>
<dt><strong>&lt;msr2data_defaults&gt;&lt;/msr2data_defaults&gt;</strong></dt>
<dd><p class="first">define the default options for calling <a class="reference internal" href="msr2data.html#msr2data"><em>msr2data</em></a> in this environment; the options set here are ticked by default in the graphical interface of <tt class="docutils literal"><span class="pre">musredit</span></tt>.</p>
<dl class="last docutils">
<dt><strong>&lt;chain_fit&gt;y/n&lt;/chain_fit&gt;</strong></dt>
<dd>(un)set the chain fit (!) option (inside a <tt class="docutils literal"><span class="pre">&lt;msr2data_defaults&gt;</span></tt> environment)</dd>
<dt><strong>&lt;write_data_header&gt;y/n&lt;/write_data_header&gt;</strong></dt>
<dd>(un)set the noheader option (inside a <tt class="docutils literal"><span class="pre">&lt;msr2data_defaults&gt;</span></tt> environment)</dd>
<dt><strong>&lt;ignore_data_header_info&gt;y/n&lt;/ignore_data_header_info&gt;</strong></dt>
<dd>(un)set the nosummary option (inside a <tt class="docutils literal"><span class="pre">&lt;msr2data_defaults&gt;</span></tt> environment)</dd>
<dt><strong>&lt;keep_minuit2_output&gt;y/n&lt;/keep_minuit2_output&gt;</strong></dt>
<dd>(un)set the <tt class="docutils literal"><span class="pre">-k</span></tt> option (inside a <tt class="docutils literal"><span class="pre">&lt;msr2data_defaults&gt;</span></tt> environment)</dd>
<dt><strong>&lt;write_column_data&gt;y/n&lt;/write_column_data&gt;</strong></dt>
<dd>(un)set the <tt class="docutils literal"><span class="pre">data</span></tt> option (inside a <tt class="docutils literal"><span class="pre">&lt;msr2data_defaults&gt;</span></tt> environment)</dd>
<dt><strong>&lt;create_msr_file_only&gt;y/n&lt;/create_msr_file_only&gt;</strong></dt>
<dd>(un)set the <tt class="docutils literal"><span class="pre">msr</span></tt> option in case a template run is specified (inside a <tt class="docutils literal"><span class="pre">&lt;msr2data_defaults&gt;</span></tt> environment)</dd>
<dt><strong>&lt;fit_only&gt;y/n&lt;/fit_only&gt;</strong></dt>
<dd>(un)set the <tt class="docutils literal"><span class="pre">fit</span></tt> option in case no template run is specified (inside a <tt class="docutils literal"><span class="pre">&lt;msr2data_defaults&gt;</span></tt> environment)</dd>
<dt><strong>&lt;global&gt;y/n&lt;/global&gt;</strong></dt>
<dd>(un)set the <tt class="docutils literal"><span class="pre">global</span></tt> option (inside a <tt class="docutils literal"><span class="pre">&lt;msr2data_defaults&gt;</span></tt> environment)</dd>
<dt><strong>&lt;global_plus&gt;y/n&lt;/global_plus&gt;</strong></dt>
<dd>(un)set the <tt class="docutils literal"><span class="pre">global+</span></tt> option (inside a <tt class="docutils literal"><span class="pre">&lt;msr2data_defaults&gt;</span></tt> environment)</dd>
<dt><strong>&lt;recreate_data_file&gt;y/n&lt;/recreate_data_file&gt;</strong></dt>
<dd>(un)set the <tt class="docutils literal"><span class="pre">musredit</span></tt> option for recreating the output file (inside a <tt class="docutils literal"><span class="pre">&lt;msr2data_defaults&gt;</span></tt> environment)</dd>
<dt><strong>&lt;open_file_after_fitting&gt;y/n&lt;/open_file_after_fitting&gt;</strong></dt>
<dd>(un)set the <tt class="docutils literal"><span class="pre">musredit</span></tt> option for opening msr files after fitting (inside a <tt class="docutils literal"><span class="pre">&lt;msr2data_defaults&gt;</span></tt> environment)</dd>
<dt><strong>&lt;msr2data_defaults&gt;&lt;/msr2data_defaults&gt;</strong></dt><dd><p>define the default options for calling <a class="reference internal" href="msr2data.html#msr2data"><span class="std std-ref">msr2data</span></a> in this environment; the options set here are ticked by default in the graphical interface of <code class="docutils literal notranslate"><span class="pre">musredit</span></code>.</p>
<dl class="simple">
<dt><strong>&lt;chain_fit&gt;y/n&lt;/chain_fit&gt;</strong></dt><dd><p>(un)set the chain fit (!) option (inside a <code class="docutils literal notranslate"><span class="pre">&lt;msr2data_defaults&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;write_data_header&gt;y/n&lt;/write_data_header&gt;</strong></dt><dd><p>(un)set the noheader option (inside a <code class="docutils literal notranslate"><span class="pre">&lt;msr2data_defaults&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;ignore_data_header_info&gt;y/n&lt;/ignore_data_header_info&gt;</strong></dt><dd><p>(un)set the nosummary option (inside a <code class="docutils literal notranslate"><span class="pre">&lt;msr2data_defaults&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;keep_minuit2_output&gt;y/n&lt;/keep_minuit2_output&gt;</strong></dt><dd><p>(un)set the <code class="docutils literal notranslate"><span class="pre">-k</span></code> option (inside a <code class="docutils literal notranslate"><span class="pre">&lt;msr2data_defaults&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;write_column_data&gt;y/n&lt;/write_column_data&gt;</strong></dt><dd><p>(un)set the <code class="docutils literal notranslate"><span class="pre">data</span></code> option (inside a <code class="docutils literal notranslate"><span class="pre">&lt;msr2data_defaults&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;create_msr_file_only&gt;y/n&lt;/create_msr_file_only&gt;</strong></dt><dd><p>(un)set the <code class="docutils literal notranslate"><span class="pre">msr</span></code> option in case a template run is specified (inside a <code class="docutils literal notranslate"><span class="pre">&lt;msr2data_defaults&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;fit_only&gt;y/n&lt;/fit_only&gt;</strong></dt><dd><p>(un)set the <code class="docutils literal notranslate"><span class="pre">fit</span></code> option in case no template run is specified (inside a <code class="docutils literal notranslate"><span class="pre">&lt;msr2data_defaults&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;global&gt;y/n&lt;/global&gt;</strong></dt><dd><p>(un)set the <code class="docutils literal notranslate"><span class="pre">global</span></code> option (inside a <code class="docutils literal notranslate"><span class="pre">&lt;msr2data_defaults&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;global_plus&gt;y/n&lt;/global_plus&gt;</strong></dt><dd><p>(un)set the <code class="docutils literal notranslate"><span class="pre">global+</span></code> option (inside a <code class="docutils literal notranslate"><span class="pre">&lt;msr2data_defaults&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;recreate_data_file&gt;y/n&lt;/recreate_data_file&gt;</strong></dt><dd><p>(un)set the <code class="docutils literal notranslate"><span class="pre">musredit</span></code> option for recreating the output file (inside a <code class="docutils literal notranslate"><span class="pre">&lt;msr2data_defaults&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;open_file_after_fitting&gt;y/n&lt;/open_file_after_fitting&gt;</strong></dt><dd><p>(un)set the <code class="docutils literal notranslate"><span class="pre">musredit</span></code> option for opening msr files after fitting (inside a <code class="docutils literal notranslate"><span class="pre">&lt;msr2data_defaults&gt;</span></code> environment)</p>
</dd>
</dl>
</dd>
</dl>
<p>Additionally, there are some settings defined in this XML file which should be only changed by experienced users who like to add new features to <tt class="docutils literal"><span class="pre">musredit</span></tt>:</p>
<dl class="docutils">
<dt><strong>&lt;help_section&gt;&lt;/help_section&gt;</strong></dt>
<dd><p class="first">define various help messages in this environment</p>
<dl class="last docutils">
<dt><strong>&lt;musr_web_X&gt;LINK&lt;/musr_web_X&gt;</strong></dt>
<dd>define the <tt class="docutils literal"><span class="pre">LINK</span></tt> to the help page <tt class="docutils literal"><span class="pre">musr_web_X</span></tt>, where <tt class="docutils literal"><span class="pre">X</span></tt> is <tt class="docutils literal"><span class="pre">main</span></tt>, <tt class="docutils literal"><span class="pre">title</span></tt>, <tt class="docutils literal"><span class="pre">parameters</span></tt>, <tt class="docutils literal"><span class="pre">theory</span></tt>, <tt class="docutils literal"><span class="pre">functions</span></tt>, <tt class="docutils literal"><span class="pre">run</span></tt>,
<tt class="docutils literal"><span class="pre">command</span></tt>, <tt class="docutils literal"><span class="pre">fourier</span></tt>, <tt class="docutils literal"><span class="pre">plot</span></tt>, <tt class="docutils literal"><span class="pre">statistics</span></tt>, <tt class="docutils literal"><span class="pre">msr2data</span></tt>, or <tt class="docutils literal"><span class="pre">musrFT</span></tt> (inside a <tt class="docutils literal"><span class="pre">&lt;help_section&gt;</span></tt> environment)</dd>
<p>Additionally, there are some settings defined in this XML file which should be only changed by experienced users who like to add new features to <code class="docutils literal notranslate"><span class="pre">musredit</span></code>:</p>
<dl>
<dt><strong>&lt;help_section&gt;&lt;/help_section&gt;</strong></dt><dd><p>define various help messages in this environment</p>
<dl class="simple">
<dt><strong>&lt;musr_web_X&gt;LINK&lt;/musr_web_X&gt;</strong></dt><dd><p>define the <code class="docutils literal notranslate"><span class="pre">LINK</span></code> to the help page <code class="docutils literal notranslate"><span class="pre">musr_web_X</span></code>, where <code class="docutils literal notranslate"><span class="pre">X</span></code> is <code class="docutils literal notranslate"><span class="pre">main</span></code>, <code class="docutils literal notranslate"><span class="pre">title</span></code>, <code class="docutils literal notranslate"><span class="pre">parameters</span></code>, <code class="docutils literal notranslate"><span class="pre">theory</span></code>, <code class="docutils literal notranslate"><span class="pre">functions</span></code>, <code class="docutils literal notranslate"><span class="pre">run</span></code>,
<code class="docutils literal notranslate"><span class="pre">command</span></code>, <code class="docutils literal notranslate"><span class="pre">fourier</span></code>, <code class="docutils literal notranslate"><span class="pre">plot</span></code>, <code class="docutils literal notranslate"><span class="pre">statistics</span></code>, <code class="docutils literal notranslate"><span class="pre">msr2data</span></code>, or <code class="docutils literal notranslate"><span class="pre">musrFT</span></code> (inside a <code class="docutils literal notranslate"><span class="pre">&lt;help_section&gt;</span></code> environment)</p>
</dd>
</dl>
</dd>
<dt><strong>&lt;func_pixmap_path&gt;PIX_PATH&lt;/func_pixmap_path&gt;</strong></dt>
<dd>set the path <tt class="docutils literal"><span class="pre">PIX_PATH</span></tt> to LaTeX pixmaps visualizing the various supported theory functions</dd>
<dt><strong>&lt;theory_functions&gt;&lt;/theory_functions&gt;</strong></dt>
<dd><p class="first">define the functions for a msr file&#8217;s <a class="reference internal" href="user-manual.html#msr-theory-block"><em>THEORY block</em></a> according to the correct syntax in this environment</p>
<dl class="last docutils">
<dt><strong>&lt;func&gt;&lt;/func&gt;</strong></dt>
<dd><p class="first">specify a function here (inside a <tt class="docutils literal"><span class="pre">&lt;theory_functions&gt;</span></tt> environment)</p>
<dl class="last docutils">
<dt><strong>&lt;name&gt;NAME&lt;/name&gt;</strong></dt>
<dd>the <tt class="docutils literal"><span class="pre">NAME</span></tt> of the function in the msr file (inside a <tt class="docutils literal"><span class="pre">&lt;func&gt;</span></tt> environment)</dd>
<dt><strong>&lt;comment&gt;COMMENT&lt;/comment&gt;</strong></dt>
<dd>description of the used parameters (inside a <tt class="docutils literal"><span class="pre">&lt;func&gt;</span></tt> environment)</dd>
<dt><strong>&lt;label&gt;LABEL&lt;/label&gt;</strong></dt>
<dd><tt class="docutils literal"><span class="pre">LABEL</span></tt> of the function in the <tt class="docutils literal"><span class="pre">musredit</span></tt> menu (inside a <tt class="docutils literal"><span class="pre">&lt;func&gt;</span></tt> environment)</dd>
<dt><strong>&lt;pixmap&gt;PIXMAP&lt;/pixmap&gt;</strong></dt>
<dd>LaTeX picture used to describe the function and stored in the <tt class="docutils literal"><span class="pre">PIX_PATH</span></tt> (inside a <tt class="docutils literal"><span class="pre">&lt;func&gt;</span></tt> environment)</dd>
<dt><strong>&lt;params&gt;N&lt;/params&gt;</strong></dt>
<dd>number of parameters <tt class="docutils literal"><span class="pre">N</span></tt> used by the function (inside a <tt class="docutils literal"><span class="pre">&lt;func&gt;</span></tt> environment)</dd>
<dt><strong>&lt;func_pixmap_path&gt;PIX_PATH&lt;/func_pixmap_path&gt;</strong></dt><dd><p>set the path <code class="docutils literal notranslate"><span class="pre">PIX_PATH</span></code> to LaTeX pixmaps visualizing the various supported theory functions</p>
</dd>
<dt><strong>&lt;theory_functions&gt;&lt;/theory_functions&gt;</strong></dt><dd><p>define the functions for a msr files <a class="reference internal" href="user-manual.html#msr-theory-block"><span class="std std-ref">THEORY block</span></a> according to the correct syntax in this environment</p>
<dl>
<dt><strong>&lt;func&gt;&lt;/func&gt;</strong></dt><dd><p>specify a function here (inside a <code class="docutils literal notranslate"><span class="pre">&lt;theory_functions&gt;</span></code> environment)</p>
<dl class="simple">
<dt><strong>&lt;name&gt;NAME&lt;/name&gt;</strong></dt><dd><p>the <code class="docutils literal notranslate"><span class="pre">NAME</span></code> of the function in the msr file (inside a <code class="docutils literal notranslate"><span class="pre">&lt;func&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;comment&gt;COMMENT&lt;/comment&gt;</strong></dt><dd><p>description of the used parameters (inside a <code class="docutils literal notranslate"><span class="pre">&lt;func&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;label&gt;LABEL&lt;/label&gt;</strong></dt><dd><p><code class="docutils literal notranslate"><span class="pre">LABEL</span></code> of the function in the <code class="docutils literal notranslate"><span class="pre">musredit</span></code> menu (inside a <code class="docutils literal notranslate"><span class="pre">&lt;func&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;pixmap&gt;PIXMAP&lt;/pixmap&gt;</strong></dt><dd><p>LaTeX picture used to describe the function and stored in the <code class="docutils literal notranslate"><span class="pre">PIX_PATH</span></code> (inside a <code class="docutils literal notranslate"><span class="pre">&lt;func&gt;</span></code> environment)</p>
</dd>
<dt><strong>&lt;params&gt;N&lt;/params&gt;</strong></dt><dd><p>number of parameters <code class="docutils literal notranslate"><span class="pre">N</span></code> used by the function (inside a <code class="docutils literal notranslate"><span class="pre">&lt;func&gt;</span></code> environment)</p>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
<p>An example of the <tt class="docutils literal"><span class="pre">musredit_startup.xml</span></tt> looks like:</p>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
<p>An example of the <code class="docutils literal notranslate"><span class="pre">musredit_startup.xml</span></code> looks like:</p>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
<span class="nt">&lt;musredit_startup</span> <span class="na">xmlns=</span><span class="s">&quot;http://lmu.web.psi.ch/musrfit/user/MUSR/MusrGui.html&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;comment&gt;</span>
This is handling default setting parameters for the musredit.
@ -285,196 +267,196 @@ a negative number will keep the <tt class="docutils literal"><span class="pre">m
</div>
<div class="section" id="musredit-features">
<span id="index-2"></span><h2>musredit Features<a class="headerlink" href="#musredit-features" title="Permalink to this headline"></a></h2>
<p>The features of <tt class="docutils literal"><span class="pre">musrfit</span></tt> which can be accessed by the graphical front ends <tt class="docutils literal"><span class="pre">musredit</span></tt> will be described in the following. All functions
<p>The features of <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> which can be accessed by the graphical front ends <code class="docutils literal notranslate"><span class="pre">musredit</span></code> will be described in the following. All functions
can either be called by choosing them from the <em>MusrFit menu</em>, by clicking the respective button in the <em>MusrFit bar</em>, or by using a <em>keyboard shortcut</em>.</p>
<p><strong>musrWiz</strong></p>
<blockquote>
<div><img src="_images/musrWiz.svg" /><p><tt class="docutils literal"><span class="pre">musrWiz</span></tt> is a helper programs which allows to create a msr-file from scratch without too much a priori knowledge. For details see <a class="reference internal" href="#musrwiz"><em>musrWiz</em></a>.</p>
<div><img alt="_images/musrWiz.svg" src="_images/musrWiz.svg" /><p><code class="docutils literal notranslate"><span class="pre">musrWiz</span></code> is a helper programs which allows to create a msr-file from scratch without too much a priori knowledge. For details see <a class="reference internal" href="#musrwiz"><span class="std std-ref">musrWiz</span></a>.</p>
</div></blockquote>
<p id="musrwiz"><span id="index-3"></span><strong>Calculate Chisq</strong></p>
<blockquote>
<div><img src="_images/musrchisq.svg" /><p>Calls <tt class="docutils literal"><span class="pre">musrfit</span></tt> with the option <tt class="docutils literal"><span class="pre">-c</span></tt>, <em>i.e.</em> calculates the <span class="math">\(\chi^2\)</span> or log max-likelihood for the active msr file tab. Shortcut-key: <tt class="docutils literal"><span class="pre">Alt+C</span></tt>.
<div><img alt="_images/musrchisq.svg" src="_images/musrchisq.svg" /><p>Calls <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> with the option <code class="docutils literal notranslate"><span class="pre">-c</span></code>, <em>i.e.</em> calculates the <span class="math notranslate nohighlight">\(\chi^2\)</span> or log max-likelihood for the active msr file tab. Shortcut-key: <code class="docutils literal notranslate"><span class="pre">Alt+C</span></code>.
The equivalent call on the command line would be</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ musrfit -c &lt;msr-file&gt;
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ musrfit -c &lt;msr-file&gt;
</pre></div>
</div>
</div></blockquote>
<p><strong>Fit</strong></p>
<blockquote>
<div><img src="_images/musrfit.svg" /><p>Calls <tt class="docutils literal"><span class="pre">musrfit</span></tt> for fitting of the active msr file in the currently active tab. Shortcut-key: <tt class="docutils literal"><span class="pre">Alt+F</span></tt>.
<div><img alt="_images/musrfit.svg" src="_images/musrfit.svg" /><p>Calls <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> for fitting of the active msr file in the currently active tab. Shortcut-key: <code class="docutils literal notranslate"><span class="pre">Alt+F</span></code>.
The equivalent call on the command line could look like</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ musrfit &lt;msr-file&gt; <span class="o">[</span>optional parameters<span class="o">]</span>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ musrfit &lt;msr-file&gt; <span class="o">[</span>optional parameters<span class="o">]</span>
</pre></div>
</div>
<p>The optional parameters may be chosen under <a class="reference internal" href="#musredit-prefs"><em>Preferences</em></a>. For further information refer to the manual of <a class="reference internal" href="user-manual.html#user-manual"><em>musrfit</em></a>.</p>
<p>The optional parameters may be chosen under <a class="reference internal" href="#musredit-prefs"><span class="std std-ref">Preferences</span></a>. For further information refer to the manual of <a class="reference internal" href="user-manual.html#user-manual"><span class="std std-ref">musrfit</span></a>.</p>
</div></blockquote>
<p><strong>Swap Msr &lt;-&gt; Mlog</strong></p>
<blockquote>
<div><img src="_images/musrswap.svg" /><p>Swap the msr and mlog files. <em>E.g.</em>, for a file called <tt class="docutils literal"><span class="pre">8472_zf.msr</span></tt>, this is copied to <tt class="docutils literal"><span class="pre">8472_zf.mlog</span></tt> and vice versa. Shortcut-key: <tt class="docutils literal"><span class="pre">Alt+S</span></tt>.</p>
<div><img alt="_images/musrswap.svg" src="_images/musrswap.svg" /><p>Swap the msr and mlog files. <em>E.g.</em>, for a file called <code class="docutils literal notranslate"><span class="pre">8472_zf.msr</span></code>, this is copied to <code class="docutils literal notranslate"><span class="pre">8472_zf.mlog</span></code> and vice versa. Shortcut-key: <code class="docutils literal notranslate"><span class="pre">Alt+S</span></code>.</p>
</div></blockquote>
<p><strong>Set Steps</strong></p>
<blockquote>
<div><img src="_images/musrStep.svg" /><p><tt class="docutils literal"><span class="pre">musrStep</span></tt> allows to adjust the step size, <em>i.e.</em> the initial steps for the fitter. Shortcut-key: <tt class="docutils literal"><span class="pre">Alt+P</span></tt>.</p>
<div><img alt="_images/musrStep.svg" src="_images/musrStep.svg" /><p><code class="docutils literal notranslate"><span class="pre">musrStep</span></code> allows to adjust the step size, <em>i.e.</em> the initial steps for the fitter. Shortcut-key: <code class="docutils literal notranslate"><span class="pre">Alt+P</span></code>.</p>
</div></blockquote>
<p><strong>Msr2Data</strong></p>
<blockquote>
<div><img src="_images/msr2data.svg" /><p>Opens a graphical interface to the <tt class="docutils literal"><span class="pre">msr2data</span></tt> program described in detail in its <a class="reference internal" href="msr2data.html#msr2data"><em>own manual</em></a>. Shortcut-key: <tt class="docutils literal"><span class="pre">Alt+2</span></tt>.</p>
<div><img alt="_images/msr2data.svg" src="_images/msr2data.svg" /><p>Opens a graphical interface to the <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> program described in detail in its <a class="reference internal" href="msr2data.html#msr2data"><span class="std std-ref">own manual</span></a>. Shortcut-key: <code class="docutils literal notranslate"><span class="pre">Alt+2</span></code>.</p>
</div></blockquote>
<p><strong>mupp</strong></p>
<blockquote>
<div><img src="_images/mupp.svg" /><p>Application which allows to plot <tt class="docutils literal"><span class="pre">*.db</span></tt> and <tt class="docutils literal"><span class="pre">*.dat</span></tt> parameter files. Shortcut-key: <tt class="docutils literal"><span class="pre">Alt+U</span></tt>.
For a detailed description see the <a class="reference internal" href="mupp.html#mupp"><em>mupp docu</em></a>.</p>
<div><img alt="_images/mupp.svg" src="_images/mupp.svg" /><p>Application which allows to plot <code class="docutils literal notranslate"><span class="pre">*.db</span></code> and <code class="docutils literal notranslate"><span class="pre">*.dat</span></code> parameter files. Shortcut-key: <code class="docutils literal notranslate"><span class="pre">Alt+U</span></code>.
For a detailed description see the <a class="reference internal" href="mupp.html#mupp"><span class="std std-ref">mupp docu</span></a>.</p>
</div></blockquote>
<p><strong>View</strong></p>
<blockquote>
<div><img src="_images/musrview.svg" /><p>Calls <tt class="docutils literal"><span class="pre">musrview</span></tt> from the active tab of <tt class="docutils literal"><span class="pre">musredit</span></tt>. For more details see the <a class="reference internal" href="user-manual.html#musrview"><em>musrview</em></a> docu. Shortcut-key: <tt class="docutils literal"><span class="pre">Alt+V</span></tt>.
<div><img alt="_images/musrview.svg" src="_images/musrview.svg" /><p>Calls <code class="docutils literal notranslate"><span class="pre">musrview</span></code> from the active tab of <code class="docutils literal notranslate"><span class="pre">musredit</span></code>. For more details see the <a class="reference internal" href="user-manual.html#musrview"><span class="std std-ref">musrview</span></a> docu. Shortcut-key: <code class="docutils literal notranslate"><span class="pre">Alt+V</span></code>.
The equivalent call on the command line could look like</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ musrview &lt;msr-file&gt; <span class="o">[</span>optional parameters<span class="o">]</span>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ musrview &lt;msr-file&gt; <span class="o">[</span>optional parameters<span class="o">]</span>
</pre></div>
</div>
</div></blockquote>
<p><strong>T0</strong></p>
<blockquote>
<div><img src="_images/musrt0-icon.svg" /><p>Calls <tt class="docutils literal"><span class="pre">musrt0</span></tt> which allows to set the <tt class="docutils literal"><span class="pre">T0</span></tt> values for all the runs. For more details see the <a class="reference internal" href="user-manual.html#musrt0"><em>musrt0</em></a> docu.
<div><img alt="_images/musrt0-icon.svg" src="_images/musrt0-icon.svg" /><p>Calls <code class="docutils literal notranslate"><span class="pre">musrt0</span></code> which allows to set the <code class="docutils literal notranslate"><span class="pre">T0</span></code> values for all the runs. For more details see the <a class="reference internal" href="user-manual.html#musrt0"><span class="std std-ref">musrt0</span></a> docu.
The equivalent call on the command line could look like</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ musrt0 &lt;msr-file&gt; <span class="o">[</span>optional parameters<span class="o">]</span>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ musrt0 &lt;msr-file&gt; <span class="o">[</span>optional parameters<span class="o">]</span>
</pre></div>
</div>
</div></blockquote>
<p><strong>Raw Fourier</strong></p>
<blockquote>
<div><img src="_images/musrFT.svg" /><p>Calls <tt class="docutils literal"><span class="pre">musrFT</span></tt> which allows to perform a Fourier transform of the raw data. For more details see the <a class="reference internal" href="user-manual.html#musrft"><em>musrFT</em></a> docu.
<div><img alt="_images/musrFT.svg" src="_images/musrFT.svg" /><p>Calls <code class="docutils literal notranslate"><span class="pre">musrFT</span></code> which allows to perform a Fourier transform of the raw data. For more details see the <a class="reference internal" href="user-manual.html#musrft"><span class="std std-ref">musrFT</span></a> docu.
The equivalent call on the command line could look like</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ musrFT &lt;msr-file&gt; <span class="o">[</span>optional parameters<span class="o">]</span>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ musrFT &lt;msr-file&gt; <span class="o">[</span>optional parameters<span class="o">]</span>
</pre></div>
</div>
</div></blockquote>
<p id="musredit-prefs"><strong>Preferences</strong></p>
<blockquote>
<div><img src="_images/musrprefs.svg" /><p>Opens a window in which the optional parameters that should be passed to musrfit can be chosen.
For further information refer to the manual of <a class="reference internal" href="user-manual.html#musrfit"><em>musrfit</em></a>.</p>
<div><img alt="_images/musrprefs.svg" src="_images/musrprefs.svg" /><p>Opens a window in which the optional parameters that should be passed to musrfit can be chosen.
For further information refer to the manual of <a class="reference internal" href="user-manual.html#musrfit"><span class="std std-ref">musrfit</span></a>.</p>
</div></blockquote>
<p><strong>Dump Header</strong></p>
<blockquote>
<div><img src="_images/musrdump.svg" /><p>Opens a file dialog which allows to select a μSR data file. When this file can be read, the run header info is dumped into a dialog window.
Essentially this calls <tt class="docutils literal"><span class="pre">dump_header</span></tt> internally.</p>
<div><img alt="_images/musrdump.svg" src="_images/musrdump.svg" /><p>Opens a file dialog which allows to select a μSR data file. When this file can be read, the run header info is dumped into a dialog window.
Essentially this calls <code class="docutils literal notranslate"><span class="pre">dump_header</span></code> internally.</p>
</div></blockquote>
</div>
<div class="section" id="id1">
<h2>musrWiz<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h2>
<p><tt class="docutils literal"><span class="pre">musrWiz</span></tt> is a helper program which allows to easily create the necessary msr-file needed as an input for <tt class="docutils literal"><span class="pre">musrfit</span></tt>.
<tt class="docutils literal"><span class="pre">musrWiz</span></tt> is still in it&#8217;s early stage; not all options are already implemented and here and there you will likely find some bugs.
From <tt class="docutils literal"><span class="pre">musredit</span></tt> it can be accessed via the MusrFit menu or the wand</p>
<img src="_images/musredit-musrWiz.svg" /><p>The <tt class="docutils literal"><span class="pre">musrWiz</span></tt> GUI is organized in a couple of different dialogues which some information needs to be provided by the user.
<p><code class="docutils literal notranslate"><span class="pre">musrWiz</span></code> is a helper program which allows to easily create the necessary msr-file needed as an input for <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>.
<code class="docutils literal notranslate"><span class="pre">musrWiz</span></code> is still in its early stage; not all options are already implemented and here and there you will likely find some bugs.
From <code class="docutils literal notranslate"><span class="pre">musredit</span></code> it can be accessed via the MusrFit menu or the wand</p>
<img alt="_images/musredit-musrWiz.svg" src="_images/musredit-musrWiz.svg" /><p>The <code class="docutils literal notranslate"><span class="pre">musrWiz</span></code> GUI is organized in a couple of different dialogues which some information needs to be provided by the user.
In the following these different dialogues will be discussed briefly.</p>
<div class="section" id="musrwiz-introduction">
<span id="index-4"></span><h3>musrWiz-Introduction<a class="headerlink" href="#musrwiz-introduction" title="Permalink to this headline"></a></h3>
<p>The introduction dialogue</p>
<img src="_images/musrWiz-Intro.svg" /><ol class="arabic simple">
<li>an explicit msr-file name can be provided here. More often the msr-file name is generated out of the run number.</li>
<li>year of the run data.</li>
<li>run number. If no explicit msr-file is provided, the run number together with fit type and type of measurement will be used to generate the msr-file name.</li>
<li>from the pull down menu the institute (for which a necessary <tt class="docutils literal"><span class="pre">xml</span></tt>-file is provided) has to be choosen.</li>
<li>from the pull down menu the the instrument can be chosen.</li>
<li>the fit type has to be chosen. Possible fit types are: <tt class="docutils literal"><span class="pre">Single</span> <span class="pre">Histo</span></tt> / <tt class="docutils literal"><span class="pre">Single</span> <span class="pre">Histo</span> <span class="pre">RRF</span></tt> / <tt class="docutils literal"><span class="pre">Asymmetry</span></tt> / <tt class="docutils literal"><span class="pre">Asymmetry</span> <span class="pre">RRF</span></tt> / <tt class="docutils literal"><span class="pre">Mu</span> <span class="pre">Minus</span></tt> / <tt class="docutils literal"><span class="pre">None</span> <span class="pre">muSR</span></tt></li>
<li>type of measurement is essentially needed for the grouping of the detectors. Possible are: <tt class="docutils literal"><span class="pre">ZF</span></tt> for zero field measurements / <tt class="docutils literal"><span class="pre">TF</span></tt> for transverse field measurements / <tt class="docutils literal"><span class="pre">LF</span></tt> for longitudinal field measurements.
Depending on the choice and instrument some additional question might be asked, <em>e.g.</em> which magnet has been used.</li>
<li><tt class="docutils literal"><span class="pre">T0</span></tt>&#8216;s: this last menu defines from where to get the t0&#8217;s. The options are: <tt class="docutils literal"><span class="pre">from</span> <span class="pre">data</span> <span class="pre">file</span></tt>, <em>i.e.</em> the t0 are assumed to be correctly set
in the provided data file <tt class="docutils literal"><span class="pre">call</span> <span class="pre">musrT0</span></tt>, <em>i.e.</em> after the msr-file is generated, <tt class="docutils literal"><span class="pre">musrt0</span></tt> will be called which allows the user to find the
proper t0 from the prompt peak <tt class="docutils literal"><span class="pre">enter</span> <span class="pre">here</span></tt> will provide a pop-up menu where the t0 parameter can be given explicitly.</li>
<img alt="_images/musrWiz-Intro.svg" src="_images/musrWiz-Intro.svg" /><ol class="arabic simple">
<li><p>an explicit msr-file name can be provided here. More often the msr-file name is generated out of the run number.</p></li>
<li><p>year of the run data.</p></li>
<li><p>run number. If no explicit msr-file is provided, the run number together with fit type and type of measurement will be used to generate the msr-file name.</p></li>
<li><p>from the pull down menu the institute (for which a necessary <code class="docutils literal notranslate"><span class="pre">xml</span></code>-file is provided) has to be choosen.</p></li>
<li><p>from the pull down menu the the instrument can be chosen.</p></li>
<li><p>the fit type has to be chosen. Possible fit types are: <code class="docutils literal notranslate"><span class="pre">Single</span> <span class="pre">Histo</span></code> / <code class="docutils literal notranslate"><span class="pre">Single</span> <span class="pre">Histo</span> <span class="pre">RRF</span></code> / <code class="docutils literal notranslate"><span class="pre">Asymmetry</span></code> / <code class="docutils literal notranslate"><span class="pre">Asymmetry</span> <span class="pre">RRF</span></code> / <code class="docutils literal notranslate"><span class="pre">Mu</span> <span class="pre">Minus</span></code> / <code class="docutils literal notranslate"><span class="pre">None</span> <span class="pre">muSR</span></code></p></li>
<li><p>type of measurement is essentially needed for the grouping of the detectors. Possible are: <code class="docutils literal notranslate"><span class="pre">ZF</span></code> for zero field measurements / <code class="docutils literal notranslate"><span class="pre">TF</span></code> for transverse field measurements / <code class="docutils literal notranslate"><span class="pre">LF</span></code> for longitudinal field measurements.
Depending on the choice and instrument some additional question might be asked, <em>e.g.</em> which magnet has been used.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">T0</span></code>s: this last menu defines from where to get the t0s. The options are: <code class="docutils literal notranslate"><span class="pre">from</span> <span class="pre">data</span> <span class="pre">file</span></code>, <em>i.e.</em> the t0 are assumed to be correctly set
in the provided data file <code class="docutils literal notranslate"><span class="pre">call</span> <span class="pre">musrT0</span></code>, <em>i.e.</em> after the msr-file is generated, <code class="docutils literal notranslate"><span class="pre">musrt0</span></code> will be called which allows the user to find the
proper t0 from the prompt peak <code class="docutils literal notranslate"><span class="pre">enter</span> <span class="pre">here</span></code> will provide a pop-up menu where the t0 parameter can be given explicitly.</p></li>
</ol>
<p>If all this information have been provided <tt class="docutils literal"><span class="pre">Next&gt;</span></tt> will lead you the the theory dialogue.</p>
<p>If all this information have been provided <code class="docutils literal notranslate"><span class="pre">Next&gt;</span></code> will lead you the the theory dialogue.</p>
</div>
<div class="section" id="musrwiz-theory">
<span id="index-5"></span><h3>musrWiz - Theory<a class="headerlink" href="#musrwiz-theory" title="Permalink to this headline"></a></h3>
<p>The theory dialogue is used to define the fitting function. There are two ways of using it:</p>
<ol class="arabic simple">
<li>choose a template theory function. This option has the advantage that the next steps will be very easy because
<li><p>choose a template theory function. This option has the advantage that the next steps will be very easy because
within the template almost everything is already pre-defined. The disadvantage is that you are not free in setting
up your theory function as you would like to have.</li>
<li>freely write your theory function. The advantage here is that you can customize your theory function at your needs.
This will come at the cost that you also will need to define <tt class="docutils literal"><span class="pre">maps</span></tt>, <tt class="docutils literal"><span class="pre">functions</span></tt>, etc. yourself. The good thing
though is that at the very end you can save this as a template for future re-use.</li>
up your theory function as you would like to have.</p></li>
<li><p>freely write your theory function. The advantage here is that you can customize your theory function at your needs.
This will come at the cost that you also will need to define <code class="docutils literal notranslate"><span class="pre">maps</span></code>, <code class="docutils literal notranslate"><span class="pre">functions</span></code>, etc. yourself. The good thing
though is that at the very end you can save this as a template for future re-use.</p></li>
</ol>
<p>First the template path will be described. The theory dialogue looks like this</p>
<img src="_images/musrWiz-Theory.svg" /><ol class="arabic simple">
<li>This is a text edit field were you can enter the theory fit function as you would like to have it. In the example
given the theory reads <span class="math">\(p1 \exp(-p2\, t) \cos(2 \pi\, f1 + m1)\)</span>, where <tt class="docutils literal"><span class="pre">pX</span></tt> stands for parameter, <tt class="docutils literal"><span class="pre">fX</span></tt> for function,
<tt class="docutils literal"><span class="pre">mX</span></tt> for map, and <tt class="docutils literal"><span class="pre">X</span></tt> for the corresponding number.</li>
<li>The <tt class="docutils literal"><span class="pre">Clear</span> <span class="pre">All</span></tt> button will clear whatever you entered in the text field above.</li>
<li>This pull-down menu allows to select a theory function which will be added to the text field above by pressing
the <tt class="docutils literal"><span class="pre">Add</span></tt> button. Pre defined theory function starting with a <tt class="docutils literal"><span class="pre">T</span></tt> are templates rather than only theory function strings.</li>
<li>The <tt class="docutils literal"><span class="pre">Add</span></tt> button is used to add the chosen theory function / template from the pull-down menu to its left.</li>
<li>The <tt class="docutils literal"><span class="pre">Check</span></tt> button is used to make a syntactical check of whatever is written in the text edit field.</li>
<img alt="_images/musrWiz-Theory.svg" src="_images/musrWiz-Theory.svg" /><ol class="arabic simple">
<li><p>This is a text edit field were you can enter the theory fit function as you would like to have it. In the example
given the theory reads <span class="math notranslate nohighlight">\(p1 \exp(-p2\, t) \cos(2 \pi\, f1 + m1)\)</span>, where <code class="docutils literal notranslate"><span class="pre">pX</span></code> stands for parameter, <code class="docutils literal notranslate"><span class="pre">fX</span></code> for function,
<code class="docutils literal notranslate"><span class="pre">mX</span></code> for map, and <code class="docutils literal notranslate"><span class="pre">X</span></code> for the corresponding number.</p></li>
<li><p>The <code class="docutils literal notranslate"><span class="pre">Clear</span> <span class="pre">All</span></code> button will clear whatever you entered in the text field above.</p></li>
<li><p>This pull-down menu allows to select a theory function which will be added to the text field above by pressing
the <code class="docutils literal notranslate"><span class="pre">Add</span></code> button. Pre defined theory function starting with a <code class="docutils literal notranslate"><span class="pre">T</span></code> are templates rather than only theory function strings.</p></li>
<li><p>The <code class="docutils literal notranslate"><span class="pre">Add</span></code> button is used to add the chosen theory function / template from the pull-down menu to its left.</p></li>
<li><p>The <code class="docutils literal notranslate"><span class="pre">Check</span></code> button is used to make a syntactical check of whatever is written in the text edit field.</p></li>
</ol>
</div>
<div class="section" id="musrwiz-functions">
<span id="index-6"></span><h3>musrWiz - Functions<a class="headerlink" href="#musrwiz-functions" title="Permalink to this headline"></a></h3>
<p>In the Functions dialogue all the necessary functions can be entered. A function operates <em>only</em> on fitting parameters.
This is different to the theory function which operates on the fitting parameters and the time. The dialogue looks like this</p>
<img src="_images/musrWiz-Functions.svg" /><ol class="arabic simple">
<li>a text edit field in which the various needed functions can be entered. In case a template theory is used, the appropriate function should be shown here and <em>no</em> editing will be needed here.</li>
<li>pressing <tt class="docutils literal"><span class="pre">Show</span> <span class="pre">Theory</span></tt> button will pop-up a little window showing the previously entered theory function. This is handy when defining its own theory, <em>i.e.</em> not working with a template.</li>
<img alt="_images/musrWiz-Functions.svg" src="_images/musrWiz-Functions.svg" /><ol class="arabic simple">
<li><p>a text edit field in which the various needed functions can be entered. In case a template theory is used, the appropriate function should be shown here and <em>no</em> editing will be needed here.</p></li>
<li><p>pressing <code class="docutils literal notranslate"><span class="pre">Show</span> <span class="pre">Theory</span></code> button will pop-up a little window showing the previously entered theory function. This is handy when defining its own theory, <em>i.e.</em> not working with a template.</p></li>
</ol>
<img src="_images/musrWiz-Functions-and-Theory.svg" /></div>
<img alt="_images/musrWiz-Functions-and-Theory.svg" src="_images/musrWiz-Functions-and-Theory.svg" /></div>
<div class="section" id="musrwiz-maps">
<span id="index-7"></span><h3>musrWiz - Maps<a class="headerlink" href="#musrwiz-maps" title="Permalink to this headline"></a></h3>
<img src="_images/musrWiz-Maps.svg" /><p>The map dialogue will list the maps previously used in the theory and functions blocks/dialogues before. Again, if a template is used, nothing needs to be entered here.</p>
<img alt="_images/musrWiz-Maps.svg" src="_images/musrWiz-Maps.svg" /><p>The map dialogue will list the maps previously used in the theory and functions blocks/dialogues before. Again, if a template is used, nothing needs to be entered here.</p>
<ol class="arabic simple">
<li>The <tt class="docutils literal"><span class="pre">Show</span> <span class="pre">Theory</span></tt> button allows to show the currently defined theory and the functions.</li>
<li><p>The <code class="docutils literal notranslate"><span class="pre">Show</span> <span class="pre">Theory</span></code> button allows to show the currently defined theory and the functions.</p></li>
</ol>
</div>
<div class="section" id="musrwiz-fit-parameters">
<span id="index-8"></span><h3>musrWiz - Fit Parameters<a class="headerlink" href="#musrwiz-fit-parameters" title="Permalink to this headline"></a></h3>
<img src="_images/musrWiz-FitParam.svg" /><p>In the fit parameter dialogue all parameter names can be defined. Furthermore the starting values for the parameters, the step
<img alt="_images/musrWiz-FitParam.svg" src="_images/musrWiz-FitParam.svg" /><p>In the fit parameter dialogue all parameter names can be defined. Furthermore the starting values for the parameters, the step
(initial step size for the parameter fit), and any boundaries can be defined here.</p>
<ol class="arabic simple">
<li>The <tt class="docutils literal"><span class="pre">Show</span> <span class="pre">Theory</span></tt> button allows to show the currently defined theory and the functions.</li>
<li><p>The <code class="docutils literal notranslate"><span class="pre">Show</span> <span class="pre">Theory</span></code> button allows to show the currently defined theory and the functions.</p></li>
</ol>
</div>
<div class="section" id="musrwiz-fit-info">
<span id="index-9"></span><h3>musrWiz - Fit Info<a class="headerlink" href="#musrwiz-fit-info" title="Permalink to this headline"></a></h3>
<p>Collects all the <tt class="docutils literal"><span class="pre">musrfit</span></tt> and <tt class="docutils literal"><span class="pre">MINUIT2</span></tt> specific fit commands.</p>
<img src="_images/musrWiz-FitInfo.svg" /><ol class="arabic simple">
<li>allows to define the time fit range (start time, end time).</li>
<li>packing defines how many bins of the original data shall be combined (added, also called re-binning).</li>
<li>in this text field to fitting commands are given (see the <tt class="docutils literal"><span class="pre">MINUIT</span></tt> and <a class="reference internal" href="user-manual.html#msr-commands-block"><em>musrfit</em></a> manual for details).</li>
<p>Collects all the <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> and <code class="docutils literal notranslate"><span class="pre">MINUIT2</span></code> specific fit commands.</p>
<img alt="_images/musrWiz-FitInfo.svg" src="_images/musrWiz-FitInfo.svg" /><ol class="arabic simple">
<li><p>allows to define the time fit range (start time, end time).</p></li>
<li><p>packing defines how many bins of the original data shall be combined (added, also called re-binning).</p></li>
<li><p>in this text field to fitting commands are given (see the <code class="docutils literal notranslate"><span class="pre">MINUIT</span></code> and <a class="reference internal" href="user-manual.html#msr-commands-block"><span class="std std-ref">musrfit</span></a> manual for details).</p></li>
</ol>
</div>
<div class="section" id="musrwiz-create">
<span id="index-10"></span><h3>musrWiz - Create<a class="headerlink" href="#musrwiz-create" title="Permalink to this headline"></a></h3>
<p>Collects the last necessary information before creating the msr-file.</p>
<img src="_images/musrWiz-Create.svg" /><ol class="arabic simple">
<li>shows the path where the msr-file will be saved. If you would like to save it somewhere else press the <tt class="docutils literal"><span class="pre">Save</span> <span class="pre">As</span> <span class="pre">(msr-file</span> <span class="pre">path)</span></tt> button.</li>
<li>pressing this button will allow you to find the path where to save the msr-file.</li>
<li>pressing this button will save to current configuration as a template for future re-use.</li>
<img alt="_images/musrWiz-Create.svg" src="_images/musrWiz-Create.svg" /><ol class="arabic simple">
<li><p>shows the path where the msr-file will be saved. If you would like to save it somewhere else press the <code class="docutils literal notranslate"><span class="pre">Save</span> <span class="pre">As</span> <span class="pre">(msr-file</span> <span class="pre">path)</span></code> button.</p></li>
<li><p>pressing this button will allow you to find the path where to save the msr-file.</p></li>
<li><p>pressing this button will save to current configuration as a template for future re-use.</p></li>
</ol>
</div>
</div>
<div class="section" id="musrstep">
<span id="index-11"></span><h2>musrStep<a class="headerlink" href="#musrstep" title="Permalink to this headline"></a></h2>
<p><tt class="docutils literal"><span class="pre">musrStep</span></tt> is a little helper program which allows to reset the initial step size. This sometimes comes very handy if working on an instrument
<p><code class="docutils literal notranslate"><span class="pre">musrStep</span></code> is a little helper program which allows to reset the initial step size. This sometimes comes very handy if working on an instrument
with many detectors after a fit slightly went wrong leaving you with a far too small initial step size for further iterations. To edit all the steps
individually is tedious and error prone. Here <tt class="docutils literal"><span class="pre">musrStep</span></tt> can help.</p>
<img src="_images/musrStep-GUI.svg" /><p>When invoking <tt class="docutils literal"><span class="pre">musrStep</span></tt> the above dialogue will popup</p>
individually is tedious and error prone. Here <code class="docutils literal notranslate"><span class="pre">musrStep</span></code> can help.</p>
<img alt="_images/musrStep-GUI.svg" src="_images/musrStep-GUI.svg" /><p>When invoking <code class="docutils literal notranslate"><span class="pre">musrStep</span></code> the above dialogue will popup</p>
<ol class="arabic simple">
<li>shows the relevant parts of the FITPARAMETER block. The only editable column is step.</li>
<li><tt class="docutils literal"><span class="pre">Check</span> <span class="pre">Specific</span></tt> will popup a dialogue where a template string can be entered, <em>e.g.</em> <tt class="docutils literal"><span class="pre">Asym</span></tt>. As a result all fit parameters containing the template string will be selected.</li>
<li><tt class="docutils literal"><span class="pre">Check</span> <span class="pre">All</span></tt> will select all fit parameters.</li>
<li><tt class="docutils literal"><span class="pre">Uncheck</span> <span class="pre">All</span></tt> will unselect all fit parameters.</li>
<li><tt class="docutils literal"><span class="pre">Modify</span> <span class="pre">Automatic</span></tt> will change all the step values automatically. It basically sets all the step sizes to 1% of
the corresponding fit parameter value, except the phases where the step will be set to a value of 5 degrees.</li>
<li><tt class="docutils literal"><span class="pre">Modify</span> <span class="pre">Selected</span></tt> will start the dialogue shown beneath. Follow the description there.</li>
<li><tt class="docutils literal"><span class="pre">Save&amp;Quit</span></tt> will save the current step values, close the dialogue and reload the modified msr-file.</li>
<li><tt class="docutils literal"><span class="pre">Cancel</span></tt> will cancel the <tt class="docutils literal"><span class="pre">musrStep</span></tt> dialogue without modifying anything.</li>
<li><p>shows the relevant parts of the FITPARAMETER block. The only editable column is step.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Check</span> <span class="pre">Specific</span></code> will popup a dialogue where a template string can be entered, <em>e.g.</em> <code class="docutils literal notranslate"><span class="pre">Asym</span></code>. As a result all fit parameters containing the template string will be selected.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Check</span> <span class="pre">All</span></code> will select all fit parameters.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Uncheck</span> <span class="pre">All</span></code> will unselect all fit parameters.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Modify</span> <span class="pre">Automatic</span></code> will change all the step values automatically. It basically sets all the step sizes to 1% of
the corresponding fit parameter value, except the phases where the step will be set to a value of 5 degrees.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Modify</span> <span class="pre">Selected</span></code> will start the dialogue shown beneath. Follow the description there.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Save&amp;Quit</span></code> will save the current step values, close the dialogue and reload the modified msr-file.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Cancel</span></code> will cancel the <code class="docutils literal notranslate"><span class="pre">musrStep</span></code> dialogue without modifying anything.</p></li>
</ol>
<img src="_images/musrStep-Modify-Selected.svg" /><p>When clicking on <tt class="docutils literal"><span class="pre">Modify</span> <span class="pre">Selected</span></tt> the above dialogue will be presented. It allows to manipulate all selected fit parameter step values according to the following rules</p>
<img alt="_images/musrStep-Modify-Selected.svg" src="_images/musrStep-Modify-Selected.svg" /><p>When clicking on <code class="docutils literal notranslate"><span class="pre">Modify</span> <span class="pre">Selected</span></code> the above dialogue will be presented. It allows to manipulate all selected fit parameter step values according to the following rules</p>
<ol class="arabic simple">
<li><tt class="docutils literal"><span class="pre">Scale</span> <span class="pre">by</span> <span class="pre">Factor</span></tt> will scale the step value by the factor given in the field (2). If the <tt class="docutils literal"><span class="pre">Absolute</span> <span class="pre">Value</span></tt> check box is selected, rather than scaling the factor value will be used to modify the step value.</li>
<li>scaling factor or absolute value to modify the step values of the selected fit parameters.</li>
<li>checking the <tt class="docutils literal"><span class="pre">Absolute</span> <span class="pre">Value</span></tt> check box will change the meaning from <em>Scale by Factor</em> to <em>Copy Factor Value</em>.</li>
<li><tt class="docutils literal"><span class="pre">Scale</span> <span class="pre">Automatically</span></tt> will modify the step values of the selected fit parameters according to the rules described before.</li>
<li><tt class="docutils literal"><span class="pre">Cancel</span></tt> will cancel the dialogue.</li>
<li><p><code class="docutils literal notranslate"><span class="pre">Scale</span> <span class="pre">by</span> <span class="pre">Factor</span></code> will scale the step value by the factor given in the field (2). If the <code class="docutils literal notranslate"><span class="pre">Absolute</span> <span class="pre">Value</span></code> check box is selected, rather than scaling the factor value will be used to modify the step value.</p></li>
<li><p>scaling factor or absolute value to modify the step values of the selected fit parameters.</p></li>
<li><p>checking the <code class="docutils literal notranslate"><span class="pre">Absolute</span> <span class="pre">Value</span></code> check box will change the meaning from <em>Scale by Factor</em> to <em>Copy Factor Value</em>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Scale</span> <span class="pre">Automatically</span></code> will modify the step values of the selected fit parameters according to the rules described before.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Cancel</span></code> will cancel the dialogue.</p></li>
</ol>
</div>
</div>
@ -483,11 +465,11 @@ the corresponding fit parameter value, except the phases where the step will be
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#"><tt class="docutils literal"><span class="pre">musredit</span></tt>: the GUI Based Interface to <tt class="docutils literal"><span class="pre">musrfit</span></tt></a><ul>
<li><a class="reference internal" href="#"><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><ul>
<li><a class="reference internal" href="#introduction">Introduction</a></li>
<li><a class="reference internal" href="#available-executable-configuration-files-and-their-basic-usage">Available Executable, Configuration Files and their Basic Usage</a><ul>
<li><a class="reference internal" href="#musredit-musrgui">musredit (musrgui)</a></li>
@ -512,33 +494,32 @@ the corresponding fit parameter value, except the phases where the step will be
<h4>Previous topic</h4>
<p class="topless"><a href="setup-dks.html"
title="previous chapter">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> / <tt class="docutils literal"><span class="pre">DKS</span></tt>: High Speed Fitting with GPU&#8217;s</a></p>
title="previous chapter">Setting up <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> / <code class="docutils literal notranslate"><span class="pre">DKS</span></code>: High Speed Fitting with GPUs</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="mupp.html"
title="next chapter">mupp - μSR Parameter Plotter</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/musredit.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/musredit.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" />
<input type="text" name="q" aria-labelledby="searchlabel" />
<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>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -550,13 +531,13 @@ the corresponding fit parameter value, except the phases where the step will be
<li class="right" >
<a href="setup-dks.html" title="Setting up musrfit / DKS: High Speed Fitting with GPUs"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
&copy; Copyright 2019, Andreas Suter.
Last updated on Jul 24, 2019.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
<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>

Binary file not shown.

View File

@ -1,54 +1,40 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Search &mdash; musrfit 1.5.1 documentation</title>
<meta charset="utf-8" />
<title>Search &#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">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.5.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<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="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></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>
<script type="text/javascript" src="_static/searchtools.js"></script>
<link rel="top" title="musrfit 1.5.1 documentation" href="index.html" />
<script type="text/javascript">
jQuery(function() { Search.loadIndex("searchindex.js"); });
</script>
<script type="text/javascript" id="searchindexloader"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="#" />
<script type="text/javascript" src="searchindex.js" defer></script>
</head>
<body>
<div class="related">
</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><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
<div class="body" role="main">
<h1 id="search-documentation">Search</h1>
<div id="fallback" class="admonition warning">
@ -77,25 +63,25 @@
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<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><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
&copy; Copyright 2019, Andreas Suter.
Last updated on Jan 30, 2020.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
<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>

File diff suppressed because one or more lines are too long

View File

@ -1,35 +1,24 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Setting up musrfit / DKS: High Speed Fitting with GPUs &mdash; musrfit 1.5.1 documentation</title>
<meta charset="utf-8" />
<title>Setting up musrfit / DKS: High Speed Fitting with GPUs &#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">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.5.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<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="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="top" title="musrfit 1.5.1 documentation" href="index.html" />
<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="musredit: the GUI Based Interface to musrfit" href="musredit.html" />
<link rel="prev" title="Setting up musrfit on Different Platforms" href="setup-standard.html" />
</head>
<body>
<div class="related">
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -41,62 +30,62 @@
<li class="right" >
<a href="setup-standard.html" title="Setting up musrfit on Different Platforms"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
<div class="body" role="main">
<div class="section" id="setting-up-musrfit-dks-high-speed-fitting-with-gpu-s">
<span id="setup-dks"></span><span id="index-0"></span><h1>Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> / <tt class="docutils literal"><span class="pre">DKS</span></tt>: High Speed Fitting with GPU&#8217;s<a class="headerlink" href="#setting-up-musrfit-dks-high-speed-fitting-with-gpu-s" title="Permalink to this headline"></a></h1>
<p>In the years 2016/2017 we explored ways to speed up current fitting frameworks, especially <tt class="docutils literal"><span class="pre">musrfit.</span></tt>
This allows now to analyze histogram sets of high field spectrometers like <tt class="docutils literal"><span class="pre">HAL-9500</span></tt> at PSI without
<span id="setup-dks"></span><span id="index-0"></span><h1>Setting up <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> / <code class="docutils literal notranslate"><span class="pre">DKS</span></code>: High Speed Fitting with GPUs<a class="headerlink" href="#setting-up-musrfit-dks-high-speed-fitting-with-gpu-s" title="Permalink to this headline"></a></h1>
<p>In the years 2016/2017 we explored ways to speed up current fitting frameworks, especially <code class="docutils literal notranslate"><span class="pre">musrfit.</span></code>
This allows now to analyze histogram sets of high field spectrometers like <code class="docutils literal notranslate"><span class="pre">HAL-9500</span></code> at PSI without
the <em>error-prone</em> RRF fitting (see U. Locans and A. Suter,
<a class="reference external" href="http://dx.doi.org/10.7566/JPSCP.21.011051">musrfit - Real Time Parameter Fitting Using GPU</a>, and the
Memo from A. Suter, &#8220;Rotating Reference Frame Fits&#8221;, in the <tt class="docutils literal"><span class="pre">musrfit</span></tt> source code). At the same time
Memo from A. Suter, “Rotating Reference Frame Fits”, in the <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> source code). At the same time
it can help to speed-up elaborate global fits tremendously, and dealing properly with muonium. It also
allows Apple macOS users to speed up their fitting code on the CPU. Currently it is not straight forward
to get <tt class="docutils literal"><span class="pre">musrfit</span></tt> multi-threaded under macOS since Apple doesn&#8217;t be default support <tt class="docutils literal"><span class="pre">OpenMP</span></tt>. <tt class="docutils literal"><span class="pre">DKS</span></tt>
enables <tt class="docutils literal"><span class="pre">musrfit</span></tt> to utilize <tt class="docutils literal"><span class="pre">OpenCL</span></tt> instead which is present on macOS by default.</p>
to get <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> multi-threaded under macOS since Apple doesnt be default support <code class="docutils literal notranslate"><span class="pre">OpenMP</span></code>. <code class="docutils literal notranslate"><span class="pre">DKS</span></code>
enables <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> to utilize <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code> instead which is present on macOS by default.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Before you run into the shop to buy a gamer graphic card or a Tesla card, make sure that you have an
<p class="admonition-title">Warning</p>
<p>Before you run into the shop to buy a gamer graphic card or a Tesla card, make sure that you have an
appropriate server with a sufficiently strong power supply!</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">However, the current <tt class="docutils literal"><span class="pre">musrfit/DKS</span></tt> version doesn&#8217;t yet support all theory functions on the GPU.
In case the theory function is not yet available for the GPU, <tt class="docutils literal"><span class="pre">musrfit</span></tt> will fall back to the CPU implementation.</p>
<p class="admonition-title">Note</p>
<p>However, the current <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> version doesnt yet support all theory functions on the GPU.
In case the theory function is not yet available for the GPU, <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> will fall back to the CPU implementation.</p>
</div>
<p>Conceptually the setup of <tt class="docutils literal"><span class="pre">musrfit/DKS</span></tt> is as following:</p>
<p>Conceptually the setup of <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> is as following:</p>
<ol class="arabic simple">
<li>install the latest hardware driver for your graphic card.</li>
<li>install the GPU SDK which enables number crunching (<tt class="docutils literal"><span class="pre">CUDA</span></tt> for NVIDIA, <tt class="docutils literal"><span class="pre">OpenCL</span></tt> for AMD)</li>
<li>install <tt class="docutils literal"><span class="pre">DKS</span></tt></li>
<li>install the <tt class="docutils literal"><span class="pre">musrfit</span></tt> version which is <tt class="docutils literal"><span class="pre">DKS</span></tt> ready</li>
<li><p>install the latest hardware driver for your graphic card.</p></li>
<li><p>install the GPU SDK which enables number crunching (<code class="docutils literal notranslate"><span class="pre">CUDA</span></code> for NVIDIA, <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code> for AMD)</p></li>
<li><p>install <code class="docutils literal notranslate"><span class="pre">DKS</span></code></p></li>
<li><p>install the <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> version which is <code class="docutils literal notranslate"><span class="pre">DKS</span></code> ready</p></li>
</ol>
<p>In the following the description for the installation of <tt class="docutils literal"><span class="pre">musrfit/DKS</span></tt> for the following systems will be discussed in some more detail:</p>
<p>In the following the description for the installation of <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> for the following systems will be discussed in some more detail:</p>
<ul class="simple">
<li>NVIDIA Tesla K40c</li>
<li>AMD Graphic Card (Radeon R9 390X)</li>
<li>macOS in order to get <tt class="docutils literal"><span class="pre">OpenCL</span></tt> support</li>
<li><p>NVIDIA Tesla K40c</p></li>
<li><p>AMD Graphic Card (Radeon R9 390X)</p></li>
<li><p>macOS in order to get <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code> support</p></li>
</ul>
<p>The usage of <tt class="docutils literal"><span class="pre">musrfit</span></tt> with GPU acceleration and <tt class="docutils literal"><span class="pre">OpenCL</span></tt> support is described in the
<a class="reference internal" href="user-manual.html#user-manual"><em>User manual of the μSR data analysis software musrfit</em></a>. The additional
<tt class="docutils literal"><span class="pre">musrfit/DKS</span></tt> are found <a class="reference internal" href="user-manual.html#msr-commands-block-dks"><em>here</em></a>.</p>
<p>The usage of <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> with GPU acceleration and <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code> support is described in the
<a class="reference internal" href="user-manual.html#user-manual"><span class="std std-ref">User manual of the μSR data analysis software musrfit</span></a>. The additional
<code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> are found <a class="reference internal" href="user-manual.html#msr-commands-block-dks"><span class="std std-ref">here</span></a>.</p>
<div class="section" id="setting-up-musrfit-dks-for-a-tesla-k40c-nvidia">
<span id="index-1"></span><h2>Setting up <tt class="docutils literal"><span class="pre">musrfit/DKS</span></tt> for a Tesla K40c (NVIDIA)<a class="headerlink" href="#setting-up-musrfit-dks-for-a-tesla-k40c-nvidia" title="Permalink to this headline"></a></h2>
<span id="index-1"></span><h2>Setting up <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> for a Tesla K40c (NVIDIA)<a class="headerlink" href="#setting-up-musrfit-dks-for-a-tesla-k40c-nvidia" title="Permalink to this headline"></a></h2>
<p>It is assumed that the Tesla K40c is already physically installed on your system. For now I only
will discuss to set it up for a Linux based system. In order to check that your operating systems
see the card, enter the following command in the terminal:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ lspci <span class="p">|</span> grep NVIDIA
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ lspci <span class="p">|</span> grep NVIDIA
</pre></div>
</div>
<p>The response should look something like</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>05:00.0 3D controller: NVIDIA Corporation GK110BGL [Tesla K40c] (rev a1)
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="mi">05</span><span class="p">:</span><span class="mf">00.0</span> <span class="mi">3</span><span class="n">D</span> <span class="n">controller</span><span class="p">:</span> <span class="n">NVIDIA</span> <span class="n">Corporation</span> <span class="n">GK110BGL</span> <span class="p">[</span><span class="n">Tesla</span> <span class="n">K40c</span><span class="p">]</span> <span class="p">(</span><span class="n">rev</span> <span class="n">a1</span><span class="p">)</span>
</pre></div>
</div>
<p>which means that the OS physically recognizes your card.</p>
@ -104,25 +93,25 @@ see the card, enter the following command in the terminal:</p>
<h3>Driver Installation for the Tesla K40c<a class="headerlink" href="#driver-installation-for-the-tesla-k40c" title="Permalink to this headline"></a></h3>
<p>Next, you will need to download and install the driver for your card. Select the proper operating system,
card, etc. from the <a class="reference external" href="http://www.nvidia.com/Download/index.aspx?lang=en-us">NVIDIA download center</a>. At PSI
we are running currently Red Hat Enterprise Linux 7.x (RHEL) for which we will get a <tt class="docutils literal"><span class="pre">rpm</span></tt> (something like
<tt class="docutils literal"><span class="pre">nvidia-diag-driver-local-repo-rhel7-375.66-1.x86_64.rpm</span></tt>). Install it and make sure there is no conflict
we are running currently Red Hat Enterprise Linux 7.x (RHEL) for which we will get a <code class="docutils literal notranslate"><span class="pre">rpm</span></code> (something like
<code class="docutils literal notranslate"><span class="pre">nvidia-diag-driver-local-repo-rhel7-375.66-1.x86_64.rpm</span></code>). Install it and make sure there is no conflict
with the nouveau driver of the system.</p>
</div>
<div class="section" id="installation-of-cuda">
<span id="index-2"></span><h3>Installation of CUDA<a class="headerlink" href="#installation-of-cuda" title="Permalink to this headline"></a></h3>
<p>Download the <a class="reference external" href="https://developer.nvidia.com/cuda-downloads">CUDA SDK</a> form NVIDIA for your system. Again,
for the RHEL 7.x this is an <tt class="docutils literal"><span class="pre">rpm</span></tt>. After the installation of the rpm you should reboot your machine.
Afterwards you are ready for the installation of <tt class="docutils literal"><span class="pre">DKS</span></tt>.</p>
for the RHEL 7.x this is an <code class="docutils literal notranslate"><span class="pre">rpm</span></code>. After the installation of the rpm you should reboot your machine.
Afterwards you are ready for the installation of <code class="docutils literal notranslate"><span class="pre">DKS</span></code>.</p>
</div>
<div class="section" id="installation-of-dks">
<span id="index-3"></span><h3>Installation of DKS<a class="headerlink" href="#installation-of-dks" title="Permalink to this headline"></a></h3>
<p>For the following list of commands the <tt class="docutils literal"><span class="pre">'$'</span></tt> will be given as the command prompt. <em>Do not enter it!</em>
Also some comments will be added starting with a <tt class="docutils literal"><span class="pre">'#'</span></tt> which can be omitted. They are only there to
explain what is going on. <tt class="docutils literal"><span class="pre">DKS</span></tt> stands for Dynamical Kernel Scheduler and provides a thin interface
allowing host applications to incorporate GPU&#8217;s and other hardware accelerators.</p>
<p>Details can be found in the papers listed <a class="reference internal" href="cite.html#cite"><em>here</em></a>, or on the <a class="reference external" href="https://gitlab.psi.ch/uldis_l/DKS/wikis/home">DKS wiki page</a>.</p>
<p>For the following list of commands the <code class="docutils literal notranslate"><span class="pre">'$'</span></code> will be given as the command prompt. <em>Do not enter it!</em>
Also some comments will be added starting with a <code class="docutils literal notranslate"><span class="pre">'#'</span></code> which can be omitted. They are only there to
explain what is going on. <code class="docutils literal notranslate"><span class="pre">DKS</span></code> stands for Dynamical Kernel Scheduler and provides a thin interface
allowing host applications to incorporate GPUs and other hardware accelerators.</p>
<p>Details can be found in the papers listed <a class="reference internal" href="cite.html#cite"><span class="std std-ref">here</span></a>, or on the <a class="reference external" href="https://gitlab.psi.ch/uldis_l/DKS/wikis/home">DKS wiki page</a>.</p>
<p>In brief the installation should be something like this:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span><span class="c1"># go to whatever directory you would like to clone/install DKS</span>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># go to whatever directory you would like to clone/install DKS</span>
<span class="c1"># For macOS DKS will likely to got to $HOME/Applications to be consistent with the musrfit docu for macOS</span>
$ <span class="nb">cd</span> <span class="nv">$HOME</span>/Apps
$ git clone https://gitlab.psi.ch/uldis_l/DKS.git
@ -134,16 +123,16 @@ $ cmake --build ./ --clean-first
$ make install
</pre></div>
</div>
<p>Since <tt class="docutils literal"><span class="pre">DKS</span></tt> is installed in a non-standard path, a couple of additional small steps are required.
<p>Since <code class="docutils literal notranslate"><span class="pre">DKS</span></code> is installed in a non-standard path, a couple of additional small steps are required.
This will be different for Linux compared to macOS.</p>
<p>For <strong>Linux:</strong></p>
<p>add the <tt class="docutils literal"><span class="pre">DKS</span></tt> library path to <tt class="docutils literal"><span class="pre">/etc/ld.so.conf.d/musrfit-x86_64.conf</span></tt> and execute as super user</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ /sbin/ldconfig
<p>add the <code class="docutils literal notranslate"><span class="pre">DKS</span></code> library path to <code class="docutils literal notranslate"><span class="pre">/etc/ld.so.conf.d/musrfit-x86_64.conf</span></code> and execute as super user</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ /sbin/ldconfig
</pre></div>
</div>
<p>For <strong>macOS:</strong></p>
<p>add the <tt class="docutils literal"><span class="pre">DKS</span></tt> path to <tt class="docutils literal"><span class="pre">$HOME/.profile</span></tt>:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">DKS</span><span class="o">=</span><span class="nv">$HOME</span>/Applications/DKS/exec
<p>add the <code class="docutils literal notranslate"><span class="pre">DKS</span></code> path to <code class="docutils literal notranslate"><span class="pre">$HOME/.profile</span></code>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">DKS</span><span class="o">=</span><span class="nv">$HOME</span>/Applications/DKS/exec
<span class="nb">export</span> <span class="nv">LD_LIBRARY_PATH</span><span class="o">=</span><span class="nv">$DKS</span>/lib:<span class="nv">$LD_LIBRARY_PATH</span>
launchctl setenv DKS <span class="nv">$DKS</span>
@ -153,31 +142,31 @@ launchctl setenv LD_LIBRARY_PATH <span class="nv">$LD_LIBRARY_PATH</span>
</div>
<div class="section" id="installation-of-musrfit-for-dks">
<span id="musrfit-dks-install"></span><h3>Installation of musrfit for DKS<a class="headerlink" href="#installation-of-musrfit-for-dks" title="Permalink to this headline"></a></h3>
<p>Most of the installation steps are the same as described for <tt class="docutils literal"><span class="pre">musrfit</span></tt> without GPU support.
Here only the differences are explained. First checkout <tt class="docutils literal"><span class="pre">musrfit</span></tt>, then you will need to
<p>Most of the installation steps are the same as described for <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> without GPU support.
Here only the differences are explained. First checkout <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>, then you will need to
switch the working branch which is done by</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> <span class="nv">$HOME</span>/Apps/musrfit
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> <span class="nv">$HOME</span>/Apps/musrfit
$ git checkout dks6
</pre></div>
</div>
<div class="section" id="install-via-cmake">
<h4>Install via cmake<a class="headerlink" href="#install-via-cmake" title="Permalink to this headline"></a></h4>
<p>There is on more configuration switch</p>
<dl class="docutils">
<dt><strong>-Ddks=&lt;value&gt;</strong></dt>
<dd>it allows to enable/disable <tt class="docutils literal"><span class="pre">DKS</span></tt> support. The default is <tt class="docutils literal"><span class="pre">&lt;value&gt;=1</span></tt>, <em>i.e.</em> enabled. To disable use <tt class="docutils literal"><span class="pre">&lt;value&gt;=0</span></tt>.</dd>
<dl class="simple">
<dt><strong>-Ddks=&lt;value&gt;</strong></dt><dd><p>it allows to enable/disable <code class="docutils literal notranslate"><span class="pre">DKS</span></code> support. The default is <code class="docutils literal notranslate"><span class="pre">&lt;value&gt;=1</span></code>, <em>i.e.</em> enabled. To disable use <code class="docutils literal notranslate"><span class="pre">&lt;value&gt;=0</span></code>.</p>
</dd>
</dl>
<p>For a typical setup on a RHEL or macOS system it could look like this</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ cmake ../ -DCMAKE_INSTALL_PREFIX<span class="o">=</span><span class="nv">$ROOTSYS</span> -DASlibs<span class="o">=</span><span class="m">1</span> -DBMWlibs<span class="o">=</span><span class="m">1</span> -Dnexus<span class="o">=</span><span class="m">1</span> -Ddks<span class="o">=</span><span class="m">1</span>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ cmake ../ -DCMAKE_INSTALL_PREFIX<span class="o">=</span><span class="nv">$ROOTSYS</span> -DASlibs<span class="o">=</span><span class="m">1</span> -DBMWlibs<span class="o">=</span><span class="m">1</span> -Dnexus<span class="o">=</span><span class="m">1</span> -Ddks<span class="o">=</span><span class="m">1</span>
</pre></div>
</div>
<p>After</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ cmake --build ./ --clean-first -- -j8
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ cmake --build ./ --clean-first -- -j8
$ make install
</pre></div>
</div>
<p>and updating the shared library lookup table (<em>only</em> needed for Linux)</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ /sbin/ldconfig <span class="c1"># as superuser / root</span>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ /sbin/ldconfig <span class="c1"># as superuser / root</span>
</pre></div>
</div>
<p>you are done with the setup.</p>
@ -185,7 +174,7 @@ $ make install
</div>
</div>
<div class="section" id="setting-up-musrfit-dks-for-a-amd-graphic-card-radeon-r9-390x">
<span id="index-4"></span><h2>Setting up <tt class="docutils literal"><span class="pre">musrfit/DKS</span></tt> for a AMD Graphic Card (Radeon R9 390X)<a class="headerlink" href="#setting-up-musrfit-dks-for-a-amd-graphic-card-radeon-r9-390x" title="Permalink to this headline"></a></h2>
<span id="index-4"></span><h2>Setting up <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> for a AMD Graphic Card (Radeon R9 390X)<a class="headerlink" href="#setting-up-musrfit-dks-for-a-amd-graphic-card-radeon-r9-390x" title="Permalink to this headline"></a></h2>
<div class="section" id="driver-installation-for-an-amd-graphic-card-e-g-radeon-r9-390x">
<h3>Driver Installation for an AMD Graphic Card, <em>e.g.</em> Radeon R9 390X<a class="headerlink" href="#driver-installation-for-an-amd-graphic-card-e-g-radeon-r9-390x" title="Permalink to this headline"></a></h3>
<p>This will depend slightly on the AMD Card and operating system. Here I will summaries how it was done
@ -193,64 +182,64 @@ on a RHEL (Linux) system using a Radeon R9 390X.</p>
<p>It is assumed that the Radeon R9 390X is already physically installed on your system. For now I only
will discuss to set it up for a Linux based system. In order to check that your operating systems see
the card, enter the following command in the terminal:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ lspci <span class="p">|</span> grep AMD
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ lspci <span class="p">|</span> grep AMD
</pre></div>
</div>
<p>The response should look something like</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>84:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii XT / Grenada XT [Radeon R9 290X/390X] (rev 80)
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="mi">84</span><span class="p">:</span><span class="mf">00.0</span> <span class="n">VGA</span> <span class="n">compatible</span> <span class="n">controller</span><span class="p">:</span> <span class="n">Advanced</span> <span class="n">Micro</span> <span class="n">Devices</span><span class="p">,</span> <span class="n">Inc</span><span class="o">.</span> <span class="p">[</span><span class="n">AMD</span><span class="o">/</span><span class="n">ATI</span><span class="p">]</span> <span class="n">Hawaii</span> <span class="n">XT</span> <span class="o">/</span> <span class="n">Grenada</span> <span class="n">XT</span> <span class="p">[</span><span class="n">Radeon</span> <span class="n">R9</span> <span class="mi">290</span><span class="n">X</span><span class="o">/</span><span class="mi">390</span><span class="n">X</span><span class="p">]</span> <span class="p">(</span><span class="n">rev</span> <span class="mi">80</span><span class="p">)</span>
</pre></div>
</div>
<p>which means that the OS physically recognizes your card.</p>
<p>For RHEL7.x the AMDGPU-PRO driver should be used. It can be downloaded from <a class="reference external" href="http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-RedHat-Install.aspx">AMD</a>. Unpack the driver</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ tar -Jxvf amdgpu-pro-17.10-414273.tar.xz
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ tar -Jxvf amdgpu-pro-17.10-414273.tar.xz
$ <span class="nb">cd</span> amdgpu-pro-17.10-414273
</pre></div>
</div>
<p>Install the driver as root</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ ./amdgpu-pro-install --compute -y
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ ./amdgpu-pro-install --compute -y
</pre></div>
</div>
<p>Here I assume that the AMD graphic card is only used for computation. You need to add the following command
in order that the user <strong>blabla</strong> (change this to the appropriate user name) can access the GPU (otherwise
only root works):</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ /sbin/usermod -a -G video blabla
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ /sbin/usermod -a -G video blabla
</pre></div>
</div>
<p>Reboot the machine.</p>
</div>
<div class="section" id="amd-app-software-development-kit-sdk-to-enable-opencl-support">
<h3>AMD APP Software Development Kit (SDK) to enable <tt class="docutils literal"><span class="pre">OpenCL</span></tt> support<a class="headerlink" href="#amd-app-software-development-kit-sdk-to-enable-opencl-support" title="Permalink to this headline"></a></h3>
<h3>AMD APP Software Development Kit (SDK) to enable <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code> support<a class="headerlink" href="#amd-app-software-development-kit-sdk-to-enable-opencl-support" title="Permalink to this headline"></a></h3>
<p>The AMD APP Software Development Kit (SDK) is a complete development platform created by AMD to allow you to
quickly and easily develop applications accelerated by AMD APP technology. The SDK provides samples, documentation,
and other materials to quickly get you started leveraging accelerated compute using <tt class="docutils literal"><span class="pre">OpenCL</span></tt> or <tt class="docutils literal"><span class="pre">C++</span> <span class="pre">AMP</span></tt> in your
<tt class="docutils literal"><span class="pre">C/C++</span></tt> applications.</p>
and other materials to quickly get you started leveraging accelerated compute using <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code> or <code class="docutils literal notranslate"><span class="pre">C++</span> <span class="pre">AMP</span></code> in your
<code class="docutils literal notranslate"><span class="pre">C/C++</span></code> applications.</p>
<p>Download the AMD APP SDK 3.0 from <a class="reference external" href="http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/">AMD-SDK</a>.</p>
<p>Extract the installer</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ tar -xvjf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ tar -xvjf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2
</pre></div>
</div>
<p>Run the installer</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh
</pre></div>
</div>
<p>This will install the AMD APP SDK to <tt class="docutils literal"><span class="pre">/opt/AMDAPPSDK-3.0/</span></tt> where you can find the <tt class="docutils literal"><span class="pre">OpenCL</span></tt> include
<p>This will install the AMD APP SDK to <code class="docutils literal notranslate"><span class="pre">/opt/AMDAPPSDK-3.0/</span></code> where you can find the <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code> include
and library files, as well as documentation and sample code. The install guide for AMD OpenCL SDK can
be found at <a class="reference external" href="http://developer.amd.com/wordpress/media/2012/10/AMD_APP_SDK_InstallationNotes.pdf">AMD SDK Installation Notes</a>.</p>
</div>
<div class="section" id="installation-of-dks-and-musrfit">
<h3>Installation of DKS and musrfit<a class="headerlink" href="#installation-of-dks-and-musrfit" title="Permalink to this headline"></a></h3>
<p>To install <tt class="docutils literal"><span class="pre">DKS</span></tt> and <tt class="docutils literal"><span class="pre">musrfit</span></tt> follow the instructions <a class="reference internal" href="#musrfit-dks-install"><em>above</em></a>.</p>
<p>To install <code class="docutils literal notranslate"><span class="pre">DKS</span></code> and <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> follow the instructions <a class="reference internal" href="#musrfit-dks-install"><span class="std std-ref">above</span></a>.</p>
</div>
</div>
<div class="section" id="setting-up-musrfit-dks-for-macos-for-opencl-support">
<span id="index-5"></span><h2>Setting up <tt class="docutils literal"><span class="pre">musrfit/DKS</span></tt> for macOS for OpenCL support<a class="headerlink" href="#setting-up-musrfit-dks-for-macos-for-opencl-support" title="Permalink to this headline"></a></h2>
<p>Since Apple is not providing an out-of-the-box <tt class="docutils literal"><span class="pre">OpenMP</span></tt> support on their macOS compiler framework (Xcode),
typically <tt class="docutils literal"><span class="pre">musrfit</span></tt> is just running <em>single threaded</em>. Here <tt class="docutils literal"><span class="pre">DKS</span></tt> can help since it delivers <tt class="docutils literal"><span class="pre">OpenCL</span></tt>
support which is present on macOS. Hence, if you would like to run <tt class="docutils literal"><span class="pre">musrfit</span></tt> multi-threaded the easiest
way is to use <tt class="docutils literal"><span class="pre">DKS</span></tt>.</p>
<span id="index-5"></span><h2>Setting up <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> for macOS for OpenCL support<a class="headerlink" href="#setting-up-musrfit-dks-for-macos-for-opencl-support" title="Permalink to this headline"></a></h2>
<p>Since Apple is not providing an out-of-the-box <code class="docutils literal notranslate"><span class="pre">OpenMP</span></code> support on their macOS compiler framework (Xcode),
typically <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> is just running <em>single threaded</em>. Here <code class="docutils literal notranslate"><span class="pre">DKS</span></code> can help since it delivers <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code>
support which is present on macOS. Hence, if you would like to run <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> multi-threaded the easiest
way is to use <code class="docutils literal notranslate"><span class="pre">DKS</span></code>.</p>
<p>Since there is no graphic card involved, you do not need any graphic card driver of additional SDK.
The only thing you need <tt class="docutils literal"><span class="pre">DKS</span></tt> and the proper <tt class="docutils literal"><span class="pre">musrfit</span></tt> version.</p>
<p>The installation instruction for <tt class="docutils literal"><span class="pre">DKS/musrfit</span></tt> can be found <a class="reference internal" href="#musrfit-dks-install"><em>here</em></a>.</p>
The only thing you need <code class="docutils literal notranslate"><span class="pre">DKS</span></code> and the proper <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> version.</p>
<p>The installation instruction for <code class="docutils literal notranslate"><span class="pre">DKS/musrfit</span></code> can be found <a class="reference internal" href="#musrfit-dks-install"><span class="std std-ref">here</span></a>.</p>
</div>
</div>
@ -258,58 +247,57 @@ The only thing you need <tt class="docutils literal"><span class="pre">DKS</span
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> / <tt class="docutils literal"><span class="pre">DKS</span></tt>: High Speed Fitting with GPU&#8217;s</a><ul>
<li><a class="reference internal" href="#setting-up-musrfit-dks-for-a-tesla-k40c-nvidia">Setting up <tt class="docutils literal"><span class="pre">musrfit/DKS</span></tt> for a Tesla K40c (NVIDIA)</a><ul>
<li><a class="reference internal" href="#">Setting up <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> / <code class="docutils literal notranslate"><span class="pre">DKS</span></code>: High Speed Fitting with GPUs</a><ul>
<li><a class="reference internal" href="#setting-up-musrfit-dks-for-a-tesla-k40c-nvidia">Setting up <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> for a Tesla K40c (NVIDIA)</a><ul>
<li><a class="reference internal" href="#driver-installation-for-the-tesla-k40c">Driver Installation for the Tesla K40c</a></li>
<li><a class="reference internal" href="#installation-of-cuda">Installation of CUDA</a></li>
<li><a class="reference internal" href="#installation-of-dks">Installation of DKS</a></li>
<li><a class="reference internal" href="#installation-of-musrfit-for-dks">Installation of musrfit for DKS</a></li>
</ul>
</li>
<li><a class="reference internal" href="#setting-up-musrfit-dks-for-a-amd-graphic-card-radeon-r9-390x">Setting up <tt class="docutils literal"><span class="pre">musrfit/DKS</span></tt> for a AMD Graphic Card (Radeon R9 390X)</a><ul>
<li><a class="reference internal" href="#setting-up-musrfit-dks-for-a-amd-graphic-card-radeon-r9-390x">Setting up <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> for a AMD Graphic Card (Radeon R9 390X)</a><ul>
<li><a class="reference internal" href="#driver-installation-for-an-amd-graphic-card-e-g-radeon-r9-390x">Driver Installation for an AMD Graphic Card, <em>e.g.</em> Radeon R9 390X</a></li>
<li><a class="reference internal" href="#amd-app-software-development-kit-sdk-to-enable-opencl-support">AMD APP Software Development Kit (SDK) to enable <tt class="docutils literal"><span class="pre">OpenCL</span></tt> support</a></li>
<li><a class="reference internal" href="#amd-app-software-development-kit-sdk-to-enable-opencl-support">AMD APP Software Development Kit (SDK) to enable <code class="docutils literal notranslate"><span class="pre">OpenCL</span></code> support</a></li>
<li><a class="reference internal" href="#installation-of-dks-and-musrfit">Installation of DKS and musrfit</a></li>
</ul>
</li>
<li><a class="reference internal" href="#setting-up-musrfit-dks-for-macos-for-opencl-support">Setting up <tt class="docutils literal"><span class="pre">musrfit/DKS</span></tt> for macOS for OpenCL support</a></li>
<li><a class="reference internal" href="#setting-up-musrfit-dks-for-macos-for-opencl-support">Setting up <code class="docutils literal notranslate"><span class="pre">musrfit/DKS</span></code> for macOS for OpenCL support</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="setup-standard.html"
title="previous chapter">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> on Different Platforms</a></p>
title="previous chapter">Setting up <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> on Different Platforms</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="musredit.html"
title="next chapter"><tt class="docutils literal"><span class="pre">musredit</span></tt>: the GUI Based Interface to <tt class="docutils literal"><span class="pre">musrfit</span></tt></a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/setup-dks.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
title="next 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>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/setup-dks.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" />
<input type="text" name="q" aria-labelledby="searchlabel" />
<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>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -321,13 +309,13 @@ The only thing you need <tt class="docutils literal"><span class="pre">DKS</span
<li class="right" >
<a href="setup-standard.html" title="Setting up musrfit on Different Platforms"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
&copy; Copyright 2019, Andreas Suter.
Last updated on Jul 24, 2019.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
<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>

File diff suppressed because it is too large Load Diff

View File

@ -1,35 +1,24 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<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.5.1 documentation</title>
<meta charset="utf-8" />
<title>Tutorial for musrfit &#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">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.5.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<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="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="top" title="musrfit 1.5.1 documentation" href="index.html" />
<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="User manual" href="user-manual.html" />
<link rel="prev" title="How to Cite musrfit?" href="cite.html" />
</head>
<body>
<div class="related">
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -41,254 +30,254 @@
<li class="right" >
<a href="cite.html" title="How to Cite musrfit?"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
<div class="body" role="main">
<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>
<span id="index-0"></span><h1>Tutorial for <code class="docutils literal notranslate"><span class="pre">musrfit</span></code><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>
of the <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> 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"><span class="std std-ref">manual</span></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;.
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 “transverse geometry”.
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
<p>To analyze these data (in a simple way) one starts out from the msr file <code class="docutils literal notranslate"><span class="pre">3110_tutorial.msr</span></code> provided together
with the source-code distribution in the sub-directory <code class="docutils literal notranslate"><span class="pre">doc/examples/</span></code>. This ASCII file can be edited using any
text editor. For convenience the editor <code class="docutils literal notranslate"><span class="pre">musredit</span></code> 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>
open within <code class="docutils literal notranslate"><span class="pre">musredit</span></code>.</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
<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"><span class="std std-ref">here</span></a>.
In the file <code class="docutils literal notranslate"><span class="pre">3110_tutorial.msr</span></code> these blocks are successively:</p>
<p><a class="reference internal" href="user-manual.html#msr-title-block"><span class="std std-ref">The title</span></a></p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sample</span> <span class="n">XYZ</span>
</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
<p><a class="reference internal" href="user-manual.html#msr-fitparameter-block"><span class="std std-ref">The FITPARAMETER block</span></a></p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">FITPARAMETER</span>
<span class="c1"># No Name Value Step Pos_Error Boundaries</span>
<span class="mi">1</span> <span class="n">NormUp</span> <span class="mi">4500</span> <span class="mi">5</span> <span class="n">none</span> <span class="mi">0</span> <span class="n">none</span>
<span class="mi">2</span> <span class="n">BgUp</span> <span class="mi">200</span> <span class="mi">1</span> <span class="n">none</span> <span class="mi">0</span> <span class="n">none</span>
<span class="mi">3</span> <span class="n">PhaseUp</span> <span class="mi">15</span> <span class="mi">1</span> <span class="n">none</span>
4 NormDown 4500 5 none 0 none
5 BgDown 200 1 none 0 none
6 PhaseDown 195 1 none
<span class="mi">4</span> <span class="n">NormDown</span> <span class="mi">4500</span> <span class="mi">5</span> <span class="n">none</span> <span class="mi">0</span> <span class="n">none</span>
<span class="mi">5</span> <span class="n">BgDown</span> <span class="mi">200</span> <span class="mi">1</span> <span class="n">none</span> <span class="mi">0</span> <span class="n">none</span>
<span class="mi">6</span> <span class="n">PhaseDown</span> <span class="mi">195</span> <span class="mi">1</span> <span class="n">none</span>
7 NormRight 600 5 none 0 none
8 BgRight 40 1 none 0 none
9 PhaseRight 285 1 none
<span class="mi">7</span> <span class="n">NormRight</span> <span class="mi">600</span> <span class="mi">5</span> <span class="n">none</span> <span class="mi">0</span> <span class="n">none</span>
<span class="mi">8</span> <span class="n">BgRight</span> <span class="mi">40</span> <span class="mi">1</span> <span class="n">none</span> <span class="mi">0</span> <span class="n">none</span>
<span class="mi">9</span> <span class="n">PhaseRight</span> <span class="mi">285</span> <span class="mi">1</span> <span class="n">none</span>
10 AsymSig1 0.17 0.01 none 0 0.33
11 RateSig1 2.5 0.1 none 0 none
12 FieldSig1 100 1 none
<span class="mi">10</span> <span class="n">AsymSig1</span> <span class="mf">0.17</span> <span class="mf">0.01</span> <span class="n">none</span> <span class="mi">0</span> <span class="mf">0.33</span>
<span class="mi">11</span> <span class="n">RateSig1</span> <span class="mf">2.5</span> <span class="mf">0.1</span> <span class="n">none</span> <span class="mi">0</span> <span class="n">none</span>
<span class="mi">12</span> <span class="n">FieldSig1</span> <span class="mi">100</span> <span class="mi">1</span> <span class="n">none</span>
13 AsymSig2 0.02 0.01 none 0 0.33
14 RateSig2 0.5 0.1 none
15 FieldSig2 150 1 none
<span class="mi">13</span> <span class="n">AsymSig2</span> <span class="mf">0.02</span> <span class="mf">0.01</span> <span class="n">none</span> <span class="mi">0</span> <span class="mf">0.33</span>
<span class="mi">14</span> <span class="n">RateSig2</span> <span class="mf">0.5</span> <span class="mf">0.1</span> <span class="n">none</span>
<span class="mi">15</span> <span class="n">FieldSig2</span> <span class="mi">150</span> <span class="mi">1</span> <span class="n">none</span>
</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).
and uncertainties (in the <code class="docutils literal notranslate"><span class="pre">Step</span></code> column). If asymmetric errors are determined, these
will be listed in the <code class="docutils literal notranslate"><span class="pre">Step</span></code> column (negative) and the <code class="docutils literal notranslate"><span class="pre">Pos_Error</span></code> 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
<p>Since a <a class="reference internal" href="user-manual.html#single-histogram-fit"><span class="std std-ref">single-histogram fit</span></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,
there are three histograms containing useful information (“Up”, “Down”, “Right”); 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)
<p><a class="reference internal" href="user-manual.html#msr-theory-block"><span class="std std-ref">The THEORY block</span></a></p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">THEORY</span>
<span class="n">asymmetry</span> <span class="mi">10</span>
<span class="n">simplExpo</span> <span class="mi">11</span> <span class="p">(</span><span class="n">rate</span><span class="p">)</span>
<span class="n">TFieldCos</span> <span class="n">map1</span> <span class="n">fun1</span> <span class="p">(</span><span class="n">phase</span> <span class="n">frequency</span><span class="p">)</span>
<span class="o">+</span>
<span class="n">asymmetry</span> <span class="mi">13</span>
<span class="n">simpleGss</span> <span class="mi">14</span> <span class="p">(</span><span class="n">rate</span><span class="p">)</span>
<span class="n">TFieldCos</span> <span class="n">map1</span> <span class="n">fun2</span> <span class="p">(</span><span class="n">phase</span> <span class="n">frequency</span><span class="p">)</span>
</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#id22"><em>user-defined</em></a>
the decay asymmetry. Different <a class="reference internal" href="user-manual.html#msr-theory-block"><span class="std std-ref">predefined</span></a> and <a class="reference internal" href="user-manual.html#id38"><span class="std std-ref">user-defined</span></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
according to the <code class="docutils literal notranslate"><span class="pre">FITPARAMETER</span> <span class="pre">block</span></code>. <code class="docutils literal notranslate"><span class="pre">map</span></code> and <code class="docutils literal notranslate"><span class="pre">fun</span></code> 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>
<p><a class="reference internal" href="user-manual.html#msr-functions-block"><span class="std std-ref">The FUNCTIONS block</span></a></p>
<div class="highlight-default notranslate"><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
the use in the <code class="docutils literal notranslate"><span class="pre">THEORY</span> <span class="pre">block</span></code>. In the example, the functions are used to calculate the
muon-spin-precession frequencies for the given fields [<span class="math notranslate nohighlight">\(\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>
<span class="math notranslate nohighlight">\(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 <code class="docutils literal notranslate"><span class="pre">FITPARAMETER</span> <span class="pre">block</span></code> and <span class="math notranslate nohighlight">\(\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
<p><a class="reference internal" href="user-manual.html#msr-run-block"><span class="std std-ref">The RUN block</span></a></p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">RUN</span> <span class="n">data</span><span class="o">/</span><span class="n">deltat_pta_gps_3110</span> <span class="n">PIM3</span> <span class="n">PSI</span> <span class="n">PSI</span><span class="o">-</span><span class="n">BIN</span> <span class="p">(</span><span class="n">name</span> <span class="n">beamline</span> <span class="n">institute</span> <span class="n">data</span><span class="o">-</span><span class="n">file</span><span class="o">-</span><span class="nb">format</span><span class="p">)</span>
<span class="n">fittype</span> <span class="mi">0</span> <span class="p">(</span><span class="n">single</span> <span class="n">histogram</span> <span class="n">fit</span><span class="p">)</span>
<span class="n">norm</span> <span class="mi">1</span>
<span class="n">backgr</span><span class="o">.</span><span class="n">fit</span> <span class="mi">2</span>
<span class="nb">map</span> <span class="mi">3</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">0</span>
<span class="n">forward</span> <span class="mi">3</span>
<span class="n">data</span> <span class="mi">1</span> <span class="mi">8000</span>
<span class="n">t0</span> <span class="mi">1</span>
<span class="n">fit</span> <span class="mi">0</span> <span class="mf">4.9</span>
<span class="n">packing</span> <span class="mi">20</span>
</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)
<div><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">RUN</span> <span class="n">data</span><span class="o">/</span><span class="n">deltat_pta_gps_3110</span> <span class="n">PIM3</span> <span class="n">PSI</span> <span class="n">PSI</span><span class="o">-</span><span class="n">BIN</span> <span class="p">(</span><span class="n">name</span> <span class="n">beamline</span> <span class="n">institute</span> <span class="n">data</span><span class="o">-</span><span class="n">file</span><span class="o">-</span><span class="nb">format</span><span class="p">)</span>
</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)
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">fittype</span> <span class="mi">0</span> <span class="p">(</span><span class="n">single</span> <span class="n">histogram</span> <span class="n">fit</span><span class="p">)</span>
</pre></div>
</div>
<p>the fit type (0 = single-histogram fit)</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>norm 1
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">norm</span> <span class="mi">1</span>
</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
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">backgr</span><span class="o">.</span><span class="n">fit</span> <span class="mi">2</span>
</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
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">map</span> <span class="mi">3</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">0</span>
</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
<p>the definition of the <strong>maps</strong> used in the <code class="docutils literal notranslate"><span class="pre">THEORY</span> <span class="pre">block</span></code> — 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
in the <code class="docutils literal notranslate"><span class="pre">THEORY</span> <span class="pre">block</span></code> for this RUN block and <strong>map2</strong>, <strong>map3</strong>, and so on are undefined.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">forward</span> <span class="mi">3</span>
</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
<p>the histogram number; in this example 3 corresponds to the histogram of the “Up” positron counter</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">data</span> <span class="mi">1</span> <span class="mi">8000</span>
</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
<p>start and end bins of the range containing useful data in the histogram (to be adjusted, <em>e.g.</em> by using <code class="docutils literal notranslate"><span class="pre">musrt0</span></code>, see below)</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">t0</span> <span class="mi">1</span>
</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
<p>histogram bin corresponding to the time zero (muon implantation time) (to be adjusted, <em>e.g.</em> by <code class="docutils literal notranslate"><span class="pre">musrt0</span></code>, see below)</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">fit</span> <span class="mi">0</span> <span class="mf">4.9</span>
</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
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">packing</span> <span class="mi">20</span>
</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>
<p><a class="reference internal" href="user-manual.html#msr-commands-block"><span class="std std-ref">The COMMAND block</span></a></p>
<div class="highlight-default notranslate"><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
<p>In the <code class="docutils literal notranslate"><span class="pre">COMMANDS</span> <span class="pre">block</span></code>, a sequence of operations that should be performed is defined.
Here, the requested operations are the minimization of <span class="math notranslate nohighlight">\(\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
be found <a class="reference internal" href="user-manual.html#msr-commands-block"><span class="std std-ref">here</span></a>.</p>
<p><a class="reference internal" href="user-manual.html#msr-fourier-block"><span class="std std-ref">The FOURIER block</span></a></p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">FOURIER</span>
<span class="n">units</span> <span class="n">Gauss</span> <span class="c1"># units either &#39;Gauss&#39;, &#39;MHz&#39;, or &#39;Mc/s&#39;</span>
<span class="n">fourier_power</span> <span class="mi">10</span>
<span class="n">apodization</span> <span class="n">WEAK</span> <span class="c1"># NONE, WEAK, MEDIUM, STRONG</span>
<span class="n">plot</span> <span class="n">POWER</span> <span class="c1"># REAL, IMAG, REAL_AND_IMAG, POWER, PHASE</span>
<span class="n">phase</span> <span class="n">par3</span>
<span class="nb">range</span> <span class="mf">0.0</span> <span class="mf">600.0</span>
</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>
<p>The <code class="docutils literal notranslate"><span class="pre">FOURIER</span> <span class="pre">block</span></code> is used to define basic settings for the Fourier transform available
in <a class="reference internal" href="user-manual.html#musrview"><span class="std std-ref">musrview</span></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;
<div><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">units</span> <span class="n">Gauss</span> <span class="c1"># units either &#39;Gauss&#39;, &#39;MHz&#39;, or &#39;Mc/s&#39;</span>
</pre></div>
</div>
<p>the units of the Fourier domain</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>fourier_power 10
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">fourier_power</span> <span class="mi">10</span>
</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
<p>the number of data points used for the discrete transform, here <span class="math notranslate nohighlight">\(2^{10}=1024\)</span>.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">apodization</span> <span class="n">WEAK</span> <span class="c1"># NONE, WEAK, MEDIUM, STRONG</span>
</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
<p>the <a class="reference internal" href="user-manual.html#msr-fourier-block-apodization"><span class="std std-ref">apodization</span></a> to be used</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">plot</span> <span class="n">POWER</span> <span class="c1"># REAL, IMAG, REAL_AND_IMAG, POWER, PHASE</span>
</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
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">phase</span> <span class="n">par3</span>
</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
from the <code class="docutils literal notranslate"><span class="pre">FITPARAMETER</span> <span class="pre">block</span></code> can be given, here <strong>par3</strong> takes the value of <strong>parameter 3</strong>.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">range</span> <span class="mf">0.0</span> <span class="mf">600.0</span>
</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
<p><a class="reference internal" href="user-manual.html#msr-plot-block"><span class="std std-ref">The PLOT block</span></a></p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">PLOT</span> <span class="mi">0</span> <span class="p">(</span><span class="n">single</span> <span class="n">histo</span> <span class="n">plot</span><span class="p">)</span>
<span class="n">runs</span> <span class="mi">1</span> <span class="mi">2</span>
<span class="nb">range</span> <span class="mi">0</span> <span class="mi">4</span> <span class="o">-</span><span class="mf">0.2</span> <span class="mf">0.2</span>
</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).
<p>The <code class="docutils literal notranslate"><span class="pre">PLOT</span> <span class="pre">block</span></code> defines which data (corresponding to the given RUN blocks) is plotted when
<a class="reference internal" href="user-manual.html#musrview"><span class="std std-ref">musrview</span></a> is called. In the given example, a canvas would be drawn containing
the (life-time-corrected) data of the first two <code class="docutils literal notranslate"><span class="pre">RUN</span> <span class="pre">blocks</span></code> (“Up” and “Down” 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
It is possible to define more than one <code class="docutils literal notranslate"><span class="pre">PLOT</span> <span class="pre">block</span></code>. Each <code class="docutils literal notranslate"><span class="pre">PLOT</span> <span class="pre">block</span></code> corresponds to a
separate canvas. Therefore, the second <code class="docutils literal notranslate"><span class="pre">PLOT</span> <span class="pre">block</span></code> in the file</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">PLOT</span> <span class="mi">0</span> <span class="p">(</span><span class="n">single</span> <span class="n">histo</span> <span class="n">plot</span><span class="p">)</span>
<span class="n">runs</span> <span class="mi">3</span>
<span class="n">use_fit_ranges</span>
</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
<p>produces an additional window containing the (not life-time-corrected) data of the third <code class="docutils literal notranslate"><span class="pre">RUN</span> <span class="pre">block</span></code>
(“Right” positron counter). The abscissa ranges from 0 to 4.9 μs (according to the fit range given
in the <code class="docutils literal notranslate"><span class="pre">RUN</span> <span class="pre">block</span></code>).</p>
<p><a class="reference internal" href="user-manual.html#msr-statistic-block"><span class="std std-ref">The STATISTIC block</span></a></p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">STATISTIC</span> <span class="o">---</span> <span class="mi">2011</span><span class="o">-</span><span class="mi">07</span><span class="o">-</span><span class="mi">09</span> <span class="mi">10</span><span class="p">:</span><span class="mi">58</span><span class="p">:</span><span class="mi">44</span>
<span class="n">chisq</span> <span class="o">=</span> <span class="mf">1348.1764</span><span class="p">,</span> <span class="n">NDF</span> <span class="o">=</span> <span class="mi">1146</span><span class="p">,</span> <span class="n">chisq</span><span class="o">/</span><span class="n">NDF</span> <span class="o">=</span> <span class="mf">1.176419</span>
</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
date and time as well as the absolute and normalized values of <span class="math notranslate nohighlight">\(\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>
@ -296,9 +285,9 @@ least once and the fit has converged!</p>
<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
<code class="docutils literal notranslate"><span class="pre">RUN</span> <span class="pre">blocks</span></code> have to be set correctly. This can be achieved using <a class="reference internal" href="user-manual.html#musrt0"><span class="std std-ref">musrt0</span></a>.
Starting this program by selecting the <code class="docutils literal notranslate"><span class="pre">musrt0</span></code> button in <code class="docutils literal notranslate"><span class="pre">musredit</span></code> or calling from a terminal</p>
<div class="highlight-bash notranslate"><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>
@ -313,65 +302,65 @@ 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>
the new t0 and data-range values will be written to the msr file. A full description of <code class="docutils literal notranslate"><span class="pre">musrt0</span></code> can be
found <a class="reference internal" href="user-manual.html#musrt0"><span class="std std-ref">here</span></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>
<h3>Fit the model to the data using <code class="docutils literal notranslate"><span class="pre">musrfit</span></code><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
can proceed with fitting the specified model to the data. This is done by selecting the <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> icon
in <code class="docutils literal notranslate"><span class="pre">musredit</span></code> or calling from a terminal</p>
<div class="highlight-bash notranslate"><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
<h3>View the data and the fit using <code class="docutils literal notranslate"><span class="pre">musrview</span></code><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 <code class="docutils literal notranslate"><span class="pre">musrview</span></code> icon in <code class="docutils literal notranslate"><span class="pre">musredit</span></code> or
calling from a terminal</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ musrview 3110_tutorial.msr
<div class="highlight-bash notranslate"><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>
<p>The basic features of <code class="docutils literal notranslate"><span class="pre">musrview</span></code> can be found in the <code class="docutils literal notranslate"><span class="pre">Musrfit</span> <span class="pre">menu</span></code>. 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>
<li><p>export the shown data and the model to an ASCII file with comma-separated values</p></li>
<li><p>presenting the difference between the shown data and the model (keyboard shortcut: <strong>d</strong>)</p></li>
<li><p>calculate and show the Fourier transform of the shown data (keyboard shortcut: <strong>f</strong>), <em>e.g.</em> for
the asymmetry of the “Up” and “Down” detectors:</p></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
<h3>Process multiple msr files using <code class="docutils literal notranslate"><span class="pre">msr2data</span></code><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"><span class="std std-ref">msr2data</span></a>.
As the name indicates the main purpose of this program is to extract the <code class="docutils literal notranslate"><span class="pre">FITPARAMETER</span></code> 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
ASCII file (either in <code class="docutils literal notranslate"><span class="pre">TRIUMF</span> <span class="pre">DB</span></code> 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>
msr files from a template and to process these files using <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> 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>
use the file <code class="docutils literal notranslate"><span class="pre">3110_tutorial.msr</span></code> as template, generate the files <code class="docutils literal notranslate"><span class="pre">3111_tutorial.msr</span></code> through
<code class="docutils literal notranslate"><span class="pre">3114_tutorial.msr</span></code> with the corresponding updates in the RUN blocks, call for each one <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>
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
file <code class="docutils literal notranslate"><span class="pre">tutorial-T-dependence.dat</span></code> (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
<div class="highlight-bash notranslate"><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>
<p>To achieve the same in <code class="docutils literal notranslate"><span class="pre">musredit</span></code> (in this snapshot in the <em>dark theme</em>) one selects the <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> 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>
<p>This page only summarizes the very basic features and options of the programs contained in the <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> suite.
For a complete description please refer to the manuals of <a class="reference internal" href="user-manual.html#musrfit"><span class="std std-ref">musrfit</span></a> (including <a class="reference internal" href="user-manual.html#musrview"><span class="std std-ref">musrview</span></a>,
<a class="reference internal" href="user-manual.html#musrt0"><span class="std std-ref">musrt0</span></a>, and <a class="reference internal" href="user-manual.html#musrft"><span class="std std-ref">musrFT</span></a>), <a class="reference internal" href="mupp.html#mupp"><span class="std std-ref">mupp</span></a>, <a class="reference internal" href="musredit.html#musredit-sec"><span class="std std-ref">musredit</span></a>, and <a class="reference internal" href="msr2data.html#msr2data"><span class="std std-ref">msr2data</span></a>.</p>
</div>
</div>
<div class="section" id="asymmtery-fit-tutorial">
@ -384,17 +373,17 @@ For a complete description please refer to the manuals of <a class="reference in
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<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="#">Tutorial for <code class="docutils literal notranslate"><span class="pre">musrfit</span></code></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="#fit-the-model-to-the-data-using-musrfit">Fit the model to the data using <code class="docutils literal notranslate"><span class="pre">musrfit</span></code></a></li>
<li><a class="reference internal" href="#view-the-data-and-the-fit-using-musrview">View the data and the fit using <code class="docutils literal notranslate"><span class="pre">musrview</span></code></a></li>
<li><a class="reference internal" href="#process-multiple-msr-files-using-msr2data">Process multiple msr files using <code class="docutils literal notranslate"><span class="pre">msr2data</span></code></a></li>
<li><a class="reference internal" href="#further-reading">Further reading</a></li>
</ul>
</li>
@ -405,33 +394,32 @@ For a complete description please refer to the manuals of <a class="reference in
<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>
title="previous chapter">How to Cite <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>?</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>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/tutorial.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" />
<input type="text" name="q" aria-labelledby="searchlabel" />
<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>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -443,13 +431,13 @@ For a complete description please refer to the manuals of <a class="reference in
<li class="right" >
<a href="cite.html" title="How to Cite musrfit?"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
&copy; Copyright 2019, Andreas Suter.
Last updated on Jul 24, 2019.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
<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>

View File

@ -1,35 +1,24 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documentation of user libs (user functions) &mdash; musrfit 1.5.1 documentation</title>
<meta charset="utf-8" />
<title>Documentation of user libs (user functions) &#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">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.5.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<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="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="top" title="musrfit 1.5.1 documentation" href="index.html" />
<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="Setting up musrfit on Different Platforms" href="setup-standard.html" />
<link rel="prev" title="User manual" href="user-manual.html" />
</head>
<body>
<div class="related">
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -41,14 +30,14 @@
<li class="right" >
<a href="user-manual.html" title="User manual"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
<div class="body" role="main">
<div class="section" id="documentation-of-user-libs-user-functions">
<span id="user-libs"></span><span id="index-0"></span><h1>Documentation of user libs (user functions)<a class="headerlink" href="#documentation-of-user-libs-user-functions" title="Permalink to this headline"></a></h1>
@ -58,44 +47,44 @@
<span id="index-2"></span><h3>libFitPofB<a class="headerlink" href="#libfitpofb" title="Permalink to this headline"></a></h3>
<div class="section" id="introduction">
<h4>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline"></a></h4>
<p><tt class="docutils literal"><span class="pre">libFitPofB</span></tt> is a collection of <tt class="docutils literal"><span class="pre">C++</span></tt> classes using the <tt class="docutils literal"><span class="pre">musrfit</span></tt> <a class="reference internal" href="user-manual.html#id22"><em>user-functions</em></a>
interface in order to facilitate the usage in conjunction with <tt class="docutils literal"><span class="pre">musrfit</span></tt>. The classes contained in this
<p><code class="docutils literal notranslate"><span class="pre">libFitPofB</span></code> is a collection of <code class="docutils literal notranslate"><span class="pre">C++</span></code> classes using the <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> <a class="reference internal" href="user-manual.html#id38"><span class="std std-ref">user-functions</span></a>
interface in order to facilitate the usage in conjunction with <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>. The classes contained in this
library generally implement calculations of one-dimensional static magnetic field distributions
<span class="math">\(p(B)\)</span> which lead to the muon-spin depolarization functions</p>
<div class="math">
<span class="math notranslate nohighlight">\(p(B)\)</span> which lead to the muon-spin depolarization functions</p>
<div class="math notranslate nohighlight">
\[{\cal P}(t) = \int p(B) \cos(\gamma_\mu B t + \varphi) dB,\]</div>
<p>where <span class="math">\(\gamma_\mu = 2 \pi \times 135.54\)</span> MHz/T is the gyromagnetic ratio of the muon and <span class="math">\(\varphi\)</span>
<p>where <span class="math notranslate nohighlight">\(\gamma_\mu = 2 \pi \times 135.54\)</span> MHz/T is the gyromagnetic ratio of the muon and <span class="math notranslate nohighlight">\(\varphi\)</span>
is the initial phase of the muon spins with respect to the positron detector. At the moment the only available
implementations deal with field distributions measured in local isotropic superconductors, either by means of
low-energy μSR (see <a class="reference external" href="https://www.psi.ch/smus/lem">https://www.psi.ch/smus/lem</a>) in the Meissner state or by bulk μSR in the mixed state.
In the following the basic usage of the library in <tt class="docutils literal"><span class="pre">musrfit</span></tt> is explained—the calculations by themselves are only
In the following the basic usage of the library in <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> is explained—the calculations by themselves are only
outlined. For further information please refer to the original literature and/or the source code of the implementation.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">In order to supply certain information needed for the calculations but not suited to be stored in the <tt class="docutils literal"><span class="pre">musrfit</span></tt>
msr files an <tt class="docutils literal"><span class="pre">XML</span></tt> configuration file in the working directory is used. For details, see below.</p>
<p class="admonition-title">Note</p>
<p>In order to supply certain information needed for the calculations but not suited to be stored in the <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>
msr files an <code class="docutils literal notranslate"><span class="pre">XML</span></code> configuration file in the working directory is used. For details, see below.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The implementations in this library heavily rely on <a class="reference external" href="http://fftw.org/">FFTW3</a>. In principle, it always checks what
<p class="admonition-title">Note</p>
<p>The implementations in this library heavily rely on <a class="reference external" href="http://fftw.org/">FFTW3</a>. In principle, it always checks what
is the best way to do efficient Fourier transforms for a given machine before the transforms are actually done. If
repeatedly Fourier transforms of the same (sizable) length should be done, it might be worth storing the once
obtained information in an external file and just load it the next time this information is needed
(<a class="reference external" href="http://fftw.org/fftw3_doc/Wisdom.html">wisdom handling</a>). In case this feature shall be used, a valid wisdom
file has to be specified in the <tt class="docutils literal"><span class="pre">XML</span></tt> file.</p>
file has to be specified in the <code class="docutils literal notranslate"><span class="pre">XML</span></code> file.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The model functions described in the following do generally <em>not behave nicely</em> in conjunction with <tt class="docutils literal"><span class="pre">MINUIT</span></tt>
<p class="admonition-title">Note</p>
<p>The model functions described in the following do generally <em>not behave nicely</em> in conjunction with <code class="docutils literal notranslate"><span class="pre">MINUIT</span></code>
function minimizations (or maximizations). The analysis process at the moment in most cases involves some
tedious trial-and-error procedure, where the displayed MINUIT information as always deserves attention.
This is especially true if small effects should be analyzed (<em>e.g.</em> small diamagnetic shifts in superconductors).
The parameter uncertainty in many cases has to be estimated independently. Due to these limitations, also
the use of the fit option of <tt class="docutils literal"><span class="pre">msr2data</span></tt> <em>cannot</em> be advised.</p>
the use of the fit option of <code class="docutils literal notranslate"><span class="pre">msr2data</span></code> <em>cannot</em> be advised.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If these classes still prove useful and results obtained through them are part of scientific publications,
<p class="admonition-title">Note</p>
<p>If these classes still prove useful and results obtained through them are part of scientific publications,
an acknowledgment of the use of the library is appreciated.</p>
</div>
</div>
@ -103,98 +92,98 @@ an acknowledgment of the use of the library is appreciated.</p>
<h4>LE-μSR<a class="headerlink" href="#le-mgrsr" title="Permalink to this headline"></a></h4>
<div class="section" id="one-dimensional-london-model-for-the-meissner-state-of-isotropic-superconductors">
<span id="index-3"></span><h5>One-dimensional London model for the Meissner state of isotropic superconductors<a class="headerlink" href="#one-dimensional-london-model-for-the-meissner-state-of-isotropic-superconductors" title="Permalink to this headline"></a></h5>
<p>The models for analyzing LE-μSR data assume the magnetic induction <span class="math">\(B(z)\)</span> to vary only in the
<p>The models for analyzing LE-μSR data assume the magnetic induction <span class="math notranslate nohighlight">\(B(z)\)</span> to vary only in the
dimension parallel to the momentum of the incident muons. In such a case the magnetic field distribution is given by</p>
<div class="math">
<div class="math notranslate nohighlight">
\[p(B) = n(z) \left| \frac{dB(z)}{dz} \right|^{-1}\]</div>
<p>where <span class="math">\(n(z)\)</span> is the muon implantation profile simulated by <tt class="docutils literal"><span class="pre">TRIM.SP</span></tt>.</p>
<p>where <span class="math notranslate nohighlight">\(n(z)\)</span> is the muon implantation profile simulated by <code class="docutils literal notranslate"><span class="pre">TRIM.SP</span></code>.</p>
<p>Assuming an array of <em>N</em> isotropic local superconductors with a total thickness <em>d</em> in the Meissner state
the magnetic induction is given by solving the 1D London equation</p>
<div class="math">
<div class="math notranslate nohighlight">
\[\frac{\partial^2}{\partial z^2}B_i(z) = \frac{1}{\lambda_i^2}B_i(z)\]</div>
<p>for each layer <em>i</em> taking into account the boundary conditions (F. London, Superfluids: Macroscopic Theory of Superconductivity, Dover (1961), p. 34)</p>
<div class="math">
\[B_1(0) = B_N(d) = \mu_0H\]\[B_i(d_i) = B_{i+1}(d_i)\]\[\lambda_i^2B_i'(z)\Big\vert_{z=d_i} = \lambda_{i+1}^2B_{i+1}'(z)\Big\vert_{z=d_i},\]</div>
<p>where the <span class="math">\(d_i\)</span> specify the interfaces between two adjacent layers and <span class="math">\(\lambda_i\)</span> is
the magnetic field penetration depth in the constituent <span class="math">\(i\)</span>.</p>
<div class="math notranslate nohighlight">
\[ \begin{align}\begin{aligned}B_1(0) = B_N(d) = \mu_0H\\B_i(d_i) = B_{i+1}(d_i)\\\lambda_i^2B_i'(z)\Big\vert_{z=d_i} = \lambda_{i+1}^2B_{i+1}'(z)\Big\vert_{z=d_i},\end{aligned}\end{align} \]</div>
<p>where the <span class="math notranslate nohighlight">\(d_i\)</span> specify the interfaces between two adjacent layers and <span class="math notranslate nohighlight">\(\lambda_i\)</span> is
the magnetic field penetration depth in the constituent <span class="math notranslate nohighlight">\(i\)</span>.</p>
<p>The calculation of the field distribution has been set up for a superconducting half-space as well
as superconducting thin films with up to three superconducting layers with different penetration depths.
The muon-spin depolarization functions are calculated using the following lines in the <tt class="docutils literal"><span class="pre">THEORY</span></tt> block
of a <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr file:</p>
The muon-spin depolarization functions are calculated using the following lines in the <code class="docutils literal notranslate"><span class="pre">THEORY</span></code> block
of a <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr file:</p>
<p id="index-4"><strong>Superconducting half-space</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libFitPofB TLondon1DHS 1 2 3 4 5
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libFitPofB</span> <span class="n">TLondon1DHS</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span>
</pre></div>
</div>
<p>The parameters are:</p>
<ol class="arabic simple">
<li>phase (deg)</li>
<li>muon implantation energy as specified in the <a class="reference internal" href="#bmwlibs-xml"><em>XML startup</em></a> file (keV)</li>
<li>applied field (G)</li>
<li>thickness of the dead layer (nm)</li>
<li>magnetic field penetration depth (nm)</li>
<li><p>phase (deg)</p></li>
<li><p>muon implantation energy as specified in the <a class="reference internal" href="#bmwlibs-xml"><span class="std std-ref">XML startup</span></a> file (keV)</p></li>
<li><p>applied field (G)</p></li>
<li><p>thickness of the dead layer (nm)</p></li>
<li><p>magnetic field penetration depth (nm)</p></li>
</ol>
<p id="index-5"><strong>Superconducting thin film (one layer)</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libFitPofB TLondon1D1L 1 2 3 4 5 6 [a b]
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libFitPofB</span> <span class="n">TLondon1D1L</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span> <span class="mi">6</span> <span class="p">[</span><span class="n">a</span> <span class="n">b</span><span class="p">]</span>
</pre></div>
</div>
<p>The mandatory parameters are:</p>
<ol class="arabic simple">
<li>phase (deg)</li>
<li>muon implantation energy as specified in the <a class="reference internal" href="#bmwlibs-xml"><em>XML startup</em></a> file (keV)</li>
<li>applied field (G)</li>
<li>thickness of the dead layer (nm)</li>
<li>thickness of the actually superconducting layer (nm)</li>
<li>magnetic field penetration depth (nm)</li>
<li><p>phase (deg)</p></li>
<li><p>muon implantation energy as specified in the <a class="reference internal" href="#bmwlibs-xml"><span class="std std-ref">XML startup</span></a> file (keV)</p></li>
<li><p>applied field (G)</p></li>
<li><p>thickness of the dead layer (nm)</p></li>
<li><p>thickness of the actually superconducting layer (nm)</p></li>
<li><p>magnetic field penetration depth (nm)</p></li>
</ol>
<p>The optional parameters are:</p>
<ol class="loweralpha simple">
<li>fraction f<sub>1</sub> of muons in the thin film contributing to the signal (0 ≤ f<sub>1</sub> ≤ 1)</li>
<li>fraction f<sub>s</sub> of muons in the substrate contributing to the signal (0 ≤ f<sub>s</sub> ≤ 1)</li>
<li><p>fraction f<sub>1</sub> of muons in the thin film contributing to the signal (0 ≤ f<sub>1</sub> ≤ 1)</p></li>
<li><p>fraction f<sub>s</sub> of muons in the substrate contributing to the signal (0 ≤ f<sub>s</sub> ≤ 1)</p></li>
</ol>
<p id="index-6"><strong>Superconducting thin-film bilayer heterostructure</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libFitPofB TLondon1D2L 1 2 3 4 5 6 7 8 [a b c]
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libFitPofB</span> <span class="n">TLondon1D2L</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span> <span class="mi">6</span> <span class="mi">7</span> <span class="mi">8</span> <span class="p">[</span><span class="n">a</span> <span class="n">b</span> <span class="n">c</span><span class="p">]</span>
</pre></div>
</div>
<p>The mandatory parameters are:</p>
<ol class="arabic simple">
<li>phase (deg)</li>
<li>muon implantation energy as specified in the <a class="reference internal" href="#bmwlibs-xml"><em>XML startup</em></a> file (keV)</li>
<li>applied field (G)</li>
<li>thickness of the dead layer (nm)</li>
<li>thickness of the actually superconducting first layer (nm)</li>
<li>thickness of the actually superconducting second layer (nm)</li>
<li>magnetic field penetration depth of the first layer (nm)</li>
<li>magnetic field penetration depth of the second layer (nm)</li>
<li><p>phase (deg)</p></li>
<li><p>muon implantation energy as specified in the <a class="reference internal" href="#bmwlibs-xml"><span class="std std-ref">XML startup</span></a> file (keV)</p></li>
<li><p>applied field (G)</p></li>
<li><p>thickness of the dead layer (nm)</p></li>
<li><p>thickness of the actually superconducting first layer (nm)</p></li>
<li><p>thickness of the actually superconducting second layer (nm)</p></li>
<li><p>magnetic field penetration depth of the first layer (nm)</p></li>
<li><p>magnetic field penetration depth of the second layer (nm)</p></li>
</ol>
<p>The optional parameters are:</p>
<ol class="loweralpha simple">
<li>fraction f<sub>1</sub> of muons in the dead and first layer contributing to the signal (0 ≤ f<sub>1</sub> ≤ 1)</li>
<li>fraction f<sub>2</sub> of muons in the second layer contributing to the signal (0 ≤ f<sub>2</sub> ≤ 1)</li>
<li>fraction f<sub>s</sub> of muons in the substrate contributing to the signal (0 ≤ f<sub>s</sub> ≤ 1)</li>
<li><p>fraction f<sub>1</sub> of muons in the dead and first layer contributing to the signal (0 ≤ f<sub>1</sub> ≤ 1)</p></li>
<li><p>fraction f<sub>2</sub> of muons in the second layer contributing to the signal (0 ≤ f<sub>2</sub> ≤ 1)</p></li>
<li><p>fraction f<sub>s</sub> of muons in the substrate contributing to the signal (0 ≤ f<sub>s</sub> ≤ 1)</p></li>
</ol>
<p id="index-7"><strong>Superconducting thin-film trilayer heterostructure</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libFitPofB TLondon1D3L 1 2 3 4 5 6 7 8 9 10 [a b c d]
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libFitPofB</span> <span class="n">TLondon1D3L</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span> <span class="mi">6</span> <span class="mi">7</span> <span class="mi">8</span> <span class="mi">9</span> <span class="mi">10</span> <span class="p">[</span><span class="n">a</span> <span class="n">b</span> <span class="n">c</span> <span class="n">d</span><span class="p">]</span>
</pre></div>
</div>
<p>The mandatory parameters are:</p>
<ol class="arabic simple">
<li>phase (deg)</li>
<li>muon implantation energy as specified in the <a class="reference internal" href="#bmwlibs-xml"><em>XML startup</em></a> file (keV)</li>
<li>applied field (G)</li>
<li>thickness of the dead layer (nm)</li>
<li>thickness of the actually superconducting first layer (nm)</li>
<li>thickness of the actually superconducting second layer (nm)</li>
<li>thickness of the actually superconducting third layer (nm)</li>
<li>magnetic field penetration depth of the first layer (nm)</li>
<li>magnetic field penetration depth of the second layer (nm)</li>
<li>magnetic field penetration depth of the third layer (nm)</li>
<li><p>phase (deg)</p></li>
<li><p>muon implantation energy as specified in the <a class="reference internal" href="#bmwlibs-xml"><span class="std std-ref">XML startup</span></a> file (keV)</p></li>
<li><p>applied field (G)</p></li>
<li><p>thickness of the dead layer (nm)</p></li>
<li><p>thickness of the actually superconducting first layer (nm)</p></li>
<li><p>thickness of the actually superconducting second layer (nm)</p></li>
<li><p>thickness of the actually superconducting third layer (nm)</p></li>
<li><p>magnetic field penetration depth of the first layer (nm)</p></li>
<li><p>magnetic field penetration depth of the second layer (nm)</p></li>
<li><p>magnetic field penetration depth of the third layer (nm)</p></li>
</ol>
<p>The optional parameters are:</p>
<ol class="loweralpha simple">
<li>fraction f<sub>1</sub> of muons in the dead and first layer contributing to the signal (0 ≤ f<sub>1</sub> ≤ 1)</li>
<li>fraction f<sub>2</sub> of muons in the second layer contributing to the signal (0 ≤ f<sub>2</sub> ≤ 1)</li>
<li>fraction f<sub>3</sub> of muons in the third layer contributing to the signal (0 ≤ f<sub>3</sub> ≤ 1)</li>
<li>fraction f<sub>s</sub> of muons in the substrate contributing to the signal (0 ≤ f<sub>s</sub> ≤ 1)</li>
<li><p>fraction f<sub>1</sub> of muons in the dead and first layer contributing to the signal (0 ≤ f<sub>1</sub> ≤ 1)</p></li>
<li><p>fraction f<sub>2</sub> of muons in the second layer contributing to the signal (0 ≤ f<sub>2</sub> ≤ 1)</p></li>
<li><p>fraction f<sub>3</sub> of muons in the third layer contributing to the signal (0 ≤ f<sub>3</sub> ≤ 1)</p></li>
<li><p>fraction f<sub>s</sub> of muons in the substrate contributing to the signal (0 ≤ f<sub>s</sub> ≤ 1)</p></li>
</ol>
</div>
</div>
@ -205,137 +194,134 @@ of a <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr file
<p>When investigating superconductors in the mixed state by means of conventional μSR a
two-dimensional flux-line lattice is probed randomly by the muons. The spatial field
distributions within such an ordered lattice are modeled using the Fourier series</p>
<div class="math">
<div class="math notranslate nohighlight">
\[B(\mathbf{r}) = \langle B \rangle \sum\limits_{\mathbf{K}}B_{\mathbf{K}}\exp(-\imath\mathbf{K}\mathbf{r}),\]</div>
<p>where <span class="math">\(\mathbf{r}=(x,y)\)</span>, <strong>K</strong> are the reciprocal lattice vectors of a two-dimensional
vortex lattice and the <span class="math">\(B_{\mathbf{K}}\)</span> are the Fourier coefficients depending on the
magnetic penetration depth <span class="math">\(\lambda\)</span> and the superconducting coherence length <span class="math">\(\xi\)</span>.
The <span class="math">\(B_{\mathbf{K}}\)</span> for some specific models are as follows:</p>
<p>where <span class="math notranslate nohighlight">\(\mathbf{r}=(x,y)\)</span>, <strong>K</strong> are the reciprocal lattice vectors of a two-dimensional
vortex lattice and the <span class="math notranslate nohighlight">\(B_{\mathbf{K}}\)</span> are the Fourier coefficients depending on the
magnetic penetration depth <span class="math notranslate nohighlight">\(\lambda\)</span> and the superconducting coherence length <span class="math notranslate nohighlight">\(\xi\)</span>.
The <span class="math notranslate nohighlight">\(B_{\mathbf{K}}\)</span> for some specific models are as follows:</p>
<p><strong>London model with Gaussian cutoff</strong> (E.H. Brandt, <a class="reference external" href="http://dx.doi.org/10.1007/BF00683568">J. Low Temp. Phys. 73, 355 (1988)</a>.)</p>
<div class="math">
<div class="math notranslate nohighlight">
\[B_{\mathbf{K}} = \frac{\exp\left({-K^2\xi^2/2}\right)}{1 + K^2\lambda^2}\]</div>
<p><strong>Modified London model</strong> (T.M. Riseman <em>et al.</em>, <a class="reference external" href="http://dx.doi.org/10.1103/PhysRevB.52.10569">Phys. Rev. B 52, 10569 (1995)</a>.)</p>
<div class="math">
<div class="math notranslate nohighlight">
\[B_{\mathbf{K}} = \frac{\exp\left({-K^2\xi^2/2(1-b)}\right)}{1 + K^2\lambda^2/(1-b)},\]</div>
<p>where <span class="math">\(b = \langle B \rangle / (\mu_0 H_{\rm c2})\)</span>.</p>
<p>where <span class="math notranslate nohighlight">\(b = \langle B \rangle / (\mu_0 H_{\rm c2})\)</span>.</p>
<p><strong>Analytical Ginzburg-Landau model</strong> ( A. Yaouanc, P. Dalmas de Réotier and E.H. Brandt, <a class="reference external" href="http://dx.doi.org/10.1103/PhysRevB.55.11107">Phys. Rev. B 55, 11107 (1997)</a>)</p>
<div class="math">
<div class="math notranslate nohighlight">
\[B_{\mathbf{K}} = \frac{f_{\infty}K_1\left(\frac{\xi_v}{\lambda}\sqrt{f_{\infty}^2+\lambda^2K^2}\right)}{K_1\left(\frac{\xi_v}{\lambda}f_{\infty}\right)\sqrt{f_{\infty}^2+\lambda^2K^2}},\]</div>
<p>where <span class="math">\(f_{\infty} = 1 - b^4,~\xi_v = \xi\left(\sqrt{2}-{3\xi}/\left({4\lambda}\right)\right)\sqrt{(1+b^4)(1-2b(1-b)^2)}\)</span> and
<span class="math">\(K_1\)</span> is a modified Bessel function.</p>
<p>Apart from the mentioned analytic models the <strong>numerical Ginzburg-Landau model</strong> (<a class="reference external" href="http://dx.doi.org/10.1103/PhysRevB.68.054506">E.H. Brandt, Phys. Rev. B 68, 054506 (2003).</a>) is available. In this case <span class="math">\(B(\mathbf{r})\)</span> is obtained by an iterative minimization of the free energy of the vortex lattice.</p>
<p>where <span class="math notranslate nohighlight">\(f_{\infty} = 1 - b^4,~\xi_v = \xi\left(\sqrt{2}-{3\xi}/\left({4\lambda}\right)\right)\sqrt{(1+b^4)(1-2b(1-b)^2)}\)</span> and
<span class="math notranslate nohighlight">\(K_1\)</span> is a modified Bessel function.</p>
<p>Apart from the mentioned analytic models the <strong>numerical Ginzburg-Landau model</strong> (<a class="reference external" href="http://dx.doi.org/10.1103/PhysRevB.68.054506">E.H. Brandt, Phys. Rev. B 68, 054506 (2003).</a>) is available. In this case <span class="math notranslate nohighlight">\(B(\mathbf{r})\)</span> is obtained by an iterative minimization of the free energy of the vortex lattice.</p>
<p><strong>Concerning the applicability (e.g. field regions) of each of the mentioned models please refer to the original publications!</strong></p>
<p>At the moment, the calculation of the field distribution has been implemented for <em>triangular</em> flux-line lattices.
The number of grid lines in which the inter-vortex distance is divided for the calculations to be specified through
the <a class="reference internal" href="#bmwlibs-xml"><em>XML startup</em></a>.
The muon-spin depolarization functions finally are calculated using the following lines in the THEORY block of a <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr file:</p>
the <a class="reference internal" href="#bmwlibs-xml"><span class="std std-ref">XML startup</span></a>.
The muon-spin depolarization functions finally are calculated using the following lines in the THEORY block of a <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr file:</p>
<p id="index-9"><strong>2D triangular vortex lattice, London model with Gaussian cutoff</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libFitPofB TBulkTriVortexLondon 1 2 3 4
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libFitPofB</span> <span class="n">TBulkTriVortexLondon</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span>
</pre></div>
</div>
<p>The parameters are:</p>
<ol class="arabic simple">
<li>phase (deg)</li>
<li>mean magnetic induction (G)</li>
<li>magnetic penetration depth (nm)</li>
<li>Ginzburg-Landau coherence length (nm)</li>
<li><p>phase (deg)</p></li>
<li><p>mean magnetic induction (G)</p></li>
<li><p>magnetic penetration depth (nm)</p></li>
<li><p>Ginzburg-Landau coherence length (nm)</p></li>
</ol>
<p id="index-10"><strong>2D triangular vortex lattice, modified London model</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libFitPofB TBulkTriVortexML 1 2 3 4
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libFitPofB</span> <span class="n">TBulkTriVortexML</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span>
</pre></div>
</div>
<p>The parameters are:</p>
<ol class="arabic simple">
<li>phase (deg)</li>
<li>mean magnetic induction (G)</li>
<li>magnetic penetration depth (nm)</li>
<li>Ginzburg-Landau coherence length (nm)</li>
<li><p>phase (deg)</p></li>
<li><p>mean magnetic induction (G)</p></li>
<li><p>magnetic penetration depth (nm)</p></li>
<li><p>Ginzburg-Landau coherence length (nm)</p></li>
</ol>
<p id="index-11"><strong>2D triangular vortex lattice, analytic Ginzburg-Landau model</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libFitPofB TBulkTriVortexAGL 1 2 3 4
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libFitPofB</span> <span class="n">TBulkTriVortexAGL</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span>
</pre></div>
</div>
<p>The parameters are:</p>
<ol class="arabic simple">
<li>phase (deg)</li>
<li>mean magnetic induction (G)</li>
<li>magnetic penetration depth (nm)</li>
<li>Ginzburg-Landau coherence length (nm)</li>
<li><p>phase (deg)</p></li>
<li><p>mean magnetic induction (G)</p></li>
<li><p>magnetic penetration depth (nm)</p></li>
<li><p>Ginzburg-Landau coherence length (nm)</p></li>
</ol>
<p id="index-12"><strong>2D triangular vortex lattice, numerical Ginzburg-Landau model</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libFitPofB TBulkTriVortexNGL 1 2 3 4
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libFitPofB</span> <span class="n">TBulkTriVortexNGL</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span>
</pre></div>
</div>
<p>The parameters are:</p>
<ol class="arabic simple">
<li>phase (deg)</li>
<li>mean magnetic induction (G)</li>
<li>magnetic penetration depth (nm)</li>
<li>Ginzburg-Landau coherence length (nm)</li>
<li><p>phase (deg)</p></li>
<li><p>mean magnetic induction (G)</p></li>
<li><p>magnetic penetration depth (nm)</p></li>
<li><p>Ginzburg-Landau coherence length (nm)</p></li>
</ol>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">In order to improve the convergence of <tt class="docutils literal"><span class="pre">MIGRAD</span></tt> it has proven useful to use the log-likelihood
maximization instead of the <span class="math">\(\chi^2\)</span> minimization routines and to choose sufficiently large
initial steps for the parameters. Calling <tt class="docutils literal"><span class="pre">MINOS</span></tt> in conjunction with these functions is futile.</p>
<p class="admonition-title">Note</p>
<p>In order to improve the convergence of <code class="docutils literal notranslate"><span class="pre">MIGRAD</span></code> it has proven useful to use the log-likelihood
maximization instead of the <span class="math notranslate nohighlight">\(\chi^2\)</span> minimization routines and to choose sufficiently large
initial steps for the parameters. Calling <code class="docutils literal notranslate"><span class="pre">MINOS</span></code> in conjunction with these functions is futile.</p>
</div>
<p>Therefore, the <a class="reference internal" href="user-manual.html#msr-commands-block"><em>COMMANDS block</em></a> of the msr file could look like:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>COMMANDS
STRATEGY 2
MAX_LIKELIHOOD
MIGRAD
HESSE
SAVE
<p>Therefore, the <a class="reference internal" href="user-manual.html#msr-commands-block"><span class="std std-ref">COMMANDS block</span></a> of the msr file could look like:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">COMMANDS</span>
<span class="n">STRATEGY</span> <span class="mi">2</span>
<span class="n">MAX_LIKELIHOOD</span>
<span class="n">MIGRAD</span>
<span class="n">HESSE</span>
<span class="n">SAVE</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="the-xml-startup-file">
<span id="bmwlibs-xml"></span><span id="index-13"></span><h4>The XML startup file<a class="headerlink" href="#the-xml-startup-file" title="Permalink to this headline"></a></h4>
<p><tt class="docutils literal"><span class="pre">BMW_startup.xml</span></tt> is a configuration file located in the working directory. In this file some settings
<p><code class="docutils literal notranslate"><span class="pre">BMW_startup.xml</span></code> is a configuration file located in the working directory. In this file some settings
like the time and field resolution of the calculations as well as the present muon implantation profiles
for a LE-μSR analysis have to be defined. The following XML tags are allowed to define settings:</p>
<dl class="docutils">
<dt><strong>&lt;debug&gt;ONE_OR_ZERO&lt;/debug&gt;</strong></dt>
<dd>activate the debugging output of the settings read from the XML file by setting 1, deactivate it with 0.</dd>
<dt><strong>&lt;wisdom&gt;PATH_TO_FILE&lt;/wisdom&gt;</strong></dt>
<dd>specify the <tt class="docutils literal"><span class="pre">PATH_TO_FILE</span></tt> to an <a class="reference external" href="http://fftw.org/fftw3_doc/Wisdom.html#Wisdom">FFTW3 wisdom file</a>
that should be used; if the <tt class="docutils literal"><span class="pre">PATH_TO_FILE</span></tt> is invalid, no <tt class="docutils literal"><span class="pre">FFTW3</span></tt> wisdom will be used.</dd>
<dt><strong>&lt;delta_t&gt;ResT&lt;/delta_t&gt;</strong></dt>
<dd>set the time resolution <tt class="docutils literal"><span class="pre">ResT</span></tt> for the calculated depolarization function in microseconds.</dd>
<dt><strong>&lt;delta_B&gt;ResB&lt;/delta_B&gt;</strong></dt>
<dd>set the field resolution <tt class="docutils literal"><span class="pre">ResB</span></tt> for the calculated field distribution in Gauss.</dd>
<dt><strong>&lt;VortexLattice&gt;&lt;/VortexLattice&gt;</strong></dt>
<dd><p class="first">set the parameters used for the calculation of the spatial field distribution of a vortex lattice.</p>
<dl class="last docutils">
<dt><strong>&lt;N_VortexGrid&gt;N&lt;/N_VortexGrid&gt;</strong></dt>
<dd>specify the number of points <strong>N</strong> (in each of the two dimensions) for which the fields within the
vortex lattice are calculated (inside a <strong>&lt;VortexLattice&gt;</strong> environment)</dd>
<dl>
<dt><strong>&lt;debug&gt;ONE_OR_ZERO&lt;/debug&gt;</strong></dt><dd><p>activate the debugging output of the settings read from the XML file by setting 1, deactivate it with 0.</p>
</dd>
<dt><strong>&lt;wisdom&gt;PATH_TO_FILE&lt;/wisdom&gt;</strong></dt><dd><p>specify the <code class="docutils literal notranslate"><span class="pre">PATH_TO_FILE</span></code> to an <a class="reference external" href="http://fftw.org/fftw3_doc/Wisdom.html#Wisdom">FFTW3 wisdom file</a>
that should be used; if the <code class="docutils literal notranslate"><span class="pre">PATH_TO_FILE</span></code> is invalid, no <code class="docutils literal notranslate"><span class="pre">FFTW3</span></code> wisdom will be used.</p>
</dd>
<dt><strong>&lt;delta_t&gt;ResT&lt;/delta_t&gt;</strong></dt><dd><p>set the time resolution <code class="docutils literal notranslate"><span class="pre">ResT</span></code> for the calculated depolarization function in microseconds.</p>
</dd>
<dt><strong>&lt;delta_B&gt;ResB&lt;/delta_B&gt;</strong></dt><dd><p>set the field resolution <code class="docutils literal notranslate"><span class="pre">ResB</span></code> for the calculated field distribution in Gauss.</p>
</dd>
<dt><strong>&lt;VortexLattice&gt;&lt;/VortexLattice&gt;</strong></dt><dd><p>set the parameters used for the calculation of the spatial field distribution of a vortex lattice.</p>
<dl class="simple">
<dt><strong>&lt;N_VortexGrid&gt;N&lt;/N_VortexGrid&gt;</strong></dt><dd><p>specify the number of points <strong>N</strong> (in each of the two dimensions) for which the fields within the
vortex lattice are calculated (inside a <strong>&lt;VortexLattice&gt;</strong> environment)</p>
</dd>
</dl>
</dd>
<dt><strong>&lt;LEM&gt;&lt;/LEM&gt;</strong></dt>
<dd><p class="first">set the parameters used for the calculation of LE-μSR field distributions</p>
<dl class="last docutils">
<dt><strong>&lt;data_path&gt;DATA_PATH_PREFIX&lt;/data_path&gt;</strong></dt>
<dd>specify the <tt class="docutils literal"><span class="pre">DATA_PATH_PREFIX</span></tt> to the <tt class="docutils literal"><span class="pre">TRIM.SP</span></tt> implantation profiles (inside a <strong>&lt;LEM&gt;</strong> environment)</dd>
<dt><strong>&lt;N_theory&gt;N_THEORY&lt;/N_theory&gt;</strong></dt>
<dd>specify the number of points <strong>N_THEORY</strong> for which <em>B(z)</em> is calculated (inside a <strong>&lt;LEM&gt;</strong> environment)
The specification of this number is not needed if the calculation of the inverse of <em>B(z)</em> is implemented!</dd>
<dt><strong>&lt;energy_list&gt;&lt;/energy_list&gt;</strong></dt>
<dd><p class="first">set the energies for which <tt class="docutils literal"><span class="pre">TRIM.SP</span></tt> implantation profiles are available (inside a <strong>&lt;LEM&gt;</strong> environment)</p>
<dl class="last docutils">
<dt><strong>&lt;energy_label&gt;LABEL&lt;/energy_label&gt;</strong></dt>
<dd>specify the <strong>LABEL</strong> within the file name of a available <tt class="docutils literal"><span class="pre">TRIM.SP</span></tt> <tt class="docutils literal"><span class="pre">RGE</span></tt> file (inside a <strong>&lt;energy_list&gt;</strong> environment)
The expected name of the <tt class="docutils literal"><span class="pre">RGE</span></tt> file will be: <tt class="docutils literal"><span class="pre">DATA_PATH_PREFIX</span> <span class="pre">+</span> <span class="pre">LABEL</span> <span class="pre">+</span> <span class="pre">.rge</span></tt></dd>
<dt><strong>&lt;energy&gt;E&lt;/energy&gt;</strong></dt>
<dd>specify the muon energy <em>E</em> (in keV) belonging to the <tt class="docutils literal"><span class="pre">TRIM.SP</span></tt> <tt class="docutils literal"><span class="pre">RGE</span></tt> file given above (inside a <strong>&lt;energy_list&gt;</strong> environment)</dd>
<dt><strong>&lt;LEM&gt;&lt;/LEM&gt;</strong></dt><dd><p>set the parameters used for the calculation of LE-μSR field distributions</p>
<dl>
<dt><strong>&lt;data_path&gt;DATA_PATH_PREFIX&lt;/data_path&gt;</strong></dt><dd><p>specify the <code class="docutils literal notranslate"><span class="pre">DATA_PATH_PREFIX</span></code> to the <code class="docutils literal notranslate"><span class="pre">TRIM.SP</span></code> implantation profiles (inside a <strong>&lt;LEM&gt;</strong> environment)</p>
</dd>
<dt><strong>&lt;N_theory&gt;N_THEORY&lt;/N_theory&gt;</strong></dt><dd><p>specify the number of points <strong>N_THEORY</strong> for which <em>B(z)</em> is calculated (inside a <strong>&lt;LEM&gt;</strong> environment)
The specification of this number is not needed if the calculation of the inverse of <em>B(z)</em> is implemented!</p>
</dd>
<dt><strong>&lt;energy_list&gt;&lt;/energy_list&gt;</strong></dt><dd><p>set the energies for which <code class="docutils literal notranslate"><span class="pre">TRIM.SP</span></code> implantation profiles are available (inside a <strong>&lt;LEM&gt;</strong> environment)</p>
<dl class="simple">
<dt><strong>&lt;energy_label&gt;LABEL&lt;/energy_label&gt;</strong></dt><dd><p>specify the <strong>LABEL</strong> within the file name of a available <code class="docutils literal notranslate"><span class="pre">TRIM.SP</span></code> <code class="docutils literal notranslate"><span class="pre">RGE</span></code> file (inside a <strong>&lt;energy_list&gt;</strong> environment)
The expected name of the <code class="docutils literal notranslate"><span class="pre">RGE</span></code> file will be: <code class="docutils literal notranslate"><span class="pre">DATA_PATH_PREFIX</span> <span class="pre">+</span> <span class="pre">LABEL</span> <span class="pre">+</span> <span class="pre">.rge</span></code></p>
</dd>
<dt><strong>&lt;energy&gt;E&lt;/energy&gt;</strong></dt><dd><p>specify the muon energy <em>E</em> (in keV) belonging to the <code class="docutils literal notranslate"><span class="pre">TRIM.SP</span></code> <code class="docutils literal notranslate"><span class="pre">RGE</span></code> file given above (inside a <strong>&lt;energy_list&gt;</strong> environment)</p>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
<p>An example XML file looks as follows:</p>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
<span class="nt">&lt;BMW&gt;</span>
<span class="nt">&lt;debug&gt;</span>0<span class="nt">&lt;/debug&gt;</span>
<span class="nt">&lt;wisdom&gt;</span>/home/user/WordsOfWisdom.dat<span class="nt">&lt;/wisdom&gt;</span>
@ -368,69 +354,69 @@ The expected name of the <tt class="docutils literal"><span class="pre">RGE</spa
</div>
<div class="section" id="nonlocal-superconductivity-related-meissner-screening-functions-as-libs">
<h2>Nonlocal superconductivity related Meissner screening functions (AS libs)<a class="headerlink" href="#nonlocal-superconductivity-related-meissner-screening-functions-as-libs" title="Permalink to this headline"></a></h2>
<p>To be written yet ...</p>
<p>To be written yet </p>
</div>
<div class="section" id="functions-to-analyze-bgr-nmr-data-bnmr-libs">
<span id="bnmr-libs"></span><span id="index-14"></span><h2>Functions to analyze β-NMR data (BNMR libs)<a class="headerlink" href="#functions-to-analyze-bgr-nmr-data-bnmr-libs" title="Permalink to this headline"></a></h2>
<p>This is a collection of <tt class="docutils literal"><span class="pre">C++</span></tt> classes using the <tt class="docutils literal"><span class="pre">musrfit</span></tt> <a class="reference internal" href="user-manual.html#id22"><em>user-functions</em></a>
interface in order to facilitate the usage in conjunction with <tt class="docutils literal"><span class="pre">musrfit</span></tt>. It consists of two libraries:</p>
<p>This is a collection of <code class="docutils literal notranslate"><span class="pre">C++</span></code> classes using the <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> <a class="reference internal" href="user-manual.html#id38"><span class="std std-ref">user-functions</span></a>
interface in order to facilitate the usage in conjunction with <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>. It consists of two libraries:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">libBNMR</span></tt> contains functions to fit spin lattice relaxation (SLR) data.</li>
<li><tt class="docutils literal"><span class="pre">libLineProfile</span></tt> contains functions to fit resonance lineshapes.</li>
<li><p><code class="docutils literal notranslate"><span class="pre">libBNMR</span></code> contains functions to fit spin lattice relaxation (SLR) data.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">libLineProfile</span></code> contains functions to fit resonance lineshapes.</p></li>
</ul>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Currently it is recommended to read in the data in ASCII format as a non-μSR fit <a class="reference internal" href="user-manual.html#non-musr-fit"><em>(fit type 8)</em></a>.</p>
<p class="admonition-title">Note</p>
<p>Currently it is recommended to read in the data in ASCII format as a non-μSR fit <a class="reference internal" href="user-manual.html#non-musr-fit"><span class="std std-ref">(fit type 8)</span></a>.</p>
</div>
<div class="section" id="libbnmr">
<span id="index-15"></span><h3>libBNMR<a class="headerlink" href="#libbnmr" title="Permalink to this headline"></a></h3>
<p>In β-NMR the SLR is usually measured by implanting a pulse of <span class="math">\(^8\)</span>Li with a length <span class="math">\(t_0\)</span> into the sample.
The asymmetry is measured both during the pulse and afterwards. For a a general spin relaxation function <span class="math">\(f(t)\)</span> the time evolution of the asymmetry is then given by [<a class="reference external" href="http://dx.doi.org/10.1103/PhysRevLett.96.147601">Z. Salman, et al., PRL 96, 147601 (2006)</a>]:</p>
<div class="math" id="slr">
<p>In β-NMR the SLR is usually measured by implanting a pulse of <span class="math notranslate nohighlight">\(^8\)</span>Li with a length <span class="math notranslate nohighlight">\(t_0\)</span> into the sample.
The asymmetry is measured both during the pulse and afterwards. For a a general spin relaxation function <span class="math notranslate nohighlight">\(f(t)\)</span> the time evolution of the asymmetry is then given by [<a class="reference external" href="http://dx.doi.org/10.1103/PhysRevLett.96.147601">Z. Salman, et al., PRL 96, 147601 (2006)</a>]:</p>
<div class="math notranslate nohighlight" id="slr">
<span id="index-16"></span>\[\begin{split}P(t) = \left\{\begin{matrix}
\frac{\int_0^t e^{-(t-t')/\tau_{\mathrm{Li}}}f(t-t')dt'}{\int_0^t e^{-t'/\tau_{\mathrm{Li}}}dt' } &amp; t\leq t_0\\[6pt]
\frac{\int_0^{t_0}e^{-(t_0-t')/\tau_{\mathrm{Li}}}f(t-t')dt'}{\int_0^{t_0}e^{-t'/\tau_{\mathrm{Li}}}dt'} &amp; t&gt; t_0,
\end{matrix}\right.\end{split}\]</div>
<p>where <span class="math">\(\tau_{\mathrm{Li}}=1.21\)</span>s is the <span class="math">\(^8\)</span>Li lifetime.</p>
<p>where <span class="math notranslate nohighlight">\(\tau_{\mathrm{Li}}=1.21\)</span>s is the <span class="math notranslate nohighlight">\(^8\)</span>Li lifetime.</p>
<div class="section" id="functions">
<h4>Functions<a class="headerlink" href="#functions" title="Permalink to this headline"></a></h4>
<p>The <tt class="docutils literal"><span class="pre">libBNMR</span></tt> library currently contains the following functions:</p>
<p>The <code class="docutils literal notranslate"><span class="pre">libBNMR</span></code> library currently contains the following functions:</p>
<p id="index-17"><strong>Exponential relaxation</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libBNMR ExpRlx 1 2
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libBNMR</span> <span class="n">ExpRlx</span> <span class="mi">1</span> <span class="mi">2</span>
</pre></div>
</div>
<p>The parameters are:</p>
<ol class="arabic simple">
<li>pulse length <span class="math">\(t_0\)</span> (s)</li>
<li>relaxation rate <span class="math">\(\lambda\)</span> (s<span class="math">\(^{-1}\)</span>)</li>
<li><p>pulse length <span class="math notranslate nohighlight">\(t_0\)</span> (s)</p></li>
<li><p>relaxation rate <span class="math notranslate nohighlight">\(\lambda\)</span> (s<span class="math notranslate nohighlight">\(^{-1}\)</span>)</p></li>
</ol>
<p>This function implements <span class="math">\(f(t)=e^{-\lambda t}\)</span>.</p>
<p>This function implements <span class="math notranslate nohighlight">\(f(t)=e^{-\lambda t}\)</span>.</p>
<p id="index-18"><strong>Stretched exponential relaxation</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libBNMR SExpRlx 1 2 3
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libBNMR</span> <span class="n">SExpRlx</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span>
</pre></div>
</div>
<p>The parameters are:</p>
<ol class="arabic simple">
<li>pulse length <span class="math">\(t_0\)</span> (s)</li>
<li>relaxation rate <span class="math">\(\lambda\)</span> (s<span class="math">\(^{-1}\)</span>)</li>
<li>stretching exponent <span class="math">\(\beta\)</span></li>
<li><p>pulse length <span class="math notranslate nohighlight">\(t_0\)</span> (s)</p></li>
<li><p>relaxation rate <span class="math notranslate nohighlight">\(\lambda\)</span> (s<span class="math notranslate nohighlight">\(^{-1}\)</span>)</p></li>
<li><p>stretching exponent <span class="math notranslate nohighlight">\(\beta\)</span></p></li>
</ol>
<p>This function implements <span class="math">\(f(t)=e^{-(\lambda t)^{\beta}}\)</span>.</p>
<p>This function implements <span class="math notranslate nohighlight">\(f(t)=e^{-(\lambda t)^{\beta}}\)</span>.</p>
</div>
</div>
<div class="section" id="liblineprofile">
<span id="index-19"></span><h3>libLineProfile<a class="headerlink" href="#liblineprofile" title="Permalink to this headline"></a></h3>
<p>In addition to some simple line shapes <tt class="docutils literal"><span class="pre">libLineProfile</span></tt> contains functions to fit chemical shift anisotropies in the powder average.
<p>In addition to some simple line shapes <code class="docutils literal notranslate"><span class="pre">libLineProfile</span></code> contains functions to fit chemical shift anisotropies in the powder average.
Their functional form can be found in <a class="reference external" href="http://dx.doi.org/10.1007/978-3-642-68756-3_2">M. Mehring, Principles of High Resolution NMR in Solids (Springer 1983)</a>.</p>
<p>For an axially symmetric interaction it is given by:</p>
<div class="math" id="iax">
<div class="math notranslate nohighlight" id="iax">
<span id="index-20"></span>\[\begin{split}I_{\mathrm ax}(f)=\left\{\begin{matrix} \frac{1}{2\sqrt{(f_\parallel-f_\perp)(f-f_\perp)}}&amp; f\in(f_\perp,f_\parallel)\cup(f_\parallel,f_\perp)\\[6pt] 0 &amp; \text{otherwise}\end{matrix} \right.\end{split}\]</div>
<p>where <span class="math">\(f_\parallel\)</span> and <span class="math">\(f_\perp\)</span> are the frequencies that would be observed if the field is oriented paralell or perpendicular to the symmetry axis, respectively.</p>
<p>where <span class="math notranslate nohighlight">\(f_\parallel\)</span> and <span class="math notranslate nohighlight">\(f_\perp\)</span> are the frequencies that would be observed if the field is oriented paralell or perpendicular to the symmetry axis, respectively.</p>
<div class="line-block">
<div class="line">In case of a completely anisotropic interaction, the powder average can be described by the frequencies along the three principle axis <span class="math">\(f_1,f_2,f_3\)</span>.</div>
<div class="line">Assume without loss of generality that <span class="math">\(f_1&lt;f_2&lt;f_3\)</span>, then</div>
<div class="line">In case of a completely anisotropic interaction, the powder average can be described by the frequencies along the three principle axis <span class="math notranslate nohighlight">\(f_1,f_2,f_3\)</span>.</div>
<div class="line">Assume without loss of generality that <span class="math notranslate nohighlight">\(f_1&lt;f_2&lt;f_3\)</span>, then</div>
</div>
<div class="math" id="ianiso">
<div class="math notranslate nohighlight" id="ianiso">
<span id="index-21"></span>\[\begin{split}I(f)&amp;=\left\{\begin{matrix}
\frac{K(m)}{\pi\sqrt{(f-f_1)(f_3-f_2)}},&amp; f_3\geq f&gt;f_2 \\[9pt]
\frac{K(m)}{\pi\sqrt{(f_3-f)(f_2-f_1)}},&amp; f_2&gt;f\geq f_1\\[9pt]
@ -443,157 +429,157 @@ m&amp;=\left\{\begin{matrix}
\end{matrix} \right. \\
\\
K(m)&amp;=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\end{split}\]</div>
<p><span class="math">\(K(m)\)</span> is the complete elliptic integral of the first kind.</p>
<p><span class="math notranslate nohighlight">\(K(m)\)</span> is the complete elliptic integral of the first kind.</p>
<div class="section" id="id1">
<h4>Functions<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h4>
<p>The <tt class="docutils literal"><span class="pre">libLineProfile</span></tt> library currently contains the following functions:</p>
<p>The <code class="docutils literal notranslate"><span class="pre">libLineProfile</span></code> library currently contains the following functions:</p>
<p id="index-22"><strong>Gaussian</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libLineProfile LineGauss 1 2
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libLineProfile</span> <span class="n">LineGauss</span> <span class="mi">1</span> <span class="mi">2</span>
</pre></div>
</div>
<p>The parameters are:</p>
<ol class="arabic simple">
<li>center of the line <span class="math">\(f_0\)</span></li>
<li>FWHM of the line <span class="math">\(\sigma\)</span></li>
<li><p>center of the line <span class="math notranslate nohighlight">\(f_0\)</span></p></li>
<li><p>FWHM of the line <span class="math notranslate nohighlight">\(\sigma\)</span></p></li>
</ol>
<div class="line-block">
<div class="line">The height of the peak is 1.</div>
<div class="line">The functional form is given by</div>
</div>
<div class="math">
<div class="math notranslate nohighlight">
\[A(f)=e^{-\frac{4\ln 2 (f-f_0)^2}{ \sigma^2}}\]</div>
<p id="index-23"><strong>Lorentzian</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libLineProfile LineLorentzian 1 2
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libLineProfile</span> <span class="n">LineLorentzian</span> <span class="mi">1</span> <span class="mi">2</span>
</pre></div>
</div>
<p>The parameters are:</p>
<ol class="arabic simple">
<li>center of the line <span class="math">\(f_0\)</span></li>
<li>FWHM of the line <span class="math">\(w\)</span></li>
<li><p>center of the line <span class="math notranslate nohighlight">\(f_0\)</span></p></li>
<li><p>FWHM of the line <span class="math notranslate nohighlight">\(w\)</span></p></li>
</ol>
<div class="line-block">
<div class="line">The height of the peak is 1.</div>
<div class="line">The functional form is given by</div>
</div>
<div class="math">
<div class="math notranslate nohighlight">
\[A(f)= \frac{w^2}{4(f-f_0)^2+w^2}\]</div>
<p id="index-24"><strong>Laplacian</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libLineProfile LineLaplace 1 2
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libLineProfile</span> <span class="n">LineLaplace</span> <span class="mi">1</span> <span class="mi">2</span>
</pre></div>
</div>
<p>The parameters are:</p>
<ol class="arabic simple">
<li>center of the line <span class="math">\(f_0\)</span></li>
<li>FWHM of the line <span class="math">\(w\)</span></li>
<li><p>center of the line <span class="math notranslate nohighlight">\(f_0\)</span></p></li>
<li><p>FWHM of the line <span class="math notranslate nohighlight">\(w\)</span></p></li>
</ol>
<div class="line-block">
<div class="line">The height of the peak is 1.</div>
<div class="line">The functional form is given by</div>
</div>
<div class="math">
<div class="math notranslate nohighlight">
\[A(f)=e^{-2\ln 2 \left|\frac{f-f_0}{w}\right|}\]</div>
<p id="index-25"><strong>Skewed Lorentzian</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libLineProfile LineSkewLorentzian 1 2 3
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libLineProfile</span> <span class="n">LineSkewLorentzian</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span>
</pre></div>
</div>
<p>The parameters are:</p>
<ol class="arabic simple">
<li>center of the line <span class="math">\(f_0\)</span></li>
<li>width of the line <span class="math">\(w\)</span></li>
<li>skewness parameter <span class="math">\(a\)</span></li>
<li><p>center of the line <span class="math notranslate nohighlight">\(f_0\)</span></p></li>
<li><p>width of the line <span class="math notranslate nohighlight">\(w\)</span></p></li>
<li><p>skewness parameter <span class="math notranslate nohighlight">\(a\)</span></p></li>
</ol>
<div class="line-block">
<div class="line">The height of the peak is 1.</div>
<div class="line">The functional form is given by</div>
</div>
<div class="math">
<div class="math notranslate nohighlight">
\[A(f)= \frac{w w_a}{4(f-f_0)^2+w_a^2}, \quad w_a=\frac{2w}{1+e^{a(f-f_0)}}\]</div>
<p id="index-26"><strong>Skewed Lorentzian 2</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libLineProfile LineSkewLorentzian2 1 2 3
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libLineProfile</span> <span class="n">LineSkewLorentzian2</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span>
</pre></div>
</div>
<p>The parameters are:</p>
<ol class="arabic simple">
<li>center of the line <span class="math">\(f_0\)</span></li>
<li>width left of the center <span class="math">\(w_1\)</span></li>
<li>width right of the center <span class="math">\(w_2\)</span></li>
<li><p>center of the line <span class="math notranslate nohighlight">\(f_0\)</span></p></li>
<li><p>width left of the center <span class="math notranslate nohighlight">\(w_1\)</span></p></li>
<li><p>width right of the center <span class="math notranslate nohighlight">\(w_2\)</span></p></li>
</ol>
<div class="line-block">
<div class="line">The height of the peak is 1.</div>
<div class="line">The functional form is given by</div>
</div>
<div class="math">
<div class="math notranslate nohighlight">
\[\begin{split}A(f)= \left\{\begin{matrix}\frac{{w_1}^2}{4{(f-f_0)}^2+{w_1}^2},&amp;f\leq f_0\\[9pt] \frac{{w_2}^2}{4{(f-f_0)}^2+{w_2}^2},&amp;f&gt;f_0\end{matrix}\right.\end{split}\]</div>
<p id="index-27"><strong>Powder average of an axially symmetric interaction convoluted with a Lorentzian</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libLineProfile PowderLineAxialLor 1 2 3
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libLineProfile</span> <span class="n">PowderLineAxialLor</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span>
</pre></div>
</div>
<p>The parameters are:</p>
<ol class="arabic simple">
<li>frequency for the field oriented paralell to the symmetry axis <span class="math">\(f_\parallel\)</span></li>
<li>frequency for the field oriented perpendicular to the symmetry axis <span class="math">\(f_\parallel\)</span></li>
<li>FWHM of the Lorentzian <span class="math">\(w\)</span></li>
<li><p>frequency for the field oriented paralell to the symmetry axis <span class="math notranslate nohighlight">\(f_\parallel\)</span></p></li>
<li><p>frequency for the field oriented perpendicular to the symmetry axis <span class="math notranslate nohighlight">\(f_\parallel\)</span></p></li>
<li><p>FWHM of the Lorentzian <span class="math notranslate nohighlight">\(w\)</span></p></li>
</ol>
<div class="line-block">
<div class="line">The height of the peak is <span class="math">\(\sim\)</span>1.</div>
<div class="line">The height of the peak is <span class="math notranslate nohighlight">\(\sim\)</span>1.</div>
<div class="line">The functional form is given by</div>
</div>
<div class="math">
<div class="math notranslate nohighlight">
\[A(f)= I_{\mathrm ax}(f)\circledast\left( \frac{w^2}{4f^2+w^2} \right)\]</div>
<p>with <span class="math">\(I_{\mathrm ax}(f)\)</span> defined <a class="reference internal" href="#iax"><em>above</em></a>.</p>
<p>with <span class="math notranslate nohighlight">\(I_{\mathrm ax}(f)\)</span> defined <a class="reference internal" href="#iax"><span class="std std-ref">above</span></a>.</p>
<p id="index-28"><strong>Powder average of an axially symmetric interaction convoluted with a Gaussian</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libLineProfile PowderLineAxialGss 1 2 3
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libLineProfile</span> <span class="n">PowderLineAxialGss</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span>
</pre></div>
</div>
<p>The parameters are:</p>
<ol class="arabic simple">
<li>frequency for the field oriented paralell to the symmetry axis <span class="math">\(f_\parallel\)</span></li>
<li>frequency for the field oriented perpendicular to the symmetry axis <span class="math">\(f_\parallel\)</span></li>
<li>FWHM of the Gaussian <span class="math">\(\sigma\)</span></li>
<li><p>frequency for the field oriented paralell to the symmetry axis <span class="math notranslate nohighlight">\(f_\parallel\)</span></p></li>
<li><p>frequency for the field oriented perpendicular to the symmetry axis <span class="math notranslate nohighlight">\(f_\parallel\)</span></p></li>
<li><p>FWHM of the Gaussian <span class="math notranslate nohighlight">\(\sigma\)</span></p></li>
</ol>
<div class="line-block">
<div class="line">The height of the peak is <span class="math">\(\sim\)</span>1.</div>
<div class="line">The height of the peak is <span class="math notranslate nohighlight">\(\sim\)</span>1.</div>
<div class="line">The functional form is given by</div>
</div>
<div class="math">
<div class="math notranslate nohighlight">
\[A(f)= I_{\mathrm ax}(f)\circledast\left( e^{-\frac{4\ln 2 (f-f_0)^2}{ \sigma^2}} \right)\]</div>
<p>with <span class="math">\(I_{\mathrm ax}(f)\)</span> defined <a class="reference internal" href="#iax"><em>above</em></a>.</p>
<p>with <span class="math notranslate nohighlight">\(I_{\mathrm ax}(f)\)</span> defined <a class="reference internal" href="#iax"><span class="std std-ref">above</span></a>.</p>
<p id="index-29"><strong>Powder average of an anisotropic interaction convoluted with a Lorentzian</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libLineProfile PowderLineAsymLor 1 2 3 4
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libLineProfile</span> <span class="n">PowderLineAsymLor</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span>
</pre></div>
</div>
<p>The parameters are:</p>
<ol class="arabic simple">
<li><span class="math">\(f_1\)</span></li>
<li><span class="math">\(f_1\)</span></li>
<li><span class="math">\(f_3\)</span> frequencies along the principal axes</li>
<li>FWHM of the Lorentzian <span class="math">\(w\)</span></li>
<li><p><span class="math notranslate nohighlight">\(f_1\)</span></p></li>
<li><p><span class="math notranslate nohighlight">\(f_1\)</span></p></li>
<li><p><span class="math notranslate nohighlight">\(f_3\)</span> frequencies along the principal axes</p></li>
<li><p>FWHM of the Lorentzian <span class="math notranslate nohighlight">\(w\)</span></p></li>
</ol>
<div class="line-block">
<div class="line">The height of the peak is <span class="math">\(\sim\)</span>1.</div>
<div class="line">The height of the peak is <span class="math notranslate nohighlight">\(\sim\)</span>1.</div>
<div class="line">The functional form is given by</div>
</div>
<div class="math">
<div class="math notranslate nohighlight">
\[A(f)= I(f)\circledast\left( \frac{w^2}{4f^2+w^2} \right)\]</div>
<p>with <span class="math">\(I(f)\)</span> defined <a class="reference internal" href="#ianiso"><em>above</em></a>. Note that <span class="math">\(f_1&lt;f_2&lt;f_3\)</span> is not required by the code.</p>
<p>with <span class="math notranslate nohighlight">\(I(f)\)</span> defined <a class="reference internal" href="#ianiso"><span class="std std-ref">above</span></a>. Note that <span class="math notranslate nohighlight">\(f_1&lt;f_2&lt;f_3\)</span> is not required by the code.</p>
<p id="index-30"><strong>Powder average of an anisotropic interaction convoluted with a Gaussian</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libLineProfile PowderLineAsymGss 1 2 3 4
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libLineProfile</span> <span class="n">PowderLineAsymGss</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span>
</pre></div>
</div>
<p>The parameters are:</p>
<ol class="arabic simple">
<li><span class="math">\(f_1\)</span></li>
<li><span class="math">\(f_1\)</span></li>
<li><span class="math">\(f_3\)</span> frequencies along the principal axes</li>
<li>FWHM of the Gaussian <span class="math">\(\sigma\)</span></li>
<li><p><span class="math notranslate nohighlight">\(f_1\)</span></p></li>
<li><p><span class="math notranslate nohighlight">\(f_1\)</span></p></li>
<li><p><span class="math notranslate nohighlight">\(f_3\)</span> frequencies along the principal axes</p></li>
<li><p>FWHM of the Gaussian <span class="math notranslate nohighlight">\(\sigma\)</span></p></li>
</ol>
<div class="line-block">
<div class="line">The height of the peak is <span class="math">\(\sim\)</span>1.</div>
<div class="line">The height of the peak is <span class="math notranslate nohighlight">\(\sim\)</span>1.</div>
<div class="line">The functional form is given by</div>
</div>
<div class="math">
<div class="math notranslate nohighlight">
\[A(f)= I(f)\circledast\left( e^{-\frac{4\ln 2 (f-f_0)^2}{ \sigma^2}} \right)\]</div>
<p>with <span class="math">\(I(f)\)</span> defined <a class="reference internal" href="#ianiso"><em>above</em></a>. Note that <span class="math">\(f_1&lt;f_2&lt;f_3\)</span> is not required by the code.</p>
<p>with <span class="math notranslate nohighlight">\(I(f)\)</span> defined <a class="reference internal" href="#ianiso"><span class="std std-ref">above</span></a>. Note that <span class="math notranslate nohighlight">\(f_1&lt;f_2&lt;f_3\)</span> is not required by the code.</p>
</div>
</div>
</div>
@ -603,9 +589,9 @@ K(m)&amp;=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Documentation of user libs (user functions)</a><ul>
<li><a class="reference internal" href="#meissner-profiles-vortex-lattice-related-functions-bmw-libs">Meissner-Profiles / Vortex-Lattice related functions (BMW libs)</a><ul>
@ -627,30 +613,29 @@ K(m)&amp;=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
title="previous chapter">User manual</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="setup-standard.html"
title="next chapter">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> on Different Platforms</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/user-libs.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
title="next chapter">Setting up <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> on Different Platforms</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/user-libs.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" />
<input type="text" name="q" aria-labelledby="searchlabel" />
<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>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@ -662,13 +647,13 @@ K(m)&amp;=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
<li class="right" >
<a href="user-manual.html" title="User manual"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.5.1 documentation</a> &raquo;</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">
&copy; Copyright 2019, Andreas Suter.
Last updated on Jul 24, 2019.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
<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>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -113,14 +113,14 @@ void PFitterFcn::CalcExpectedChiSquare(const std::vector<Double_t> &par, Double_
if (fUseChi2) {
// single histo
for (UInt_t i=0; i<fRunListCollection->GetNoOfSingleHisto(); i++) {
value = fRunListCollection->GetSingleHistoChisqExpected(par, i); // calculate the expected chisq for single histo run block 'i'
value = fRunListCollection->GetSingleRunChisqExpected(par, i); // calculate the expected chisq for single histo run block 'i'
expectedChisqPerRun.push_back(value);
totalExpectedChisq += value;
}
} else { // log max. likelihood
// single histo
for (UInt_t i=0; i<fRunListCollection->GetNoOfSingleHisto(); i++) {
value = fRunListCollection->GetSingleHistoMaximumLikelihoodExpected(par, i); // calculate the expected mlh for single histo run block 'i'
value = fRunListCollection->GetSingleRunMaximumLikelihoodExpected(par, i); // calculate the expected mlh for single histo run block 'i'
expectedChisqPerRun.push_back(value);
totalExpectedChisq += value;
}

View File

@ -378,7 +378,7 @@ void PRunAsymmetry::SetFitRangeBin(const TString fitRange)
}
//--------------------------------------------------------------------------
// CalcNoOfFitBins (protected)
// CalcNoOfFitBins (public)
//--------------------------------------------------------------------------
/**
* <p>Calculate the number of fitted bins for the current fit range.

View File

@ -400,7 +400,7 @@ void PRunAsymmetryBNMR::SetFitRangeBin(const TString fitRange)
}
//--------------------------------------------------------------------------
// CalcNoOfFitBins (protected)
// CalcNoOfFitBins (public)
//--------------------------------------------------------------------------
/**
* <p>Calculate the number of fitted bins for the current fit range.

View File

@ -370,7 +370,7 @@ void PRunAsymmetryRRF::SetFitRangeBin(const TString fitRange)
}
//--------------------------------------------------------------------------
// CalcNoOfFitBins (protected)
// CalcNoOfFitBins (public)
//--------------------------------------------------------------------------
/**
* <p>Calculate the number of fitted bins for the current fit range.

View File

@ -206,18 +206,30 @@ void PRunListCollection::SetFitRange(const TString fitRange)
*/
void PRunListCollection::SetFitRange(const PDoublePairVector fitRange)
{
for (UInt_t i=0; i<fRunSingleHistoList.size(); i++)
for (UInt_t i=0; i<fRunSingleHistoList.size(); i++) {
fRunSingleHistoList[i]->SetFitRange(fitRange);
for (UInt_t i=0; i<fRunSingleHistoRRFList.size(); i++)
fRunSingleHistoList[i]->CalcNoOfFitBins(); // needed to update fStartTimeBin, fEndTimeBin
}
for (UInt_t i=0; i<fRunSingleHistoRRFList.size(); i++) {
fRunSingleHistoRRFList[i]->SetFitRange(fitRange);
for (UInt_t i=0; i<fRunAsymmetryList.size(); i++)
fRunSingleHistoRRFList[i]->CalcNoOfFitBins(); // needed to update fStartTimeBin, fEndTimeBin
}
for (UInt_t i=0; i<fRunAsymmetryList.size(); i++) {
fRunAsymmetryList[i]->SetFitRange(fitRange);
for (UInt_t i=0; i<fRunAsymmetryRRFList.size(); i++)
fRunAsymmetryList[i]->CalcNoOfFitBins(); // needed to update fStartTimeBin, fEndTimeBin
}
for (UInt_t i=0; i<fRunAsymmetryRRFList.size(); i++) {
fRunAsymmetryRRFList[i]->SetFitRange(fitRange);
for (UInt_t i=0; i<fRunAsymmetryBNMRList.size(); i++)
fRunAsymmetryRRFList[i]->CalcNoOfFitBins(); // needed to update fStartTimeBin, fEndTimeBin
}
for (UInt_t i=0; i<fRunAsymmetryBNMRList.size(); i++) {
fRunAsymmetryBNMRList[i]->SetFitRange(fitRange);
for (UInt_t i=0; i<fRunMuMinusList.size(); i++)
fRunAsymmetryBNMRList[i]->CalcNoOfFitBins(); // needed to update fStartTimeBin, fEndTimeBin
}
for (UInt_t i=0; i<fRunMuMinusList.size(); i++) {
fRunMuMinusList[i]->SetFitRange(fitRange);
fRunMuMinusList[i]->CalcNoOfFitBins(); // needed to update fStartTimeBin, fEndTimeBin
}
for (UInt_t i=0; i<fRunNonMusrList.size(); i++)
fRunNonMusrList[i]->SetFitRange(fitRange);
}
@ -370,38 +382,39 @@ Double_t PRunListCollection::GetNonMusrChisq(const std::vector<Double_t>& par) c
}
//--------------------------------------------------------------------------
// GetSingleHistoChisqExpected (public)
// GetSingleRunChisqExpected (public)
//--------------------------------------------------------------------------
/**
* <p>Calculates expected chi-square of the single histogram with run block index idx of a msr-file.
* <p>Calculates expected chi-square of the run block index idx of a msr-file.
*
* <b>return:</b>
* - expected chi-square of for a single histogram
* - expected chi-square of for a single run block
*
* \param par fit parameter vector
* \param idx run block index
*/
Double_t PRunListCollection::GetSingleHistoChisqExpected(const std::vector<Double_t>& par, const UInt_t idx) const
Double_t PRunListCollection::GetSingleRunChisqExpected(const std::vector<Double_t>& par, const UInt_t idx) const
{
Double_t expectedChisq = 0.0;
if (idx > fMsrInfo->GetMsrRunList()->size()) {
std::cerr << ">> PRunListCollection::GetSingleHistoChisqExpected() **ERROR** idx=" << idx << " is out of range [0.." << fMsrInfo->GetMsrRunList()->size() << "[" << std::endl << std::endl;
std::cerr << ">> PRunListCollection::GetSingleRunChisqExpected() **ERROR** idx=" << idx << " is out of range [0.." << fMsrInfo->GetMsrRunList()->size() << "[" << std::endl << std::endl;
return expectedChisq;
}
UInt_t subIdx = 0;
Int_t type = fMsrInfo->GetMsrRunList()->at(idx).GetFitType();
if (type == -1) { // i.e. not found in the RUN block, try the GLOBAL block
type = fMsrInfo->GetMsrGlobal()->GetFitType();
subIdx = idx;
} else { // found in the RUN block
// count how many entries of this fit-type are present up to idx
for (UInt_t i=0; i<idx; i++) {
if (fMsrInfo->GetMsrRunList()->at(i).GetFitType() == type)
subIdx++;
}
}
// count how many entries of this fit-type are present up to idx
UInt_t subIdx = 0;
for (UInt_t i=0; i<idx; i++) {
if ((fMsrInfo->GetMsrRunList()->at(i).GetFitType() == type) ||
(fMsrInfo->GetMsrRunList()->at(i).GetFitType() == -1)) // the -1 is needed if there is a global section
subIdx++;
}
// return the chisq of the single run
switch (type) {
@ -649,36 +662,37 @@ Double_t PRunListCollection::GetNonMusrMaximumLikelihood(const std::vector<Doubl
}
//--------------------------------------------------------------------------
// GetSingleHistoMaximumLikelihoodExpected (public)
// GetSingleRunMaximumLikelihoodExpected (public)
//--------------------------------------------------------------------------
/**
* <p>Calculates expected mlh of the single histogram with run block index idx of a msr-file.
* <p>Calculates expected mlh of the run block index idx of a msr-file.
*
* <b>return:</b>
* - expected mlh of for a single histogram
* - expected mlh of for a single run block
*
* \param par fit parameter vector
* \param idx run block index
*/
Double_t PRunListCollection::GetSingleHistoMaximumLikelihoodExpected(const std::vector<Double_t>& par, const UInt_t idx) const
Double_t PRunListCollection::GetSingleRunMaximumLikelihoodExpected(const std::vector<Double_t>& par, const UInt_t idx) const
{
Double_t expected_mlh = 0.0;
if (idx > fMsrInfo->GetMsrRunList()->size()) {
std::cerr << ">> PRunListCollection::GetSingleHistoMaximumLikelihoodExpected() **ERROR** idx=" << idx << " is out of range [0.." << fMsrInfo->GetMsrRunList()->size() << "[" << std::endl << std::endl;
std::cerr << ">> PRunListCollection::GetSingleRunMaximumLikelihoodExpected() **ERROR** idx=" << idx << " is out of range [0.." << fMsrInfo->GetMsrRunList()->size() << "[" << std::endl << std::endl;
return expected_mlh;
}
UInt_t subIdx = 0;
Int_t type = fMsrInfo->GetMsrRunList()->at(idx).GetFitType();
if (type == -1) { // i.e. not found in the RUN block, try the GLOBAL block
type = fMsrInfo->GetMsrGlobal()->GetFitType();
}
// count how many entries of this fit-type are present up to idx
UInt_t subIdx = 0;
for (UInt_t i=0; i<idx; i++) {
if (fMsrInfo->GetMsrRunList()->at(i).GetFitType() == type)
subIdx++;
subIdx = idx;
} else { // found in the RUN block
// count how many entries of this fit-type are present up to idx
for (UInt_t i=0; i<idx; i++) {
if (fMsrInfo->GetMsrRunList()->at(i).GetFitType() == type)
subIdx++;
}
}
// return the mlh of the single run
@ -760,16 +774,17 @@ UInt_t PRunListCollection::GetNoOfBinsFitted(const UInt_t idx) const
return result;
}
Int_t type = fMsrInfo->GetMsrRunList()->at(idx).GetFitType();
if (type == -1) { // i.e. not forun in the RUN block, try the GLOBAL block
type = fMsrInfo->GetMsrGlobal()->GetFitType();
}
// count how many entries of this fit-type are present up to idx
UInt_t subIdx = 0;
for (UInt_t i=0; i<idx; i++) {
if (fMsrInfo->GetMsrRunList()->at(i).GetFitType() == type)
subIdx++;
Int_t type = fMsrInfo->GetMsrRunList()->at(idx).GetFitType();
if (type == -1) { // i.e. not found in the RUN block, try the GLOBAL block
type = fMsrInfo->GetMsrGlobal()->GetFitType();
subIdx = idx;
} else { // found in the RUN block
// count how many entries of this fit-type are present up to idx
for (UInt_t i=0; i<idx; i++) {
if (fMsrInfo->GetMsrRunList()->at(i).GetFitType() == type)
subIdx++;
}
}
// return the chisq of the single run

View File

@ -382,7 +382,7 @@ void PRunMuMinus::SetFitRangeBin(const TString fitRange)
}
//--------------------------------------------------------------------------
// CalcNoOfFitBins (private)
// CalcNoOfFitBins (public)
//--------------------------------------------------------------------------
/**
* <p>Calculate the number of fitted bins for the current fit range.

View File

@ -276,9 +276,9 @@ Double_t PRunSingleHisto::CalcChiSquareExpected(const std::vector<Double_t>& par
Int_t chunk = (fEndTimeBin - fStartTimeBin)/omp_get_num_procs();
if (chunk < 10)
chunk = 10;
#pragma omp parallel for default(shared) private(i,time,diff) schedule(dynamic,chunk) reduction(+:chisq)
#pragma omp parallel for default(shared) private(i,time,theo,diff) schedule(dynamic,chunk) reduction(+:chisq)
#endif
for (i=fStartTimeBin; i < fEndTimeBin; ++i) {
for (i=fStartTimeBin; i<fEndTimeBin; ++i) {
time = fData.GetDataTimeStart() + static_cast<Double_t>(i)*fData.GetDataTimeStep();
theo = N0*TMath::Exp(-time/tau)*(1.0+fTheory->Func(time, par, fFuncValues))+bkg;
diff = fData.GetValue()->at(i) - theo;
@ -373,9 +373,8 @@ Double_t PRunSingleHisto::CalcMaxLikelihood(const std::vector<Double_t>& par)
time = fData.GetDataTimeStart() + static_cast<Double_t>(i)*fData.GetDataTimeStep();
// calculate theory for the given parameter set
theo = N0*TMath::Exp(-time/tau)*(1.0+fTheory->Func(time, par, fFuncValues))+bkg;
theo *= normalizer;
data = normalizer*fData.GetValue()->at(i);
data = fData.GetValue()->at(i);
if (theo <= 0.0) {
std::cerr << ">> PRunSingleHisto::CalcMaxLikelihood: **WARNING** NEGATIVE theory!!" << std::endl;
@ -389,7 +388,7 @@ Double_t PRunSingleHisto::CalcMaxLikelihood(const std::vector<Double_t>& par)
}
}
return 2.0*mllh;
return normalizer*2.0*mllh;
}
//--------------------------------------------------------------------------
@ -472,9 +471,8 @@ Double_t PRunSingleHisto::CalcMaxLikelihoodExpected(const std::vector<Double_t>&
time = fData.GetDataTimeStart() + static_cast<Double_t>(i)*fData.GetDataTimeStep();
// calculate theory for the given parameter set
theo = N0*TMath::Exp(-time/tau)*(1.0+fTheory->Func(time, par, fFuncValues))+bkg;
theo *= normalizer;
data = normalizer*fData.GetValue()->at(i);
data = fData.GetValue()->at(i);
if (theo <= 0.0) {
std::cerr << ">> PRunSingleHisto::CalcMaxLikelihood: **WARNING** NEGATIVE theory!!" << std::endl;
@ -486,7 +484,7 @@ Double_t PRunSingleHisto::CalcMaxLikelihoodExpected(const std::vector<Double_t>&
}
}
return 2.0*mllh;
return normalizer*2.0*mllh;
}
//--------------------------------------------------------------------------
@ -659,7 +657,7 @@ void PRunSingleHisto::SetFitRangeBin(const TString fitRange)
}
//--------------------------------------------------------------------------
// CalcNoOfFitBins (protected)
// CalcNoOfFitBins (public)
//--------------------------------------------------------------------------
/**
* <p>Calculate the number of fitted bins for the current fit range.

View File

@ -388,7 +388,7 @@ void PRunSingleHistoRRF::SetFitRangeBin(const TString fitRange)
}
//--------------------------------------------------------------------------
// CalcNoOfFitBins (protected)
// CalcNoOfFitBins (public)
//--------------------------------------------------------------------------
/**
* <p>Calculate the number of fitted bins for the current fit range.

View File

@ -58,7 +58,51 @@
#define PMN_USER_COVARIANCE 17
#define PMN_USER_PARAM_STATE 18
#define PMN_PRINT 19
#define PMN_SECTOR 20
//-----------------------------------------------------------------------------
/**
* <p>The PSectorChisq class is needed to store the chisq/maxLH of a sector.
* A sector is a time window from fgb to fLast (fLast < lgb). It also stores
* these information for each run of the msr-file.
*/
class PSectorChisq
{
public:
PSectorChisq(UInt_t noOfRuns);
void SetRunFirstTime(Double_t first, UInt_t idx);
void SetSectorTime(Double_t last) { fLast = last; }
void SetChisq(Double_t chisq) { fChisq = chisq; }
void SetChisq(Double_t chisq, UInt_t idx);
void SetExpectedChisq(Double_t expChisq) { fExpectedChisq = expChisq; }
void SetExpectedChisq(Double_t chisq, UInt_t idx);
void SetNDF(UInt_t ndf) { fNDF = ndf; }
void SetNDF(UInt_t ndf, UInt_t idx);
Double_t GetTimeRangeFirst(UInt_t idx);
Double_t GetTimeRangeLast() { return fLast; }
Double_t GetChisq() { return fChisq; }
Double_t GetChisq(UInt_t idx);
Double_t GetExpectedChisq() { return fExpectedChisq; }
Double_t GetExpectedChisq(UInt_t idx);
UInt_t GetNDF() { return fNDF; }
UInt_t GetNDF(UInt_t idx);
UInt_t GetNoRuns() { return fNoOfRuns; }
private:
UInt_t fNoOfRuns; ///< number of runs presesent
Double_t fLast; ///< requested time stamp
Double_t fChisq; ///< chisq or maxLH for the sector
Double_t fExpectedChisq; ///< keep the expected chisq or maxLH for the sector
UInt_t fNDF; ///< NDF for the sector
PDoubleVector fFirst; ///< time stamp for fgb for a given run
PDoubleVector fChisqRun; ///< chisq or maxLH for the sector and run
PDoubleVector fExpectedChisqRun; ///< expected chisq or maxLH for the sector and run
PUIntVector fNDFRun; ///< NDF for the sector and run
};
//-----------------------------------------------------------------------------
/**
* <p>Interface class to minuit2.
*/
@ -108,6 +152,9 @@ class PFitter
PStringVector fElapsedTime;
Bool_t fSectorFlag; ///< sector command present flag
std::vector<PSectorChisq> fSector; ///< stores all chisq/maxLH sector information
// commands
Bool_t CheckCommands();
Bool_t SetParameters();
@ -126,6 +173,8 @@ class PFitter
Bool_t ExecuteScan();
Bool_t ExecuteSave(Bool_t first);
Bool_t ExecuteSimplex();
void PrepareSector(PDoubleVector &param, PDoubleVector &error);
Bool_t ExecuteSector(std::ofstream &fout);
Double_t MilliTime();
};

View File

@ -66,6 +66,8 @@ class PMsrHandler
virtual TString* GetMsrFileDirectoryPath() { return &fMsrFileDirectoryPath; }
virtual UInt_t GetNoOfRuns() { return fRuns.size(); }
virtual UInt_t GetNoOfParams() { return fParam.size(); }
virtual const TString& GetFileName() const { return fFileName; }

View File

@ -56,8 +56,9 @@ class PRunAsymmetry : public PRunBase
virtual Int_t GetEndTimeBin() { return fEndTimeBin; }
virtual Int_t GetPacking() { return fPacking; }
protected:
virtual void CalcNoOfFitBins();
protected:
virtual Bool_t PrepareData();
virtual Bool_t PrepareFitData();
virtual Bool_t PrepareViewData(PRawRunData* runData, UInt_t histoNo[2]);

View File

@ -57,8 +57,9 @@ class PRunAsymmetryBNMR : public PRunBase
virtual Int_t GetEndTimeBin() { return fEndTimeBin; }
virtual Int_t GetPacking() { return fPacking; }
protected:
virtual void CalcNoOfFitBins();
protected:
virtual Bool_t PrepareData();
virtual Bool_t PrepareFitData();
virtual Bool_t PrepareViewData(PRawRunData* runData, UInt_t histoNo[2]);

View File

@ -55,8 +55,9 @@ class PRunAsymmetryRRF : public PRunBase
virtual Int_t GetStartTimeBin() { return fStartTimeBin; }
virtual Int_t GetEndTimeBin() { return fEndTimeBin; }
protected:
virtual void CalcNoOfFitBins();
protected:
virtual Bool_t PrepareData();
virtual Bool_t PrepareFitData();
virtual Bool_t PrepareViewData(PRawRunData* runData, UInt_t histoNo[2]);

View File

@ -67,7 +67,7 @@ class PRunListCollection
virtual Double_t GetMuMinusChisq(const std::vector<Double_t>& par) const;
virtual Double_t GetNonMusrChisq(const std::vector<Double_t>& par) const;
virtual Double_t GetSingleHistoChisqExpected(const std::vector<Double_t>& par, const UInt_t idx) const;
virtual Double_t GetSingleRunChisqExpected(const std::vector<Double_t>& par, const UInt_t idx) const;
virtual Double_t GetSingleRunChisq(const std::vector<Double_t>& par, const UInt_t idx) const;
virtual Double_t GetSingleHistoMaximumLikelihood(const std::vector<Double_t>& par) const;
@ -78,7 +78,7 @@ class PRunListCollection
virtual Double_t GetMuMinusMaximumLikelihood(const std::vector<Double_t>& par) const;
virtual Double_t GetNonMusrMaximumLikelihood(const std::vector<Double_t>& par) const;
virtual Double_t GetSingleHistoMaximumLikelihoodExpected(const std::vector<Double_t>& par, const UInt_t idx) const;
virtual Double_t GetSingleRunMaximumLikelihoodExpected(const std::vector<Double_t>& par, const UInt_t idx) const;
virtual Double_t GetSingleRunMaximumLikelihood(const std::vector<Double_t>& par, const UInt_t idx) const;
virtual UInt_t GetNoOfBinsFitted(const UInt_t idx) const;

View File

@ -55,8 +55,9 @@ class PRunMuMinus : public PRunBase
virtual Int_t GetEndTimeBin() { return fEndTimeBin; }
virtual Int_t GetPacking() { return fPacking; }
protected:
virtual void CalcNoOfFitBins();
protected:
virtual Bool_t PrepareData();
virtual Bool_t PrepareFitData(PRawRunData* runData, const UInt_t histoNo);
virtual Bool_t PrepareRawViewData(PRawRunData* runData, const UInt_t histoNo);

View File

@ -59,8 +59,9 @@ class PRunSingleHisto : public PRunBase
virtual Int_t GetPacking() { return fPacking; }
virtual Bool_t GetScaleN0AndBkg() { return fScaleN0AndBkg; }
protected:
virtual void CalcNoOfFitBins();
protected:
virtual Bool_t PrepareData();
virtual Bool_t PrepareFitData(PRawRunData* runData, const UInt_t histoNo);
virtual Bool_t PrepareRawViewData(PRawRunData* runData, const UInt_t histoNo);

View File

@ -54,8 +54,9 @@ class PRunSingleHistoRRF : public PRunBase
virtual Int_t GetStartTimeBin() { return fStartTimeBin; }
virtual Int_t GetEndTimeBin() { return fEndTimeBin; }
protected:
virtual void CalcNoOfFitBins();
protected:
virtual Bool_t PrepareData();
virtual Bool_t PrepareFitData(PRawRunData* runData, const UInt_t histoNo);
virtual Bool_t PrepareViewData(PRawRunData* runData, const UInt_t histoNo);