Merge branch 'dks6' of https://git.psi.ch/nemu/musrfit into dks6

This commit is contained in:
suter_a 2021-01-29 15:24:43 +01:00
commit f2334f39f8
402 changed files with 67305 additions and 201 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.6.4 LANGUAGES C CXX)
project(musrfit VERSION 1.6.5 LANGUAGES C CXX)
#--- musrfit specific options -------------------------------------------------
option(dks "build musrfit with DKS (GPU/MIC) support" ON)
@ -150,49 +150,60 @@ endif (DKS_FOUND)
if (qt_based_tools)
# check for any Qt, i.e. AUTO
if (qt_version STREQUAL AUTO)
# first try Qt5
# Find the QtCore library
find_package(Qt5Core)
if (Qt5Core_FOUND)
# Find the QtWidgets library
find_package(Qt5Widgets CONFIG REQUIRED)
# Find the QtXml library
find_package(Qt5Xml CONFIG REQUIRED)
# Find the QtNetwork library
find_package(Qt5Network CONFIG REQUIRED)
# Find the QtSvg library
find_package(Qt5Svg CONFIG REQUIRED)
# Fing the QtPrintSupport
find_package(Qt5PrintSupport CONFIG REQUIRED)
endif (Qt5Core_FOUND)
# try Qt6
find_package(Qt6Core)
if (Qt6Core_FOUND)
find_package(Qt6Widgets CONFIG REQUIRED)
find_package(Qt6Xml CONFIG REQUIRED)
find_package(Qt6Network CONFIG REQUIRED)
find_package(Qt6Svg CONFIG REQUIRED)
find_package(Qt6PrintSupport CONFIG REQUIRED)
endif (Qt6Core_FOUND)
# try Qt5
if (NOT Qt6Core_FOUND)
find_package(Qt5Core)
if (Qt5Core_FOUND)
find_package(Qt5Widgets CONFIG REQUIRED)
find_package(Qt5Xml CONFIG REQUIRED)
find_package(Qt5Network CONFIG REQUIRED)
find_package(Qt5Svg CONFIG REQUIRED)
find_package(Qt5PrintSupport CONFIG REQUIRED)
endif (Qt5Core_FOUND)
endif (NOT Qt6Core_FOUND)
# if Qt5 is not found, try Qt4
if (NOT Qt5Core_FOUND)
# if Qt6 and Qt5 is not found, try Qt4
if (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND)
find_package(Qt4 COMPONENTS QtGui QtWebKit QtXml)
endif (NOT Qt5Core_FOUND)
endif (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND)
# if Qt5 and Qt4 is not found try Qt3. Hopefully you never reach this point
if (NOT Qt5Core_FOUND)
if (NOT Qt4_FOUND)
find_package(Qt3)
endif (NOT Qt4_FOUND)
endif (NOT Qt5Core_FOUND)
# if Qt6, Qt5 and Qt4 is not found try Qt3. Hopefully you never reach this point
if (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND AND Qt4_FOUND)
find_package(Qt3)
endif (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND AND Qt4_FOUND)
endif (qt_version STREQUAL AUTO)
# check specifically for Qt5
# check specifically for Qt6
if (qt_version STREQUAL 6)
find_package(Qt6Core)
if (Qt6Core_FOUND)
find_package(Qt6Widgets CONFIG REQUIRED)
find_package(Qt6Xml CONFIG REQUIRED)
find_package(Qt6Network CONFIG REQUIRED)
find_package(Qt6Svg CONFIG REQUIRED)
find_package(Qt6PrintSupport CONFIG REQUIRED)
else (Qt6Core_FOUND)
message(FATAL_ERROR "Couldn't find the specifically requested Qt6 version.")
endif (Qt6Core_FOUND)
endif (qt_version STREQUAL 6)
# check specifically for Qt5
if (qt_version STREQUAL 5)
# Find the QtCore library
find_package(Qt5Core)
if (Qt5Core_FOUND)
# Find the QtWidgets library
find_package(Qt5Widgets CONFIG REQUIRED)
# Find the QtXml library
find_package(Qt5Xml CONFIG REQUIRED)
# Find the QtNetwork library
find_package(Qt5Network CONFIG REQUIRED)
# Find the QtSvg library
find_package(Qt5Svg CONFIG REQUIRED)
# Fing the QtPrintSupport
find_package(Qt5PrintSupport CONFIG REQUIRED)
else (Qt5Core_FOUND)
message(FATAL_ERROR "Couldn't find the specifically requested Qt5 version.")
@ -288,17 +299,21 @@ endif (nexus)
message("")
if (qt_based_tools)
if (Qt5Core_FOUND)
message(" Qt found in ${Qt5Core_INCLUDE_DIRS} (Version: ${Qt5Core_VERSION})")
else (Qt5Core_FOUND)
if (Qt4_FOUND)
message(" Qt found (Version: ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH})")
else (Qt4_FOUND)
if (QT_FOUND)
message(" Qt found (Version: ${QT_VERSION})")
endif (QT_FOUND)
endif (Qt4_FOUND)
endif (Qt5Core_FOUND)
if (Qt6Core_FOUND)
message(" Qt found in ${Qt6Core_INCLUDE_DIRS} (Version: ${Qt6Core_VERSION})")
else (Qt6Core_FOUND)
if (Qt5Core_FOUND)
message(" Qt found in ${Qt5Core_INCLUDE_DIRS} (Version: ${Qt5Core_VERSION})")
else (Qt5Core_FOUND)
if (Qt4_FOUND)
message(" Qt found (Version: ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH})")
else (Qt4_FOUND)
if (QT_FOUND)
message(" Qt found (Version: ${QT_VERSION})")
endif (QT_FOUND)
endif (Qt4_FOUND)
endif (Qt5Core_FOUND)
endif (Qt6Core_FOUND)
endif (qt_based_tools)
message("")
message(" Features:")
@ -336,25 +351,27 @@ else (BNMRlibs)
endif (BNMRlibs)
if (qt_based_tools)
if (Qt5Core_FOUND)
if (Qt6Core_FOUND)
message("")
message(" Qt6 based tools:")
message(" musredit, musrStep, musrWiz, mupp : yes")
elseif (Qt5Core_FOUND)
message("")
message(" Qt5 based tools:")
message(" musredit, musrStep, musrWiz, mupp : yes")
endif (Qt5Core_FOUND)
if (Qt4_FOUND)
elseif (Qt4_FOUND)
message("")
message(" Qt4 based tools (deprecated):")
message(" musredit : yes")
endif (Qt4_FOUND)
if (QT_FOUND)
else ()
message("")
message(" Qt3 based tools (outdated):")
message(" musrgui : yes")
endif (QT_FOUND)
if (NOT Qt5Core_FOUND AND NOT Qt4_FOUND AND NOT QT_FOUND)
endif ()
if (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND AND NOT Qt4_FOUND AND NOT QT_FOUND)
message("")
message(" NO Qt based tools will be installed since Qt is not found or not installed on the system")
endif (NOT Qt5Core_FOUND AND NOT Qt4_FOUND AND NOT QT_FOUND)
endif (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND AND NOT Qt4_FOUND AND NOT QT_FOUND)
else (qt_based_tools)
message("")
message(" Qt based tools (musredit, musrStep, musrWiz, mupp) have been disabled")

View File

@ -12,6 +12,11 @@ or
https://bitbucket.org/muonspin/musrfit/commits/all
Release of V1.6.5, 2021/01/22
=============================
Add Qt6 version of musredit, mupp, etc.
Release of V1.6.4, 2020/08/29
=============================

View File

@ -24,12 +24,12 @@ set (CPACK_SET_DESTDIR "OFF")
set (CPACK_PACKAGE_RELOCATABLE "true")
if (${CPACK_GENERATOR} STREQUAL "RPM")
set (CPACK_RPM_PACKAGE_REQUIRES "root >= 6.16.00")
set (CPACK_RPM_PACKAGE_REQUIRES "root >= 6.22.00")
set (CPACK_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
set (CPACK_PACKAGING_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
set (CPACK_RPM_FILE_NAME "RPM-DEFAULT")
set (CPACK_RPM_PACKAGE_RELEASE "1")
# next variable for RHEL, CentOS, Fedfora
# next variable for RHEL, CentOS, Fedora
set (CPACK_RPM_PACKAGE_RELEASE_DIST "")
set (CPACK_RPM_PACKAGE_LICENSE "GPLv2")
set (CPACK_RPM_PACKAGE_VENDOR "Paul Scherrer Institute - LMU - LEM")

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: 0b93e4185566cd2a81b86f199313e66e
config: eec60d1156b3ecdeb8b69fcbd6a0b13b
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>`.

238
doc/html/_sources/mupp.txt Normal file
View File

@ -0,0 +1,238 @@
.. 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>`.
Each collection bundles a number of runs, where a run is a single |mgr|\SR measurement.
A run is analyzed by a number of parameters (defined in the msr-files), and complemented by
additional physical parameters as the temperature, magnetic field, implantation energy, etc.
Hence parameters can be seen as vectors and can be plot against each other.
.. 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. Command history window.
14. 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.
Define Variable Dialog
++++++++++++++++++++++
.. image:: ../images/mupp-add-var.*
1. Variable text edit window.
2. Collection link window.
3. Shows the parameters of the selected collection.
4. Check if the variable/error variable from the edit window is valid.
5. Add the variable to the selected collection(s) if the parsing is successful.
A variable defined here is a mathematical expression defined by parameters of loaded collections.
Since a parameter also has an associated error, also newly defined variables **always** need
to be defined together with a corresponding error variable. If the name of a variable is defined
as ``SigmaSC_10`` (see the above snapshot), the error variable need to be named as ``SigmaSC_10Err``.
Currently the following mathematical functions are defined: ``max``, ``min``, ``abs``, ``sin``, ``cos``,
``tan``, ``exp``, ``log``, ``ln``, ``pow``.
.. 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.
**x <label>**
add ``<label>`` as a *x*-variable. Only *one* is allowed.
**y <label(s)>**
add ``<label(s)>`` as *y*-variable. *Multiple* labels are possible.
**norm**
this will normalize all the *y*-variables by their maximum.
**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.
**var <var_name> = <expr>**
defines a variable.
<expr> is a mathematical expression where collection variables are addressed
via the '$', e.g. ``dataT`` is addressed by ``$dataT``, etc. An example:
``var invT = 1000.0 / $dataT``
Each variable has to be accompanied by its error variable. An error variable
is defined by the ``<var_name>`` followed by ``Err``
For the above example the error variable is
``var invTErr = $invT * $dataTErr / $dataT``
**col <nn> : <var_name>**
links <var_name> to the collection <nn>, where <nn> is the number of the
collection as defined by the order of load, starting with 0.
An example script file ``sigmaSC-vs-temp.txt`` might look like this:
::
# This is a comment
# Script: sigmaSC-vs-temp.txt
loadPath ./
load YBCO-40nm-FC-E3p8keV-B10mT-Tscan.db # collection 0
load YBCO-40nm-FC-E3p8keV-B150mT-Tscan.db # collection 1
# define variables: for each variable an associated error variable is needed.
# B=10mT
var SigmaSC_10 = pow(abs(pow($Sigma,2.0)-pow(0.11,2.0)), 0.5) # 0.11 (1/us) is the nuclear contribution (T>Tc)
var SigmaSC_10Err = pow(pow($Sigma*$SigmaErr,2.0)+pow(0.11*0.0025,2.0), 0.5)/$SigmaSC_10
# B=150mT
var SigmaSC_150 = pow(abs(pow($Sigma,2.0)-pow(0.075,2.0)), 0.5) # 0.075 (1/us) is the nuclear contribution (T>Tc)
var SigmaSC_150Err = pow(pow($Sigma*$SigmaErr,2.0)+pow(0.075*0.0025,2.0), 0.5)/$SigmaSC_150
# link variables to collections
col 0 : SigmaSC_10 # error variable SigmaSC_10Err doesn't need to be given, it is automatically linked to SigmaSC_10
col 1 : SigmaSC_150
norm # normalize the plot to the maximum of each y-data-set
# the next 3 cmds means the following: use collection 0, add dataT to the x-axis,
# and SigmaSC_10 to the y-axis
select 0
x dataT
y SigmaSC_10
select 1
x dataT
y SigmaSC_150
# where to save the output
savePath ./
# create a pdf output file of the above defined xy-data sets. Currently also
# other file formats are supported, like png, jpg, etc.
plot SigmaSCVsTemp.pdf
# creates a ROOT macro which can be used for further refinement
macro SigmaSCVsTemp.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.
load <coll> : load a collection. <coll> is the filename of the
collection (*.db, *.dat)
loadPath <path> : set the load path to <path>; accepting bash variables
like $HOME, etc.
x <var-name> : set a x-axis variable. <var-name> is a data tag of
the db/dat-file.
y <var-name> : set a y-axis variable. <var-name> is a data tag of
the db/dat-file.
select <nn> : select collection <nn>, where <nn> is the row-number
or the name of the collection to be selected.
selectAll : i.e. already set 'x', 'y' will apply to ALL collections
present.
savePath <path> : sets the save path to <path>; accepting bash variables
like $HOME, etc.
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.
var <var_name> = <expr> : defines a variable.
<expr> is a mathematical expression where
collection variables are addressed via the '$',
e.g. dataT is addressed by $dataT, etc.
col <nn> : <var_name> : links <var_name> to the collection <nn>, where
<nn> is the number of the collection as defined
by the order of load, starting with 0.

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, Qt 5.6 (or above), or Qt6.x.
The Qt 5.6 and Qt 6.x 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

BIN
doc/html/_static/down.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

BIN
doc/html/_static/up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

View File

@ -0,0 +1,808 @@
/*
* websupport.js
* ~~~~~~~~~~~~~
*
* sphinx.websupport utilties for all documentation.
*
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
(function($) {
$.fn.autogrow = function() {
return this.each(function() {
var textarea = this;
$.fn.autogrow.resize(textarea);
$(textarea)
.focus(function() {
textarea.interval = setInterval(function() {
$.fn.autogrow.resize(textarea);
}, 500);
})
.blur(function() {
clearInterval(textarea.interval);
});
});
};
$.fn.autogrow.resize = function(textarea) {
var lineHeight = parseInt($(textarea).css('line-height'), 10);
var lines = textarea.value.split('\n');
var columns = textarea.cols;
var lineCount = 0;
$.each(lines, function() {
lineCount += Math.ceil(this.length / columns) || 1;
});
var height = lineHeight * (lineCount + 1);
$(textarea).css('height', height);
};
})(jQuery);
(function($) {
var comp, by;
function init() {
initEvents();
initComparator();
}
function initEvents() {
$('a.comment-close').live("click", function(event) {
event.preventDefault();
hide($(this).attr('id').substring(2));
});
$('a.vote').live("click", function(event) {
event.preventDefault();
handleVote($(this));
});
$('a.reply').live("click", function(event) {
event.preventDefault();
openReply($(this).attr('id').substring(2));
});
$('a.close-reply').live("click", function(event) {
event.preventDefault();
closeReply($(this).attr('id').substring(2));
});
$('a.sort-option').live("click", function(event) {
event.preventDefault();
handleReSort($(this));
});
$('a.show-proposal').live("click", function(event) {
event.preventDefault();
showProposal($(this).attr('id').substring(2));
});
$('a.hide-proposal').live("click", function(event) {
event.preventDefault();
hideProposal($(this).attr('id').substring(2));
});
$('a.show-propose-change').live("click", function(event) {
event.preventDefault();
showProposeChange($(this).attr('id').substring(2));
});
$('a.hide-propose-change').live("click", function(event) {
event.preventDefault();
hideProposeChange($(this).attr('id').substring(2));
});
$('a.accept-comment').live("click", function(event) {
event.preventDefault();
acceptComment($(this).attr('id').substring(2));
});
$('a.delete-comment').live("click", function(event) {
event.preventDefault();
deleteComment($(this).attr('id').substring(2));
});
$('a.comment-markup').live("click", function(event) {
event.preventDefault();
toggleCommentMarkupBox($(this).attr('id').substring(2));
});
}
/**
* Set comp, which is a comparator function used for sorting and
* inserting comments into the list.
*/
function setComparator() {
// If the first three letters are "asc", sort in ascending order
// and remove the prefix.
if (by.substring(0,3) == 'asc') {
var i = by.substring(3);
comp = function(a, b) { return a[i] - b[i]; };
} else {
// Otherwise sort in descending order.
comp = function(a, b) { return b[by] - a[by]; };
}
// Reset link styles and format the selected sort option.
$('a.sel').attr('href', '#').removeClass('sel');
$('a.by' + by).removeAttr('href').addClass('sel');
}
/**
* Create a comp function. If the user has preferences stored in
* the sortBy cookie, use those, otherwise use the default.
*/
function initComparator() {
by = 'rating'; // Default to sort by rating.
// If the sortBy cookie is set, use that instead.
if (document.cookie.length > 0) {
var start = document.cookie.indexOf('sortBy=');
if (start != -1) {
start = start + 7;
var end = document.cookie.indexOf(";", start);
if (end == -1) {
end = document.cookie.length;
by = unescape(document.cookie.substring(start, end));
}
}
}
setComparator();
}
/**
* Show a comment div.
*/
function show(id) {
$('#ao' + id).hide();
$('#ah' + id).show();
var context = $.extend({id: id}, opts);
var popup = $(renderTemplate(popupTemplate, context)).hide();
popup.find('textarea[name="proposal"]').hide();
popup.find('a.by' + by).addClass('sel');
var form = popup.find('#cf' + id);
form.submit(function(event) {
event.preventDefault();
addComment(form);
});
$('#s' + id).after(popup);
popup.slideDown('fast', function() {
getComments(id);
});
}
/**
* Hide a comment div.
*/
function hide(id) {
$('#ah' + id).hide();
$('#ao' + id).show();
var div = $('#sc' + id);
div.slideUp('fast', function() {
div.remove();
});
}
/**
* Perform an ajax request to get comments for a node
* and insert the comments into the comments tree.
*/
function getComments(id) {
$.ajax({
type: 'GET',
url: opts.getCommentsURL,
data: {node: id},
success: function(data, textStatus, request) {
var ul = $('#cl' + id);
var speed = 100;
$('#cf' + id)
.find('textarea[name="proposal"]')
.data('source', data.source);
if (data.comments.length === 0) {
ul.html('<li>No comments yet.</li>');
ul.data('empty', true);
} else {
// If there are comments, sort them and put them in the list.
var comments = sortComments(data.comments);
speed = data.comments.length * 100;
appendComments(comments, ul);
ul.data('empty', false);
}
$('#cn' + id).slideUp(speed + 200);
ul.slideDown(speed);
},
error: function(request, textStatus, error) {
showError('Oops, there was a problem retrieving the comments.');
},
dataType: 'json'
});
}
/**
* Add a comment via ajax and insert the comment into the comment tree.
*/
function addComment(form) {
var node_id = form.find('input[name="node"]').val();
var parent_id = form.find('input[name="parent"]').val();
var text = form.find('textarea[name="comment"]').val();
var proposal = form.find('textarea[name="proposal"]').val();
if (text == '') {
showError('Please enter a comment.');
return;
}
// Disable the form that is being submitted.
form.find('textarea,input').attr('disabled', 'disabled');
// Send the comment to the server.
$.ajax({
type: "POST",
url: opts.addCommentURL,
dataType: 'json',
data: {
node: node_id,
parent: parent_id,
text: text,
proposal: proposal
},
success: function(data, textStatus, error) {
// Reset the form.
if (node_id) {
hideProposeChange(node_id);
}
form.find('textarea')
.val('')
.add(form.find('input'))
.removeAttr('disabled');
var ul = $('#cl' + (node_id || parent_id));
if (ul.data('empty')) {
$(ul).empty();
ul.data('empty', false);
}
insertComment(data.comment);
var ao = $('#ao' + node_id);
ao.find('img').attr({'src': opts.commentBrightImage});
if (node_id) {
// if this was a "root" comment, remove the commenting box
// (the user can get it back by reopening the comment popup)
$('#ca' + node_id).slideUp();
}
},
error: function(request, textStatus, error) {
form.find('textarea,input').removeAttr('disabled');
showError('Oops, there was a problem adding the comment.');
}
});
}
/**
* Recursively append comments to the main comment list and children
* lists, creating the comment tree.
*/
function appendComments(comments, ul) {
$.each(comments, function() {
var div = createCommentDiv(this);
ul.append($(document.createElement('li')).html(div));
appendComments(this.children, div.find('ul.comment-children'));
// To avoid stagnating data, don't store the comments children in data.
this.children = null;
div.data('comment', this);
});
}
/**
* After adding a new comment, it must be inserted in the correct
* location in the comment tree.
*/
function insertComment(comment) {
var div = createCommentDiv(comment);
// To avoid stagnating data, don't store the comments children in data.
comment.children = null;
div.data('comment', comment);
var ul = $('#cl' + (comment.node || comment.parent));
var siblings = getChildren(ul);
var li = $(document.createElement('li'));
li.hide();
// Determine where in the parents children list to insert this comment.
for(i=0; i < siblings.length; i++) {
if (comp(comment, siblings[i]) <= 0) {
$('#cd' + siblings[i].id)
.parent()
.before(li.html(div));
li.slideDown('fast');
return;
}
}
// If we get here, this comment rates lower than all the others,
// or it is the only comment in the list.
ul.append(li.html(div));
li.slideDown('fast');
}
function acceptComment(id) {
$.ajax({
type: 'POST',
url: opts.acceptCommentURL,
data: {id: id},
success: function(data, textStatus, request) {
$('#cm' + id).fadeOut('fast');
$('#cd' + id).removeClass('moderate');
},
error: function(request, textStatus, error) {
showError('Oops, there was a problem accepting the comment.');
}
});
}
function deleteComment(id) {
$.ajax({
type: 'POST',
url: opts.deleteCommentURL,
data: {id: id},
success: function(data, textStatus, request) {
var div = $('#cd' + id);
if (data == 'delete') {
// Moderator mode: remove the comment and all children immediately
div.slideUp('fast', function() {
div.remove();
});
return;
}
// User mode: only mark the comment as deleted
div
.find('span.user-id:first')
.text('[deleted]').end()
.find('div.comment-text:first')
.text('[deleted]').end()
.find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id +
', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id)
.remove();
var comment = div.data('comment');
comment.username = '[deleted]';
comment.text = '[deleted]';
div.data('comment', comment);
},
error: function(request, textStatus, error) {
showError('Oops, there was a problem deleting the comment.');
}
});
}
function showProposal(id) {
$('#sp' + id).hide();
$('#hp' + id).show();
$('#pr' + id).slideDown('fast');
}
function hideProposal(id) {
$('#hp' + id).hide();
$('#sp' + id).show();
$('#pr' + id).slideUp('fast');
}
function showProposeChange(id) {
$('#pc' + id).hide();
$('#hc' + id).show();
var textarea = $('#pt' + id);
textarea.val(textarea.data('source'));
$.fn.autogrow.resize(textarea[0]);
textarea.slideDown('fast');
}
function hideProposeChange(id) {
$('#hc' + id).hide();
$('#pc' + id).show();
var textarea = $('#pt' + id);
textarea.val('').removeAttr('disabled');
textarea.slideUp('fast');
}
function toggleCommentMarkupBox(id) {
$('#mb' + id).toggle();
}
/** Handle when the user clicks on a sort by link. */
function handleReSort(link) {
var classes = link.attr('class').split(/\s+/);
for (var i=0; i<classes.length; i++) {
if (classes[i] != 'sort-option') {
by = classes[i].substring(2);
}
}
setComparator();
// Save/update the sortBy cookie.
var expiration = new Date();
expiration.setDate(expiration.getDate() + 365);
document.cookie= 'sortBy=' + escape(by) +
';expires=' + expiration.toUTCString();
$('ul.comment-ul').each(function(index, ul) {
var comments = getChildren($(ul), true);
comments = sortComments(comments);
appendComments(comments, $(ul).empty());
});
}
/**
* Function to process a vote when a user clicks an arrow.
*/
function handleVote(link) {
if (!opts.voting) {
showError("You'll need to login to vote.");
return;
}
var id = link.attr('id');
if (!id) {
// Didn't click on one of the voting arrows.
return;
}
// If it is an unvote, the new vote value is 0,
// Otherwise it's 1 for an upvote, or -1 for a downvote.
var value = 0;
if (id.charAt(1) != 'u') {
value = id.charAt(0) == 'u' ? 1 : -1;
}
// The data to be sent to the server.
var d = {
comment_id: id.substring(2),
value: value
};
// Swap the vote and unvote links.
link.hide();
$('#' + id.charAt(0) + (id.charAt(1) == 'u' ? 'v' : 'u') + d.comment_id)
.show();
// The div the comment is displayed in.
var div = $('div#cd' + d.comment_id);
var data = div.data('comment');
// If this is not an unvote, and the other vote arrow has
// already been pressed, unpress it.
if ((d.value !== 0) && (data.vote === d.value * -1)) {
$('#' + (d.value == 1 ? 'd' : 'u') + 'u' + d.comment_id).hide();
$('#' + (d.value == 1 ? 'd' : 'u') + 'v' + d.comment_id).show();
}
// Update the comments rating in the local data.
data.rating += (data.vote === 0) ? d.value : (d.value - data.vote);
data.vote = d.value;
div.data('comment', data);
// Change the rating text.
div.find('.rating:first')
.text(data.rating + ' point' + (data.rating == 1 ? '' : 's'));
// Send the vote information to the server.
$.ajax({
type: "POST",
url: opts.processVoteURL,
data: d,
error: function(request, textStatus, error) {
showError('Oops, there was a problem casting that vote.');
}
});
}
/**
* Open a reply form used to reply to an existing comment.
*/
function openReply(id) {
// Swap out the reply link for the hide link
$('#rl' + id).hide();
$('#cr' + id).show();
// Add the reply li to the children ul.
var div = $(renderTemplate(replyTemplate, {id: id})).hide();
$('#cl' + id)
.prepend(div)
// Setup the submit handler for the reply form.
.find('#rf' + id)
.submit(function(event) {
event.preventDefault();
addComment($('#rf' + id));
closeReply(id);
})
.find('input[type=button]')
.click(function() {
closeReply(id);
});
div.slideDown('fast', function() {
$('#rf' + id).find('textarea').focus();
});
}
/**
* Close the reply form opened with openReply.
*/
function closeReply(id) {
// Remove the reply div from the DOM.
$('#rd' + id).slideUp('fast', function() {
$(this).remove();
});
// Swap out the hide link for the reply link
$('#cr' + id).hide();
$('#rl' + id).show();
}
/**
* Recursively sort a tree of comments using the comp comparator.
*/
function sortComments(comments) {
comments.sort(comp);
$.each(comments, function() {
this.children = sortComments(this.children);
});
return comments;
}
/**
* Get the children comments from a ul. If recursive is true,
* recursively include childrens' children.
*/
function getChildren(ul, recursive) {
var children = [];
ul.children().children("[id^='cd']")
.each(function() {
var comment = $(this).data('comment');
if (recursive)
comment.children = getChildren($(this).find('#cl' + comment.id), true);
children.push(comment);
});
return children;
}
/** Create a div to display a comment in. */
function createCommentDiv(comment) {
if (!comment.displayed && !opts.moderator) {
return $('<div class="moderate">Thank you! Your comment will show up '
+ 'once it is has been approved by a moderator.</div>');
}
// Prettify the comment rating.
comment.pretty_rating = comment.rating + ' point' +
(comment.rating == 1 ? '' : 's');
// Make a class (for displaying not yet moderated comments differently)
comment.css_class = comment.displayed ? '' : ' moderate';
// Create a div for this comment.
var context = $.extend({}, opts, comment);
var div = $(renderTemplate(commentTemplate, context));
// If the user has voted on this comment, highlight the correct arrow.
if (comment.vote) {
var direction = (comment.vote == 1) ? 'u' : 'd';
div.find('#' + direction + 'v' + comment.id).hide();
div.find('#' + direction + 'u' + comment.id).show();
}
if (opts.moderator || comment.text != '[deleted]') {
div.find('a.reply').show();
if (comment.proposal_diff)
div.find('#sp' + comment.id).show();
if (opts.moderator && !comment.displayed)
div.find('#cm' + comment.id).show();
if (opts.moderator || (opts.username == comment.username))
div.find('#dc' + comment.id).show();
}
return div;
}
/**
* A simple template renderer. Placeholders such as <%id%> are replaced
* by context['id'] with items being escaped. Placeholders such as <#id#>
* are not escaped.
*/
function renderTemplate(template, context) {
var esc = $(document.createElement('div'));
function handle(ph, escape) {
var cur = context;
$.each(ph.split('.'), function() {
cur = cur[this];
});
return escape ? esc.text(cur || "").html() : cur;
}
return template.replace(/<([%#])([\w\.]*)\1>/g, function() {
return handle(arguments[2], arguments[1] == '%' ? true : false);
});
}
/** Flash an error message briefly. */
function showError(message) {
$(document.createElement('div')).attr({'class': 'popup-error'})
.append($(document.createElement('div'))
.attr({'class': 'error-message'}).text(message))
.appendTo('body')
.fadeIn("slow")
.delay(2000)
.fadeOut("slow");
}
/** Add a link the user uses to open the comments popup. */
$.fn.comment = function() {
return this.each(function() {
var id = $(this).attr('id').substring(1);
var count = COMMENT_METADATA[id];
var title = count + ' comment' + (count == 1 ? '' : 's');
var image = count > 0 ? opts.commentBrightImage : opts.commentImage;
var addcls = count == 0 ? ' nocomment' : '';
$(this)
.append(
$(document.createElement('a')).attr({
href: '#',
'class': 'sphinx-comment-open' + addcls,
id: 'ao' + id
})
.append($(document.createElement('img')).attr({
src: image,
alt: 'comment',
title: title
}))
.click(function(event) {
event.preventDefault();
show($(this).attr('id').substring(2));
})
)
.append(
$(document.createElement('a')).attr({
href: '#',
'class': 'sphinx-comment-close hidden',
id: 'ah' + id
})
.append($(document.createElement('img')).attr({
src: opts.closeCommentImage,
alt: 'close',
title: 'close'
}))
.click(function(event) {
event.preventDefault();
hide($(this).attr('id').substring(2));
})
);
});
};
var opts = {
processVoteURL: '/_process_vote',
addCommentURL: '/_add_comment',
getCommentsURL: '/_get_comments',
acceptCommentURL: '/_accept_comment',
deleteCommentURL: '/_delete_comment',
commentImage: '/static/_static/comment.png',
closeCommentImage: '/static/_static/comment-close.png',
loadingImage: '/static/_static/ajax-loader.gif',
commentBrightImage: '/static/_static/comment-bright.png',
upArrow: '/static/_static/up.png',
downArrow: '/static/_static/down.png',
upArrowPressed: '/static/_static/up-pressed.png',
downArrowPressed: '/static/_static/down-pressed.png',
voting: false,
moderator: false
};
if (typeof COMMENT_OPTIONS != "undefined") {
opts = jQuery.extend(opts, COMMENT_OPTIONS);
}
var popupTemplate = '\
<div class="sphinx-comments" id="sc<%id%>">\
<p class="sort-options">\
Sort by:\
<a href="#" class="sort-option byrating">best rated</a>\
<a href="#" class="sort-option byascage">newest</a>\
<a href="#" class="sort-option byage">oldest</a>\
</p>\
<div class="comment-header">Comments</div>\
<div class="comment-loading" id="cn<%id%>">\
loading comments... <img src="<%loadingImage%>" alt="" /></div>\
<ul id="cl<%id%>" class="comment-ul"></ul>\
<div id="ca<%id%>">\
<p class="add-a-comment">Add a comment\
(<a href="#" class="comment-markup" id="ab<%id%>">markup</a>):</p>\
<div class="comment-markup-box" id="mb<%id%>">\
reStructured text markup: <i>*emph*</i>, <b>**strong**</b>, \
<tt>``code``</tt>, \
code blocks: <tt>::</tt> and an indented block after blank line</div>\
<form method="post" id="cf<%id%>" class="comment-form" action="">\
<textarea name="comment" cols="80"></textarea>\
<p class="propose-button">\
<a href="#" id="pc<%id%>" class="show-propose-change">\
Propose a change &#9657;\
</a>\
<a href="#" id="hc<%id%>" class="hide-propose-change">\
Propose a change &#9663;\
</a>\
</p>\
<textarea name="proposal" id="pt<%id%>" cols="80"\
spellcheck="false"></textarea>\
<input type="submit" value="Add comment" />\
<input type="hidden" name="node" value="<%id%>" />\
<input type="hidden" name="parent" value="" />\
</form>\
</div>\
</div>';
var commentTemplate = '\
<div id="cd<%id%>" class="sphinx-comment<%css_class%>">\
<div class="vote">\
<div class="arrow">\
<a href="#" id="uv<%id%>" class="vote" title="vote up">\
<img src="<%upArrow%>" />\
</a>\
<a href="#" id="uu<%id%>" class="un vote" title="vote up">\
<img src="<%upArrowPressed%>" />\
</a>\
</div>\
<div class="arrow">\
<a href="#" id="dv<%id%>" class="vote" title="vote down">\
<img src="<%downArrow%>" id="da<%id%>" />\
</a>\
<a href="#" id="du<%id%>" class="un vote" title="vote down">\
<img src="<%downArrowPressed%>" />\
</a>\
</div>\
</div>\
<div class="comment-content">\
<p class="tagline comment">\
<span class="user-id"><%username%></span>\
<span class="rating"><%pretty_rating%></span>\
<span class="delta"><%time.delta%></span>\
</p>\
<div class="comment-text comment"><#text#></div>\
<p class="comment-opts comment">\
<a href="#" class="reply hidden" id="rl<%id%>">reply &#9657;</a>\
<a href="#" class="close-reply" id="cr<%id%>">reply &#9663;</a>\
<a href="#" id="sp<%id%>" class="show-proposal">proposal &#9657;</a>\
<a href="#" id="hp<%id%>" class="hide-proposal">proposal &#9663;</a>\
<a href="#" id="dc<%id%>" class="delete-comment hidden">delete</a>\
<span id="cm<%id%>" class="moderation hidden">\
<a href="#" id="ac<%id%>" class="accept-comment">accept</a>\
</span>\
</p>\
<pre class="proposal" id="pr<%id%>">\
<#proposal_diff#>\
</pre>\
<ul class="comment-children" id="cl<%id%>"></ul>\
</div>\
<div class="clearleft"></div>\
</div>\
</div>';
var replyTemplate = '\
<li>\
<div class="reply-div" id="rd<%id%>">\
<form id="rf<%id%>">\
<textarea name="comment" cols="80"></textarea>\
<input type="submit" value="Add reply" />\
<input type="button" value="Cancel" />\
<input type="hidden" name="parent" value="<%id%>" />\
<input type="hidden" name="node" value="" />\
</form>\
</div>\
</li>';
$(document).ready(function() {
init();
});
})(jQuery);
$(document).ready(function() {
// add comment anchors for all paragraphs that are commentable
$('.sphinx-has-comment').comment();
// highlight search words in search results
$("div.context").each(function() {
var params = $.getQueryParameters();
var terms = (params.q) ? params.q[0].split(/\s+/) : [];
var result = $(this);
$.each(terms, function() {
result.highlightText(this.toLowerCase(), 'highlighted');
});
});
// directly open comment window if requested
var anchor = document.location.hash;
if (anchor.substring(0, 9) == '#comment-') {
$('#ao' + anchor.substring(9)).click();
document.location.hash = '#s' + anchor.substring(9);
}
});

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Acknowledgements &mdash; musrfit 1.6.4 documentation</title>
<title>Acknowledgements &mdash; musrfit 1.6.5 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.6.4',
VERSION: '1.6.5',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -24,7 +24,7 @@
<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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.6.5 documentation" href="index.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>
@ -41,7 +41,7 @@
<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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
@ -112,12 +112,12 @@ 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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Jan 23, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>any2many - a Universal μSR-file-format converter &mdash; musrfit 1.6.4 documentation</title>
<title>any2many - a Universal μSR-file-format converter &mdash; musrfit 1.6.5 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.6.4',
VERSION: '1.6.5',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -24,7 +24,7 @@
<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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.6.5 documentation" href="index.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>
@ -41,7 +41,7 @@
<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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
@ -102,12 +102,12 @@ 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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Jan 23, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bugtracking &mdash; musrfit 1.6.4 documentation</title>
<title>Bugtracking &mdash; musrfit 1.6.5 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.6.4',
VERSION: '1.6.5',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -24,7 +24,7 @@
<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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
<link rel="prev" title="Acknowledgements" href="acknowledgement.html" />
</head>
<body>
@ -37,7 +37,7 @@
<li class="right" >
<a href="acknowledgement.html" title="Acknowledgements"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
@ -93,12 +93,12 @@ 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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Jan 23, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>How to Cite musrfit? &mdash; musrfit 1.6.4 documentation</title>
<title>How to Cite musrfit? &mdash; musrfit 1.6.5 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.6.4',
VERSION: '1.6.5',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -24,7 +24,7 @@
<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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
<link rel="next" title="Tutorial for musrfit" href="tutorial.html" />
<link rel="prev" title="Welcome to the musrfit documentation!" href="index.html" />
</head>
@ -41,7 +41,7 @@
<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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
@ -114,12 +114,12 @@
<li class="right" >
<a href="index.html" title="Welcome to the musrfit documentation!"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Jan 23, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -7,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Index &mdash; musrfit 1.6.4 documentation</title>
<title>Index &mdash; musrfit 1.6.5 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -15,7 +15,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.6.4',
VERSION: '1.6.5',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -25,7 +25,7 @@
<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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
</head>
<body>
<div class="related">
@ -34,7 +34,7 @@
<li class="right" style="margin-right: 10px">
<a href="#" title="General Index"
accesskey="I">index</a></li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
@ -990,12 +990,12 @@
<li class="right" style="margin-right: 10px">
<a href="#" title="General Index"
>index</a></li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Jan 23, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome to the musrfit documentation! &mdash; musrfit 1.6.4 documentation</title>
<title>Welcome to the musrfit documentation! &mdash; musrfit 1.6.5 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.6.4',
VERSION: '1.6.5',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -24,7 +24,7 @@
<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.6.4 documentation" href="#" />
<link rel="top" title="musrfit 1.6.5 documentation" href="#" />
<link rel="next" title="How to Cite musrfit?" href="cite.html" />
</head>
<body>
@ -37,7 +37,7 @@
<li class="right" >
<a href="cite.html" title="How to Cite musrfit?"
accesskey="N">next</a> |</li>
<li><a href="#">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="#">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
@ -180,12 +180,12 @@
<li class="right" >
<a href="cite.html" title="How to Cite musrfit?"
>next</a> |</li>
<li><a href="#">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="#">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Jan 23, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<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.6.4 documentation</title>
<title>msr2data - A Program for Automatically Processing Multiple musrfit msr Files &mdash; musrfit 1.6.5 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.6.4',
VERSION: '1.6.5',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -24,7 +24,7 @@
<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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.6.5 documentation" href="index.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>
@ -41,7 +41,7 @@
<li class="right" >
<a href="mupp.html" title="mupp - μSR Parameter Plotter"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
@ -434,12 +434,12 @@ 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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Jan 23, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>mupp - μSR Parameter Plotter &mdash; musrfit 1.6.4 documentation</title>
<title>mupp - μSR Parameter Plotter &mdash; musrfit 1.6.5 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.6.4',
VERSION: '1.6.5',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -24,7 +24,7 @@
<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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.6.5 documentation" href="index.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>
@ -41,7 +41,7 @@
<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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
@ -324,12 +324,12 @@ 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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Jan 23, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MusrRoot - an Extensible Open File Format for μSR &mdash; musrfit 1.6.4 documentation</title>
<title>MusrRoot - an Extensible Open File Format for μSR &mdash; musrfit 1.6.5 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.6.4',
VERSION: '1.6.5',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -24,7 +24,7 @@
<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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
<link rel="next" title="Acknowledgements" href="acknowledgement.html" />
<link rel="prev" title="any2many - a Universal μSR-file-format converter" href="any2many.html" />
</head>
@ -41,7 +41,7 @@
<li class="right" >
<a href="any2many.html" title="any2many - a Universal μSR-file-format converter"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
@ -923,12 +923,12 @@ the entry has been added. The last token, <tt class="docutils literal"><span cla
<li class="right" >
<a href="any2many.html" title="any2many - a Universal μSR-file-format converter"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Jan 23, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>musredit: the GUI Based Interface to musrfit &mdash; musrfit 1.6.4 documentation</title>
<title>musredit: the GUI Based Interface to musrfit &mdash; musrfit 1.6.5 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.6.4',
VERSION: '1.6.5',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -24,7 +24,7 @@
<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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.6.5 documentation" href="index.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>
@ -41,7 +41,7 @@
<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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
@ -55,8 +55,8 @@
<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.
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, Qt 5.6 (or above), or Qt6.x.
The Qt 5.6 and Qt 6.x 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>
<div class="admonition note">
@ -550,12 +550,12 @@ 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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Jan 23, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Search &mdash; musrfit 1.6.4 documentation</title>
<title>Search &mdash; musrfit 1.6.5 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.6.4',
VERSION: '1.6.5',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -25,7 +25,7 @@
<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/searchtools.js"></script>
<link rel="top" title="musrfit 1.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
<script type="text/javascript">
jQuery(function() { Search.loadIndex("searchindex.js"); });
</script>
@ -41,7 +41,7 @@
<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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
@ -89,12 +89,12 @@
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Jan 23, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
<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.6.4 documentation</title>
<title>Setting up musrfit / DKS: High Speed Fitting with GPUs &mdash; musrfit 1.6.5 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -13,7 +13,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.6.4',
VERSION: '1.6.5',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -23,7 +23,7 @@
<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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.6.5 documentation" href="index.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>
@ -40,7 +40,7 @@
<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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
@ -320,12 +320,12 @@ 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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Jan 23, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Setting up musrfit on Different Platforms &mdash; musrfit 1.6.4 documentation</title>
<title>Setting up musrfit on Different Platforms &mdash; musrfit 1.6.5 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.6.4',
VERSION: '1.6.5',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -24,7 +24,7 @@
<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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
<link rel="next" title="Setting up musrfit / DKS: High Speed Fitting with GPUs" href="setup-dks.html" />
<link rel="prev" title="Documentation of user libs (user functions)" href="user-libs.html" />
</head>
@ -41,7 +41,7 @@
<li class="right" >
<a href="user-libs.html" title="Documentation of user libs (user functions)"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
@ -106,7 +106,7 @@ Currently the <tt class="docutils literal"><span class="pre">MXML</span></tt> su
<p>If <em>optionally</em> the editor and graphical user interface <tt class="docutils literal"><span class="pre">musrgui</span></tt> / <tt class="docutils literal"><span class="pre">musredit</span></tt> is going to be installed there is one further requirement:</p>
<dl class="docutils" id="index-11">
<dt><strong>Qt</strong></dt>
<dd>A cross-platform application and user interface framework. <em>Required version ≥ 4.6</em> (musredit) (see <a class="reference external" href="http://qt.io/">Qt</a>).</dd>
<dd>A cross-platform application and user interface framework. <em>Required version ≥ 4.6</em> (musredit) (see <a class="reference external" href="http://qt.io/">Qt</a>). Currently the <strong>Qt5</strong> is the main development part. Qt6 just kicked in, but is not widely available yet.</dd>
</dl>
<p>Each of the following sections focusing on the installation of <tt class="docutils literal"><span class="pre">musrfit</span></tt> on the different operating systems will also give a brief introduction on the installation of the requirements before the actual musrfit installation is described.</p>
</div>
@ -150,7 +150,7 @@ from the shell will do the trick (never type the &#8216;$&#8217; it is the shell
<p>For <strong>Qt5</strong>:</p>
<blockquote>
<div><div class="highlight-bash"><div class="highlight"><pre><span></span>$ yum install epel-release
$ yum install git cmake boost-devel gsl-devel fftw-devel libxml2-devel qt5-qtbase-devel qt5-qtsvg-devel qt5-qtwebkit-devel
$ yum install git cmake boost-devel gsl-devel fftw-devel libxml2-devel qt5-qtbase-devel qt5-qtsvg-devel
</pre></div>
</div>
</div></blockquote>
@ -165,7 +165,7 @@ the installation would look like:</p>
</div></blockquote>
<p>For <strong>Qt5</strong>:</p>
<blockquote>
<div><div class="highlight-bash"><div class="highlight"><pre><span></span>$ apt-get install git cmake libboost-dev libgsl-dev libfftw3-dev libxml2-dev qt5-default qtbase5-dev libqt5svg5-dev libqt5webkit5-dev
<div><div class="highlight-bash"><div class="highlight"><pre><span></span>$ apt-get install git cmake libboost-dev libgsl-dev libfftw3-dev libxml2-dev qt5-default qtbase5-dev libqt5svg5-dev
</pre></div>
</div>
</div></blockquote>
@ -339,7 +339,7 @@ switch is not provided is <tt class="docutils literal"><span class="pre">BMWlibs
<dd>Will try to get <tt class="docutils literal"><span class="pre">musredit</span></tt>, <tt class="docutils literal"><span class="pre">musrWiz</span></tt>, <tt class="docutils literal"><span class="pre">musrStep</span></tt>, and <tt class="docutils literal"><span class="pre">mupp</span></tt> installed, if <tt class="docutils literal"><span class="pre">Qt</span></tt> is found.
By default this is enabled. Again &lt;value&gt;=0 means disabled, &lt;value&gt;=1 enabled.</dd>
<dt><strong>-Dqt_version=&lt;value&gt;</strong></dt>
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. &lt;value&gt; can take the values: <tt class="docutils literal"><span class="pre">AUTO,</span> <span class="pre">3,</span> <span class="pre">4,</span> <span class="pre">5</span></tt>.
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. &lt;value&gt; can take the values: <tt class="docutils literal"><span class="pre">AUTO,</span> <span class="pre">3,</span> <span class="pre">4,</span> <span class="pre">5,</span> <span class="pre">6</span></tt>.
If the value is set to <tt class="docutils literal"><span class="pre">AUTO</span></tt>, this highest installed version is chosen, otherwise the specified version is used.</dd>
<dt><strong>-Dtry_OpenMP=&lt;value&gt;</strong></dt>
<dd>Will check if <tt class="docutils literal"><span class="pre">OpenMP</span></tt> support is possible, and if yes use it. The default is enabled</dd>
@ -380,23 +380,10 @@ detailed information on this XML file refer to the <a class="reference internal"
<div class="section" id="musredit">
<span id="index-20"></span><h3>musredit<a class="headerlink" href="#musredit" title="Permalink to this headline"></a></h3>
<p>In the latest version of <tt class="docutils literal"><span class="pre">musrfit</span></tt> the configure script tries to determine automatically the highest available <tt class="docutils literal"><span class="pre">Qt</span></tt> version.
In case this is found, the editor <tt class="docutils literal"><span class="pre">musredit</span></tt> is built already together with <tt class="docutils literal"><span class="pre">musrfit</span></tt>.
To install this editor separately, <em>i.e.</em> by &#8220;hand&#8221; do</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> <span class="nv">$HOME</span>/Apps/musrfit/src/musredit_qt5
$ <span class="c1"># for some distributions you will need qmake-qt5 for the next command</span>
$ qmake musredit.pro
</pre></div>
In case this is found, the editor <tt class="docutils literal"><span class="pre">musredit</span></tt> is built already together with <tt class="docutils literal"><span class="pre">musrfit</span></tt>.</p>
</div>
<p>If everything went fine, <tt class="docutils literal"><span class="pre">musredit</span></tt> can be compiled and installed:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ make
$ make install
</pre></div>
</div>
<p>In case one does not like the executable <tt class="docutils literal"><span class="pre">musredit</span></tt> to be copied to the default installation directory <tt class="docutils literal"><span class="pre">$ROOTSYS/bin</span></tt>
the last <em>make install</em> can be skipped and the executable can be copied somewhere else instead.</p>
</div>
<div class="section" id="musrgui-obsolate">
<h3>musrgui (obsolate)<a class="headerlink" href="#musrgui-obsolate" title="Permalink to this headline"></a></h3>
<div class="section" id="musrgui-depreciated">
<h3>musrgui (depreciated)<a class="headerlink" href="#musrgui-depreciated" title="Permalink to this headline"></a></h3>
<p>If <tt class="docutils literal"><span class="pre">Qt4.6</span></tt> or higher is not available but <tt class="docutils literal"><span class="pre">Qt3</span></tt> is set up <tt class="docutils literal"><span class="pre">musrgui</span></tt> can be installed. For this please
follow the instructions for the <tt class="docutils literal"><span class="pre">musredit</span></tt> installation where simply every <tt class="docutils literal"><span class="pre">musredit</span></tt> occurrence has to
be replaced by <tt class="docutils literal"><span class="pre">musrgui</span></tt>. If there are problems during the <tt class="docutils literal"><span class="pre">qmake</span></tt> step, <em>e.g.</em>
@ -603,7 +590,7 @@ The default setting, <em>i.e.</em> the switch is not provided is <tt class="docu
<dd>Will try to get <tt class="docutils literal"><span class="pre">musredit</span></tt>, <tt class="docutils literal"><span class="pre">musrWiz</span></tt>, <tt class="docutils literal"><span class="pre">musrStep</span></tt>, and <tt class="docutils literal"><span class="pre">mupp</span></tt> installed, if <tt class="docutils literal"><span class="pre">Qt</span></tt> is found.
By default this is <em>enabled</em>. Again &lt;value&gt;=0 means disabled, &lt;value&gt;=1 enabled.</dd>
<dt><strong>-Dqt_version=&lt;value&gt;</strong></dt>
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. &lt;value&gt; can take the values: <tt class="docutils literal"><span class="pre">AUTO,</span> <span class="pre">3,</span> <span class="pre">4,</span> <span class="pre">5</span></tt>.
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. &lt;value&gt; can take the values: <tt class="docutils literal"><span class="pre">AUTO,</span> <span class="pre">3,</span> <span class="pre">4,</span> <span class="pre">5,</span> <span class="pre">6</span></tt>.
If the value is set to <tt class="docutils literal"><span class="pre">AUTO</span></tt>, this highest installed version is chosen, otherwise the specified version is used.</dd>
<dt><strong>-Dtry_OpenMP=&lt;value&gt;</strong></dt>
<dd>Will check if <tt class="docutils literal"><span class="pre">OpenMP</span></tt> support is possible, and if yes use it. The default is <em>enabled</em>.</dd>
@ -652,7 +639,7 @@ musredit <span class="p">&amp;</span>
</div>
</div>
<div class="section" id="id12">
<h3>musrgui (obsolate)<a class="headerlink" href="#id12" title="Permalink to this headline"></a></h3>
<h3>musrgui (depreciated)<a class="headerlink" href="#id12" title="Permalink to this headline"></a></h3>
<p>If <tt class="docutils literal"><span class="pre">Qt4.5</span></tt> or higher is not available but <tt class="docutils literal"><span class="pre">Qt3</span></tt> is set up <tt class="docutils literal"><span class="pre">musrgui</span></tt> can be installed. For this
please follow the instructions for the <tt class="docutils literal"><span class="pre">musredit</span></tt> installation where simply every <tt class="docutils literal"><span class="pre">musredit</span></tt> occurrence
has to be replaced by <tt class="docutils literal"><span class="pre">musrgui</span></tt>, and <tt class="docutils literal"><span class="pre">qt4</span></tt> is replaced by <tt class="docutils literal"><span class="pre">qt3</span></tt>.</p>
@ -686,6 +673,11 @@ and <tt class="docutils literal"><span class="pre">C:\cygwin\bin\bash.exe</span>
<h2>Mac OS X / macOS<a class="headerlink" href="#mac-os-x-macos" title="Permalink to this headline"></a></h2>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">macOS 11 alias <strong>Big Sur</strong>: <tt class="docutils literal"><span class="pre">musrfit</span></tt> is ready for <strong>Big Sur</strong> on Intel based macs. The <tt class="docutils literal"><span class="pre">DKS</span></tt> version of
<tt class="docutils literal"><span class="pre">musrfit</span></tt> for macOS <strong>Big Sur</strong> is ready as well.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">macOS Catalina is slightly different in some aspects, so if it happens that you have it installed, please
first check <a class="reference internal" href="#note-on-catalina"><em>Notes on macOS Catalina</em></a> before you proceed.</p>
</div>
@ -753,7 +745,7 @@ add a new line pointing to your local copy, <em>e.g.</em></p>
</ol>
<p>Then the MacPorts system should be set up and can be used to install additional software.</p>
<p>The installation of the software mentioned above is then done in the terminal:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ sudo port -v install pkgconfig autoconf automake libtool cmake fftw-3 fftw-3-single gsl boost libxml2 qt5 qt5-qtsvg qt5-qtwebengine
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ sudo port -v install pkgconfig autoconf automake libtool cmake fftw-3 fftw-3-single gsl boost libxml2 qt5 qt5-qtsvg
</pre></div>
</div>
<p>With <tt class="docutils literal"><span class="pre">Qt5</span></tt>, <tt class="docutils literal"><span class="pre">musredit</span></tt> will be installed. If it happens that you used <tt class="docutils literal"><span class="pre">musrgui</span></tt> in the past,
@ -927,8 +919,7 @@ is necessary to compile a few packages from source since no binary packages are
automatically by the FinkCommander after you have chosen the software packages for installation:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>autoconf automake cmake boost1.63-nopython boost1.63.nopython-shlibs fftw3 fftw3-shlibs gsl gsl-shlibs
libtool2 libtool2-shlibs libxml2 libxml2-bin libxml2-shlibs pkgconfig qt5-mac-qtbase qt5-mac-qtbase-dev-tools
qt5-mac-qtsvg qt5-mac-qtsvg-shlibs qt5-mac-qtwebengine qt5-mac-qtwebengine-shlibs qt5-mac-qtwebenginecore-shlibs
qt5-mac-qtwebenginewidgets-shlibs
qt5-mac-qtsvg qt5-mac-qtsvg-shlibs
</pre></div>
</div>
<p>Under OS X 10.6 Snow Leopard it will <em>not</em> be possible to install <tt class="docutils literal"><span class="pre">qt3mac</span></tt> since the system is by default a 64-bit
@ -1112,7 +1103,7 @@ switch is not provided is <tt class="docutils literal"><span class="pre">BMWlibs
<dd>Will try to get <tt class="docutils literal"><span class="pre">musredit</span></tt>, <tt class="docutils literal"><span class="pre">musrWiz</span></tt>, <tt class="docutils literal"><span class="pre">musrStep</span></tt>, and <tt class="docutils literal"><span class="pre">mupp</span></tt> installed, if <tt class="docutils literal"><span class="pre">Qt</span></tt> is found.
By default this is enabled. Again &lt;value&gt;=0 means disabled, &lt;value&gt;=1 enabled.</dd>
<dt><strong>-Dqt_version=&lt;value&gt;</strong></dt>
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. &lt;value&gt; can take the values: <tt class="docutils literal"><span class="pre">AUTO,</span> <span class="pre">3,</span> <span class="pre">4,</span> <span class="pre">5</span></tt>.
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. &lt;value&gt; can take the values: <tt class="docutils literal"><span class="pre">AUTO,</span> <span class="pre">3,</span> <span class="pre">4,</span> <span class="pre">5,</span> <span class="pre">6</span></tt>.
If the value is set to <tt class="docutils literal"><span class="pre">AUTO</span></tt>, this highest installed version is chosen, otherwise the specified version is used.</dd>
<dt><strong>-Dtry_OpenMP=&lt;value&gt;</strong></dt>
<dd>Will check if <tt class="docutils literal"><span class="pre">OpenMP</span></tt> support is possible, and if yes use it. The default is enabled</dd>
@ -1223,7 +1214,7 @@ $ musrview test-histo-ROOT-NPP.msr
</ul>
</li>
<li><a class="reference internal" href="#musredit">musredit</a></li>
<li><a class="reference internal" href="#musrgui-obsolate">musrgui (obsolate)</a></li>
<li><a class="reference internal" href="#musrgui-depreciated">musrgui (depreciated)</a></li>
<li><a class="reference internal" href="#check-the-installation">Check the installation</a></li>
</ul>
</li>
@ -1240,7 +1231,7 @@ $ musrview test-histo-ROOT-NPP.msr
</ul>
</li>
<li><a class="reference internal" href="#index-26">musredit</a></li>
<li><a class="reference internal" href="#id12">musrgui (obsolate)</a></li>
<li><a class="reference internal" href="#id12">musrgui (depreciated)</a></li>
<li><a class="reference internal" href="#id13">Check the installation</a></li>
<li><a class="reference internal" href="#potential-problems">Potential Problems</a></li>
</ul>
@ -1311,12 +1302,12 @@ $ musrview test-histo-ROOT-NPP.msr
<li class="right" >
<a href="user-libs.html" title="Documentation of user libs (user functions)"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Jan 23, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Tutorial for musrfit &mdash; musrfit 1.6.4 documentation</title>
<title>Tutorial for musrfit &mdash; musrfit 1.6.5 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.6.4',
VERSION: '1.6.5',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -24,7 +24,7 @@
<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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
<link rel="next" title="User manual" href="user-manual.html" />
<link rel="prev" title="How to Cite musrfit?" href="cite.html" />
</head>
@ -41,7 +41,7 @@
<li class="right" >
<a href="cite.html" title="How to Cite musrfit?"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
@ -443,12 +443,12 @@ 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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Jan 23, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documentation of user libs (user functions) &mdash; musrfit 1.6.4 documentation</title>
<title>Documentation of user libs (user functions) &mdash; musrfit 1.6.5 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.6.4',
VERSION: '1.6.5',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -24,7 +24,7 @@
<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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.6.5 documentation" href="index.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>
@ -41,7 +41,7 @@
<li class="right" >
<a href="user-manual.html" title="User manual"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
@ -662,12 +662,12 @@ 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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Jan 23, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>User manual &mdash; musrfit 1.6.4 documentation</title>
<title>User manual &mdash; musrfit 1.6.5 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.6.4',
VERSION: '1.6.5',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -24,7 +24,7 @@
<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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
<link rel="next" title="Documentation of user libs (user functions)" href="user-libs.html" />
<link rel="prev" title="Tutorial for musrfit" href="tutorial.html" />
</head>
@ -41,7 +41,7 @@
<li class="right" >
<a href="tutorial.html" title="Tutorial for musrfit"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
@ -2557,12 +2557,12 @@ In case this cannot be ensured, the parallelization can be disabled by <em>&#821
<li class="right" >
<a href="tutorial.html" title="Tutorial for musrfit"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.6.5 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Jan 23, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -1,13 +1,15 @@
#--- add further sub-directories ----------------------------------------------
add_subdirectory(classes)
add_subdirectory(external)
if (Qt5Core_FOUND)
if (Qt6Core_FOUND)
add_subdirectory(musredit_qt6)
elseif (Qt5Core_FOUND)
add_subdirectory(musredit_qt5)
elseif (Qt4_FOUND)
add_subdirectory(musredit)
elseif (QT_FOUND)
add_subdirectory(musrgui)
endif (Qt5Core_FOUND)
endif ()
#--- define the musrfit libs --------------------------------------------------
set(MUSRFIT_LIBS ${MUSRFIT_LIBS} mud)

View File

@ -140,8 +140,10 @@ endif (OpenMP_FOUND)
#--- add DKS compiler flags if enabled ----------------------------------------
if (DKS_FOUND)
set(DKS_CXX_FLAGS -DDKS_OPENCL -DDKS_CUDA -I${CUDA_INCLUDE_DIRS} -I${DKS_INCLUDE_DIR})
target_compile_options(PMusr PUBLIC ${DKS_CXX_FLAGS})
if (CUDA_FOUND)
set(DKS_CXX_FLAGS -DDKS_OPENCL -DDKS_CUDA -I${CUDA_INCLUDE_DIRS} -I${DKS_INCLUDE_DIR})
target_compile_options(PMusr PUBLIC ${DKS_CXX_FLAGS})
endif (CUDA_FOUND)
endif (DKS_FOUND)
#--- add library dependencies -------------------------------------------------

View File

@ -0,0 +1,12 @@
#--- musredit_qt6 for Qt > 6.0 ------------------------------------------------
#--- create musrfit-info.h ----------------------------------------------------
configure_file(
${CMAKE_SOURCE_DIR}/cmake/musrfit-info.h.in
${CMAKE_CURRENT_BINARY_DIR}/musrfit-info.h
)
add_subdirectory(musredit)
add_subdirectory(musrStep)
add_subdirectory(musrWiz)
add_subdirectory(mupp)

View File

@ -0,0 +1,107 @@
#--- mupp for Qt > 6.0 --------------------------------------------------------
#--- Find includes in corresponding build directories -------------------------
set(CMAKE_INCLUDE_CURRENT_DIR ON)
#--- instruct CMake to run moc automatically when needed ----------------------
set(CMAKE_AUTOMOC ON)
#--- define mupp version ------------------------------------------------------
set(mupp_VERSION 1.0.0)
#--- mupp_version.h generation - START ----------------------------------------
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/cmake/configure_mupp_version_file.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/configure_mupp_version_file.cmake
@ONLY
)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mupp_version.h
COMMAND ${CMAKE_COMMAND} -P
${CMAKE_CURRENT_BINARY_DIR}/configure_mupp_version_file.cmake
DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/configure_mupp_version_file.cmake
${CMAKE_CURRENT_SOURCE_DIR}/cmake/mupp_version.h.in
COMMENT "Configuring mupp_version.h"
VERBATIM
)
add_custom_target(
configure_mupp_version ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/mupp_version.h
)
#--- mupp_version.h generation - END ------------------------------------------
add_subdirectory(plotter)
qt6_add_resources(qrc_mupp.cpp mupp.qrc)
set_property(SOURCE qrc_mupp.cpp PROPERTY SKIP_AUTOMOC ON) # needed for cmake 3.x
set(GENERATED_HEADER_FILES
mupp_version.h
)
set_property(SOURCE mupp_version.h PROPERTY SKIP_AUTOMOC ON) # needed for cmake 3.x
set(MUPP_SOURCE_FILES
mupp.cpp
PmuppAdmin.cpp
Pmupp.cpp
PmuppScript.cpp
PmuppGui.cpp
PVarDialog.cpp
)
if (APPLE)
set(RESOURCE_FILES icons/mupp.icns)
add_executable(mupp
MACOSX_BUNDLE ${GENERATED_HEADER_FILES} ${MUPP_SOURCE_FILES}
qrc_mupp.cpp ${RESOURCE_FILES}
)
else (APPLE)
add_executable(mupp ${GENERATED_HEADER_FILES} ${MUPP_SOURCE_FILES} qrc_mupp.cpp)
endif (APPLE)
#--- compiler option to workaround a little cast problem for some
#--- boost/compiler combinations ----------------------------------------------
target_compile_options(mupp
PRIVATE
"-fpermissive"
)
#--- add the variable related sources -----------------------------------------
add_subdirectory(var)
#--- add the necessary header includes ----------------------------------------
target_include_directories(mupp
BEFORE PRIVATE
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/var/include>
)
#--- use the Widgets and XML modules from Qt5 ---------------------------------
target_link_libraries(mupp Qt6::Widgets Qt6::Xml)
#--- if macOS make an app rather than just a command line executable ----------
set_target_properties(mupp PROPERTIES
VERSION ${mupp_VERSION}
)
if (APPLE)
set_target_properties(mupp PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_BUNDLE_NAME "mupp"
MACOSX_BUNDLE_INFO_STRING "mupp is used to plot parameters from musrfit collections."
MACOSX_BUNDLE_ICON_FILE "mupp.icns"
MACOSX_BUNDLE_LONG_VERSION_STRING "${mupp_VERSION}"
MACOSX_FRAMEWORK_IDENTIFIER ch.psi.mupp
MACOSX_BUNDLE_COPYRIGHT "Andreas Suter"
RESOURCE "${RESOURCE_FILES}"
)
endif (APPLE)
#--- install ------------------------------------------------------------------
if (APPLE)
install(TARGETS mupp BUNDLE DESTINATION /Applications)
else (APPLE)
install(TARGETS mupp DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
endif (APPLE)

View File

@ -0,0 +1,459 @@
/***************************************************************************
PVarDialog.cpp
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <iostream>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QSplitter>
#include <QListWidgetItem>
#include <QMessageBox>
#include <QLabel>
#include <QRegularExpression>
#include "PVarDialog.h"
//--------------------------------------------------------------------------
/**
* @brief PShowVarNameDialog::PShowVarNameDialog. Ctor
* @param info containing the necessary information of the collection
*/
PShowVarNameDialog::PShowVarNameDialog(PCollInfo &info)
{
// if fCollName is a path name, extract the fln
QString collNameStr(info.fCollName);
if (collNameStr.contains("/")) {
QStringList tok = collNameStr.split('/', Qt::SkipEmptyParts);
collNameStr = tok[tok.count()-1];
}
QLabel *collName = new QLabel(collNameStr);
QLabel *numVars = new QLabel(QString("#variables: %1").arg(info.fVarName.count()));
QListWidget *list = new QListWidget();
for (int i=0; i<info.fVarName.count(); i++) {
QListWidgetItem *newItem = new QListWidgetItem;
newItem->setText(QString("%1 : %2").arg(i, 2).arg(info.fVarName[i]));
list->addItem(newItem);
}
QPushButton *done = new QPushButton("Done", this);
QVBoxLayout *vLayout = new QVBoxLayout;
vLayout->addWidget(collName);
vLayout->addWidget(numVars);
vLayout->addWidget(list);
vLayout->addWidget(done);
connect(done, SIGNAL( clicked() ), this, SLOT( accept() ));
resize(300, 450);
setLayout(vLayout);
setModal(false);
setWindowTitle("Variable Names");
QString iconName("");
if (true) // <-- NEEDS TO BE PROPERLY IMPLEMENTED
iconName = QString(":/icons/varEdit-dark.svg");
else
iconName = QString(":/icons/varEdit-plain.svg");
setWindowIcon( QIcon( QPixmap(iconName) ) );
}
//--------------------------------------------------------------------------
/**
* @brief PVarDialog::PVarDialog. Variable GUI allowing the users to define
* variables.
* @param collection_list list of all the collections
* @param darkTheme plain/dark theme flag
* @param parent parent widget pointer
* @param f window flag
*/
PVarDialog::PVarDialog(QVector<PCollInfo> collection_list, bool darkTheme,
QWidget *parent, Qt::WindowFlags f) :
QDialog(parent, f), fCollList(collection_list)
{
fVarEdit = new QPlainTextEdit();
fCollectionView = new QListWidget();
fCancel = new QPushButton("&Cancel", this);
fCheck = new QPushButton("Chec&k", this);
fAdd = new QPushButton("&Add", this);
fHelp = new QPushButton("&Help", this);
fShowVarName = new QPushButton("Show&VarName", this);
// fill collection view
for (int i=0; i<fCollList.count(); i++) {
QListWidgetItem *newItem = new QListWidgetItem;
newItem->setText(fCollList[i].fCollName);
fCollectionView->addItem(newItem);
}
fCollectionView->setCurrentRow(0, QItemSelectionModel::Select);
fCollectionView->setSelectionMode(QAbstractItemView::ExtendedSelection);
QHBoxLayout *hLayout0 = new QHBoxLayout;
hLayout0->addWidget(fShowVarName);
hLayout0->addWidget(fHelp);
QHBoxLayout *hLayout1 = new QHBoxLayout;
hLayout1->addWidget(fCancel);
hLayout1->addWidget(fCheck);
hLayout1->addWidget(fAdd);
QLabel *varLabel = new QLabel("Edit Variables:");
QVBoxLayout *varVLayout = new QVBoxLayout;
varVLayout->addWidget(varLabel);
varVLayout->addWidget(fVarEdit);
QLabel *collLabel = new QLabel("Collections:");
QVBoxLayout *collVLayout = new QVBoxLayout;
collVLayout->addWidget(collLabel);
collVLayout->addWidget(fCollectionView);
QWidget *varWidget = new QWidget(this); // only needed since splitter needs a QWidget
varWidget->setLayout(varVLayout);
QWidget *collWidget = new QWidget(this); // only needed since splitter needs a QWidget
collWidget->setLayout(collVLayout);
QSplitter *splitter = new QSplitter(Qt::Vertical, this);
splitter->addWidget(varWidget);
splitter->addWidget(collWidget);
QVBoxLayout *vLayout = new QVBoxLayout;
vLayout->addWidget(splitter);
vLayout->addLayout(hLayout0);
vLayout->addLayout(hLayout1);
fVarEdit->resize(600, 300);
setLayout(vLayout);
resize(600, 450);
connect(fCancel, SIGNAL( clicked() ), this, SLOT( reject() ));
connect(fCheck, SIGNAL( clicked() ), this, SLOT( check() ));
connect(fAdd, SIGNAL( clicked() ), this, SLOT( add() ));
connect(fHelp, SIGNAL( clicked() ), this, SLOT( help() ));
connect(fShowVarName, SIGNAL( clicked() ), this, SLOT( showVarNames() ));
QString iconName("");
if (darkTheme)
iconName = QString(":/icons/varEdit-dark.svg");
else
iconName = QString(":/icons/varEdit-plain.svg");
setWindowIcon( QIcon( QPixmap(iconName) ) );
}
//--------------------------------------------------------------------------
/**
* @brief PVarDialog::check. Allows the user to check the variable string.
*/
void PVarDialog::check()
{
if (!basic_check())
return;
if (!var_consistency_check())
return;
// create the collection index vector
QVector<int> idx;
QList<QListWidgetItem *> selected = fCollectionView->selectedItems();
for (int i=0; i<selected.count(); i++) {
idx.push_back(fCollectionView->row(selected[i]));
}
emit check_request(fVarEdit->toPlainText(), idx);
}
//--------------------------------------------------------------------------
/**
* @brief PVarDialog::add. It is used to initiate the add variable to the mupp GUI.
*/
void PVarDialog::add()
{
if (fVarEdit->toPlainText().isEmpty()) {
QMessageBox::critical(this, "**ERROR**", "No input available.");
return;
}
if (fCollectionView->selectedItems().count() == 0) {
QMessageBox::critical(this, "**ERROR**", "One or more collection(s) need to linked to the variable(s).");
return;
}
if (!basic_check())
return;
if (!var_consistency_check())
return;
// create the collection index vector
QVector<int> idx;
QList<QListWidgetItem *> selected = fCollectionView->selectedItems();
for (int i=0; i<selected.count(); i++) {
idx.push_back(fCollectionView->row(selected[i]));
}
emit add_request(fVarEdit->toPlainText(), idx);
}
//--------------------------------------------------------------------------
/**
* @brief PVarDialog::help
*/
void PVarDialog::help()
{
QMessageBox::information(this, "Var Help",
"Syntax: var <var_name> = <expr>.\n"\
"<expr> can contain identifiers defined in the collections.\n"\
"An identifier is an addressed variable which is defined\n"\
"by a preceeding '$' before the variable name.\n"\
"Example: variable sigma -> identifier $sigma.\n"\
"Example:\nvar sigSC = pow(abs(pow($sigma,2.0)-pow(0.11,2.0)),0.5)");
}
//--------------------------------------------------------------------------
/**
* @brief PVarDialog::showVarNames. Show a variable name dialog for a given
* selected collection.
*/
void PVarDialog::showVarNames()
{
// get the selected collection
if (fCollectionView->selectedItems().count() == 0) {
QMessageBox::critical(this, "**ERROR**", "At least one collection needs to be selected.");
return;
}
if (fCollectionView->selectedItems().count() > 1) {
QMessageBox::critical(this, "**ERROR**", "Currently only the vars of a single collection can be shown.");
return;
}
int idx = fCollectionView->currentRow();
if (idx >= fCollList.count()) {
QMessageBox::critical(this, "**ERROR**", QString("Collection idx=%1 > #Collections=%2. This never should have happened.").arg(idx).arg(fCollList.count()));
return;
}
PCollInfo info = fCollList[idx];
PShowVarNameDialog *dialog = new PShowVarNameDialog(info);
dialog->show();
}
//--------------------------------------------------------------------------
/**
* @brief PVarDialog::basic_check. Carry out basic checks before feeding it
* to the parser.
* @return true on success
*/
bool PVarDialog::basic_check()
{
QString varStr = fVarEdit->toPlainText();
bool ok;
if (varStr.isEmpty()) {
QMessageBox::critical(this, "**ERROR**", "No input available.");
return false;
}
if (fCollectionView->selectedItems().count() == 0) {
QMessageBox::critical(this, "**ERROR**", "One or more collection(s) need to linked to the variable(s).");
return false;
}
// tokenize variable input
QStringList strList = varStr.split(QRegularExpression("\\s+"), Qt::SkipEmptyParts);
// check if there are ANY var definitions
ok = false;
for (int i=0; i<strList.count(); i++) {
if (strList[i] == "var") {
ok = true;
break;
}
}
if (!ok) {
QMessageBox::critical(this, "**ERROR**", "<b>NO</b> 'var' definition found.");
return false;
}
// check that for each variable, there is also an Err variable present
QStringList varNames = collectVarNames(strList, ok);
if (!ok) {
QMessageBox::critical(this, "**ERROR**", "found 'var' without <var_name>.");
return false;
}
QString name("");
if (!hasErrorDef(varNames, name)) {
QMessageBox::critical(this, "**ERROR**", QString("found &lt;var_name&gt;=%1 without corresponding %1Err.<br>Both, a variable <b>and</b> its corresponding error variable needs to be defined.").arg(name));
return false;
}
return true;
}
//--------------------------------------------------------------------------
/**
* @brief PVarDialog::var_consistency_check. Variable consistency checks. For
* instance it is checked that for each variable there is also the corresponding
* error variable defined.
* @return true on success
*/
bool PVarDialog::var_consistency_check()
{
QString varStr = fVarEdit->toPlainText();
// collect all identifiers
int idx = 0, idxEnd = 0;
QStringList varNames;
QVector<int> isIdendifier;
char ch;
bool done;
do {
idx = varStr.indexOf("$", idx);
if (idx > -1) { // found identifier
idxEnd = idx+1;
done = false;
do {
ch = varStr[idxEnd].toLatin1();
if (isalnum(ch) || (ch == '_'))
idxEnd++;
else
done = true;
} while (!done && (idxEnd <= varStr.length()));
varNames << varStr.mid(idx+1, idxEnd-idx-1);
isIdendifier.push_back(1);
idx++;
}
} while (idx != -1);
// collect all the variable names
idx = 0;
do {
idx = varStr.indexOf("var ", idx);
if (idx > -1) { // found variable
idxEnd = varStr.indexOf("=", idx);
if (idxEnd == -1) {
return false;
}
varNames << varStr.mid(idx+4, idxEnd-idx-5);
isIdendifier.push_back(0);
idx++;
}
} while (idx != -1);
// make sure that identifier is found in collection if it is not a variable
bool isVar = false;
bool found = false;
QString str;
QList<QListWidgetItem *> selColl = fCollectionView->selectedItems();
for (int i=0; i<varNames.count(); i++) {
if (isIdendifier[i] == 0) // it is a variable, hence nothing to be done
continue;
str = varNames[i];
if (str.endsWith("Err")) {
str = str.left(str.indexOf("Err"));
}
isVar = false;
for (int j=i+1; j<varNames.count(); j++) {
if ((varNames[j] == str) && isIdendifier[j] == 0) {
isVar = true;
break;
}
}
if (isVar)
continue;
for (int j=0; j<selColl.count(); j++) {
idx = fCollectionView->row(selColl[j]);
found = false;
for (int k=0; k<fCollList[idx].fVarName.count(); k++) {
if (str == fCollList[idx].fVarName[k]) {
found = true;
break;
}
}
if (!found) {
QMessageBox::critical(this, "**ERROR**", QString("Identifier '%1' not present in selected collection '%2'").arg(str).arg(fCollList[idx].fCollName));
return false;
}
}
}
return true;
}
//--------------------------------------------------------------------------
/**
* @brief PVarDialog::collectVarNames. Collect variable names from edit variable.
* @param list input list
* @param ok true if ok
* @return return variable list
*/
QStringList PVarDialog::collectVarNames(QStringList &list, bool &ok)
{
QStringList name;
ok = true;
for (int i=0; i<list.count(); i++) {
if (list[i] == "var") {
if (i+1 >= list.count()) {
ok = false;
} else {
name << list[i+1];
i++;
}
}
}
return name;
}
//--------------------------------------------------------------------------
/**
* @brief PVarDialog::hasErrorDef. Check for error definition
* @param varNames variable name list
* @param name failed variable name
* @return true on success
*/
bool PVarDialog::hasErrorDef(QStringList &varNames, QString &name)
{
QString errStr;
for (int i=0; i<varNames.count(); i++) {
if (!varNames[i].contains("Err", Qt::CaseSensitive)) { // not an error variable
errStr = varNames[i] + "Err";
bool ok = false;
for (int j=0; j<varNames.count(); j++) {
if (varNames[j] == errStr) {
ok = true;
break;
}
}
if (!ok) {
name = varNames[i];
return ok;
}
}
}
return true;
}

View File

@ -0,0 +1,102 @@
/***************************************************************************
PVarDialog.h
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef _PVARDIALOG_H_
#define _PVARDIALOG_H_
#include <QDialog>
#include <QPushButton>
#include <QPlainTextEdit>
#include <QListWidget>
#include <QVector>
//-----------------------------------------------------------------------------
/**
* @brief The PCollInfo struct
*/
struct PCollInfo
{
QString fCollName; ///< collection name
QStringList fVarName; ///< variable names of the given collection
};
//-----------------------------------------------------------------------------
/**
* @brief The PShowVarNameDialog class. Class used to create a show variable
* name dialog.
*/
class PShowVarNameDialog : public QDialog
{
Q_OBJECT
public:
PShowVarNameDialog(PCollInfo &info);
};
//-----------------------------------------------------------------------------
/**
* @brief The PVarDialog class
*/
class PVarDialog : public QDialog
{
Q_OBJECT
public:
PVarDialog(QVector<PCollInfo> collection_list, bool darkTheme,
QWidget *parent = nullptr,
Qt::WindowFlags f = Qt::WindowFlags());
private:
QPlainTextEdit *fVarEdit;
QListWidget *fCollectionView;
QPushButton *fCancel;
QPushButton *fAdd;
QPushButton *fCheck;
QPushButton *fHelp;
QPushButton *fShowVarName;
QVector<PCollInfo> fCollList;
bool basic_check();
bool var_consistency_check();
QStringList collectVarNames(QStringList &list, bool& ok);
bool hasErrorDef(QStringList &varNames, QString& name);
private slots:
void check();
void add();
void help();
void showVarNames();
signals:
void check_request(QString varStr, QVector<int> idx);
void add_request(QString varStr, QVector<int> idx);
};
#endif // _PVARDIALOG_H_

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,171 @@
/***************************************************************************
Pmupp.h
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef _PMUPP_H_
#define _PMUPP_H_
#include <QObject>
#include <QString>
#include <QVector>
#include <QStringList>
#include <QProcess>
#define MUPP_UNDEF 1.0e99
//----------------------------------------------------------------------------
/**
* <p>The PmuppParam class. It handles a single parameter: name, value,
* positive- and negative error.
*/
class PmuppParam {
public:
PmuppParam();
PmuppParam(QString name, double param, double posErr);
PmuppParam(QString name, double param, double posErr, double negErr);
void ResetParam();
void SetParam(QString name, double param, double posErr);
void SetParam(QString name, double param, double posErr, double negErr);
void SetName(QString name) { fName = name; }
void SetValue(double dval) { fValue = dval; }
void SetPosErr(double dval) { fPosErr = dval; }
void SetNegErr(double dval) { fNegErr = dval; }
QString GetName() { return fName; }
double GetValue() { return fValue; }
double GetPosErr() { return fPosErr; }
double GetNegErr() { return fNegErr; }
private:
QString fName; ///< parameter name
double fValue; ///< parameter value
double fPosErr; ///< positive error of the parameter
double fNegErr; ///< negative error of the parameter
};
//----------------------------------------------------------------------------
/**
* <p>The PmuppRun class. Contains all the parameters of a single run.
*/
class PmuppRun {
public:
PmuppRun() { fNumber = -1; fName=""; fParam.clear(); }
~PmuppRun() { fNumber = -1; fName=""; fParam.clear(); }
void Clear() { fNumber = -1; fName=""; fParam.clear(); }
void SetName(QString name) { fName = name; }
void SetNumber(int ival) { fNumber = ival; }
void AddParam(PmuppParam param) { fParam.push_back(param); }
int GetNumber() { return fNumber; }
QString GetName() { return fName; }
int GetNoOfParam() { return fParam.size(); }
PmuppParam GetParam(unsigned int idx);
private:
int fNumber; ///< run number
QString fName; ///< name of the run
QVector<PmuppParam> fParam; ///< parameters of the run
};
//----------------------------------------------------------------------------
/**
* <p>The PmuppCollection class. Is collecting a number of runs. Typically
* something like a full temperature scan, an energy scan, etc.
*/
class PmuppCollection {
public:
PmuppCollection() { fPathName=""; fName = ""; fRun.clear(); }
void SetPathName(QString pathName) { fPathName = pathName; }
void SetName (QString name) { fName = name; }
void AddRun(PmuppRun run) { fRun.push_back(run); }
QString GetPathName() { return fPathName; }
QString GetName() { return fName; }
int GetNoOfRuns() { return fRun.size(); }
PmuppRun GetRun(unsigned int idx);
private:
QString fPathName; ///< path-name of the collection
QString fName; ///< name of the collection
QVector<PmuppRun> fRun; ///< all the runs in the collection
};
//----------------------------------------------------------------------------
/**
* <p>The PParamDataHandler class. This class handles all the collections
* loaded.
*/
class PParamDataHandler : public QObject {
Q_OBJECT
public:
PParamDataHandler() {}
int GetNoOfCollections() { return fCollection.size(); }
void NewCollection(const QString name);
bool ReadParamFile(const QStringList fln, QString &errorMsg);
PmuppCollection ReadDbFile(const QString fln, bool &valid, QString &errorMsg);
PmuppCollection ReadColumnParamFile(const QString fln, bool &valid, QString &errorMsg);
PmuppCollection GetCollection(const int idx, bool &valid);
PmuppCollection GetCollection(const QString name, bool &valid);
PmuppCollection *GetCollection(const int idx);
PmuppCollection *GetCollection(const QString name);
int GetCollectionIndex(const QString name);
QString GetCollectionName(const int idx);
QVector<double> GetValues(QString collName, QString paramName);
QVector<double> GetPosErr(QString collName, QString paramName);
QVector<double> GetNegErr(QString collName, QString paramName);
void RemoveCollection(QString name);
void ReplaceCollection(PmuppCollection coll, int idx);
void Dump();
signals:
void newData();
private:
QProcess *fProc; ///< this will be needed if msr2data needs to be called
QVector<PmuppCollection> fCollection; ///< all the collections handeled
bool analyzeFileList(const QStringList &fln, QString &collectionName,
QStringList &arg, QString &workDir, QString &errorMsg);
private slots:
void readFromStdOut();
void readFromStdErr();
void processDone(int, QProcess::ExitStatus);
};
#endif // _PMUPP_H_

View File

@ -0,0 +1,605 @@
/****************************************************************************
PmuppAdmin.cpp
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2017 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <cstdlib>
#include <iostream>
#include <QMessageBox>
#include <QString>
#include <QStringView>
#include <QFile>
#include <QTextStream>
#include <QVector>
#include <QDir>
#include <QProcessEnvironment>
#include <QSysInfo>
#include <QtDebug>
#include "PmuppAdmin.h"
//--------------------------------------------------------------------------
// implementation of PmuppColor class
//--------------------------------------------------------------------------
/**
* @brief PmuppColor::PmuppColor. Ctor
*/
PmuppColor::PmuppColor()
{
fName = "UnDef";
fRed = -1;
fGreen = -1;
fBlue = -1;
}
//--------------------------------------------------------------------------
/**
* @brief PmuppColor::setRGB. set RGB value
* @param r red (0..255)
* @param g green (0..255)
* @param b blue (0..255)
*/
void PmuppColor::setRGB(const int r, const int g, const int b)
{
if ((r>=0) && (r<=255))
fRed = r;
if ((g>=0) && (g<=255))
fGreen = g;
if ((b>=0) && (b<=255))
fBlue = b;
}
//--------------------------------------------------------------------------
// implementation of PmuppAdminXMLParser class
//--------------------------------------------------------------------------
/**
* <p>XML Parser class for the mupp administration file.
*
* \param admin pointer to an admin class instance.
*/
PmuppAdminXMLParser::PmuppAdminXMLParser(const QString& fln, PmuppAdmin *admin) : fAdmin(admin)
{
fValid = false;
fKeyWord = eEmpty;
QFile file(fln);
if (!file.open(QFile::ReadOnly | QFile::Text)) {
// warning and create default - STILL MISSING
}
fValid = parse(&file);
}
//--------------------------------------------------------------------------
/**
* <p>parse the mupp startup xml-file.
*
* \param device QFile object of the mupp startup xml-file
*
* @return true on success, false otherwise
*/
bool PmuppAdminXMLParser::parse(QIODevice *device)
{
fXml.setDevice(device);
bool expectChars = false;
while (!fXml.atEnd()) {
fXml.readNext();
if (fXml.isStartDocument()) {
startDocument();
} else if (fXml.isStartElement()) {
startElement();
expectChars = true;
} else if (fXml.isCharacters() && expectChars) {
characters();
} else if (fXml.isEndElement()) {
endElement();
expectChars = false;
} else if (fXml.isEndDocument()) {
endDocument();
}
}
if (fXml.hasError()) {
QString msg;
msg = QString("%1 Line %2, column %3").arg(fXml.errorString()).arg(fXml.lineNumber()).arg(fXml.columnNumber());
QMessageBox::critical(0, "**ERROR**", msg, QMessageBox::Ok, QMessageBox::NoButton);
return false;
}
return true;
}
//--------------------------------------------------------------------------
/**
* <p>Routine called at the beginning of the XML parsing process.
*/
bool PmuppAdminXMLParser::startDocument()
{
// nothing to be done here for now
return true;
}
//--------------------------------------------------------------------------
/**
* <p>Routine called when a new XML tag is found. Here it is used
* to set a tag for filtering afterwards the content.
*/
bool PmuppAdminXMLParser::startElement()
{
QString qName = fXml.name().toString();
if (qName == "path_file_name") {
fKeyWord = eRecentFile;
} else if (qName == "dark_theme") {
fKeyWord = eDarkTheme;
} else if (qName == "marker") {
fKeyWord = eMarker;
} else if (qName == "color") {
fKeyWord = eColor;
}
return true;
}
//--------------------------------------------------------------------------
/**
* <p>Routine called when the end XML tag is found. It is used to
* put the filtering tag to 'empty'. It also resets the fFunc flag in case
* the entry was a theory function.
*/
bool PmuppAdminXMLParser::endElement()
{
fKeyWord = eEmpty;
return true;
}
//--------------------------------------------------------------------------
/**
* <p>This routine delivers the content of an XML tag. It fills the
* content into the load data structure.
*/
bool PmuppAdminXMLParser::characters()
{
QString str = fXml.text().toString();
if (str.isEmpty())
return true;
bool ok;
int ival, r, g, b;
double dval;
QString name("");
QStringList tok;
switch (fKeyWord) {
case eRecentFile:
fAdmin->addRecentFile(QString(str.toLatin1()).trimmed());
break;
case eDarkTheme:
if ((str == "yes") || (str == "1") || (str == "true"))
fAdmin->setTheme(true);
else
fAdmin->setTheme(false);
break;
case eMarker:
tok = str.split(",", Qt::SkipEmptyParts);
if ((tok.count() != 1) && (tok.count() != 2)) {
return false;
}
ival = tok[0].toInt(&ok);
if (!ok)
return false;
dval = 1.0;
if (tok.count() == 2) {
dval = tok[1].toDouble(&ok);
if (!ok)
return false;
}
fAdmin->setMarker(ival, dval);
break;
case eColor:
tok = str.split(",", Qt::SkipEmptyParts);
if ((tok.count() != 3) && (tok.count() != 4)) {
return false;
}
ival = tok[0].toInt(&ok);
if (!ok)
return false;
r = ival;
ival = tok[1].toInt(&ok);
if (!ok)
return false;
g = ival;
ival = tok[2].toInt(&ok);
if (!ok)
return false;
b = ival;
if (tok.count() == 4)
name = tok[3];
fAdmin->setColor(r, g, b, name);
break;
default:
break;
}
return true;
}
//--------------------------------------------------------------------------
/**
* <p>Called at the end of the XML parse process. It checks if default paths
* contain system variables, and if so expand them for the further use.
*/
bool PmuppAdminXMLParser::endDocument()
{
return true;
}
//--------------------------------------------------------------------------
// implementation of PmuppAdmin class
//--------------------------------------------------------------------------
/**
* <p>Initializes that PmuppAdmin object, and calls the XML parser which feeds
* the object variables.
*/
PmuppAdmin::PmuppAdmin() : QObject(), fDarkTheme(false)
{
// XML Parser part
// 1st: check local directory
QString path = QString("./");
QString fln = QString("mupp_startup.xml");
QString pathFln = path + fln;
QProcessEnvironment procEnv = QProcessEnvironment::systemEnvironment();
if (!QFile::exists(pathFln)) {
// 2nd: check $HOME/.musrfit/mupp/mupp_startup.xml
path = procEnv.value("HOME", "");
pathFln = path + "/.musrfit/mupp/" + fln;
if (!QFile::exists(pathFln)) {
// 3rd: check $MUSRFITPATH/mupp_startup.xml
path = procEnv.value("MUSRFITPATH", "");
pathFln = path + "/" + fln;
if (!QFile::exists(pathFln)) {
// 4th: check $ROOTSYS/bin/mupp_startup.xml
path = procEnv.value("ROOTSYS", "");
pathFln = path + "/bin/" + fln;
if (!QFile::exists(pathFln)) {
// 5th: not found anywhere hence create it
path = procEnv.value("HOME", "");
pathFln = path + "/.musrfit/mupp/" + fln;
createMuppStartupFile();
}
}
}
}
if (QFile::exists(pathFln)) { // administration file present
PmuppAdminXMLParser handler(pathFln, this);
if (!handler.isValid()) {
QMessageBox::critical(0, "**ERROR**",
"Error parsing mupp_startup.xml settings file.\nProbably a few things will not work porperly.\nPlease fix this first.",
QMessageBox::Ok, QMessageBox::NoButton);
return;
}
} else {
QMessageBox::critical(0, "**ERROR**",
"Couldn't find the mupp_startup.xml settings file.\nProbably a few things will not work porperly.\nPlease fix this first.",
QMessageBox::Ok, QMessageBox::NoButton);
return;
}
}
//--------------------------------------------------------------------------
/**
* <p>Destructor
*/
PmuppAdmin::~PmuppAdmin()
{
saveRecentFiles();
}
//--------------------------------------------------------------------------
/**
* <p>Add recent path-file name to the internal ring-buffer.
*
* \param str recent path-file name to be added
*/
void PmuppAdmin::addRecentFile(const QString str)
{
// check if file name is not already present
for (int i=0; i<fRecentFile.size(); i++) {
if (str == fRecentFile[i])
return;
}
fRecentFile.push_front(str);
if (fRecentFile.size() > MAX_RECENT_FILES)
fRecentFile.resize(MAX_RECENT_FILES);
}
//--------------------------------------------------------------------------
/**
* @brief PmuppAdmin::getRecentFile. Get a file from the recent files with
* index idx.
* @param idx
*
* @return return the recent file with index idx if present, otherwise return
* an empty string.
*/
QString PmuppAdmin::getRecentFile(int idx)
{
QString str("");
if ((idx >= 0) && (idx < fRecentFile.size()))
str = fRecentFile[idx];
return str;
}
//--------------------------------------------------------------------------
/**
* @brief PmuppAdmin::getMarker. Get the marker with index idx.
* @param idx marker index
*
* @return requested marker
*/
PmuppMarker PmuppAdmin::getMarker(int idx) {
PmuppMarker marker;
if (idx >= fMarker.size())
return marker;
return fMarker[idx];
}
//--------------------------------------------------------------------------
/**
* @brief PmuppAdmin::getColor. Get rgb color codes of name
* @param name of the requeset color.
* @param r red value (0..255)
* @param g green value (0..255)
* @param b blue value (0..255
*/
void PmuppAdmin::getColor(QString name, int &r, int &g, int &b)
{
int idx=-1;
for (int i=0; i<fColor.size(); i++) {
if (fColor[i].getName() == name) {
idx = i;
break;
}
}
if (idx == -1) {
r = -1;
g = -1;
b = -1;
} else {
fColor[idx].getRGB(r, g, b);
}
}
//--------------------------------------------------------------------------
/**
* @brief PmuppAdmin::getColor. Get color codes of color at index idx
* @param idx requested color index
* @param r red value (0..255)
* @param g green value (0..255)
* @param b blue value (0..255)
*/
void PmuppAdmin::getColor(int idx, int &r, int &g, int &b)
{
if ((idx<=0) || (idx>fColor.size())) {
r = -1;
g = -1;
b = -1;
} else {
fColor[idx].getRGB(r, g, b);
}
}
//--------------------------------------------------------------------------
/**
* @brief PmuppAdmin::setMaker. Set a marker
* @param marker marker code
* @param size marker size
*/
void PmuppAdmin::setMarker(int marker, double size)
{
PmuppMarker markerObj;
// make sure marker is in proper range
if ((marker<1) || (marker>49)) {
QMessageBox::warning(0, "WARNING", QString("Found Marker (%1) not in the expected range.\nWill ignore it.").arg(marker));
return;
}
markerObj.setMarker(marker);
markerObj.setMarkerSize(size);
fMarker.push_back(markerObj);
}
//--------------------------------------------------------------------------
/**
* @brief PmuppAdmin::setColor. Set a color
* @param r red value (0..255)
* @param g green value (0..255)
* @param b blue value (0..255)
* @param name color name
*/
void PmuppAdmin::setColor(int r, int g, int b, QString name)
{
if (((r<0) || (r>255)) ||
((g<0) || (g>255)) ||
((b<0) || (b>255))) {
QMessageBox::warning(0, "WARNING", QString("Found Color (%1,%2,%3) not in the expected range.\nWill ignore it.").arg(r).arg(g).arg(b));
return;
}
PmuppColor color;
color.setName(name);
color.setRGB(r,g,b);
fColor.push_back(color);
}
//--------------------------------------------------------------------------
/**
* <p>Merges the recent file ring buffer into mupp_startup.xml and saves it.
* If a local copy is present it will be saved there, otherwise the master file
* will be used.
*/
void PmuppAdmin::saveRecentFiles()
{
// check if mupp_startup.xml is present in the current directory, and if yes, use this file to
// save the recent file names otherwise use the "master" mupp_startup.xml
QString str("");
QString fln = QString("./mupp_startup.xml");
if (!QFile::exists(fln)) {
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
fln = QString("%1/.musrfit/mupp/mupp_startup.xml").arg(env.value("HOME"));
}
if (QFile::exists(fln)) { // administration file present
QVector<QString> data;
QFile file(fln);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
std::cerr << std::endl << ">> PmuppAdmin::saveRecentFile: **ERROR** Cannot open " << fln.toLatin1().data() << " for reading." << std::endl;
return;
}
QTextStream fin(&file);
while (!fin.atEnd()) {
data.push_back(fin.readLine());
}
file.close();
// remove <path_file_name> from data
for (QVector<QString>::iterator it = data.begin(); it != data.end(); ++it) {
if (it->contains("<path_file_name>")) {
it = data.erase(it);
--it;
}
}
// add recent files
int i;
for (i=0; i<data.size(); i++) {
if (data[i].contains("<recent_files>"))
break;
}
if (i == data.size()) {
std::cerr << std::endl << ">> PmuppAdmin::saveRecentFile: **ERROR** " << fln.toLatin1().data() << " seems to be corrupt." << std::endl;
return;
}
i++;
for (int j=0; j<fRecentFile.size(); j++) {
str = " <path_file_name>" + fRecentFile[j] + "</path_file_name>";
data.insert(i++, str);
}
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
std::cerr << std::endl << ">> PmuppAdmin::saveRecentFile: **ERROR** Cannot open " << fln.toLatin1().data() << " for reading." << std::endl;
return;
}
fin.setDevice(&file);
for (int i=0; i<data.size(); i++) {
fin << data[i] << Qt::endl;
}
file.close();
} else {
QString msg("Failed to write mupp_startup.xml. Neither a local nor a global copy found.");
QMessageBox::warning(0, "WARNING", msg, QMessageBox::Ok, QMessageBox::NoButton);
}
}
//--------------------------------------------------------------------------
/**
* @brief PmuppAdmin::createMuppStartupFile. Create a default mupp_startup.xml
* file if not present.
*/
void PmuppAdmin::createMuppStartupFile()
{
// get $HOME
QProcessEnvironment procEnv = QProcessEnvironment::systemEnvironment();
QString pathName = procEnv.value("HOME", "");
pathName += "/.musrfit/mupp";
// check if the directory $HOME/.musrfit/mupp exists if not create it
QDir dir(pathName);
if (!dir.exists()) {
// directory $HOME/.musrfit/mupp does not exist hence create it
dir.mkpath(pathName);
}
// create default mupp_startup.xml file in $HOME/.musrfit/mupp
pathName += "/mupp_startup.xml";
// get the default mupp_startup.xml.in from the internal resources
QFile fres(":/mupp_startup.xml.in");
if (!fres.exists()) {
QString msg = QString("Neither couldn't find nor create mupp_startup.xml. Things are likely not to work.");
QMessageBox::critical(0, "ERROR", msg);
return;
}
if (!fres.open(QIODevice::ReadOnly | QIODevice::Text)) {
QString msg = QString("Couldn't open internal resource file mupp_startup.xml.in. Things are likely not to work.");
QMessageBox::critical(0, "ERROR", msg);
return;
}
// text stream for fres
QTextStream fin(&fres);
// mupp_startup.xml default file
QFile file(pathName);
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
return;
// text stream for file
QTextStream fout(&file);
QString line;
while (!fin.atEnd()) {
line = fin.readLine();
fout << line << Qt::endl;
}
file.close();
fres.close();
}
//--------------------------------------------------------------------------
// END
//--------------------------------------------------------------------------

View File

@ -0,0 +1,167 @@
/****************************************************************************
PmuppAdmin.h
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2017 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef _PMUPPADMIN_H_
#define _PMUPPADMIN_H_
#include <QString>
#include <QVector>
#include <QMap>
#include <QPixmap>
#include <QXmlStreamReader>
#include "mupp.h"
class PmuppAdmin;
//---------------------------------------------------------------------------
/**
* @brief The PmuppColor class. Contains to colors read from the xml-startup
* which are used for the plotted data.
*/
class PmuppColor {
public:
PmuppColor();
virtual ~PmuppColor() {}
QString getName() { return fName; }
void getRGB(int &r, int &g, int &b) { r=fRed; g=fGreen; b=fBlue; }
void setName(const QString name) { fName = name; }
void setRGB(const int r, const int g, const int b);
private:
QString fName;
int fRed;
int fGreen;
int fBlue;
};
//---------------------------------------------------------------------------
/**
* @brief The PmuppMarker class. List of the markers used in the plotter. Read
* from the xml-startup.
*/
class PmuppMarker {
public:
PmuppMarker() { fMarker = 20; fMarkerSize = 1.0; }
PmuppMarker(int marker, double size) : fMarker(marker), fMarkerSize(size) {}
virtual ~PmuppMarker() {}
void getMarker(int &marker, double &size) { marker = fMarker; size = fMarkerSize; }
int getMarker() { return fMarker; }
double getMarkerSize() { return fMarkerSize; }
void setMarker(int marker) { fMarker = marker; }
void setMarkerSize(double size) { fMarkerSize = size; }
private:
int fMarker;
double fMarkerSize;
};
//---------------------------------------------------------------------------
/**
* PAdminXMLParser is an XML parser class used to handle the mupp startup
* XML-file called <tt>mupp_startup.xml</tt>. This startup file contains
* necessary informations about executable pathes, online help informations,
* default font sizes, etc.
*/
class PmuppAdminXMLParser
{
public:
PmuppAdminXMLParser(const QString &fln, PmuppAdmin*);
virtual ~PmuppAdminXMLParser() {}
virtual bool isValid() { return fValid; }
private:
enum EAdminKeyWords {eEmpty, eRecentFile, eDarkTheme, eMarker, eColor};
bool parse(QIODevice *device);
bool startDocument();
bool startElement();
bool endElement();
bool characters();
bool endDocument();
QXmlStreamReader fXml; ///< xml stream reader object
bool fValid; ///< flag showing if XML read has been successful
EAdminKeyWords fKeyWord; ///< key word tag to know how to handle the content
PmuppAdmin *fAdmin; ///< a pointer to the main administration class object
};
//---------------------------------------------------------------------------
/**
* The PMuppAdmin class is handling the informations contained in the XML startup file,
* <tt>mupp_startup.xml</tt>. This startup file contains
* necessary informations like marker style, marker color, etc. The XML parsing is done
* with the help of the PmuppAdminXMLParser class.
*/
class PmuppAdmin : public QObject
{
public:
PmuppAdmin();
virtual ~PmuppAdmin();
void addRecentFile(const QString str);
int getNumRecentFiles() { return fRecentFile.size(); }
QString getRecentFile(int idx);
int getNoOfMarkers() { return fMarker.size(); }
QVector<PmuppMarker> getMarkers() { return fMarker; }
PmuppMarker getMarker(int idx);
int getNoOfColors() { return fColor.size(); }
QVector<PmuppColor> getColors() { return fColor; }
void getColor(QString name, int &r, int &g, int &b);
void getColor(int idx, int &r, int &g, int &b);
bool isDarkTheme() { return fDarkTheme; }
void setTheme(bool theme) { fDarkTheme = theme; }
void setMarker(int marker, double size);
void setColor(int r, int g, int b, QString name="");
private:
friend class PmuppAdminXMLParser;
QVector<QString> fRecentFile; ///< keep vector of recent path-file names
bool fDarkTheme;
QVector<PmuppMarker> fMarker;
QVector<PmuppColor> fColor;
void saveRecentFiles(); ///< save recent file list
void createMuppStartupFile(); ///< create default mupp_startup.xml
};
#endif // _PMUPPADMIN_H_

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,270 @@
/***************************************************************************
PmuppGui.h
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef _PMUPPGUI_H_
#define _PMUPPGUI_H_
#include <QMainWindow>
#include <QVector>
#include <QString>
#include <QStringList>
#include <QWidget>
#include <QBoxLayout>
#include <QGridLayout>
#include <QLabel>
#include <QSplitter>
#include <QListWidget>
#include <QPushButton>
#include <QLineEdit>
#include <QPlainTextEdit>
#include <QEvent>
#include <QProcess>
#include <QDialog>
#include "PVarHandler.h"
#include "PVarDialog.h"
#include "PmuppAdmin.h"
#include "Pmupp.h"
#include "mupp.h"
//-----------------------------------------------------------------------------
/**
* @brief The PmuppXY class.
*/
class PmuppXY
{
public:
PmuppXY() { init(); }
void setCollectionTag(int tag) { fCollectionTag = tag; }
void setXlabel(QString str) { fXlabel = str; }
void addYlabel(QString str) { fYlabel.push_back(str); }
void setYlabel(int idx, QString str);
void removeYlabel(int idx);
void removeYlabel(QString str);
int getCollectionTag() { return fCollectionTag; }
QString getXlabel() { return fXlabel; }
int getXlabelIdx();
int getYlabelSize() { return fYlabel.size(); }
QString getYlabel(int idx);
int getYlabelIdx(int idx);
QVector<QString> getYlabels() { return fYlabel; }
private:
int fCollectionTag;
QString fXlabel;
QVector<QString> fYlabel;
void init();
};
//-----------------------------------------------------------------------------
/**
* @brief The PVarErrorDialog class. It is used to display error messages from
* the variable parsing.
*/
class PVarErrorDialog : public QDialog
{
Q_OBJECT
public:
PVarErrorDialog(QString errMsg);
private:
QPlainTextEdit *fErrMsg;
QPushButton *fOK;
};
//-----------------------------------------------------------------------------
// Layout Scheme of PmuppGui:
// |--------------------------------------------------------------------|
// | Main |
// | |----------------------------------------------------------------| |
// | | Top | |
// | | |----------------------------| |-----------------------------| | |
// | | | Grid Left (2 cols, 3 rows) | | Grid Right (2 cols, 6 rows) | | |
// | | | +++++++++ | | ++++++++++ | | |
// | | | | | | | |
// | | |----------------------------| |-----------------------------| | |
// | |----------------------------------------------------------------| |
// | |
// | |----------------------------------------------------------------| |
// | | History | |
// | |----------------------------------------------------------------| |
// | | Cmd | |
// | |----------------------------------------------------------------| |
// ----------------------------------------------------------------------
//
// Grid Left contains: fColLabel, fColParamSplitter,
// fRemoveCollection, fRefreshCollection
// Grid Right contains: f(X,Y)axisLabel, fView(X,Y), fAdd(X,Y), fRemove(X,Y),
// fAddDitto, fPlot
//-----------------------------------------------------------------------------
class PmuppGui : public QMainWindow
{
Q_OBJECT
public:
PmuppGui(QStringList fln);
virtual ~PmuppGui();
public slots:
void aboutToQuit();
void fileOpen();
void fileOpenRecent();
void fileExit();
void toolDumpCollections();
void toolDumpXY();
void addVar();
void normalize();
void helpCmds();
void helpAbout();
void helpAboutQt();
protected:
bool eventFilter(QObject *o, QEvent *e);
private:
enum EAxis {kXaxis, kYaxis};
PmuppAdmin *fAdmin;
bool fDarkTheme;
bool fDarkToolBarIcon;
bool fNormalize;
qint64 fDatime;
uint fMuppInstance;
PParamDataHandler *fParamDataHandler;
QVector<PmuppXY> fXY;
QVector<PVarHandler> fVarHandler;
QString fMacroPath;
QString fMacroName;
QWidget *fCentralWidget;
QMenu *fRecentFilesMenu; ///< recent file menu
QAction *fRecentFilesAction[MAX_RECENT_FILES]; ///< array of the recent file actions
QAction *fNormalizeAction;
QBoxLayout *fBoxLayout_Main; // top->bottom (0)
QBoxLayout *fBoxLayout_Top; // left->right (1)
QGridLayout *fGridLayout_Left; // 2 columns, 3 rows
QGridLayout *fGridLayout_Right; // 2 columns, 6 rows
QBoxLayout *fBoxLayout_Cmd; // left->right (1)
QLabel *fColLabel;
QSplitter *fColParamSplitter;
QListWidget *fColList;
QListWidget *fParamList;
QPushButton *fRemoveCollection;
QPushButton *fRefreshCollection;
QLabel *fXaxisLabel;
QLabel *fYaxisLabel;
QListWidget *fViewX;
QListWidget *fViewY;
QPushButton *fAddX;
QPushButton *fAddY;
QPushButton *fAddDitto;
QPushButton *fRemoveX;
QPushButton *fRemoveY;
QPushButton *fPlot;
QSplitter *fCmdSplitter;
QPlainTextEdit *fCmdLineHistory;
QLineEdit *fCmdLine;
QPushButton *fExitButton;
QVector<QString> fCmdHistory; ///< command history buffer
PVarDialog *fVarDlg; ///< variable dialog
QProcess *fMuppPlot; ///< mupp plotter
void setupFileActions();
void setupToolActions();
void setupHelpActions();
void getTheme();
void fillRecentFiles();
void readCmdHistory();
void writeCmdHistory();
bool isNewCollection(PmuppCollection &coll);
int getXlabelIndex(QString label);
void getMinMax(QVector<double> &data, double &min, double &max);
QString substituteDefaultLabels(QString label);
void selectCollection(QString cmd);
uint getFirstAvailableMuppInstance();
void updateCollectionList();
void updateXYList(int idx);
void updateXYListGui();
bool findValue(PmuppRun &run, EAxis tag);
bool allXYEqual();
bool indexAlreadyPresent(int idx);
void replaceIndex(PmuppXY &data, const int idx);
void startMuppPlot();
void parseErrMsgDlg();
QStringList getVarNames(QString parseStr);
QVector<double> getValues(QString collName, QString paramName, bool &ok);
QVector<double> getPosErr(QString collName, QString paramName, bool &ok);
QVector<double> getNegErr(QString collName, QString paramName, bool &ok);
private slots:
void addDitto();
void addX(QString param="");
void addY(QString param="");
void createMacro();
void handleCmds();
void plot();
void refresh();
void remove();
void removeX(QString param="");
void removeY(QString param="");
void handleNewData();
void updateParamList(int currentRow);
void editCollName(QListWidgetItem *item);
void dropOnViewX(QListWidgetItem *item);
void dropOnViewY(QListWidgetItem *item);
void refreshY();
void check(QString varStr, QVector<int> idx);
void add(QString varStr, QVector<int> idx);
};
#endif // _PMUPPGUI_H_

View File

@ -0,0 +1,980 @@
/***************************************************************************
PmuppScript.cpp
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <cmath>
#include <iostream>
#include <QProcessEnvironment>
#include <QString>
#include <QFile>
#include <QTextStream>
#include <QDateTime>
#include <QProcess>
#include <QtGlobal> // Q_ASSERT
#include "PmuppScript.h"
//--------------------------------------------------------------------------
/**
* @brief PmuppScript::PmuppScript. Ctor
* @param script source
*/
PmuppScript::PmuppScript(QStringList script) :
fScript(script)
{
fParamDataHandler = 0;
fLoadPath = QString("./");
fSavePath = QString("./");
fSelected = -2; // nothing selected
fNorm = false;
fAdmin = new PmuppAdmin();
}
//--------------------------------------------------------------------------
/**
* @brief PmuppScript::~PmuppScript. Dtor
*/
PmuppScript::~PmuppScript()
{
if (fParamDataHandler) {
delete fParamDataHandler;
fParamDataHandler = 0;
}
if (fAdmin) {
delete fAdmin;
fAdmin = 0;
}
}
//--------------------------------------------------------------------------
/**
* @brief PmuppScript::executeScript. Handles the script commands.
* @return 0 on success.
*/
int PmuppScript::executeScript()
{
fParamDataHandler = new PParamDataHandler();
if (fParamDataHandler == 0) {
std::cerr << std::endl << "**ERROR** couldn't invoke data handler ..." << std::endl << std::endl;
return -1;
}
QString cmd;
int status;
for (int i=0; i<fScript.size(); i++) {
cmd = fScript.at(i);
if (cmd.startsWith("loadPath")) {
setLoadPath(cmd);
} else if (cmd.startsWith("savePath")) {
setSavePath(cmd);
} else if (cmd.startsWith("load ")) {
status = loadCollection(cmd);
} else if (cmd.startsWith("selectAll")) {
status = selectAll();
} else if (cmd.startsWith("select ")) {
status = select(cmd);
} else if (cmd.startsWith("x")) {
status = addX(cmd);
} else if (cmd.startsWith("y")) {
status = addY(cmd);
} else if (cmd.startsWith("norm")) {
fNorm = true;
} else if (cmd.startsWith("plot")) {
status = plot(cmd);
} else if (cmd.startsWith("macro")) {
status = macro(cmd);
} else if (cmd.startsWith("var")) {
status = var_cmd(cmd);
} else if (cmd.startsWith("col")) {
// nothing to be done here, since var handles it internally
} else {
std::cerr << "**ERROR** found unkown script command '" << cmd.toLatin1().constData() << "'." << std::endl << std::endl;
status = -2;
}
// check for errors
if (status != 0) {
emit finished();
return status;
}
}
emit finished();
return 0;
}
//--------------------------------------------------------------------------
/**
* @brief PmuppScript::setLoadPath. Sets the load path (where to look for input
* data.
* @param cmd set load path command string.
*/
void PmuppScript::setLoadPath(const QString cmd)
{
QString str = cmd;
QStringList tok;
// remove command from string
str = str.remove("loadPath ");
// tokenize path string
tok = str.split("/", Qt::SkipEmptyParts);
// check if there is a bash variable which needs to be resolved
QProcessEnvironment procEnv = QProcessEnvironment::systemEnvironment();
QString path = QString("");
for (int i=0; i<tok.size(); i++) {
str = tok.at(i);
if (str.startsWith("$")) {
str = str.remove("$");
QString var = procEnv.value(str, "");
path += var + "/";
} else {
path += str + "/";
}
}
fLoadPath = path;
}
//--------------------------------------------------------------------------
/**
* @brief PmuppScript::setSavePath. Sets the save path (where to save the output
* files.
* @param cmd save path command string.
*/
void PmuppScript::setSavePath(const QString cmd)
{
QString str = cmd;
QStringList tok;
// remove command from string
str = str.remove("savePath ");
// tokenize path string
tok = str.split("/", Qt::SkipEmptyParts);
// check if there is a bash variable which needs to be resolved
QProcessEnvironment procEnv = QProcessEnvironment::systemEnvironment();
QString path = QString("");
for (int i=0; i<tok.size(); i++) {
str = tok.at(i);
if (str.startsWith("$")) {
str = str.remove("$");
QString var = procEnv.value(str, "");
path += var + "/";
} else {
path += str + "/";
}
}
fSavePath = path;
}
//--------------------------------------------------------------------------
/**
* @brief PmuppScript::loadCollection. Load collection command
* @param str load collection command string
* @return 0 on success.
*/
int PmuppScript::loadCollection(const QString str)
{
QString fln = str;
fln = fln.remove("load ");
fln = fln.trimmed();
fln = fln.prepend(fLoadPath);
QStringList flnList;
flnList << fln;
QString errorMsg("");
fParamDataHandler->ReadParamFile(flnList, errorMsg);
return 0;
}
//--------------------------------------------------------------------------
/**
* @brief PmuppScript::select. Select collection command.
* @param str selection command string
* @return 0 on success
*/
int PmuppScript::select(const QString str)
{
QString cmd = str;
QStringList tok = cmd.split(' ', Qt::SkipEmptyParts);
if (tok.size() != 2) {
std::cerr << std::endl << "**ERROR** wrong 'select' command syntax." << std::endl << std::endl;
return -1;
}
bool ok;
int ival = tok[1].toInt(&ok);
if (ok) { // collection index given
if (ival >= fParamDataHandler->GetNoOfCollections()) {
std::cerr << std::endl << "**ERROR** try to select a collection with index " << ival << ", which is >= # collections (" << fParamDataHandler->GetNoOfCollections() << ")." << std::endl << std::endl;
return -2;
}
fSelected = ival;
} else { // assume that a collection name is given
ival = fParamDataHandler->GetCollectionIndex(tok[1]);
if (ival == -1) {
std::cerr << std::endl << "**ERROR** couldn't find collection '" << tok[1].toLatin1().constData() << "'." << std::endl << std::endl;
return -3;
}
if (ival >= fParamDataHandler->GetNoOfCollections()) {
std::cerr << std::endl << "**ERROR** try to select a collection with index " << ival << ", which is >= # collections (" << fParamDataHandler->GetNoOfCollections() << ")." << std::endl << std::endl;
return -2;
}
fSelected = ival;
}
return 0;
}
//--------------------------------------------------------------------------
/**
* @brief PmuppScript::selectAll. Select all collections
* @return 0 on success
*/
int PmuppScript::selectAll()
{
int noColl = fParamDataHandler->GetNoOfCollections();
if ( noColl > 0) {
fSelected = -1; // all collections are selected
} else {
std::cerr << std::endl << "**ERROR** no collections present, hence it is not possible to select them." << std::endl << std::endl;
return -1;
}
return 0;
}
//--------------------------------------------------------------------------
/**
* @brief PmuppScript::addX. Add label to x-axis
* @param str label string
* @return 0 on success
*/
int PmuppScript::addX(const QString str)
{
QString cmd = str, label;
QStringList tok = cmd.split(' ', Qt::SkipEmptyParts);
if (tok.size() != 2) {
std::cerr << std::endl << "**ERROR** in addX: number of tokens missmatch." << std::endl << std::endl;
return -1;
}
label = tok[1].trimmed();
PmuppCollection *coll=0;
if (fSelected == -2) { // no selection -> error
std::cerr << std::endl << "**ERROR** in addX. addX called without previous 'select' command." << std::endl << std::endl;
return -2;
} else if (fSelected == -1) { // i.e. select ALL
// clean up plot info first
fPlotInfo.clear();
// make sure that label is found in ALL collections, or in variables
// first check collections
bool foundInColl(true), foundInVar(true);
QString collName("");
for (int i=0; i<fParamDataHandler->GetNoOfCollections(); i++) {
coll = fParamDataHandler->GetCollection(i);
if (!foundLabel(coll, label)) { // label not found
foundInColl = false;
collName = coll->GetName();
break;
}
}
// second check variables
if (!foundVariable(label)) { // label not found
foundInVar = false;
}
// make sure label(s) have been found
if (!foundInColl && !foundInVar) { // not all labels found, neither in collection nor variables.
std::cerr << std::endl << "**ERROR** couldn't find '" << label.toLatin1().constData() << "' in collection '" << collName.toLatin1().constData() << "'," << std::endl;
std::cerr << " nor is it a defined variable" << std::endl << std::endl;
return -4;
}
// resize fPlotInfo to the number of selections
fPlotInfo.resize(fParamDataHandler->GetNoOfCollections());
// feed plot info
for (int i=0; i<fPlotInfo.size(); i++) {
fPlotInfo[i].collIdx = i;
fPlotInfo[i].xLabel = label;
}
} else { // a specific selection
// check that label is found in the selected collection, or in variables
coll = fParamDataHandler->GetCollection(fSelected);
if (coll == 0) {
std::cerr << std::endl << "**ERROR** in addX: selected collection couldn't be found ..." << std::endl << std::endl;
return -3;
}
// first check collection
bool foundInColl(true), foundInVar(true);
QString collName("");
if (!foundLabel(coll, label)) { // label not found
foundInColl = false;
collName = coll->GetName();
}
// second check variables
if (!foundVariable(label)) { // label not found
foundInVar = false;
}
// make sure label(s) have been found
if (!foundInColl && !foundInVar) { // not all labels found, neither in collection nor variables.
std::cerr << std::endl << "**ERROR** couldn't find '" << label.toLatin1().constData() << "' in collection '" << collName.toLatin1().constData() << "'," << std::endl;
std::cerr << " nor is it a defined variable" << std::endl << std::endl;
return -4;
}
// feed plot entry
fPlotEntry.collIdx = fSelected;
fPlotEntry.xLabel = label;
}
return 0;
}
//--------------------------------------------------------------------------
/**
* @brief PmuppScript::addY. Add label to y-axis.
* @param str label string
* @return 0 on success
*/
int PmuppScript::addY(const QString str)
{
QString cmd = str;
QVector<QString> label;
QStringList tok = cmd.split(' ', Qt::SkipEmptyParts);
if (tok.size() < 2) {
std::cerr << std::endl << "**ERROR** in addY: number of tokens < 2." << std::endl << std::endl;
return -1;
}
// collect all potential labels
for (int i=1; i<tok.size(); i++)
label.push_back(tok[i].trimmed());
PmuppCollection *coll=0;
if (fSelected == -2) { // no selection -> error
std::cerr << std::endl << "**ERROR** in addY. addY called without previous 'select' command." << std::endl << std::endl;
return -2;
} else if (fSelected == -1) { // i.e. select ALL
// make sure that label(s) is/are found in ALL collections, or in variables
// first check collections
bool foundInColl(true), foundInVar(true);
int idx = -1;
QString collName("");
for (int i=0; i<fParamDataHandler->GetNoOfCollections(); i++) {
coll = fParamDataHandler->GetCollection(i);
for (int j=0; j<label.size(); j++) {
if (!foundLabel(coll, label[j])) { // label not found
foundInColl = false;
collName = coll->GetName();
idx = j;
break;
}
}
}
// second check variables
for (int i=0; i<label.size(); i++) {
if (!foundVariable(label[i])) { // label not found
foundInVar = false;
idx = i;
break;
}
}
// make sure label(s) have been found
if (!foundInColl && !foundInVar) { // not all labels found, neither in collection nor variables.
std::cerr << std::endl << "**ERROR** couldn't find '" << label[idx].toLatin1().constData() << "' in collection '" << collName.toLatin1().constData() << "'," << std::endl;
std::cerr << " nor is it a defined variable" << std::endl << std::endl;
return -4;
}
// feed plot info with y-label(s)
for (int i=0; i<fPlotInfo.size(); i++) {
fPlotInfo[i].yLabel = label;
}
} else { // a specific selection
// clear yLabel
fPlotEntry.yLabel.clear();
// check that label is found in the selected collection, or in the variables
coll = fParamDataHandler->GetCollection(fSelected);
if (coll == 0) {
std::cerr << std::endl << "**ERROR** in addY: selected collection couldn't be found ..." << std::endl << std::endl;
return -3;
}
// first check specific collection
bool foundInColl(true), foundInVar(true);
int idx = -1;
QString collName("");
for (int i=0; i<label.size(); i++) {
if (!foundLabel(coll, label[i])) { // label not found
foundInColl = false;
collName = coll->GetName();
idx = i;
break;
}
}
// second check variables
for (int i=0; i<label.size(); i++) {
if (!foundVariable(label[i])) { // label not found
foundInVar = false;
idx = i;
break;
}
}
// make sure label(s) have been found
if (!foundInColl && !foundInVar) { // not all labels found, neither in collection nor variables.
std::cerr << std::endl << "**ERROR** couldn't find '" << label[idx].toLatin1().constData() << "' in collection '" << collName.toLatin1().constData() << "'," << std::endl;
std::cerr << " nor is it a defined variable" << std::endl << std::endl;
return -4;
}
fPlotEntry.yLabel = label;
// add plot entry
fPlotInfo.push_back(fPlotEntry);
}
return 0;
}
//--------------------------------------------------------------------------
/**
* @brief PmuppScript::plot. Create root macro and feed it to root in the bash mode.
* @param str plot script command string
* @return 0 on success
*/
int PmuppScript::plot(const QString str)
{
QString cmd = str;
QStringList tok = cmd.split(' ', Qt::SkipEmptyParts);
if (tok.size() != 2) {
std::cerr << std::endl << "**ERROR** in plot: number of tokens != 2." << std::endl << std::endl;
return -1;
}
QString flnOut = fSavePath + tok[1];
QString macroOut = fSavePath + "__out.C";
if (macro(QString("macro " + macroOut), flnOut) != 0) {
std::cerr << std::endl << "**ERROR** temporary macro generation failed." << std::endl << std::endl;
return -1;
}
// call root via batch
QProcess *proc = new QProcess(this);
if (proc == nullptr) {
std::cerr << std::endl << "**ERROR** couldn't invoke root.exe in batch mode." << std::endl << std::endl;
return -2;
}
// make sure that the system environment variables are properly set
QString exec_cmd = "root.exe";
QStringList arg;
arg << "-b";
arg << macroOut;
arg << "-q";
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
env.insert("LD_LIBRARY_PATH", env.value("ROOTSYS") + "/lib:" + env.value("LD_LIBRARY_PATH"));
proc->setProcessEnvironment(env);
proc->setWorkingDirectory(fSavePath);
proc->start(exec_cmd, arg);
if (!proc->waitForStarted()) {
std::cerr << std::endl << "**ERROR** Could not execute the output command: " << exec_cmd.toLatin1().constData() << std::endl << std::endl;
QFile::remove(macroOut);
return -3;
}
proc->waitForFinished();
QFile::remove(macroOut);
return 0;
}
//--------------------------------------------------------------------------
/**
* @brief PmuppScript::macro. Create a root macro
* @param str macro string command string
* @param plotFln plot file name. Depending on the extension (*.png, *.pdf, ...)
* the given a file will be created.
* @return 0 on success
*/
int PmuppScript::macro(const QString str, const QString plotFln)
{
QVector<PmuppMarker> marker = fAdmin->getMarkers();
QVector<PmuppColor> color = fAdmin->getColors();
QString cmd = str;
QStringList tok = cmd.split(' ', Qt::SkipEmptyParts);
if (tok.size() != 2) {
std::cerr << std::endl << "**ERROR** macro command with wrong number of arguments (" << tok.size() << ")." << std::endl << std::endl;
return -1;
}
QString macroName = tok[1].trimmed();
QString fln = fSavePath + macroName;
QFile file(fln);
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
std::cerr << std::endl << "**ERROR** Couldn't open macro file for writting." << std::endl << std::endl;
return -2;
}
QTextStream fout(&file);
// write header
fout << "// --------------------------" << Qt::endl;
fout << "// " << fln.toLatin1().constData() << Qt::endl;
fout << "// " << QDateTime::currentDateTime().toString("yy/MM/dd - HH:mm:ss") << Qt::endl;
fout << "// --------------------------" << Qt::endl;
fout << "{" << Qt::endl;
fout << " gROOT->Reset();" << Qt::endl;
fout << Qt::endl;
fout << " gStyle->SetOptTitle(0);" << Qt::endl;
fout << " gStyle->SetOptDate(0);" << Qt::endl;
fout << " gStyle->SetPadColor(TColor::GetColor(255,255,255)); // pad bkg to white" << Qt::endl;
fout << " gStyle->SetCanvasColor(TColor::GetColor(255,255,255)); // canvas bkg to white" << Qt::endl;
fout << Qt::endl;
fout << " Int_t nn=0, i=0;" << Qt::endl;
fout << " Double_t null[512];" << Qt::endl;
fout << " Double_t xx[512];" << Qt::endl;
fout << " Double_t yy[512];" << Qt::endl;
fout << " Double_t yyPosErr[512];" << Qt::endl;
fout << " Double_t yyNegErr[512];" << Qt::endl;
fout << Qt::endl;
// write data
QVector<double> xx, yy, yyPosErr, yyNegErr;
QString collName;
int count=0;
double x_min=0.0, x_max=0.0, x_min_new=0.0, x_max_new=0.0, y_min=0.0, y_max=0.0, y_min_new=0.0, y_max_new=0.0;
double dval, y_min_norm=1.0e10;
for (int i=0; i<fPlotInfo.size(); i++) {
// get collection name
collName = fParamDataHandler->GetCollectionName(i);
xx = fParamDataHandler->GetValues(collName, fPlotInfo[i].xLabel);
if (xx.size() == 0) { // it is a variable
int idx = getVarIndex(fPlotInfo[i].xLabel);
if (idx == -1) {
std::cerr << std::endl;
std::cerr << "**ERROR** Couldn't get x-label '" << fPlotInfo[i].xLabel.toLatin1().data() << "'." << std::endl;
std::cerr << " This should never happens." << std::endl;
return -3;
}
QVector<double> qvec(fVarHandler[idx].getValues().begin(), fVarHandler[idx].getValues().end());
xx = qvec;
}
// get x-axis min/max
minMax(xx, x_min, x_max);
if (count==0) {
x_min_new = x_min;
x_max_new = x_max;
} else {
if (x_min < x_min_new)
x_min_new = x_min;
if (y_max > x_max_new)
x_max_new = x_max;
}
for (int j=0; j<fPlotInfo[i].yLabel.size(); j++) {
yy = fParamDataHandler->GetValues(collName, fPlotInfo[i].yLabel[j]);
yyPosErr = fParamDataHandler->GetPosErr(collName, fPlotInfo[i].yLabel[j]);
yyNegErr = fParamDataHandler->GetNegErr(collName, fPlotInfo[i].yLabel[j]);
if (yy.size() == 0) { // it's a variable
int idx = getVarIndex(fPlotInfo[i].yLabel[j]);
if (idx == -1) {
std::cerr << std::endl;
std::cerr << "**ERROR** Couldn't get y-label '" << fPlotInfo[i].yLabel[j].toLatin1().data() << "'." << std::endl;
std::cerr << " This should never happens." << std::endl;
return -3;
}
QVector<double> qvecV(fVarHandler[idx].getValues().begin(), fVarHandler[idx].getValues().end());
yy = qvecV;
QVector<double> qvecE(fVarHandler[idx].getErrors().begin(), fVarHandler[idx].getErrors().end());
yyPosErr = qvecE;
yyNegErr = qvecE;
}
// get y-axis min/max
minMax(yy, y_min, y_max);
if (count==0) {
y_min_new = y_min;
y_max_new = y_max;
} else {
if (y_min < y_min_new)
y_min_new = y_min;
if (y_max > y_max_new)
y_max_new = y_max;
}
fout << " // " << ++count << ". data set" << Qt::endl;
fout << " nn = " << xx.size() << ";" << Qt::endl;
fout << " // null-values" << Qt::endl;
for (int k=0; k<xx.size(); k++) {
fout << " null[" << k << "]=0.0;" << Qt::endl;
}
fout << " // x-values" << Qt::endl;
for (int k=0; k<xx.size(); k++) {
fout << " xx[" << k << "]=" << xx[k] << ";" << Qt::endl;
}
fout << " // y-values" << Qt::endl;
for (int k=0; k<yy.size(); k++) {
dval = yy[k];
if (fNorm) {
dval /= y_max;
if (dval < y_min_norm)
y_min_norm = dval;
}
fout << " yy[" << k << "]=" << dval << ";" << Qt::endl;
}
fout << " // yyNegErr-values" << Qt::endl;
for (int k=0; k<yyNegErr.size(); k++) {
dval = fabs(yyNegErr[k]);
if (fNorm)
dval /= fabs(y_max);
fout << " yyNegErr[" << k << "]=" << dval << ";" << Qt::endl;
}
fout << " // yyPosErr-values" << Qt::endl;
for (int k=0; k<yyPosErr.size(); k++) {
dval = fabs(yyPosErr[k]);
if (fNorm)
dval /= fabs(y_max);
fout << " yyPosErr[" << k << "]=" << dval << ";" << Qt::endl;
}
fout << Qt::endl;
fout << " TGraphAsymmErrors *g_" << i << "_" << j << " = new TGraphAsymmErrors(nn, xx, yy, null, null, yyNegErr, yyPosErr);" << Qt::endl;
fout << Qt::endl;
}
}
// x,y-min/max range
double diff;
if (x_min_new > 0.0)
x_min = 0.0;
else
x_min = x_min_new;
diff = x_max-x_min;
x_max = x_max_new + 0.05*diff;
diff = y_max_new - y_min_new;
y_min = y_min_new - 0.05 * diff;
y_max = y_max_new + 0.05 * diff;
if (fNorm) {
diff = 1.0 - y_min_norm;
y_min = y_min_norm - 0.05 * diff;
y_max = 1.0 + 0.05 * diff;
}
// plotting
fout << " //**********" << Qt::endl;
fout << " // plotting " << Qt::endl;
fout << " //**********" << Qt::endl;
fout << " TCanvas *c1 = new TCanvas(\"c1\", \"" << macroName.toLatin1().constData() << "\", 10, 10, 600, 700);" << Qt::endl;
fout << Qt::endl;
count = 0;
int rr, gg, bb;
for (int i=0; i<fPlotInfo.size(); i++) {
for (int j=0; j<fPlotInfo[i].yLabel.size(); j++) {
if (count == 0) {
if (count < marker.size()) {
fout << " g_" << i << "_" << j << "->SetMarkerStyle(" << marker[count].getMarker() << ");" << Qt::endl;
fout << " g_" << i << "_" << j << "->SetMarkerSize(" << marker[count].getMarkerSize() << ");" << Qt::endl;
color[count].getRGB(rr, gg, bb);
fout << " g_" << i << "_" << j << "->SetMarkerColor(TColor::GetColor(" << rr << "," << gg << "," << bb << "));" << Qt::endl;
fout << " g_" << i << "_" << j << "->SetLineColor(TColor::GetColor(" << rr << "," << gg << "," << bb << "));" << Qt::endl;
} else {
fout << " g_" << i << "_" << j << "->SetMarkerStyle(20);" << Qt::endl;
fout << " g_" << i << "_" << j << "->SetMarkerSize(1.3);" << Qt::endl;
fout << " g_" << i << "_" << j << "->SetMarkerColor(TColor::GetColor(0,0,0));" << Qt::endl;
fout << " g_" << i << "_" << j << "->SetLineColor(TColor::GetColor(0,0,0));" << Qt::endl;
}
fout << " g_" << i << "_" << j << "->SetFillColor(kWhite);" << Qt::endl;
fout << " g_" << i << "_" << j << "->GetXaxis()->SetTitle(\"" << getNicerLabel(fPlotInfo[0].xLabel).toLatin1().data() << "\");" << Qt::endl;
fout << " g_" << i << "_" << j << "->GetXaxis()->SetTitleSize(0.05);" << Qt::endl;
fout << " g_" << i << "_" << j << "->GetXaxis()->SetDecimals(kTRUE);" << Qt::endl;
fout << " g_" << i << "_" << j << "->GetXaxis()->SetLimits(" << x_min << "," << x_max << ");" << Qt::endl;
fout << " g_" << i << "_" << j << "->GetYaxis()->SetTitle(\"" << getNicerLabel(fPlotInfo[0].yLabel[0]).toLatin1().data() << "\");" << Qt::endl;
fout << " g_" << i << "_" << j << "->GetYaxis()->SetTitleSize(0.05);" << Qt::endl;
fout << " g_" << i << "_" << j << "->GetYaxis()->SetTitleOffset(1.30);" << Qt::endl;
fout << " g_" << i << "_" << j << "->GetYaxis()->SetRangeUser(" << y_min << "," << y_max << ");" << Qt::endl;
fout << " g_" << i << "_" << j << "->Draw(\"AP\");" << Qt::endl;
} else {
if (count < marker.size()) {
fout << " g_" << i << "_" << j << "->SetMarkerStyle(" << marker[count].getMarker() << ");" << Qt::endl;
fout << " g_" << i << "_" << j << "->SetMarkerSize(" << marker[count].getMarkerSize() << ");" << Qt::endl;
color[count].getRGB(rr, gg, bb);
fout << " g_" << i << "_" << j << "->SetMarkerColor(TColor::GetColor(" << rr << "," << gg << "," << bb << "));" << Qt::endl;
fout << " g_" << i << "_" << j << "->SetLineColor(TColor::GetColor(" << rr << "," << gg << "," << bb << "));" << Qt::endl;
} else {
fout << " g_" << i << "_" << j << "->SetMarkerStyle(20);" << Qt::endl;
fout << " g_" << i << "_" << j << "->SetMarkerSize(1.3);" << Qt::endl;
fout << " g_" << i << "_" << j << "->SetMarkerColor(TColor::GetColor(0,0,0));" << Qt::endl;
fout << " g_" << i << "_" << j << "->SetLineColor(TColor::GetColor(0,0,0));" << Qt::endl;
}
fout << " g_" << i << "_" << j << "->SetFillColor(kWhite);" << Qt::endl;
fout << " g_" << i << "_" << j << "->Draw(\"Psame\");" << Qt::endl;
}
count++;
}
}
fout << " c1->SetMargin(0.15, 0.05, 0.12, 0.05);" << Qt::endl;
fout << " c1->Update();" << Qt::endl;
if (!plotFln.isEmpty()) {
fout << Qt::endl;
fout << " c1->SaveAs(\"" << plotFln.toLatin1().constData() << "\");" << Qt::endl;
}
fout << "}" << Qt::endl;
return 0;
}
//--------------------------------------------------------------------------
/**
* @brief PmuppScript::var_cmd. Variable definition command
* @param str variable definition command string
* @return 0 on success
*/
int PmuppScript::var_cmd(const QString str)
{
QStringList tok;
int idx=0;
// get linked collection index for further use
tok = str.split(' ', Qt::SkipEmptyParts);
if (tok[1].endsWith("Err")) // error variable no need to do something
return 0;
idx = getCollectionIndex(tok[1]);
if (idx == -1) // var not linked to collection, ignore it
return 0;
// check if the related error variable is present
QString varErr = QString("%1%2").arg(tok[1]).arg("Err");
QString varErrCmd("");
for (int i=0; i<fScript.size(); i++) {
if (fScript.at(i).contains(varErr, Qt::CaseSensitive)) {
varErrCmd = fScript.at(i);
break;
}
}
std::string parse_str = str.toLatin1().data();
if (!varErrCmd.isEmpty()) {
parse_str += "\n";
parse_str += varErrCmd.toLatin1().data();
}
PVarHandler varHandler(fParamDataHandler->GetCollection(idx), parse_str, tok[1].toLatin1().data());
if (!varHandler.isValid()) {
// deal with errors
QString mupp_err = QString("%1/.musrfit/mupp/mupp_err.log").arg(QString(qgetenv("HOME")));
// dump error messages if present
QFile fout(mupp_err);
if (fout.open(QIODevice::ReadOnly | QIODevice::Text)) {
QString msg;
while (!fout.atEnd()) {
msg = fout.readLine();
std::cerr << msg.toLatin1().data();
}
// delete potentially present mupp_err.log file
QFile::remove(mupp_err);
}
return 1;
}
fVarHandler.push_back(varHandler);
return 0;
}
//--------------------------------------------------------------------------
/**
* @brief PmuppScript::foundLabel find label in collection coll.
* @param coll collection object
* @return true if found
*/
bool PmuppScript::foundLabel(PmuppCollection *coll, const QString label)
{
bool result = false;
for (int i=0; i<coll->GetRun(0).GetNoOfParam(); i++) {
if (!coll->GetRun(0).GetParam(i).GetName().compare(label)) {
result = true;
break;
}
}
return result;
}
//--------------------------------------------------------------------------
/**
* @brief PmuppScript::foundVariable. Check if a variable is found in the
* variable handler.
* @param var variable name
* @return true if found
*/
bool PmuppScript::foundVariable(const QString var)
{
bool result = false;
for (int i=0; i<fVarHandler.size(); i++) {
if (!fVarHandler[i].getVarName().compare(var)) {
result = true;
break;
}
}
return result;
}
//--------------------------------------------------------------------------
/**
* @brief PmuppScript::getVarIndex. Get index of the variable object given by
* its name.
* @param var variable name searched for
* @return idx of found, -1 otherwise
*/
int PmuppScript::getVarIndex(const QString var)
{
int idx = -1;
for (int i=0; i<fVarHandler.size(); i++) {
if (!fVarHandler[i].getVarName().compare(var)) {
idx = i;
break;
}
}
return idx;
}
//--------------------------------------------------------------------------
/**
* @brief PmuppScript::minMax get minimum and maximum of the data set.
* @param dvec data set vector
* @param min resulting minimum
* @param max resulting maximum
*/
void PmuppScript::minMax(QVector<double> dvec, double &min, double &max)
{
min = 99.0e6;
max = -99.0e6;
for (int i=0; i<dvec.size(); i++) {
if (dvec[i] < min)
min = dvec[i];
if (dvec[i] > max)
max = dvec[i];
}
}
//--------------------------------------------------------------------------
/**
* @brief PmuppScript::getNicerLabel. Prettify the labels.
* @param label to be prettified
* @return prettified label
*/
QString PmuppScript::getNicerLabel(const QString label)
{
QString nice = label;
if (label == "dataE") {
nice = "E (keV)";
} else if (label == "dataT") {
nice = "T (K)";
} else if (label == "dataB") {
nice = "B (G)";
} else if (!label.compare("sigma", Qt::CaseInsensitive)) {
if (fNorm)
nice = "#sigma/max(#sigma)";
else
nice = "#sigma (1/#mus)";
} else if (!label.compare("lambda", Qt::CaseInsensitive)) {
if (fNorm)
nice = "#lambda/max(#lambda)";
else
nice = "#lambda (1/#mus)";
} else if (!label.compare("rate", Qt::CaseInsensitive)) {
if (fNorm)
nice = "Rate/max(Rate)";
else
nice = "Rate (1/#mus)";
} else if (!label.compare("alpha_LR", Qt::CaseInsensitive)) {
if (fNorm)
nice = "#alpha_{LR}/max(#alpha_{LR})";
else
nice = "#alpha_{LR}";
} else if (!label.compare("alpha_TB", Qt::CaseInsensitive)) {
if (fNorm)
nice = "#alpha_{TB}/max(#alpha_{TB})";
else
nice = "#alpha_{TB}";
} else {
if (fNorm) {
nice = label + "/ max(" + label + ")";
}
}
return nice;
}
//--------------------------------------------------------------------------
/**
* @brief PmuppScript::getCollectionIndex. Get the index of a collection.
* @param var_name name of the collection
* @return idx on success, -1 otherwise
*/
int PmuppScript::getCollectionIndex(const QString var_name)
{
int idx = -1;
QString cmd;
QStringList tok;
bool ok;
for (int i=0; i<fScript.size(); i++) {
cmd = fScript.at(i);
if (cmd.startsWith("col")) {
tok.clear();
tok = cmd.split(' ', Qt::SkipEmptyParts);
if (tok[3] == var_name) {
idx = tok[1].toInt(&ok);
if (!ok) {
Q_ASSERT(0);
}
break;
}
}
}
return idx;
}

View File

@ -0,0 +1,106 @@
/***************************************************************************
PmuppScript.h
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef _PMUPPSCRIPT_H_
#define _PMUPPSCRIPT_H_
#include <QString>
#include <QStringList>
#include "PmuppAdmin.h"
#include "Pmupp.h"
#include "PVarHandler.h"
//----------------------------------------------------------------------------
typedef struct {
int collIdx; ///< collection index
QString xLabel; ///< x-axis label
QVector<QString> yLabel; ///< y-axis label(s)
} PmuppPlotEntry;
//----------------------------------------------------------------------------
/**
* @brief The PmuppScript class. mupp script class which is used as a scripting
* interface for mupp.
*/
class PmuppScript : public QObject
{
Q_OBJECT
public:
PmuppScript(QStringList script);
~PmuppScript();
void setLoadPath(const QString cmd);
QString getLoadPath() { return fLoadPath; }
void setSavePath(const QString cmd);
QString getSavePath() { return fSavePath; }
int loadCollection(const QString str);
int select(const QString str);
int selectAll();
int addX(const QString str);
int addY(const QString str);
int plot(const QString str);
int macro(const QString str, const QString plotFln="");
int var_cmd(const QString str);
public slots:
int executeScript();
signals:
void finished();
private:
PmuppAdmin *fAdmin; ///< admin object
QStringList fScript; ///< script source
PParamDataHandler *fParamDataHandler; ///< parameter data handler
int fSelected; ///< -2=nothing selected, -1=all selected, >=0 is the index if the selected collection
PmuppPlotEntry fPlotEntry; ///< plot entry object
QVector<PmuppPlotEntry> fPlotInfo; ///< vector of all plot entry objects
bool fNorm; ///< normalization flag, true -> normalize y-data before plotting.
QString fLoadPath; ///< load path specifying where to look for data.
QString fSavePath; ///< save path specifying where to save data.
QVector<PVarHandler> fVarHandler; ///< variable handler vector
bool foundLabel(PmuppCollection *coll, const QString label);
bool foundVariable(const QString var);
int getVarIndex(const QString var);
void minMax(QVector<double> dvec, double &min, double &max);
QString getNicerLabel(const QString label);
int getCollectionIndex(const QString var_name);
};
#endif // _PMUPPSCRIPT_H_

View File

@ -0,0 +1,30 @@
# configure_mupp_version_file.cmake.in:
set(SRC_DIR "@CMAKE_CURRENT_SOURCE_DIR@")
set(BIN_DIR "@CMAKE_CURRENT_BINARY_DIR@")
# Set MUPP variables
set(CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
set(MUPP_VERSION "@mupp_VERSION@")
# Get the current working branch
execute_process(
COMMAND git rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Get the latest abbreviated commit hash of the working branch
execute_process(
COMMAND git log -1 --pretty="%h, %ci"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
configure_file(
${SRC_DIR}/cmake/mupp_version.h.in
${BIN_DIR}/mupp_version.h
@ONLY
)
# EOF

View File

@ -0,0 +1,11 @@
#ifndef VERSION_H
#define VERSION_H
#define MUPP_PREFIX "@CMAKE_INSTALL_PREFIX@"
#define MUPP_VERSION "@MUPP_VERSION@"
#define GIT_BRANCH "@GIT_BRANCH@"
#define GIT_COMMIT_HASH @GIT_COMMIT_HASH@
#endif

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=120.01 K, E=3.72 keV, B=~1500(G)/259.52(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.15779 -0.00080 0.00081
2 Sigma 0.0681 -0.0061 0.0057 0 none
3 Ph -150.01 -0.59 0.60
4 Field 1513.489 -0.031 0.032
# L
5 RelPh_L 0 0 none
6 N0_L 262.50 -0.30 0.30
7 N_bkg_L 4.930 -0.039 0.039
# T
8 RelPh_T -90.95 -0.72 0.72
9 N0_T 268.28 -0.30 0.30
10 N_bkg_T 5.042 -0.039 0.039
# R
11 RelPh_R 180.00 -0.73 0.73
12 alpha_LR 0.9991 -0.0016 0.0016
13 N_bkg_R 5.228 -0.039 0.039
# B
14 RelPh_B 90.52 -0.73 0.73
15 alpha_TB 0.9397 -0.0015 0.0015
16 N_bkg_B 4.688 -0.038 0.038
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2485 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2485 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2485 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2485 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-03 15:51:58
maxLH = 20436.1, NDF = 20361, maxLH/NDF = 1.003689

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=110.01 K, E=3.72 keV, B=~1500(G)/259.51(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.15809 -0.00080 0.00081
2 Sigma 0.0649 -0.0064 0.0059 0 none
3 Ph -149.17 -0.59 0.58
4 Field 1513.565 -0.031 0.031
# L
5 RelPh_L 0 0 none
6 N0_L 262.96 -0.30 0.30
7 N_bkg_L 4.780 -0.038 0.038
# T
8 RelPh_T -90.23 -0.71 0.72
9 N0_T 268.63 -0.30 0.30
10 N_bkg_T 4.938 -0.039 0.039
# R
11 RelPh_R 178.56 -0.71 0.72
12 alpha_LR 0.9990 -0.0016 0.0016
13 N_bkg_R 5.152 -0.039 0.039
# B
14 RelPh_B 88.76 -0.73 0.74
15 alpha_TB 0.9377 -0.0015 0.0015
16 N_bkg_B 4.705 -0.038 0.038
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2486 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2486 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2486 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2486 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-03 16:19:31
maxLH = 20767.0, NDF = 20361, maxLH/NDF = 1.019939

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=100.00 K, E=3.72 keV, B=~1500(G)/259.52(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.15934 -0.00082 0.00082
2 Sigma 0.0922 -0.0048 0.0047 0 none
3 Ph -150.01 -0.59 0.59
4 Field 1513.756 -0.033 0.033
# L
5 RelPh_L 0 0 none
6 N0_L 263.43 -0.30 0.30
7 N_bkg_L 4.848 -0.039 0.039
# T
8 RelPh_T -88.93 -0.72 0.72
9 N0_T 268.40 -0.30 0.30
10 N_bkg_T 4.936 -0.039 0.039
# R
11 RelPh_R 180.65 -0.73 0.73
12 alpha_LR 0.9991 -0.0016 0.0016
13 N_bkg_R 5.253 -0.039 0.039
# B
14 RelPh_B 89.79 -0.73 0.73
15 alpha_TB 0.9424 -0.0015 0.0015
16 N_bkg_B 4.794 -0.038 0.038
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2487 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2487 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2487 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2487 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-03 16:55:59
maxLH = 20276.6, NDF = 20361, maxLH/NDF = 0.995855

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=90.00 K, E=3.72 keV, B=~1500(G)/259.52(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.15729 -0.00081 0.00081
2 Sigma 0.0682 -0.0062 0.0058 0 none
3 Ph -151.06 -0.59 0.58
4 Field 1513.939 -0.031 0.032
# L
5 RelPh_L 0 0 none
6 N0_L 263.19 -0.30 0.30
7 N_bkg_L 4.791 -0.038 0.039
# T
8 RelPh_T -88.06 -0.71 0.73
9 N0_T 268.08 -0.30 0.30
10 N_bkg_T 5.070 -0.039 0.039
# R
11 RelPh_R 180.74 -0.72 0.73
12 alpha_LR 0.9960 -0.0016 0.0016
13 N_bkg_R 5.257 -0.039 0.040
# B
14 RelPh_B 91.29 -0.72 0.73
15 alpha_TB 0.9416 -0.0015 0.0015
16 N_bkg_B 4.703 -0.038 0.038
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2488 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2488 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2488 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2488 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-03 17:35:16
maxLH = 20817.9, NDF = 20361, maxLH/NDF = 1.022442

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=80.00 K, E=3.72 keV, B=~1500(G)/259.51(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.15485 -0.00095 0.00095
2 Sigma 0.2684 -0.0043 0.0043 0 none
3 Ph -148.61 -0.68 0.70
4 Field 1513.209 -0.057 0.057
# L
5 RelPh_L 0 0 none
6 N0_L 261.84 -0.30 0.30
7 N_bkg_L 4.866 -0.039 0.039
# T
8 RelPh_T -87.62 -0.85 0.82
9 N0_T 267.69 -0.30 0.30
10 N_bkg_T 5.009 -0.039 0.039
# R
11 RelPh_R 182.56 -0.86 0.83
12 alpha_LR 1.0033 -0.0016 0.0016
13 N_bkg_R 5.215 -0.039 0.039
# B
14 RelPh_B 92.29 -0.87 0.84
15 alpha_TB 0.9398 -0.0015 0.0015
16 N_bkg_B 4.713 -0.038 0.038
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2489 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2489 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2489 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2489 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-03 17:51:30
maxLH = 20788.2, NDF = 20361, maxLH/NDF = 1.020982

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=70.00 K, E=3.72 keV, B=~1500(G)/259.52(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.1479 -0.0012 0.0012
2 Sigma 0.5707 -0.0084 0.0086 0 none
3 Ph -143.97 -0.91 0.90
4 Field 1510.98 -0.12 0.13
# L
5 RelPh_L 0 0 none
6 N0_L 262.34 -0.30 0.30
7 N_bkg_L 4.771 -0.038 0.039
# T
8 RelPh_T -90.6 -1.1 1.1
9 N0_T 268.29 -0.30 0.30
10 N_bkg_T 4.998 -0.039 0.039
# R
11 RelPh_R 180.3 -1.1 1.1
12 alpha_LR 1.0020 -0.0016 0.0016
13 N_bkg_R 5.240 -0.039 0.039
# B
14 RelPh_B 90.6 -1.1 1.1
15 alpha_TB 0.9407 -0.0015 0.0015
16 N_bkg_B 4.649 -0.038 0.038
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2490 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2490 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2490 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2490 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-03 18:21:39
maxLH = 20459.9, NDF = 20361, maxLH/NDF = 1.004857

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=60.00 K, E=3.72 keV, B=~1500(G)/259.51(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.1470 -0.0014 0.0014
2 Sigma 0.747 -0.011 0.011 0 none
3 Ph -140.57 -1.00 1.00
4 Field 1509.20 -0.17 0.17
# L
5 RelPh_L 0 0 none
6 N0_L 261.28 -0.30 0.30
7 N_bkg_L 4.777 -0.038 0.039
# T
8 RelPh_T -92.4 -1.2 1.2
9 N0_T 268.75 -0.30 0.30
10 N_bkg_T 4.861 -0.039 0.039
# R
11 RelPh_R 177.8 -1.2 1.2
12 alpha_LR 1.0073 -0.0016 0.0016
13 N_bkg_R 5.148 -0.039 0.039
# B
14 RelPh_B 86.7 -1.2 1.2
15 alpha_TB 0.9345 -0.0015 0.0015
16 N_bkg_B 4.798 -0.038 0.038
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2491 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2491 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2491 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2491 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-03 18:52:37
maxLH = 20785.1, NDF = 20361, maxLH/NDF = 1.020830

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=49.99 K, E=3.72 keV, B=~1500(G)/259.52(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.1422 -0.0014 0.0014
2 Sigma 0.861 -0.013 0.013 0 none
3 Ph -141.6 -1.1 1.1
4 Field 1507.25 -0.21 0.22
# L
5 RelPh_L 0 0 none
6 N0_L 263.18 -0.30 0.30
7 N_bkg_L 4.744 -0.039 0.038
# T
8 RelPh_T -88.5 -1.3 1.3
9 N0_T 269.06 -0.30 0.30
10 N_bkg_T 5.062 -0.040 0.039
# R
11 RelPh_R 181.5 -1.3 1.3
12 alpha_LR 1.0004 -0.0016 0.0016
13 N_bkg_R 5.298 -0.040 0.039
# B
14 RelPh_B 91.0 -1.3 1.3
15 alpha_TB 0.9408 -0.0015 0.0015
16 N_bkg_B 4.734 -0.038 0.038
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2492 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2492 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2492 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2492 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-03 19:20:19
maxLH = 20799.5, NDF = 20361, maxLH/NDF = 1.021534

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=40.00 K, E=3.72 keV, B=~1500(G)/259.52(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.1381 -0.0015 0.0015
2 Sigma 0.970 -0.016 0.016 0 none
3 Ph -140.2 -1.2 1.2
4 Field 1506.77 -0.26 0.26
# L
5 RelPh_L 0 0 none
6 N0_L 262.27 -0.30 0.30
7 N_bkg_L 4.712 -0.038 0.038
# T
8 RelPh_T -90.9 -1.4 1.4
9 N0_T 269.85 -0.30 0.30
10 N_bkg_T 4.981 -0.039 0.039
# R
11 RelPh_R 181.2 -1.4 1.4
12 alpha_LR 1.0097 -0.0016 0.0016
13 N_bkg_R 5.230 -0.040 0.039
# B
14 RelPh_B 89.4 -1.4 1.4
15 alpha_TB 0.9379 -0.0015 0.0015
16 N_bkg_B 4.738 -0.038 0.038
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2493 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2493 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2493 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2493 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-03 20:07:55
maxLH = 20044.5, NDF = 20361, maxLH/NDF = 0.984454

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=30.00 K, E=3.72 keV, B=~1500(G)/259.51(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.1442 -0.0016 0.0016
2 Sigma 1.094 -0.018 0.018 0 none
3 Ph -137.3 -1.2 1.2
4 Field 1505.51 -0.29 0.29
# L
5 RelPh_L 0 0 none
6 N0_L 259.62 -0.30 0.30
7 N_bkg_L 4.850 -0.039 0.038
# T
8 RelPh_T -93.2 -1.4 1.4
9 N0_T 268.18 -0.30 0.30
10 N_bkg_T 5.057 -0.039 0.039
# R
11 RelPh_R 178.0 -1.4 1.4
12 alpha_LR 1.0129 -0.0016 0.0016
13 N_bkg_R 5.224 -0.039 0.039
# B
14 RelPh_B 89.1 -1.4 1.4
15 alpha_TB 0.9400 -0.0015 0.0015
16 N_bkg_B 4.568 -0.038 0.038
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2494 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2494 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2494 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2494 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-03 20:51:41
maxLH = 20448.4, NDF = 20361, maxLH/NDF = 1.004295

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=20.00 K, E=3.72 keV, B=~1500(G)/259.52(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.1393 -0.0016 0.0017
2 Sigma 1.138 -0.020 0.020 0 none
3 Ph -141.9 -1.3 1.3
4 Field 1505.85 -0.32 0.32
# L
5 RelPh_L 0 0 none
6 N0_L 261.04 -0.30 0.30
7 N_bkg_L 4.715 -0.038 0.038
# T
8 RelPh_T -87.0 -1.5 1.5
9 N0_T 269.62 -0.30 0.30
10 N_bkg_T 5.026 -0.039 0.039
# R
11 RelPh_R 180.2 -1.5 1.5
12 alpha_LR 1.0091 -0.0016 0.0016
13 N_bkg_R 5.218 -0.039 0.039
# B
14 RelPh_B 91.8 -1.5 1.5
15 alpha_TB 0.9369 -0.0015 0.0015
16 N_bkg_B 4.643 -0.038 0.038
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2495 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2495 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2495 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2495 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-03 20:51:31
maxLH = 20908.9, NDF = 20361, maxLH/NDF = 1.026911

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=10.01 K, E=3.72 keV, B=~1500(G)/259.53(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.1431 -0.0017 0.0017
2 Sigma 1.227 -0.021 0.021 0 none
3 Ph -140.1 -1.3 1.3
4 Field 1504.58 -0.34 0.34
# L
5 RelPh_L 0 0 none
6 N0_L 261.09 -0.30 0.30
7 N_bkg_L 4.683 -0.038 0.038
# T
8 RelPh_T -90.1 -1.5 1.5
9 N0_T 268.81 -0.30 0.30
10 N_bkg_T 5.029 -0.039 0.039
# R
11 RelPh_R 178.6 -1.5 1.5
12 alpha_LR 1.0115 -0.0016 0.0016
13 N_bkg_R 5.133 -0.039 0.039
# B
14 RelPh_B 89.2 -1.5 1.5
15 alpha_TB 0.9387 -0.0015 0.0015
16 N_bkg_B 4.799 -0.038 0.038
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2496 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2496 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2496 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2496 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-03 21:18:46
maxLH = 20464.0, NDF = 20361, maxLH/NDF = 1.005059

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=4.99 K, E=3.72 keV, B=~1500(G)/259.51(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.1344 -0.0015 0.0015
2 Sigma 1.195 -0.019 0.019 0 none
3 Ph -135.1 -1.2 1.2
4 Field 1503.89 -0.32 0.32
# L
5 RelPh_L 0 0 none
6 N0_L 313.46 -0.32 0.33
7 N_bkg_L 5.724 -0.042 0.042
# T
8 RelPh_T -90.8 -1.4 1.4
9 N0_T 322.27 -0.33 0.33
10 N_bkg_T 6.028 -0.043 0.043
# R
11 RelPh_R 175.3 -1.5 1.5
12 alpha_LR 1.0103 -0.0015 0.0015
13 N_bkg_R 6.222 -0.043 0.043
# B
14 RelPh_B 86.5 -1.5 1.5
15 alpha_TB 0.9401 -0.0014 0.0014
16 N_bkg_B 5.563 -0.042 0.041
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2497 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2497 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2497 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2497 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-03 21:52:51
maxLH = 20911.8, NDF = 20361, maxLH/NDF = 1.027052

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=120.00 K, E=3.72 keV, B=~100(G)/17.30(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.15430 -0.00077 0.00077
2 Sigma 0.1070 -0.0043 0.0042 0 none
3 Ph 21.06 -0.56 0.56
4 Field 101.611 -0.032 0.032
# L
5 RelPh_L 0 0 none
6 N0_L 304.71 -0.32 0.33
7 N_bkg_L 5.850 -0.042 0.042
# T
8 RelPh_T -88.67 -0.69 0.69
9 N0_T 322.01 -0.33 0.33
10 N_bkg_T 6.275 -0.043 0.043
# R
11 RelPh_R 182.67 -0.68 0.68
12 alpha_LR 1.0480 -0.0016 0.0016
13 N_bkg_R 6.506 -0.043 0.044
# B
14 RelPh_B 91.87 -0.71 0.71
15 alpha_TB 0.9186 -0.0014 0.0014
16 N_bkg_B 5.789 -0.042 0.042
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2498 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2498 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2498 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2498 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 250
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 06:16:24
maxLH = 20371.9, NDF = 20361, maxLH/NDF = 1.000533

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=110.00 K, E=3.72 keV, B=~100(G)/17.30(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.15162 -0.00076 0.00077
2 Sigma 0.1038 -0.0044 0.0043 0 none
3 Ph 21.96 -0.56 0.56
4 Field 101.648 -0.032 0.033
# L
5 RelPh_L 0 0 none
6 N0_L 306.71 -0.33 0.32
7 N_bkg_L 5.651 -0.042 0.042
# T
8 RelPh_T -88.95 -0.71 0.70
9 N0_T 322.89 -0.33 0.33
10 N_bkg_T 6.064 -0.043 0.043
# R
11 RelPh_R 180.98 -0.70 0.69
12 alpha_LR 1.0395 -0.0015 0.0015
13 N_bkg_R 6.410 -0.043 0.043
# B
14 RelPh_B 89.25 -0.72 0.71
15 alpha_TB 0.9199 -0.0014 0.0014
16 N_bkg_B 5.683 -0.041 0.042
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2499 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2499 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2499 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2499 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 250
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 06:17:37
maxLH = 20571.2, NDF = 20361, maxLH/NDF = 1.010323

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=100.00 K, E=3.72 keV, B=~100(G)/17.30(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.15397 -0.00077 0.00077
2 Sigma 0.1179 -0.0041 0.0040 0 none
3 Ph 22.69 -0.56 0.57
4 Field 101.788 -0.033 0.033
# L
5 RelPh_L 0 0 none
6 N0_L 305.99 -0.32 0.33
7 N_bkg_L 5.667 -0.042 0.042
# T
8 RelPh_T -89.73 -0.70 0.69
9 N0_T 322.59 -0.33 0.33
10 N_bkg_T 6.099 -0.043 0.043
# R
11 RelPh_R 180.18 -0.70 0.69
12 alpha_LR 1.0455 -0.0016 0.0015
13 N_bkg_R 6.407 -0.043 0.043
# B
14 RelPh_B 88.65 -0.71 0.70
15 alpha_TB 0.9225 -0.0014 0.0014
16 N_bkg_B 5.755 -0.042 0.042
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2500 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2500 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2500 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2500 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 250
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 06:17:39
maxLH = 20798.7, NDF = 20361, maxLH/NDF = 1.021497

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=90.00 K, E=3.72 keV, B=~100(G)/17.30(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.15292 -0.00076 0.00078
2 Sigma 0.1139 -0.0041 0.0041 0 none
3 Ph 22.77 -0.56 0.56
4 Field 101.934 -0.032 0.033
# L
5 RelPh_L 0 0 none
6 N0_L 305.80 -0.32 0.33
7 N_bkg_L 5.615 -0.042 0.041
# T
8 RelPh_T -89.44 -0.70 0.70
9 N0_T 323.19 -0.33 0.33
10 N_bkg_T 5.877 -0.043 0.043
# R
11 RelPh_R 179.80 -0.69 0.69
12 alpha_LR 1.0427 -0.0016 0.0015
13 N_bkg_R 6.380 -0.043 0.043
# B
14 RelPh_B 90.59 -0.72 0.72
15 alpha_TB 0.9193 -0.0014 0.0014
16 N_bkg_B 5.684 -0.041 0.042
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2501 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2501 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2501 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2501 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 250
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 06:17:42
maxLH = 20651.7, NDF = 20361, maxLH/NDF = 1.014275

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=80.00 K, E=3.72 keV, B=~100(G)/17.30(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.15503 -0.00080 0.00080
2 Sigma 0.1701 -0.0037 0.0037 0 none
3 Ph 23.32 -0.58 0.58
4 Field 101.761 -0.038 0.038
# L
5 RelPh_L 0 0 none
6 N0_L 307.50 -0.32 0.33
7 N_bkg_L 5.583 -0.042 0.042
# T
8 RelPh_T -89.57 -0.72 0.72
9 N0_T 322.69 -0.33 0.33
10 N_bkg_T 6.069 -0.043 0.043
# R
11 RelPh_R 180.36 -0.71 0.70
12 alpha_LR 1.0438 -0.0016 0.0015
13 N_bkg_R 6.327 -0.043 0.043
# B
14 RelPh_B 90.42 -0.73 0.73
15 alpha_TB 0.9273 -0.0014 0.0014
16 N_bkg_B 5.494 -0.041 0.041
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2502 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2502 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2502 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2502 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 250
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 06:17:45
maxLH = 20164.1, NDF = 20361, maxLH/NDF = 0.990327

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=70.01 K, E=3.72 keV, B=~100(G)/17.30(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.14723 -0.00085 0.00085
2 Sigma 0.2154 -0.0041 0.0041 0 none
3 Ph 24.96 -0.63 0.63
4 Field 100.813 -0.046 0.046
# L
5 RelPh_L 0 0 none
6 N0_L 305.91 -0.32 0.33
7 N_bkg_L 5.739 -0.042 0.042
# T
8 RelPh_T -88.52 -0.78 0.78
9 N0_T 322.43 -0.33 0.33
10 N_bkg_T 6.083 -0.043 0.043
# R
11 RelPh_R 181.37 -0.77 0.78
12 alpha_LR 1.0466 -0.0016 0.0015
13 N_bkg_R 6.381 -0.043 0.044
# B
14 RelPh_B 90.77 -0.80 0.80
15 alpha_TB 0.9244 -0.0014 0.0014
16 N_bkg_B 5.651 -0.041 0.041
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2503 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2503 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2503 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2503 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 250
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 06:17:47
maxLH = 20557.8, NDF = 20361, maxLH/NDF = 1.009667

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=60.00 K, E=3.72 keV, B=~100(G)/17.30(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.14658 -0.00089 0.00089
2 Sigma 0.2583 -0.0044 0.0044 0 none
3 Ph 27.31 -0.65 0.65
4 Field 100.082 -0.052 0.053
# L
5 RelPh_L 0 0 none
6 N0_L 307.17 -0.32 0.33
7 N_bkg_L 5.644 -0.042 0.042
# T
8 RelPh_T -90.36 -0.81 0.81
9 N0_T 322.70 -0.33 0.33
10 N_bkg_T 6.046 -0.043 0.043
# R
11 RelPh_R 179.44 -0.80 0.80
12 alpha_LR 1.0422 -0.0015 0.0015
13 N_bkg_R 6.290 -0.043 0.043
# B
14 RelPh_B 89.98 -0.83 0.83
15 alpha_TB 0.9204 -0.0014 0.0014
16 N_bkg_B 5.629 -0.041 0.042
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2504 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2504 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2504 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2504 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 250
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 06:17:51
maxLH = 20312.5, NDF = 20361, maxLH/NDF = 0.997620

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=50.00 K, E=3.72 keV, B=~100(G)/17.30(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.14694 -0.00091 0.00092
2 Sigma 0.3015 -0.0046 0.0047 0 none
3 Ph 26.54 -0.67 0.67
4 Field 99.560 -0.060 0.060
# L
5 RelPh_L 0 0 none
6 N0_L 308.21 -0.33 0.33
7 N_bkg_L 5.725 -0.042 0.042
# T
8 RelPh_T -88.06 -0.84 0.84
9 N0_T 322.68 -0.33 0.33
10 N_bkg_T 5.998 -0.043 0.043
# R
11 RelPh_R 182.28 -0.83 0.83
12 alpha_LR 1.0340 -0.0015 0.0015
13 N_bkg_R 6.414 -0.043 0.043
# B
14 RelPh_B 93.05 -0.85 0.85
15 alpha_TB 0.9233 -0.0014 0.0014
16 N_bkg_B 5.554 -0.041 0.041
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2505 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2505 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2505 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2505 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 250
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 06:17:53
maxLH = 20520.8, NDF = 20361, maxLH/NDF = 1.007850

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=39.99 K, E=3.72 keV, B=~100(G)/17.30(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.14448 -0.00093 0.00093
2 Sigma 0.3229 -0.0049 0.0049 0 none
3 Ph 27.69 -0.71 0.71
4 Field 99.218 -0.065 0.065
# L
5 RelPh_L 0 0 none
6 N0_L 308.64 -0.32 0.33
7 N_bkg_L 5.629 -0.042 0.042
# T
8 RelPh_T -89.25 -0.87 0.87
9 N0_T 323.32 -0.33 0.33
10 N_bkg_T 5.986 -0.043 0.043
# R
11 RelPh_R 179.57 -0.85 0.85
12 alpha_LR 1.0321 -0.0015 0.0015
13 N_bkg_R 6.356 -0.043 0.043
# B
14 RelPh_B 92.12 -0.88 0.88
15 alpha_TB 0.9198 -0.0014 0.0014
16 N_bkg_B 5.560 -0.041 0.041
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2506 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2506 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2506 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2506 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 250
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 06:17:56
maxLH = 20387.1, NDF = 20361, maxLH/NDF = 1.001283

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=30.00 K, E=3.72 keV, B=~100(G)/17.30(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.14302 -0.00096 0.00096
2 Sigma 0.3559 -0.0053 0.0054 0 none
3 Ph 26.24 -0.73 0.73
4 Field 99.133 -0.071 0.071
# L
5 RelPh_L 0 0 none
6 N0_L 308.94 -0.33 0.33
7 N_bkg_L 5.538 -0.042 0.042
# T
8 RelPh_T -89.10 -0.89 0.89
9 N0_T 325.00 -0.33 0.33
10 N_bkg_T 5.966 -0.043 0.043
# R
11 RelPh_R 180.61 -0.88 0.88
12 alpha_LR 1.0277 -0.0015 0.0015
13 N_bkg_R 6.368 -0.043 0.043
# B
14 RelPh_B 91.54 -0.92 0.92
15 alpha_TB 0.9171 -0.0014 0.0014
16 N_bkg_B 5.501 -0.041 0.041
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2507 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2507 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2507 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2507 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 250
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 06:17:58
maxLH = 20754.5, NDF = 20361, maxLH/NDF = 1.019328

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=19.98 K, E=3.72 keV, B=~100(G)/17.30(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.14124 -0.00097 0.00098
2 Sigma 0.3703 -0.0055 0.0056 0 none
3 Ph 27.39 -0.74 0.74
4 Field 98.751 -0.075 0.075
# L
5 RelPh_L 0 0 none
6 N0_L 309.63 -0.32 0.33
7 N_bkg_L 5.579 -0.042 0.042
# T
8 RelPh_T -89.02 -0.92 0.92
9 N0_T 324.61 -0.33 0.33
10 N_bkg_T 6.045 -0.043 0.043
# R
11 RelPh_R 180.44 -0.90 0.89
12 alpha_LR 1.0280 -0.0015 0.0015
13 N_bkg_R 6.317 -0.043 0.043
# B
14 RelPh_B 91.04 -0.94 0.94
15 alpha_TB 0.9176 -0.0014 0.0014
16 N_bkg_B 5.626 -0.041 0.042
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2508 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2508 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2508 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2508 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 250
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 06:18:01
maxLH = 20451.1, NDF = 20361, maxLH/NDF = 1.004423

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=10.01 K, E=3.72 keV, B=~100(G)/17.30(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.13867 -0.00098 0.00099
2 Sigma 0.3824 -0.0058 0.0058 0 none
3 Ph 29.09 -0.77 0.77
4 Field 98.629 -0.079 0.079
# L
5 RelPh_L 0 0 none
6 N0_L 309.62 -0.32 0.33
7 N_bkg_L 5.543 -0.042 0.042
# T
8 RelPh_T -91.92 -0.95 0.94
9 N0_T 323.32 -0.33 0.33
10 N_bkg_T 6.028 -0.043 0.043
# R
11 RelPh_R 180.01 -0.93 0.93
12 alpha_LR 1.0266 -0.0015 0.0015
13 N_bkg_R 6.234 -0.043 0.043
# B
14 RelPh_B 90.07 -0.96 0.96
15 alpha_TB 0.9183 -0.0014 0.0014
16 N_bkg_B 5.573 -0.041 0.041
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2509 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2509 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2509 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2509 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 250
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 06:18:03
maxLH = 20426.7, NDF = 20361, maxLH/NDF = 1.003225

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=5.01 K, E=3.72 keV, B=~100(G)/17.30(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.13438 -0.00098 0.00098
2 Sigma 0.3809 -0.0059 0.0060 0 none
3 Ph 27.97 -0.79 0.79
4 Field 98.570 -0.081 0.082
# L
5 RelPh_L 0 0 none
6 N0_L 309.88 -0.33 0.33
7 N_bkg_L 5.664 -0.042 0.042
# T
8 RelPh_T -88.74 -0.96 0.97
9 N0_T 325.36 -0.33 0.33
10 N_bkg_T 5.981 -0.043 0.043
# R
11 RelPh_R 180.84 -0.96 0.96
12 alpha_LR 1.0271 -0.0015 0.0015
13 N_bkg_R 6.324 -0.043 0.043
# B
14 RelPh_B 92.48 -0.99 0.98
15 alpha_TB 0.9141 -0.0014 0.0014
16 N_bkg_B 5.608 -0.042 0.041
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2510 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2510 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2510 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2510 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 250
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 06:18:06
maxLH = 20906.7, NDF = 20361, maxLH/NDF = 1.026802

View File

@ -0,0 +1,95 @@
YBCO-40nm, T=119.99 K, E=3.72 keV, B=~50(G)/8.65(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.15228 -0.00061 0.00061
2 Sigma 0.1395 -0.0029 0.0029 0 none
3 Ph 11.17 -0.45 0.45
4 Field 52.675 -0.027 0.028
# L
5 RelPh_L 0 0 none
6 N0_L 517.08 -0.43 0.43
7 N_bkg_L 9.123 -0.054 0.054
# T
8 RelPh_T -90.84 -0.56 0.56
9 N0_T 537.04 -0.42 0.43
10 N_bkg_T 9.880 -0.055 0.055
# R
11 RelPh_R 180.62 -0.55 0.55
12 alpha_LR 1.0260 -0.0012 0.0012
13 N_bkg_R 10.404 -0.056 0.056
# B
14 RelPh_B 88.79 -0.56 0.56
15 alpha_TB 0.9256 -0.0011 0.0011
16 N_bkg_B 9.143 -0.053 0.053
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2511 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2511 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2511 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2511 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 500
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
###############################################################
STATISTIC --- 2017-08-04 07:47:54
maxLH = 20065.8, NDF = 20361, maxLH/NDF = 0.985501

View File

@ -0,0 +1,95 @@
YBCO-40nm, T=4.99 K, E=3.72 keV, B=~50(G)/8.65(A), Tr/Sa=15.02/10.54 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.13719 -0.00075 0.00075
2 Sigma 0.3385 -0.0042 0.0042 0 none
3 Ph 15.78 -0.58 0.58
4 Field 50.621 -0.055 0.056
# L
5 RelPh_L 0 0 none
6 N0_L 516.65 -0.43 0.43
7 N_bkg_L 9.436 -0.054 0.054
# T
8 RelPh_T -89.74 -0.72 0.72
9 N0_T 538.32 -0.43 0.43
10 N_bkg_T 10.072 -0.056 0.055
# R
11 RelPh_R 180.80 -0.70 0.70
12 alpha_LR 1.0196 -0.0012 0.0012
13 N_bkg_R 10.468 -0.056 0.056
# B
14 RelPh_B 90.57 -0.73 0.73
15 alpha_TB 0.9212 -0.0011 0.0011
16 N_bkg_B 9.115 -0.053 0.053
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2512 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2512 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2512 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2512 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 500
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
###############################################################
STATISTIC --- 2017-08-04 08:51:06
maxLH = 20444.1, NDF = 20361, maxLH/NDF = 1.004079

View File

@ -0,0 +1,95 @@
YBCO-40nm, T=120.01 K, E=3.79 keV, B=~800(G)/138.41(A), Tr/Sa=12.02/7.29 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.07612 -0.00096 0.00097
2 Sigma 0.429 -0.010 0.010 0 none
3 Ph 196.3 -1.5 1.5
4 Field 805.59 -0.17 0.17
# L
5 RelPh_L 0 0 none
6 N0_L 323.67 -0.33 0.33
7 N_bkg_L 5.434 -0.042 0.042
# T
8 RelPh_T -81.1 -1.8 1.8
9 N0_T 294.12 -0.32 0.31
10 N_bkg_T 5.244 -0.041 0.041
# R
11 RelPh_R 188.3 -1.7 1.7
12 alpha_LR 1.0106 -0.0015 0.0015
13 N_bkg_R 6.206 -0.043 0.043
# B
14 RelPh_B 95.1 -1.7 1.8
15 alpha_TB 1.1764 -0.0017 0.0017
16 N_bkg_B 5.910 -0.044 0.044
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2516 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 41 45
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2516 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 42 46
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2516 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 43 47
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2516 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 44 48
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 50
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
###############################################################
STATISTIC --- 2017-08-04 12:38:19
maxLH = 20356.2, NDF = 20365, maxLH/NDF = 0.999568

View File

@ -0,0 +1,95 @@
YBCO-40nm, T=120.00 K, E=3.79 keV, B=~800(G)/138.41(A), Tr/Sa=12.02/7.29 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.0744 -0.0023 0.0024
2 Sigma 0.357 -0.023 0.024 0 none
3 Ph 189.3 -3.6 3.6
4 Field 805.92 -0.36 0.35
# L
5 RelPh_L 0 0 none
6 N0_L 50.34 -0.13 0.13
7 N_bkg_L 0.872 -0.017 0.017
# T
8 RelPh_T -81.8 -4.4 4.4
9 N0_T 44.87 -0.12 0.12
10 N_bkg_T 0.809 -0.016 0.016
# R
11 RelPh_R 195.0 -4.3 4.3
12 alpha_LR 0.9807 -0.0036 0.0036
13 N_bkg_R 0.923 -0.017 0.017
# B
14 RelPh_B 102.8 -4.3 4.3
15 alpha_TB 1.1769 -0.0044 0.0044
16 N_bkg_B 0.946 -0.017 0.017
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2517 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 41 45
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2517 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 42 46
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2517 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 43 47
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2517 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 44 48
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 50
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
###############################################################
STATISTIC --- 2017-08-04 12:51:58
maxLH = 20794.6, NDF = 20365, maxLH/NDF = 1.021097

View File

@ -0,0 +1,95 @@
YBCO-40nm, T=120.00 K, E=3.79 keV, B=~800(G)/138.41(A), Tr/Sa=12.02/7.29 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.0813 -0.0024 0.0024
2 Sigma 0.413 -0.022 0.023 0 none
3 Ph 198.9 -3.4 3.4
4 Field 805.18 -0.38 0.38
# L
5 RelPh_L 0 0 none
6 N0_L 50.32 -0.13 0.13
7 N_bkg_L 0.861 -0.017 0.017
# T
8 RelPh_T -87.2 -4.1 4.2
9 N0_T 45.75 -0.12 0.12
10 N_bkg_T 0.826 -0.016 0.016
# R
11 RelPh_R 184.1 -4.0 4.0
12 alpha_LR 0.9898 -0.0036 0.0037
13 N_bkg_R 0.952 -0.017 0.017
# B
14 RelPh_B 94.5 -4.1 4.1
15 alpha_TB 1.1472 -0.0043 0.0043
16 N_bkg_B 0.910 -0.017 0.017
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2518 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 41 45
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2518 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 42 46
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2518 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 43 47
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2518 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 44 48
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 50
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
###############################################################
STATISTIC --- 2017-08-04 13:07:03
maxLH = 20946.8, NDF = 20365, maxLH/NDF = 1.028570

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=119.99 K, E=24.26 keV, B=~1500(G)/259.51(A), Tr/Sa=15.02/-9.99 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.16934 -0.00091 0.00092
2 Sigma 0.0504 -0.0087 0.0076 0 none
3 Ph -151.89 -0.62 0.62
4 Field 1513.140 -0.032 0.032
# L
5 RelPh_L 0 0 none
6 N0_L 199.87 -0.26 0.26
7 N_bkg_L 3.485 -0.033 0.033
# T
8 RelPh_T -91.07 -0.75 0.76
9 N0_T 203.23 -0.26 0.26
10 N_bkg_T 3.652 -0.034 0.034
# R
11 RelPh_R 180.84 -0.77 0.77
12 alpha_LR 1.0068 -0.0019 0.0018
13 N_bkg_R 3.970 -0.034 0.034
# B
14 RelPh_B 88.76 -0.77 0.78
15 alpha_TB 0.9521 -0.0017 0.0018
16 N_bkg_B 3.508 -0.033 0.033
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2519 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2519 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2519 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2519 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 14:12:14
maxLH = 20465.5, NDF = 20361, maxLH/NDF = 1.005132

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=120.00 K, E=21.76 keV, B=~1500(G)/259.52(A), Tr/Sa=15.02/-7.50 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.16434 -0.00091 0.00092
2 Sigma 0.026 -0.026 0.013 0 none
3 Ph -153.67 -0.64 0.63
4 Field 1513.255 -0.033 0.033
# L
5 RelPh_L 0 0 none
6 N0_L 200.43 -0.26 0.26
7 N_bkg_L 3.509 -0.033 0.033
# T
8 RelPh_T -89.10 -0.77 0.78
9 N0_T 203.53 -0.27 0.26
10 N_bkg_T 3.735 -0.034 0.034
# R
11 RelPh_R 180.88 -0.78 0.79
12 alpha_LR 1.0056 -0.0019 0.0018
13 N_bkg_R 3.886 -0.034 0.034
# B
14 RelPh_B 90.92 -0.78 0.79
15 alpha_TB 0.9541 -0.0017 0.0018
16 N_bkg_B 3.605 -0.033 0.033
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2520 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2520 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2520 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2520 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 14:12:22
maxLH = 20707.2, NDF = 20361, maxLH/NDF = 1.017003

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=120.01 K, E=19.26 keV, B=~1500(G)/259.52(A), Tr/Sa=15.02/-5.00 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.16711 -0.00080 0.00081
2 Sigma 0.0619 -0.0063 0.0058 0 none
3 Ph -152.11 -0.54 0.55
4 Field 1513.153 -0.029 0.029
# L
5 RelPh_L 0 0 none
6 N0_L 263.35 -0.29 0.30
7 N_bkg_L 4.647 -0.039 0.038
# T
8 RelPh_T -90.62 -0.68 0.66
9 N0_T 267.77 -0.31 0.30
10 N_bkg_T 4.863 -0.038 0.039
# R
11 RelPh_R 181.79 -0.68 0.66
12 alpha_LR 1.0067 -0.0016 0.0016
13 N_bkg_R 5.119 -0.039 0.039
# B
14 RelPh_B 91.18 -0.70 0.68
15 alpha_TB 0.9525 -0.0015 0.0016
16 N_bkg_B 4.671 -0.038 0.038
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2521 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2521 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2521 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2521 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 14:44:54
maxLH = 20572.5, NDF = 20361, maxLH/NDF = 1.010389

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=120.00 K, E=16.76 keV, B=~1500(G)/259.52(A), Tr/Sa=15.02/-2.50 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.16787 -0.00080 0.00080
2 Sigma 0.0558 -0.0069 0.0063 0 none
3 Ph -151.23 -0.54 0.54
4 Field 1513.118 -0.029 0.029
# L
5 RelPh_L 0 0 none
6 N0_L 263.47 -0.30 0.30
7 N_bkg_L 4.654 -0.038 0.038
# T
8 RelPh_T -91.14 -0.66 0.67
9 N0_T 268.17 -0.30 0.30
10 N_bkg_T 4.819 -0.039 0.039
# R
11 RelPh_R 181.17 -0.67 0.68
12 alpha_LR 1.0052 -0.0016 0.0016
13 N_bkg_R 5.111 -0.039 0.039
# B
14 RelPh_B 90.72 -0.67 0.68
15 alpha_TB 0.9499 -0.0015 0.0015
16 N_bkg_B 4.647 -0.038 0.038
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2522 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2522 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2522 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2522 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 15:33:57
maxLH = 20241.8, NDF = 20361, maxLH/NDF = 0.994146

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=120.00 K, E=14.26 keV, B=~1500(G)/259.52(A), Tr/Sa=15.02/0.00 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.16521 -0.00080 0.00080
2 Sigma 0.0583 -0.0067 0.0061 0 none
3 Ph -151.61 -0.56 0.55
4 Field 1513.082 -0.029 0.029
# L
5 RelPh_L 0 0 none
6 N0_L 263.39 -0.30 0.30
7 N_bkg_L 4.560 -0.038 0.038
# T
8 RelPh_T -89.15 -0.68 0.68
9 N0_T 267.35 -0.30 0.30
10 N_bkg_T 4.938 -0.039 0.039
# R
11 RelPh_R 180.19 -0.68 0.69
12 alpha_LR 1.0052 -0.0016 0.0016
13 N_bkg_R 5.079 -0.039 0.039
# B
14 RelPh_B 89.84 -0.69 0.69
15 alpha_TB 0.9533 -0.0015 0.0015
16 N_bkg_B 4.604 -0.038 0.038
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2523 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2523 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2523 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2523 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 15:34:11
maxLH = 20791.3, NDF = 20361, maxLH/NDF = 1.021131

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=120.00 K, E=11.77 keV, B=~1500(G)/259.52(A), Tr/Sa=15.02/2.50 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.16487 -0.00080 0.00080
2 Sigma 0.0676 -0.0058 0.0054 0 none
3 Ph -151.23 -0.55 0.57
4 Field 1513.098 -0.030 0.030
# L
5 RelPh_L 0 0 none
6 N0_L 263.64 -0.30 0.30
7 N_bkg_L 4.523 -0.038 0.038
# T
8 RelPh_T -90.51 -0.69 0.67
9 N0_T 267.28 -0.30 0.30
10 N_bkg_T 4.806 -0.038 0.039
# R
11 RelPh_R 180.31 -0.70 0.68
12 alpha_LR 0.9997 -0.0016 0.0016
13 N_bkg_R 5.061 -0.039 0.039
# B
14 RelPh_B 90.13 -0.71 0.69
15 alpha_TB 0.9485 -0.0015 0.0015
16 N_bkg_B 4.654 -0.038 0.038
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2524 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2524 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2524 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2524 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 16:00:09
maxLH = 20278.6, NDF = 20361, maxLH/NDF = 0.995951

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=120.01 K, E=9.26 keV, B=~1500(G)/259.52(A), Tr/Sa=15.02/5.00 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.16393 -0.00081 0.00080
2 Sigma 0.0771 -0.0053 0.0050 0 none
3 Ph -152.46 -0.57 0.56
4 Field 1513.117 -0.031 0.031
# L
5 RelPh_L 0 0 none
6 N0_L 263.73 -0.30 0.30
7 N_bkg_L 4.689 -0.039 0.038
# T
8 RelPh_T -89.47 -0.69 0.69
9 N0_T 269.40 -0.30 0.30
10 N_bkg_T 4.741 -0.039 0.039
# R
11 RelPh_R 181.18 -0.69 0.69
12 alpha_LR 1.0054 -0.0016 0.0016
13 N_bkg_R 4.991 -0.039 0.039
# B
14 RelPh_B 91.51 -0.71 0.71
15 alpha_TB 0.9437 -0.0015 0.0015
16 N_bkg_B 4.576 -0.038 0.038
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2525 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2525 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2525 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2525 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 16:11:03
maxLH = 20462.3, NDF = 20361, maxLH/NDF = 1.004973

View File

@ -0,0 +1,96 @@
YBCO-40nm, T=120.00 K, E=6.77 keV, B=~1500(G)/259.53(A), Tr/Sa=15.02/7.50 kV, SR=-10.00
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Asy 0.15957 -0.00081 0.00081
2 Sigma 0.0741 -0.0057 0.0053 0 none
3 Ph -151.80 -0.58 0.58
4 Field 1513.059 -0.031 0.031
# L
5 RelPh_L 0 0 none
6 N0_L 263.18 -0.30 0.30
7 N_bkg_L 4.709 -0.038 0.039
# T
8 RelPh_T -90.14 -0.71 0.71
9 N0_T 269.04 -0.30 0.30
10 N_bkg_T 4.836 -0.039 0.039
# R
11 RelPh_R 180.64 -0.71 0.71
12 alpha_LR 1.0099 -0.0016 0.0016
13 N_bkg_R 5.117 -0.039 0.039
# B
14 RelPh_B 90.77 -0.72 0.73
15 alpha_TB 0.9449 -0.0015 0.0015
16 N_bkg_B 4.699 -0.038 0.038
###############################################################
THEORY
asymmetry 1
simpleGss 2 (rate)
TFieldCos fun1 fun2 (phase frequency)
###############################################################
FUNCTIONS
fun1 = par3 + map1
fun2 = gamma_mu * par4
fun3 = par6 * par12
fun4 = par9 * par15
###############################################################
GLOBAL
fittype 0 (single histogram fit)
fit 0.05 10
data 2500 66500 2500 66500
packing 10
###############################################################
RUN 2017/lem17_his_2526 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 5 0 0 0 0 0 0 0 0 0
forward 1 5
norm 6
backgr.fit 7
#-----------------------------------------------
RUN 2017/lem17_his_2526 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 8 0 0 0 0 0 0 0 0 0
forward 2 6
norm 9
backgr.fit 10
#-----------------------------------------------
RUN 2017/lem17_his_2526 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 11 0 0 0 0 0 0 0 0 0
forward 3 7
norm fun3
backgr.fit 13
#-----------------------------------------------
RUN 2017/lem17_his_2526 MUE4 PSI MUSR-ROOT (name beamline institute data-file-format)
map 14 0 0 0 0 0 0 0 0 0
forward 4 8
norm fun4
backgr.fit 16
###############################################################
COMMANDS
MAX_LIKELIHOOD
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2 3 4
range 0 10 -0.25 0.25
view_packing 25
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 13
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
range 0 5000
###############################################################
STATISTIC --- 2017-08-04 16:30:13
maxLH = 20674.9, NDF = 20361, maxLH/NDF = 1.015416

Some files were not shown because too many files have changed in this diff Show More