merged root6
This commit is contained in:
commit
8b416b45e0
5
AUTHORS
5
AUTHORS
@ -1,7 +1,5 @@
|
||||
#---------------------------------------------------------------------
|
||||
# AUTHORS
|
||||
# Andreas Suter, 2009/06/21
|
||||
# $Id: AUTHORS 4013 2009-06-21
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
Andreas Suter <andreas.suter@psi.ch>
|
||||
@ -10,6 +8,9 @@ Andreas Suter <andreas.suter@psi.ch>
|
||||
Bastian M. Wojek
|
||||
msr2data; initial testing; full initial documentation; BMWlibs;
|
||||
|
||||
Zaher Salman <zaher.salman@psi.ch>
|
||||
beta-NMR and web-interface
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# this is the end ...
|
||||
#---------------------------------------------------------------------
|
||||
|
@ -1,7 +1,7 @@
|
||||
# - musrfit --- DKS -----------------------------------------------------------
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
cmake_minimum_required(VERSION 3.9)
|
||||
|
||||
project(musrfit VERSION 1.4.3 LANGUAGES C CXX)
|
||||
project(musrfit VERSION 1.5.1 LANGUAGES C CXX)
|
||||
|
||||
#--- musrfit specific options -------------------------------------------------
|
||||
option(dks "build musrfit with DKS (GPU/MIC) support" ON)
|
||||
@ -68,7 +68,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
find_package(Git REQUIRED)
|
||||
|
||||
#--- check for ROOT -----------------------------------------------------------
|
||||
find_package(ROOT 6.06 REQUIRED COMPONENTS Gui MathMore Minuit2 XMLParser)
|
||||
find_package(ROOT 6.16 REQUIRED COMPONENTS Gui MathMore Minuit2 XMLParser)
|
||||
if (ROOT_mathmore_FOUND)
|
||||
execute_process(COMMAND root-config --bindir OUTPUT_VARIABLE ROOT_BINDIR)
|
||||
string(STRIP ${ROOT_BINDIR} ROOT_BINDIR)
|
||||
@ -205,8 +205,7 @@ endif (qt_based_tools)
|
||||
#--- if NeXus check also for HDF4, HDF5, and MXML -----------------------------
|
||||
if (nexus)
|
||||
find_package(HDF5 COMPONENTS CXX REQUIRED )
|
||||
#//as35 - STILL NEEDED?? -> find_package(HDF4 REQUIRED)
|
||||
find_package(MXML REQUIRED)
|
||||
#//as35 find_package(HDF4 REQUIRED)
|
||||
find_package(NeXus REQUIRED)
|
||||
add_definitions(-DPNEXUS_ENABLED)
|
||||
endif (nexus)
|
||||
@ -266,7 +265,6 @@ if (NOT CUDA_FOUND AND NOT OpenCL_FOUND AND NOT DKS_FOUND)
|
||||
message(" **WARNING** configured without DKS support! DKS, CUDA, OpenCL not found?")
|
||||
endif (NOT CUDA_FOUND AND NOT OpenCL_FOUND AND NOT DKS_FOUND)
|
||||
|
||||
|
||||
if (nexus)
|
||||
message("")
|
||||
#//as35 message(" HDF4 found in ${HDF4_INCLUDE_DIRS}")
|
||||
@ -358,4 +356,20 @@ message("")
|
||||
message("-------------------------------------------------------------------------")
|
||||
message("")
|
||||
|
||||
#--- cpack specific info ......................................................
|
||||
file(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR} PROJECT_SOURCE_DIR_NATIVE)
|
||||
file(TO_NATIVE_PATH ${PROJECT_BINARY_DIR} PROJECT_BINARY_DIR_NATIVE)
|
||||
string(REPLACE "\\" "\\\\" PROJECT_SOURCE_DIR_NATIVE_D ${PROJECT_SOURCE_DIR_NATIVE})
|
||||
string(REPLACE "\\" "\\\\" PROJECT_BINARY_DIR_NATIVE_D ${PROJECT_BINARY_DIR_NATIVE})
|
||||
|
||||
configure_file(${CMAKE_SOURCE_DIR}/cmake/CPackOptions.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/CPackOptions.cmake @ONLY)
|
||||
set (CPACK_PROJECT_CONFIG_FILE "${PROJECT_BINARY_DIR}/CPackOptions.cmake")
|
||||
#set (CPACK_GENERATOR TGZ) # not use ZIP on UNIX as problem with symlinks
|
||||
#set (CPACK_SOURCE_GENERATOR TGZ) # not use ZIP on UNIX as problem with symlinks
|
||||
if (UNIX)
|
||||
set (CPACK_GENERATOR ${CPACK_GENERATOR};RPM)
|
||||
endif ()
|
||||
# Include of CPack must always be last
|
||||
include(CPack)
|
||||
|
||||
#--- end ----------------------------------------------------------------------
|
||||
|
@ -2,7 +2,9 @@
|
||||
# ChangeLog
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
rather than updating this document, the changes can be followed here:
|
||||
The ChangeLog will describe feature changes rather than coding detail changes.
|
||||
|
||||
For detailed information about changes have a look here:
|
||||
|
||||
https://gitlab.psi.ch/nemu/musrfit/activity
|
||||
|
||||
@ -10,6 +12,11 @@ or
|
||||
|
||||
https://bitbucket.org/muonspin/musrfit/commits/all
|
||||
|
||||
Release of V1.5.0, 2019/05/15
|
||||
=============================
|
||||
|
||||
Added beta-NMR support (thanks to Zaher Salman).
|
||||
|
||||
Release of V1.4.2, 2019/03/08
|
||||
=============================
|
||||
|
||||
|
12
INSTALL
12
INSTALL
@ -21,8 +21,7 @@ directory and
|
||||
make install (as superuser -- maybe)
|
||||
/sbin/ldconfig (as superuser)
|
||||
|
||||
cmake configuration allows a couple of switches. For details check the user
|
||||
docu under
|
||||
cmake configuration allows a couple of switches. For details check the documentation at
|
||||
|
||||
http://lmu.web.psi.ch/musrfit/user/MUSR/MusrFitSetup.html
|
||||
|
||||
@ -35,15 +34,16 @@ An example with NeXus support and BMWlibs needed would look like this
|
||||
make install (as superuser -- maybe)
|
||||
/sbin/ldconfig (as superuser)
|
||||
|
||||
In the optimal case, everything is set up ;-)
|
||||
In the optimal case everything is ready to be used ;-)
|
||||
|
||||
#----------------------------------
|
||||
# Link to the docu
|
||||
# Link to the documentation
|
||||
#----------------------------------
|
||||
|
||||
More information about the software requirements and the installation can be found at:
|
||||
More information regarding software requirements and the installation process
|
||||
can be found here:
|
||||
|
||||
http://lmu.web.psi.ch/musrfit/user/MUSR/MusrFitSetup.html
|
||||
http://lmu.web.psi.ch/musrfit/user/MUSR/MusrFitSetup.html
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# this is the end ...
|
||||
|
36
README
36
README
@ -1,35 +1,43 @@
|
||||
README
|
||||
------
|
||||
|
||||
musrfit - muSR data analysis package
|
||||
musrfit - muSR and beta-NMR data analysis package
|
||||
|
||||
Contents
|
||||
--------
|
||||
|
||||
This is a data analysis package to analyze time differential muSR and beta-NMR data.
|
||||
Currently it allows the following things:
|
||||
Currently it allows the following:
|
||||
|
||||
* setting up most commonly used fitting functions for muSR and beta-NMR
|
||||
* fitting data, including global fits
|
||||
* showing the fit results and the residuals
|
||||
* showing the Fourier transform of the data
|
||||
* extracting easily the fitting parameters to be used in other programs (gnuplot, qtiplot/origin, ...)
|
||||
* allows to generate fitting input files for follow-up runs
|
||||
* allows to generate global fitting input files based on a single run template
|
||||
* allows to implement more sophisticated user functions
|
||||
* set up most commonly used fitting functions for muSR and beta-NMR
|
||||
* fit data, including global fits
|
||||
* show the fit results and the residuals
|
||||
* show the Fourier transform of the data
|
||||
* easily extract the fit parameters and import in other programs (gnuplot, qtiplot/origin, ...)
|
||||
* generate input fitting files for follow-up runs
|
||||
* generate global input fitting files based on a single run template
|
||||
* implement more sophisticated user functions
|
||||
(e.g. GL vortex lattice, Meissner screening including low-energy muon stopping profiles)
|
||||
|
||||
Currently supported platforms:
|
||||
Currently supported platforms
|
||||
-----------------------------
|
||||
|
||||
* Linux
|
||||
* Mac OS X
|
||||
* Windows - not really, only for the very brave ones
|
||||
* Windows 10 1809 or newer - current state is for the commited ones
|
||||
* Web based implementation - http://musruser.psi.ch/cgi-bin/musrfit.cgi
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
For a more exhaustive user documentation see:
|
||||
|
||||
http://lmu.web.psi.ch/musrfit/user/html/index.html
|
||||
|
||||
Contact
|
||||
Contacts
|
||||
|
||||
<andreas.suter@psi.ch>
|
||||
<andreas.suter@psi.ch>
|
||||
|
||||
For the beta-NMR related parts, please contact
|
||||
|
||||
<zaher.salman@psi.ch>
|
||||
|
31
README.md
31
README.md
@ -1,25 +1,26 @@
|
||||
# musrfit - muSR data analysis package #
|
||||
# musrfit - muSR and beta-NMR data analysis package #
|
||||
|
||||
### Contents ###
|
||||
|
||||
This is a data analysis package to analyze time differential muSR and beta-NMR data.
|
||||
Currently it allows the following things:
|
||||
This is a data analysis package to analyze time differential muSR and beta-NMR data.
|
||||
Currently it allows the following:
|
||||
|
||||
* setting up most commonly used fitting functions for muSR and beta-NMR
|
||||
* fitting data, including global fits
|
||||
* showing the fit results and the residuals
|
||||
* showing the Fourier transform of the data
|
||||
* extracting easily the fitting parameters to be used in other programs (gnuplot, qtiplot/origin, ...)
|
||||
* allows to generate fitting input files for follow-up runs
|
||||
* allows to generate global fitting input files based on a single run template
|
||||
* allows to implement more sophisticated user functions
|
||||
* set up most commonly used fitting functions for muSR and beta-NMR
|
||||
* fit data, including global fits
|
||||
* show the fit results and the residuals
|
||||
* show the Fourier transform of the data
|
||||
* easily extract the fit parameters and import in other programs (gnuplot, qtiplot/origin, ...)
|
||||
* generate input fitting files for follow-up runs
|
||||
* generate global input fitting files based on a single run template
|
||||
* implement more sophisticated user functions
|
||||
(e.g. GL vortex lattice, Meissner screening including low-energy muon stopping profiles)
|
||||
|
||||
### Currently supported platforms: ###
|
||||
|
||||
* Linux
|
||||
* Mac OS X
|
||||
* Windows - not really, only for the very brave ones
|
||||
* Windows 10 1809 or newer - current state is for the commited ones
|
||||
* Web based implementation - http://musruser.psi.ch/cgi-bin/musrfit.cgi
|
||||
|
||||
### Documentation ####
|
||||
|
||||
@ -27,7 +28,11 @@ For a more exhaustive user documentation see:
|
||||
|
||||
http://lmu.web.psi.ch/musrfit/user/html/index.html
|
||||
|
||||
### Contact ###
|
||||
### Contacts ###
|
||||
|
||||
<andreas.suter@psi.ch>
|
||||
|
||||
For the beta-NMR related parts, please contact
|
||||
|
||||
<zaher.salman@psi.ch>
|
||||
|
||||
|
43
cmake/CPackOptions.cmake.in
Normal file
43
cmake/CPackOptions.cmake.in
Normal file
@ -0,0 +1,43 @@
|
||||
# musrfit - cpack
|
||||
|
||||
include(CPackComponent)
|
||||
|
||||
set (CPACK_PACKAGE_NAME "musrfit-root6")
|
||||
set (CPACK_PACKAGE_VENDOR "Paul Scherrer Institute - LMU - LEM")
|
||||
set (CPACK_PACKAGE_DIRECTOR "@CMAKE_CURRENT_BINARY_DIR@/pack")
|
||||
set (CPACK_PACKAGE_VERSION_MAJOR "@PROJECT_VERSION_MAJOR@")
|
||||
set (CPACK_PACKAGE_VERSION_MINOR "@PROJECT_VERSION_MINOR@")
|
||||
set (CPACK_PACKAGE_VERSION_PATCH "@PROJECT_VERSION_PATCH@")
|
||||
set (CPACK_PACKAGE_CONTACT "<andreas.suter@psi.ch>")
|
||||
set (CPACK_PACKAGE_DESCRIPTION_FILE "@PROJECT_SOURCE_DIR@/README.md")
|
||||
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "musrfit - muSR data analysis package")
|
||||
set (CPACK_PACKAGE_HOMEPAGE_URL "http://lmu.web.psi.ch/musrfit/user/html/index.html")
|
||||
set (CPACK_PACKAGE_CHECKSUM "MD5")
|
||||
set (CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING")
|
||||
set (CPACK_RESOURCE_FILE_README "@PROJECT_SOURCE_DIR@/README.md")
|
||||
set (CPACK_RESOURCE_FILE_WELCOME "@PROJECT_SOURCE_DIR@/cmake/welcome.txt")
|
||||
|
||||
set (CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "@CMAKE_INSTALL_PREFIX@;@CMAKE_INSTALL_PREFIX@/bin;@CMAKE_INSTALL_PREFIX@/include;@CMAKE_INSTALL_PREFIX@/share;@CMAKE_INSTALL_PREFIX@/lib64;@CMAKE_INSTALL_PREFIX@/lib;@CMAKE_INSTALL_PREFIX@/pkgconfig")
|
||||
|
||||
# we do not have any absolute paths, so do not need DESTDIR
|
||||
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_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
|
||||
set (CPACK_RPM_PACKAGE_RELEASE_DIST "")
|
||||
set (CPACK_RPM_PACKAGE_LICENSE "GPLv2")
|
||||
set (CPACK_RPM_PACKAGE_VENDOR "Paul Scherrer Institute - LMU - LEM")
|
||||
set (CPACK_RPM_CHANGELOG_FILE "@PROJECT_SOURCE_DIR@/cmake/ChangeLogRPM")
|
||||
set (CPACK_RPM_POST_INSTALL_SCRIPT_FILE "@PROJECT_SOURCE_DIR@/cmake/post_install.sh")
|
||||
set (CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "@PROJECT_SOURCE_DIR@/cmake/post_uninstall.sh")
|
||||
endif ()
|
||||
|
||||
if (${CPACK_GENERATOR} STREQUAL "DEB")
|
||||
# to be populated yet
|
||||
endif ()
|
4
cmake/ChangeLogRPM
Normal file
4
cmake/ChangeLogRPM
Normal file
@ -0,0 +1,4 @@
|
||||
* Mon Mar 11 2019 Andreas Suter <andreas.suter@psi.ch> - 1.4.2-2
|
||||
- minor version update
|
||||
* Mon Jan 14 2019 Andreas Suter <andreas.suter@psi.ch> - 1.4.0-1
|
||||
- first cpack/cmake version
|
101
cmake/musrfit-root6.spec.in
Normal file
101
cmake/musrfit-root6.spec.in
Normal file
@ -0,0 +1,101 @@
|
||||
Name: musrfit-root6
|
||||
Version: 1.4
|
||||
Release: 1%{?dist}
|
||||
Summary: musrfit - muSR data analysis package
|
||||
|
||||
License: GPLv2
|
||||
URL: http://lmu.web.psi.ch/musrfit/user/html/index.html
|
||||
Source0: https://gitlab.psi.ch/nemu/musrfit/repository/%{name}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: libtool
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
BuildRequires: hdf-devel hdf5-devel
|
||||
BuildRequires: mxml-devel
|
||||
BuildRequires: fftw3-devel
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: gsl-devel
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: root
|
||||
BuildRequires: root-io-xml
|
||||
BuildRequires: root-mathmore
|
||||
BuildRequires: root-minuit2
|
||||
BuildRequires: qt5-qtbase-devel qt5-qtsvg-devel qt5-qtwebkit-devel
|
||||
BuildRequires: nexus
|
||||
Requires: hdf hdf5
|
||||
Requires: mxml
|
||||
Requires: fftw3
|
||||
Requires: gsl
|
||||
Requires: boost-devel
|
||||
Requires: libxml2
|
||||
Requires: root
|
||||
Requires: root-io-xml
|
||||
Requires: root-mathmore
|
||||
Requires: root-minuit2
|
||||
Requires: qt5-qtbase qt5-qtsvg qt5-qtwebkit
|
||||
Requires: nexus
|
||||
|
||||
%description
|
||||
This is a data analysis package to analyze time differential muSR and beta-NMR data. Currently it allows the following things:
|
||||
- setting up most commonly used fitting functions for muSR and beta-NMR
|
||||
- fitting data, including global fits
|
||||
- showing the fit results and the residuals
|
||||
- showing the Fourier transform of the data
|
||||
- extracting easily the fitting parameters to be used in other programs (gnuplot, qtiplot/origin, ...)
|
||||
- allows to generate fitting input files for follow-up runs
|
||||
- allows to generate global fitting input files based on a single run template
|
||||
- allows to implement more sophisticated user functions (e.g. GL vortex lattice, Meissner screening including low-energy muon stopping profiles)
|
||||
|
||||
Currently supported platforms:
|
||||
- Linux
|
||||
- Mac OS X
|
||||
- Windows - not really, only for the very brave ones
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
|
||||
|
||||
%build
|
||||
##æs35 ./autogen.sh
|
||||
# DOCDIR is needed to be set here. BMWlibs still makes troubles
|
||||
%cmake -DASlibs=1 -DBMWlbis=1 -Dnexus=1 DOCDIR=$RPM_BUILD_ROOT/usr/share/doc/musrfit
|
||||
%cmake --build ./ --clean-first -- -j8
|
||||
##æs35 %configure --enable-ASlibs --enable-BMWlibs --enable-NeXus DOCDIR=$RPM_BUILD_ROOT/usr/share/doc/musrfit
|
||||
##æs35 %make_build
|
||||
|
||||
|
||||
%install
|
||||
# INSTALL_ROOT is needed for Qt applications
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%make_install INSTALL_ROOT=%{buildroot}
|
||||
|
||||
%files
|
||||
%_prefix/bin/any2many
|
||||
%_prefix/bin/dump_header
|
||||
%_prefix/bin/msr2data
|
||||
%_prefix/bin/msr2msr
|
||||
%_prefix/bin/mupp
|
||||
%_prefix/bin/mupp_plot
|
||||
%_prefix/bin/musredit
|
||||
%_prefix/bin/musrfit
|
||||
%_prefix/bin/musrFT
|
||||
%_prefix/bin/musrRootValidation
|
||||
%_prefix/bin/musrStep
|
||||
%_prefix/bin/musrt0
|
||||
%_prefix/bin/musrview
|
||||
%_prefix/bin/musrWiz
|
||||
%_prefix/bin/write_musrRoot_runHeader
|
||||
%_prefix/include/*
|
||||
%_prefix/lib64/*
|
||||
%license COPYING
|
||||
%doc %_prefix/share/doc/musrfit
|
||||
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Dec 20 2018 Andreas Suter <andreas.suter@psi.ch> - 1.4-1
|
||||
- adopted to cmake
|
||||
* Wed Oct 25 2017 Andreas Suter <andreas.suter@psi.ch> - 1.2-1
|
||||
- first spec file for musrfit-root6
|
12
cmake/post_install.sh
Normal file
12
cmake/post_install.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo " >> musrfit post install script started ..."
|
||||
|
||||
# test if nemu-x86_64.conf does not exist
|
||||
if [ ! -f "/etc/ld.so.conf.d/nemu-x86_64.conf" ]
|
||||
then
|
||||
echo "/usr/local/lib" >> /etc/ld.so.conf.d/nemu-x86_64.conf
|
||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/nemu-x86_64.conf
|
||||
fi
|
||||
/sbin/ldconfig
|
||||
|
5
cmake/post_uninstall.sh
Normal file
5
cmake/post_uninstall.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo " >> musrfit post uninstall script started ..."
|
||||
|
||||
/sbin/ldconfig
|
1
cmake/welcome.txt
Normal file
1
cmake/welcome.txt
Normal file
@ -0,0 +1 @@
|
||||
Welcome to the musrfit package
|
@ -1,21 +1,20 @@
|
||||
|
||||
# Run Numbers: 1111
|
||||
LaAlO3, SLR, 30G, 150K, Bias=23 kV, Ix=0A, Iy=+3A, aligned, beam on=1s
|
||||
###############################################################
|
||||
FITPARAMETER
|
||||
###############################################################
|
||||
# No Name Value Err Min Max
|
||||
1 Alpha 1.11587 0.00038 none
|
||||
2 Asy 0.0570 0.0011 none
|
||||
1 Alpha 1.11592 0.00035 none
|
||||
2 Asy 0.05868 0.00091 none 0 0.2
|
||||
3 T 1 0 none
|
||||
4 Rlx 1.015 0.023 none
|
||||
4 Rlx 1.142 0.023 none 0 15000
|
||||
5 One 1 0 none
|
||||
6 Bet -1.052 0.027 none
|
||||
6 FlHel -1.048 0.022 none -2 0
|
||||
|
||||
###############################################################
|
||||
THEORY
|
||||
###############################################################
|
||||
asymmetry fun1
|
||||
userFcn .libs/libBNMR.so ExpRlx 3 4
|
||||
userFcn libBNMR.so ExpRlx 3 4
|
||||
|
||||
###############################################################
|
||||
FUNCTIONS
|
||||
@ -28,12 +27,11 @@ fittype 2 (asymmetry fit)
|
||||
alpha 1
|
||||
forward 3
|
||||
backward 4
|
||||
data 11 800 11 800
|
||||
#backgr.fix 0
|
||||
data 11 910 11 910
|
||||
background 1 9 1 9 # estimated bkg: 8.0000 / 9.6250
|
||||
t0 10.0 10.0
|
||||
map 2 5 0 0 0 0 0 0 0 0
|
||||
fit 0.5 8
|
||||
fit 0.2 9
|
||||
packing 5
|
||||
|
||||
RUN 045674 BNMR TRIUMF MUD (name beamline institute data-file-format)
|
||||
@ -41,15 +39,13 @@ fittype 2 (asymmetry fit)
|
||||
alpha 1
|
||||
forward 5
|
||||
backward 6
|
||||
data 11 800 11 800
|
||||
#backgr.fix 0
|
||||
data 11 910 11 910
|
||||
background 1 9 1 9 # estimated bkg: 11.6250 / 15.6250
|
||||
t0 10.0 10.0
|
||||
map 2 6 0 0 0 0 0 0 0 0
|
||||
fit 0.5 8
|
||||
fit 0.2 9
|
||||
packing 5
|
||||
|
||||
|
||||
###############################################################
|
||||
COMMANDS
|
||||
MINIMIZE
|
||||
@ -68,9 +64,9 @@ FOURIER
|
||||
units MHz # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
|
||||
fourier_power 12
|
||||
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
|
||||
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE
|
||||
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
|
||||
phase 8
|
||||
#range FRQMIN FRQMAX
|
||||
###############################################################
|
||||
STATISTIC --- 2015-04-14 11:00:19
|
||||
chisq = 399.5, NDF = 290, chisq/NDF = 1.377736
|
||||
STATISTIC --- 2019-05-03 17:05:58
|
||||
chisq = 566.6, NDF = 346, chisq/NDF = 1.637584
|
53
doc/examples/BNMRlibs/test-ExpRlx.msr
Normal file
53
doc/examples/BNMRlibs/test-ExpRlx.msr
Normal file
@ -0,0 +1,53 @@
|
||||
LaAlO3, SLR, 30G, 150K, Bias=23 kV, Ix=0A, Iy=+3A, aligned, beam on=1s
|
||||
###############################################################
|
||||
FITPARAMETER
|
||||
###############################################################
|
||||
# No Name Value Err Min Max
|
||||
1 Alpha 1 0 none
|
||||
2 Asy 0.05992 0.00063 none 0 0.2
|
||||
3 T 1 0 none
|
||||
4 Rlx 1.143 0.023 none 0 100
|
||||
|
||||
###############################################################
|
||||
THEORY
|
||||
###############################################################
|
||||
asymmetry 2
|
||||
userFcn libBNMR ExpRlx 3 4
|
||||
|
||||
###############################################################
|
||||
RUN 045674 BNMR TRIUMF MUD (name beamline institute data-file-format)
|
||||
fittype 5 (beta-NMR fit)
|
||||
alpha 1
|
||||
forward 3 5
|
||||
backward 4 6
|
||||
data 11 910 11 910
|
||||
background 1 9 1 9 # estimated bkg: 8.0000 / 9.6250
|
||||
t0 10.0 10.0 10.0 10.0
|
||||
map 0 0 0 0 0 0 0 0 0 0
|
||||
fit 0.2 9
|
||||
packing 5
|
||||
|
||||
###############################################################
|
||||
COMMANDS
|
||||
MINIMIZE
|
||||
HESSE
|
||||
SAVE
|
||||
|
||||
###############################################################
|
||||
PLOT 5 (beta-NMR asymmetry plot)
|
||||
runs 1
|
||||
use_fit_ranges
|
||||
view_packing 10
|
||||
|
||||
|
||||
###############################################################
|
||||
FOURIER
|
||||
units MHz # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
|
||||
fourier_power 12
|
||||
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
|
||||
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
|
||||
phase 8
|
||||
#range FRQMIN FRQMAX
|
||||
###############################################################
|
||||
STATISTIC --- 2019-05-03 17:06:29
|
||||
chisq = 419.1, NDF = 173, chisq/NDF = 2.422357
|
73
doc/examples/BNMRlibs/test-SExpRlx-hel.msr
Normal file
73
doc/examples/BNMRlibs/test-SExpRlx-hel.msr
Normal file
@ -0,0 +1,73 @@
|
||||
LaAlO3, SLR, 30G, 150K, Bias=23 kV, Ix=0A, Iy=+3A, aligned, beam on=1s
|
||||
###############################################################
|
||||
FITPARAMETER
|
||||
###############################################################
|
||||
# No Name Value Err Min Max
|
||||
1 Alpha 1.11589 0.00037 none
|
||||
2 Asy 0.1121 0.0094 none 0 0.2
|
||||
3 T 1 0 none
|
||||
4 Rlx 4.12 0.87 none 0 15000
|
||||
5 Beta 0.434 0.031 none 0.3 2
|
||||
6 One 1 0 none
|
||||
7 FlHel -1.048 0.023 none -2 0
|
||||
|
||||
###############################################################
|
||||
THEORY
|
||||
###############################################################
|
||||
asymmetry fun1
|
||||
userFcn libBNMR SExpRlx 3 4 5
|
||||
|
||||
###############################################################
|
||||
FUNCTIONS
|
||||
###############################################################
|
||||
fun1 = 0.5 * map1 * map2
|
||||
|
||||
###############################################################
|
||||
RUN 045674 BNMR TRIUMF MUD (name beamline institute data-file-format)
|
||||
fittype 2 (asymmetry fit)
|
||||
alpha 1
|
||||
forward 3
|
||||
backward 4
|
||||
data 11 1000 11 1000
|
||||
background 1 9 1 9 # estimated bkg: 8.0000 / 9.6250
|
||||
t0 10.0 10.0
|
||||
map 2 6 0 0 0 0 0 0 0 0
|
||||
fit 0.2 9
|
||||
packing 5
|
||||
|
||||
RUN 045674 BNMR TRIUMF MUD (name beamline institute data-file-format)
|
||||
fittype 2 (asymmetry fit)
|
||||
alpha 1
|
||||
forward 5
|
||||
backward 6
|
||||
data 11 1000 11 1000
|
||||
background 1 9 1 9 # estimated bkg: 11.6250 / 15.6250
|
||||
t0 10.0 10.0
|
||||
map 2 7 0 0 0 0 0 0 0 0
|
||||
fit 0.2 9
|
||||
packing 5
|
||||
|
||||
###############################################################
|
||||
COMMANDS
|
||||
MINIMIZE
|
||||
HESSE
|
||||
SAVE
|
||||
|
||||
###############################################################
|
||||
PLOT 2 (asymmetry plot)
|
||||
runs 1 2
|
||||
use_fit_ranges
|
||||
view_packing 10
|
||||
|
||||
|
||||
###############################################################
|
||||
FOURIER
|
||||
units MHz # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
|
||||
fourier_power 12
|
||||
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
|
||||
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
|
||||
phase 8
|
||||
#range FRQMIN FRQMAX
|
||||
###############################################################
|
||||
STATISTIC --- 2019-05-01 11:29:06
|
||||
chisq = 358.6, NDF = 345, chisq/NDF = 1.039300
|
54
doc/examples/BNMRlibs/test-SExpRlx.msr
Normal file
54
doc/examples/BNMRlibs/test-SExpRlx.msr
Normal file
@ -0,0 +1,54 @@
|
||||
LaAlO3, SLR, 30G, 150K, Bias=23 kV, Ix=0A, Iy=+3A, aligned, beam on=1s
|
||||
###############################################################
|
||||
FITPARAMETER
|
||||
###############################################################
|
||||
# No Name Value Err Min Max
|
||||
1 Alpha 0.9 1.0 none
|
||||
2 Asy 0.115 0.012 none 0 0.2
|
||||
3 T 1 0 none
|
||||
4 Rlx 4.16 0.88 none 0 100
|
||||
5 Beta 0.433 0.031 none 0.3 2
|
||||
|
||||
###############################################################
|
||||
THEORY
|
||||
###############################################################
|
||||
asymmetry 2
|
||||
userFcn libBNMR SExpRlx 3 4 5
|
||||
|
||||
###############################################################
|
||||
RUN 045674 BNMR TRIUMF MUD (name beamline institute data-file-format)
|
||||
fittype 5 (beta-NMR fit)
|
||||
alpha 1
|
||||
forward 3 5
|
||||
backward 4 6
|
||||
data 11 910 11 910
|
||||
background 1 9 1 9 # estimated bkg: 8.0000 / 9.6250
|
||||
t0 10.0 10.0 10.0 10.0
|
||||
map 0 0 0 0 0 0 0 0 0 0
|
||||
fit 0.2 9
|
||||
packing 5
|
||||
|
||||
###############################################################
|
||||
COMMANDS
|
||||
MINIMIZE
|
||||
HESSE
|
||||
SAVE
|
||||
|
||||
###############################################################
|
||||
PLOT 5 (beta-NMR asymmetry plot)
|
||||
runs 1
|
||||
use_fit_ranges
|
||||
view_packing 10
|
||||
|
||||
|
||||
###############################################################
|
||||
FOURIER
|
||||
units MHz # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
|
||||
fourier_power 12
|
||||
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
|
||||
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
|
||||
phase 8
|
||||
#range FRQMIN FRQMAX
|
||||
###############################################################
|
||||
STATISTIC --- 2019-05-03 17:07:01
|
||||
chisq = 210.2, NDF = 171, chisq/NDF = 1.229344
|
@ -55,11 +55,11 @@ SAVE
|
||||
###############################################################
|
||||
FOURIER
|
||||
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
|
||||
fourier_power 10
|
||||
fourier_power 11
|
||||
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
|
||||
plot REAL # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
|
||||
range 0 200
|
||||
phase par2
|
||||
phase parR2 par11
|
||||
|
||||
###############################################################
|
||||
PLOT 0 (single histo plot)
|
||||
@ -69,5 +69,5 @@ range 0 14 -0.22 0.22
|
||||
view_packing 2
|
||||
|
||||
###############################################################
|
||||
STATISTIC --- 2017-08-17 13:47:22
|
||||
STATISTIC --- 2019-03-12 18:08:05
|
||||
maxLH = 2585.1, NDF = 1696, maxLH/NDF = 1.524236
|
||||
|
@ -1,4 +1,8 @@
|
||||
# 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.
|
||||
<<<<<<< HEAD
|
||||
config: 39df8dc76b5eba2fef9a1560a07e9143
|
||||
=======
|
||||
config: b0f54e143f8f1d163af95476812112f7
|
||||
>>>>>>> root6
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
|
@ -13,4 +13,10 @@ Acknowledgements
|
||||
|
||||
**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!
|
||||
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``!
|
||||
|
@ -57,7 +57,7 @@ Additionally, *only* if ``musrfit`` should support reading of data files in the
|
||||
.. index:: hdf4
|
||||
|
||||
**HDF4**
|
||||
A library and multi-object file format for storing and managing data (see `HDF4 <http://www.hdfgroup.org/products/hdf4/>`_). ``HDF4`` is "outdated" and its support will soon be dropped.
|
||||
A library and multi-object file format for storing and managing data (see `HDF4 <http://www.hdfgroup.org/products/hdf4/>`_). ``HDF4`` is "outdated" and its support will soon be dropped. The single only reason why it is still required is that ISIS is not able to cope to implement HDF5 V2 of the NeXus muon instrument specification which has been agreed in 2012!
|
||||
|
||||
.. index:: hdf5
|
||||
|
||||
@ -67,7 +67,8 @@ Additionally, *only* if ``musrfit`` should support reading of data files in the
|
||||
.. index:: minixml
|
||||
|
||||
**minixml**
|
||||
A small ``XML`` library that can be used to read and write ``XML`` and ``XML``-like data files. *Required version ≥ 2.2* (see `minixml <http://www.minixml.org/>`_).
|
||||
A small ``XML`` library that can be used to read and write ``XML`` and ``XML``-like data files. *Required version ≥ 2.2* (see `minixml <http://www.minixml.org/>`_).
|
||||
Currently the ``MXML`` support in ``NeXus`` is broken and hence you will **not** need to install ``minixml`` for the time being.
|
||||
|
||||
.. index:: nexus
|
||||
|
||||
@ -172,23 +173,20 @@ Installation of NeXus requirements (optional)
|
||||
|
||||
*Only* if ``musrfit`` should support reading/writing data files in the ``NeXus`` format the further required
|
||||
software has to be set up. The required libraries and header files could either be available through the user's
|
||||
GNU/Linux distribution or if this is not the case, the packages can be installed from the source code. The necessary
|
||||
packages to build ``NeXus`` are ``MXML``, (``HDF4``), and ``HDF5``. This means, for a rpm-package based distro try something like:
|
||||
GNU/Linux distribution or if this is not the case, the packages can be installed from the source code. In principle
|
||||
NeXus should support ``MXML``, ``HDF4``, and ``HDF5``. At the time of this writing, the ``MXML`` support in the
|
||||
NeXus project is broken, and ``HDF4`` is outdated on most platforms, yet since ISIS/RAL is still **not** up-to-date ``HDF4`` still
|
||||
needs to be dragged on (comment: if you are a ISIS user, please complain about ``HDF4``). Hence, the necessary packages to build ``NeXus`` are ``HDF4`` and ``HDF5``. This means, for a rpm-package based distro try something like:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ yum install mxml-devel hdf-devel hdf5-devel
|
||||
$ yum install hdf-devel hdf5-devel
|
||||
|
||||
and on a deb-package based distro try something like:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ apt-get install libmxml-dev libhdf4-dev libhdf5-dev
|
||||
|
||||
.. note::
|
||||
|
||||
``HDF4`` support within ``NeXus`` will be dropped by ``musrfit`` in the near future. If you *not* urgently need
|
||||
to read old ``ISIS NeXus`` files, you safely can drop it.
|
||||
$ apt-get install libhdf4-dev libhdf5-dev
|
||||
|
||||
**Only NeXus Version ≥ 4.4 is support!**
|
||||
|
||||
@ -208,10 +206,7 @@ A brief instruction how to get ``NeXus`` compiled from source (lines starting wi
|
||||
$ # next we will build NeXus out-of-source
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ # The next line only if HDF4 support is needed
|
||||
$ cmake -DENABLE_HDF5=1 -DENABLE_HDF4=1 -DENABLE_MXML=1 ../code
|
||||
$ # The next line if HDF4 support is NOT needed
|
||||
$ cmake -DENABLE_HDF5=1 -DENABLE_MXML=1 ../code
|
||||
$ cmake -DENABLE_HDF5=1 -DENABLE_HDF4=1 -DENABLE_MXML=0 ../code
|
||||
$ cmake --build ./ --clean-first
|
||||
$ # make install needs either to be carried out as root or sudo depending on your linux flavour.
|
||||
$ sudo make install
|
||||
@ -550,11 +545,7 @@ to be set up. Under ``Cygwin`` of all the required libraries only ``HDF5`` is av
|
||||
``libhdf5-devel`` can be installed through the ``Cygwin`` setup. One should also make sure that ``bison``, ``flex``
|
||||
and a package containing ``/usr/lib/librpc.a`` (*e.g.* ``sunrpc = 4.0-3``, but *not* ``sunrpc = 4.0-4``) are installed.
|
||||
|
||||
All other libraries have to be built from the sources. The following lines will track the installation of ``JPEG 6b``,
|
||||
``MXML 2.9``, ``HDF 4.2.7-patch1``, and ``NeXus 4.3.2``. The version numbers and source-code locations might of
|
||||
course change with time but should be easily adjustable.
|
||||
|
||||
*Only* ``NeXus`` version ≥ 4.4 is support!
|
||||
**Only NeXus Version ≥ 4.4 is support!**
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@ -567,18 +558,6 @@ course change with time but should be easily adjustable.
|
||||
$ make
|
||||
$ make install
|
||||
$ cd ..
|
||||
$ curl www.msweet.org/files/project3/mxml-2.9.tar.gz -G | tar xz
|
||||
$ cd mxml-2.9
|
||||
$ ./configure --prefix=/usr/local --enable-static
|
||||
$ make
|
||||
$ make install
|
||||
$ cd ..
|
||||
$ curl http://www.hdfgroup.org/ftp/HDF/HDF_Current/src/hdf-4.2.7-patch1.tar.gz -G | tar xz
|
||||
$ cd hdf-4.2.7-patch1
|
||||
$ ./configure --prefix=/usr/local --enable-static --disable-fortran --with-jpeg=/usr/local
|
||||
$ make
|
||||
$ make install
|
||||
$ cd ..
|
||||
$ # create a directory for the NeXus source code
|
||||
$ mkdir nexus
|
||||
$ cd nexus
|
||||
@ -587,7 +566,7 @@ course change with time but should be easily adjustable.
|
||||
$ # next we will build NeXus out-of-source
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ cmake -DENABLE_HDF5=1 -DENABLE_HDF4=1 -DENABLE_MXML=1 ../code
|
||||
$ cmake -DENABLE_HDF5=1 -DENABLE_HDF4=1 -DENABLE_MXML=0 ../code
|
||||
$ make
|
||||
$ make install
|
||||
|
||||
@ -876,21 +855,14 @@ Installation of NeXus requirements (optional)
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ sudo port -v install hdf4 hdf5
|
||||
$ sudo port -v install hdf5
|
||||
|
||||
Unfortunately, the ``minixml`` and ``NeXus`` libraries have to be compiled and installed directly from the source code.
|
||||
Given the respective version numbers of 2.9 and 4.4.2 (which are subject to change with time.
|
||||
Only ``NeXus`` Version ≥ 4.4 is support!) this can be achieved for example by:
|
||||
**Only NeXus Version ≥ 4.4 is support!**
|
||||
|
||||
To get things compiled do:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ # get and instal Mini-XML
|
||||
$ cd $HOME/Applications
|
||||
$ git clone https://github.com/michaelrsweet/mxml.git
|
||||
$ cd mxml
|
||||
$ ./configure --prefix=/usr/local
|
||||
$ make
|
||||
$ sudo make install
|
||||
$ # get and install NeXus
|
||||
$ cd $HOME/Applications
|
||||
$ # get the source code from the master repository
|
||||
@ -899,7 +871,7 @@ Only ``NeXus`` Version ≥ 4.4 is support!) this can be achieved for example by:
|
||||
$ cd nexus
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ cmake -DENABLE_HDF5=1 -DENABLE_HDF4=1 -DENABLE_MXML=1 ../code
|
||||
$ cmake -DENABLE_HDF5=1 -DENABLE_HDF4=1 -DENABLE_MXML=0 ../code
|
||||
$ make
|
||||
$ sudo make install
|
||||
|
||||
@ -1101,27 +1073,20 @@ packages can be installed through Fink (check for the most recent versions):
|
||||
|
||||
libjpeg hdf hdf5-cpp11 hdf5-cpp11-shlibs
|
||||
|
||||
Unfortunately, the ``minixml`` and ``NeXus`` libraries have to be compiled and installed directly from
|
||||
the source code. Given the respective version numbers of 2.9 and 4.3.2 (which are subject to change with time)
|
||||
Unfortunately, the ``NeXus`` libraries have to be compiled and installed directly from
|
||||
the source code. Given the respective version number 4.4 (which are subject to change with time)
|
||||
this can be achieved for example by:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ # first build Mini-XML
|
||||
$ cd $HOME/Applications
|
||||
$ git clone https://github.com/michaelrsweet/mxml.git
|
||||
$ cd mxml
|
||||
$ ./configure --prefix=/usr/local
|
||||
$ make
|
||||
$ sudo make install
|
||||
$ # second build NeXus
|
||||
$ # build NeXus
|
||||
$ cd ..
|
||||
$ git clone https://github.com/nexusformat/code.git nexus/code
|
||||
$ cd nexus
|
||||
$ # build NeXus out-of-source
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ cmake ../code -DENABLE_HDF4=1 -DENABLE_HDF5=1 -DENABLE_MXML=1
|
||||
$ cmake ../code -DENABLE_HDF5=1 -DENABLE_HDF4=1 -DENABLE_MXML=0
|
||||
$ cmake --build ./ --clean-first -- -j8
|
||||
$ sudo make install
|
||||
|
||||
|
@ -449,7 +449,7 @@ where :math:`\tau_{\mathrm{Li}}=1.21`\ s is the :math:`^8`\ Li lifetime.
|
||||
|
||||
Functions
|
||||
^^^^^^^^^^^^
|
||||
The ``libLineProfile`` library currently contains the following functions:
|
||||
The ``libBNMR`` library currently contains the following functions:
|
||||
|
||||
|
||||
|
||||
@ -464,10 +464,10 @@ The ``libLineProfile`` library currently contains the following functions:
|
||||
|
||||
The parameters are:
|
||||
|
||||
#. pulse length :math:`t_0` (ms)
|
||||
#. relaxation rate :math:`\sigma` (ms\ :math:`^{-1}`\ )
|
||||
#. pulse length :math:`t_0` (s)
|
||||
#. relaxation rate :math:`\lambda` (s\ :math:`^{-1}`\ )
|
||||
|
||||
This function implements :math:`f(t)=e^{-\sigma t}`.
|
||||
This function implements :math:`f(t)=e^{-\lambda t}`.
|
||||
|
||||
.. index:: SExpRlx
|
||||
|
||||
@ -479,11 +479,11 @@ This function implements :math:`f(t)=e^{-\sigma t}`.
|
||||
|
||||
The parameters are:
|
||||
|
||||
#. pulse length :math:`t_0` (ms)
|
||||
#. relaxation rate :math:`\sigma` (ms\ :math:`^{-1}`\ )
|
||||
#. pulse length :math:`t_0` (s)
|
||||
#. relaxation rate :math:`\lambda` (s\ :math:`^{-1}`\ )
|
||||
#. stretching exponent :math:`\beta`
|
||||
|
||||
This function implements :math:`f(t)=e^{-(\sigma t)^{\beta}}`.
|
||||
This function implements :math:`f(t)=e^{-(\lambda t)^{\beta}}`.
|
||||
|
||||
|
||||
|
||||
|
@ -855,7 +855,7 @@ Currently the supported GLOBAL block entries are:
|
||||
* ``rrf_freq`` for fittype 1, 3
|
||||
* ``rrf_packing`` for fittype 1, 3
|
||||
* ``rrf_phase`` for fittype 1, 3
|
||||
* ``packing`` for fittype 0, 2, 4
|
||||
* ``packing`` for fittype 0, 2, 4, 5
|
||||
|
||||
For a detailed discussion of these entries see the section :ref:`RUN block <msr-run-block>`.
|
||||
|
||||
@ -1049,6 +1049,8 @@ In order to describe the operations needed for fitting and plotting, quite some
|
||||
Asymmetry RRF Fit (only for online analysis)
|
||||
**4**
|
||||
MuMinus Fit. This is a single histogram fit especially for negative muon |mgr|\SR
|
||||
**5**
|
||||
beta-NMR Asymmetry Fit
|
||||
**8**
|
||||
Non-|mgr|\SR Fit
|
||||
|
||||
@ -1061,8 +1063,8 @@ In order to describe the operations needed for fitting and plotting, quite some
|
||||
.. index:: alpha-beta
|
||||
.. _msr-alpha-beta:
|
||||
|
||||
**alpha, beta** (fit type 2, 3)
|
||||
These parameters are used to correct the asymmetry for different detector efficiencies, solid angles and initial asymmetries. They are defined as :math:`\alpha = N_{0,b}/N_{0,f}` and :math:`\beta = A_{0,b}/A_{0,f}`. If the parameters are not specified in the :ref:`RUN block <msr-run-block>`, for each one the value of 1 is assumed. Example for alpha with fit parameter number 1:
|
||||
**alpha, beta** (fit type 2, 3, 5)
|
||||
These parameters are used to correct the asymmetry for different detector efficiencies, solid angles and initial asymmetries. They are defined as :math:`\alpha = N_{0,b}/N_{0,f}` and :math:`\beta = A_{0,b}/A_{0,f}`. If the parameters are not specified in the :ref:`RUN block <msr-run-block>`, for each one the value of 1 is assumed (for fittype 5, alpha is estimated from the ratio of :math:`\sum_i \left( N_{\mathrm{bp}}(i)+N_{\mathrm{bm}}(i) \right)` and :math:`\sum_i \left( N_{\mathrm{fp}}(i)+N_{\mathrm{fm}}(i) \right)`). Example for alpha with fit parameter number 1:
|
||||
|
||||
::
|
||||
|
||||
@ -1141,10 +1143,19 @@ In order to describe the operations needed for fitting and plotting, quite some
|
||||
forward 1-3
|
||||
backward 7-9
|
||||
|
||||
**forward, backward** (fit type 5)
|
||||
Numbers of the histograms in the data file that should be taken to calculate the asymmetry. Two forward and backward histograms should be given indicationg positive and negative helicities. The asymmetry from opposite helicities will be subtracted. Examples:
|
||||
|
||||
::
|
||||
|
||||
# build forward/backward asymmetry with histogram 1 and 3 then subtract asymmetry built with histograms 2 and 4
|
||||
forward 1 2
|
||||
backward 3 4
|
||||
|
||||
.. index:: backgr.fix
|
||||
.. _msr-backgr.fix:
|
||||
|
||||
**backgr.fix** (fit types 0, 1, 2, 3)
|
||||
**backgr.fix** (fit types 0, 1, 2, 3, 5)
|
||||
A fixed constant background in counts per nanosecond or per bin (see :ref:`below <msr-commands-block>`) may be given at this point.
|
||||
The background is specified for all histograms in the order :math:`B_f B_b [B_r B_l]`. If this keyword is present, *any* information on a ``background`` line is ignored.
|
||||
|
||||
@ -1162,7 +1173,7 @@ In order to describe the operations needed for fitting and plotting, quite some
|
||||
.. index:: background-asymmetry
|
||||
.. _msr-background-asymmetry:
|
||||
|
||||
**background** (fit types 2, 3)
|
||||
**background** (fit types 2, 3, 5)
|
||||
The numbers of the first and the last channel of an interval from which the constant background should be calculated are specified here.
|
||||
For all the histograms this is done together in the following order: :math:`k_{f,\rm first} k_{f,\rm last} k_{b,\rm first} k_{b, \rm last} [k_{r,\rm first} k_{r,\rm last} k_{l,\rm first} k_{l,\rm last}]`.
|
||||
In case histograms are being grouped, the specified channels are interpreted with respect to the first histograms. Example:
|
||||
@ -1186,7 +1197,7 @@ In order to describe the operations needed for fitting and plotting, quite some
|
||||
.. index:: data-asymmetry
|
||||
.. _msr-data-asymmetry:
|
||||
|
||||
**data** (fit type 2, 3)
|
||||
**data** (fit type 2, 3, 5)
|
||||
The numbers of the first and the last channel of an interval from which the data is taken are specified here.
|
||||
Typically these channels are referred to as first good bin / last good bin (fgb/lgb). For all the histograms this is
|
||||
done together in the following order: :math:`k_{f,\rm first} k_{f,\rm last} k_{b,\rm first} k_{b, \rm last} [k_{r,\rm first} k_{r,\rm last} k_{l,\rm first} k_{l,\rm last}]`.
|
||||
@ -1210,8 +1221,8 @@ In order to describe the operations needed for fitting and plotting, quite some
|
||||
.. index:: t0-asymmetry
|
||||
.. _msr-t0-asymmetry:
|
||||
|
||||
**t0** (fit type 2, 3)
|
||||
The numbers of time-zero channels of the histograms in the order :math:`t_{0,f} t_{0,b}`. Example:
|
||||
**t0** (fit type 2, 3, 5)
|
||||
The numbers of time-zero channels of the histograms in the order :math:`t_{0,f} t_{0,b}`. For fit type 5, the time-zero is the channel of the start of beam pulse. Example:
|
||||
|
||||
::
|
||||
|
||||
@ -1229,7 +1240,7 @@ In order to describe the operations needed for fitting and plotting, quite some
|
||||
.. index:: addt0-asymmetry
|
||||
.. _msr-addt0-asymmetry:
|
||||
|
||||
**addt0** (fit type 2, 3)
|
||||
**addt0** (fit type 2, 3, 5)
|
||||
The numbers of time-zero channels of the histograms in the order :math:`t_{0,f} t_{0,b} [t_{0,r} t_{0,l}]`.
|
||||
If grouping of histograms is present (see :ref:`forward <msr-forward-backward>`) the same syntax as for :ref:`t0 <msr-t0-asymmetry>` applies.
|
||||
If one addt0 is given, the total number of addt0's needs to be equal to the total number of :ref:`ADDRUN <msr-addrun>`\'s!
|
||||
@ -1851,6 +1862,56 @@ where :math:`i` runs over the different lifetime channels of :math:`\mu^{-}`, an
|
||||
|
||||
Since MuMinus is quite generic, the full functional depends has to be written in the :ref:`THEORY Block <msr-theory-block>`.
|
||||
|
||||
.. index:: bnmr-asymmetry-fit
|
||||
.. _bnmr-asymmetry-fit:
|
||||
|
||||
beta-NMR Asymmetry Fit (fit type 5)
|
||||
+++++++++++++++++++++++++++++++++++
|
||||
|
||||
Four histograms are needed for a beta-NMR asymmetry fit (fit type 5), two for positive helecity and two for negative. These are given by the :ref:`forward <msr-forward-backward>` and :ref:`backward <msr-forward-backward>` keywords
|
||||
in the :ref:`RUN block <msr-run-block>`. Additionally, the parameters :ref:`alpha <msr-alpha-beta>` and :ref:`beta <msr-alpha-beta>` which relate the detector
|
||||
efficiencies, solid angles and initial asymmetries of the two detectors can be supplied. The constant background for the two histograms is either given by
|
||||
:ref:`background-determined intervals <msr-background-asymmetry>` or specified through :ref:`backgr.fix <msr-backgr.fix>` in the :ref:`RUN-block <msr-run-block>`.
|
||||
|
||||
The experimental asymmetry :math:`a(k)` is then calculated from the four histograms:
|
||||
|
||||
.. math::
|
||||
|
||||
a(k)=\frac{\left[N_{\mathrm{fp}}(k)-B_{\mathrm{fp}}\right]-\left[N_{\mathrm{bp}}(k)-B_{\mathrm{bp}}\right]}{\left[N_{\mathrm{fp}}(k)-B_{\mathrm{fp}}\right]+\left[N_{\mathrm{bp}}(k)-B_{\mathrm{bp}}\right]}
|
||||
- \frac{\left[N_{\mathrm{fm}}(k)-B_{\mathrm{fm}}\right]-\left[N_{\mathrm{bm}}(k)-B_{\mathrm{bm}}\right]}{\left[N_{\mathrm{fm}}(k)-B_{\mathrm{fm}}\right]+\left[N_{\mathrm{bm}}(k)-B_{\mathrm{bm}}\right]},
|
||||
|
||||
with
|
||||
|
||||
* :math:`N_{\mathrm{fp}}(k)`: counts in the **forward** histogram channel with positive helicity :math:`k`
|
||||
* :math:`N_{\mathrm{bp}}(k)`: counts in the **backward** histogram channel with positive helicity :math:`k`
|
||||
* :math:`B_{\mathrm{fp}}`: constant background in the **forward** histogram with positive helicity (RUN block: :ref:`backgr.fix <msr-backgr.fix>` or :ref:`background <msr-background-asymmetry>`)
|
||||
* :math:`B_{\mathrm{bp}}`: constant background in the **backward** histogram with positive helicity (RUN block: :ref:`backgr.fix <msr-backgr.fix>` or :ref:`background <msr-background-asymmetry>`)
|
||||
* :math:`N_{\mathrm{fm}}(k)`: counts in the **forward** histogram channel with negative helicity :math:`k`
|
||||
* :math:`N_{\mathrm{bm}}(k)`: counts in the **backward** histogram channel with negative helicity :math:`k`
|
||||
* :math:`B_{\mathrm{fm}}`: constant background in the **forward** histogram with negative helicity (RUN block: :ref:`backgr.fix <msr-backgr.fix>` or :ref:`background <msr-background-asymmetry>`)
|
||||
* :math:`B_{\mathrm{bm}}`: constant background in the **backward** histogram with negative helicity (RUN block: :ref:`backgr.fix <msr-backgr.fix>` or :ref:`background <msr-background-asymmetry>`)
|
||||
|
||||
This theoretical asymmetry :math:`a(t)` is used to fit the function
|
||||
|
||||
.. math::
|
||||
|
||||
a(t)=\frac{(\alpha\beta +1)A(t)-(\alpha -1)}{(\alpha +1)-(\alpha\beta -1)A(t)} - \frac{(\alpha -1)-(\alpha\beta 1)A(t)}{(\alpha +1)+(\alpha\beta -1)Am(t)},
|
||||
|
||||
where
|
||||
|
||||
* :math:`\alpha`: accounts for the different detector efficiencies and solid angles (RUN block: :ref:`alpha <msr-alpha-beta>`).
|
||||
* :math:`\beta`: accounts for the different detector asymmetries (RUN block: :ref:`beta <msr-alpha-beta>`).
|
||||
* :math:`A(t)`: is the depolarization function as given in the :ref:`THEORY block <msr-theory-block>`.
|
||||
|
||||
For the graphical representation in plot type 5 the equation above is rearranged to get :math:`A(t)`:
|
||||
|
||||
.. math::
|
||||
|
||||
A(t) &= \frac{(\alpha -1)+(\alpha +1)a(t)}{(\alpha\beta+1)+(\alpha\beta -1)a(t)}-\frac{(\alpha +1)a(t)-(\alpha-1)}{(\alpha\beta +1)+(1-\alpha\beta)a(t)} \\
|
||||
&= \frac{\alpha\left[N_{\mathrm{fp}}(t)-B_{\mathrm{fp}}\right]-\left[N_{\mathrm{bp}}(t)-B_{\mathrm{bp}}\right]}{\alpha\beta\left[N_{\mathrm{fp}}(t)-B_{\mathrm{fp}}\right]+\left[N_{\mathrm{bp}}(t)-B_{\mathrm{bp}}\right]} -\frac{\alpha\left[N_{\mathrm{fm}}(t)-B_{\mathrm{fm}}\right]-\left[N_{\mathrm{bm}}(t)-B_{\mathrm{bm}}\right]}{\alpha\beta\left[N_{\mathrm{fm}}(t)-B_{\mathrm{fm}}\right]+\left[N_{\mathrm{bm}}(t)-B_{\mathrm{bm}}\right]}
|
||||
|
||||
and plotted together with the function given in the THEORY block.
|
||||
|
||||
|
||||
.. index:: non-musr-fit
|
||||
.. _non-musr-fit:
|
||||
|
@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Acknowledgements — musrfit 1.4.2 documentation</title>
|
||||
<title>Acknowledgements — musrfit 1.5.1 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.4.2',
|
||||
VERSION: '1.5.1',
|
||||
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.4.2 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.5.1 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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -59,6 +59,10 @@ largest part of the user manual of <tt class="docutils literal"><span class="pre
|
||||
<dt><strong>Uldis Locans</strong></dt>
|
||||
<dd>I am very much indebted to Uldis work on <a class="reference internal" href="setup-dks.html#setup-dks"><em>DKS</em></a> enabling the GPU support for <tt class="docutils literal"><span class="pre">musrfit</span></tt>. His kind, calm, and
|
||||
extremely competent way to deal with his projects as well as to deal with the chaos of physicists way to think is admirable. Many thanks Uldis!</dd>
|
||||
<dt><strong>Zaher Salman</strong></dt>
|
||||
<dd>Thanks for his beta-NMR and web-interface contributions to <tt class="docutils literal"><span class="pre">musrfit</span></tt>!</dd>
|
||||
<dt><strong>Robert Scheuermann</strong></dt>
|
||||
<dd>Thanks for his constant contructive input on <tt class="docutils literal"><span class="pre">musrfit</span></tt>!</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
@ -108,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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2018, Andreas Suter.
|
||||
Last updated on Mar 08, 2019.
|
||||
© Copyright 2019, Andreas Suter.
|
||||
Last updated on Sep 10, 2019.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>any2many - a Universal μSR-file-format converter — musrfit 1.4.2 documentation</title>
|
||||
<title>any2many - a Universal μSR-file-format converter — musrfit 1.5.1 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.4.2',
|
||||
VERSION: '1.5.1',
|
||||
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.4.2 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.5.1 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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2018, Andreas Suter.
|
||||
Last updated on Mar 08, 2019.
|
||||
© Copyright 2019, Andreas Suter.
|
||||
Last updated on Sep 10, 2019.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Bugtracking — musrfit 1.4.2 documentation</title>
|
||||
<title>Bugtracking — musrfit 1.5.1 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.4.2',
|
||||
VERSION: '1.5.1',
|
||||
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.4.2 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.5.1 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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2018, Andreas Suter.
|
||||
Last updated on Mar 08, 2019.
|
||||
© Copyright 2019, Andreas Suter.
|
||||
Last updated on Sep 10, 2019.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>How to Cite musrfit? — musrfit 1.4.2 documentation</title>
|
||||
<title>How to Cite musrfit? — musrfit 1.5.1 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.4.2',
|
||||
VERSION: '1.5.1',
|
||||
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.4.2 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.5.1 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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2018, Andreas Suter.
|
||||
Last updated on Mar 08, 2019.
|
||||
© Copyright 2019, Andreas Suter.
|
||||
Last updated on Sep 10, 2019.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Index — musrfit 1.4.2 documentation</title>
|
||||
<title>Index — musrfit 1.5.1 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.4.2',
|
||||
VERSION: '1.5.1',
|
||||
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.4.2 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.5.1 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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -151,6 +151,10 @@
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-69">bnmr-asymmetry-fit</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-libs.html#index-14">BNMR-libs</a>
|
||||
</dt>
|
||||
|
||||
@ -713,7 +717,7 @@
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-69">non-musr-fit</a>
|
||||
<dt><a href="user-manual.html#index-70">non-musr-fit</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@ -843,7 +847,7 @@
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-73">technical-musrfit</a>
|
||||
<dt><a href="user-manual.html#index-74">technical-musrfit</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@ -875,15 +879,15 @@
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="user-manual.html#index-70">user-functions</a>
|
||||
<dt><a href="user-manual.html#index-71">user-functions</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-72">user-functions-with-global-part</a>
|
||||
<dt><a href="user-manual.html#index-73">user-functions-with-global-part</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-71">user-functions-without-global-part</a>
|
||||
<dt><a href="user-manual.html#index-72">user-functions-without-global-part</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
@ -970,12 +974,12 @@
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="#" title="General Index"
|
||||
>index</a></li>
|
||||
<li><a href="index.html">musrfit 1.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2018, Andreas Suter.
|
||||
Last updated on Mar 08, 2019.
|
||||
© Copyright 2019, Andreas Suter.
|
||||
Last updated on Sep 10, 2019.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Welcome to the musrfit documentation! — musrfit 1.4.2 documentation</title>
|
||||
<title>Welcome to the musrfit documentation! — musrfit 1.5.1 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.4.2',
|
||||
VERSION: '1.5.1',
|
||||
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.4.2 documentation" href="#" />
|
||||
<link rel="top" title="musrfit 1.5.1 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.4.2 documentation</a> »</li>
|
||||
<li><a href="#">musrfit 1.5.1 documentation</a> »</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.4.2 documentation</a> »</li>
|
||||
<li><a href="#">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2018, Andreas Suter.
|
||||
Last updated on Mar 08, 2019.
|
||||
© Copyright 2019, Andreas Suter.
|
||||
Last updated on Sep 10, 2019.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
@ -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 — musrfit 1.4.2 documentation</title>
|
||||
<title>msr2data - A Program for Automatically Processing Multiple musrfit msr Files — musrfit 1.5.1 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.4.2',
|
||||
VERSION: '1.5.1',
|
||||
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.4.2 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.5.1 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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2018, Andreas Suter.
|
||||
Last updated on Mar 08, 2019.
|
||||
© Copyright 2019, Andreas Suter.
|
||||
Last updated on Sep 10, 2019.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>mupp - μSR Parameter Plotter — musrfit 1.4.2 documentation</title>
|
||||
<title>mupp - μSR Parameter Plotter — musrfit 1.5.1 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.4.2',
|
||||
VERSION: '1.5.1',
|
||||
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.4.2 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.5.1 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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -252,12 +252,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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2018, Andreas Suter.
|
||||
Last updated on Mar 08, 2019.
|
||||
© Copyright 2019, Andreas Suter.
|
||||
Last updated on Sep 10, 2019.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
@ -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 — musrfit 1.4.2 documentation</title>
|
||||
<title>MusrRoot - an Extensible Open File Format for μSR — musrfit 1.5.1 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.4.2',
|
||||
VERSION: '1.5.1',
|
||||
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.4.2 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.5.1 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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2018, Andreas Suter.
|
||||
Last updated on Mar 08, 2019.
|
||||
© Copyright 2019, Andreas Suter.
|
||||
Last updated on Sep 10, 2019.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>musredit: the GUI Based Interface to musrfit — musrfit 1.4.2 documentation</title>
|
||||
<title>musredit: the GUI Based Interface to musrfit — musrfit 1.5.1 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.4.2',
|
||||
VERSION: '1.5.1',
|
||||
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.4.2 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.5.1 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 GPU’s" 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 GPU’s"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -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 GPU’s"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2018, Andreas Suter.
|
||||
Last updated on Mar 08, 2019.
|
||||
© Copyright 2019, Andreas Suter.
|
||||
Last updated on Sep 10, 2019.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
Binary file not shown.
@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Search — musrfit 1.4.2 documentation</title>
|
||||
<title>Search — musrfit 1.5.1 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.4.2',
|
||||
VERSION: '1.5.1',
|
||||
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.4.2 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.5.1 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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2018, Andreas Suter.
|
||||
Last updated on Mar 08, 2019.
|
||||
© Copyright 2019, Andreas Suter.
|
||||
Last updated on Sep 10, 2019.
|
||||
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
@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Setting up musrfit / DKS: High Speed Fitting with GPU’s — musrfit 1.4.2 documentation</title>
|
||||
<title>Setting up musrfit / DKS: High Speed Fitting with GPU’s — musrfit 1.5.1 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.4.2',
|
||||
VERSION: '1.5.1',
|
||||
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.4.2 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.5.1 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>
|
||||
@ -41,7 +41,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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -321,12 +321,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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2018, Andreas Suter.
|
||||
Last updated on Mar 08, 2019.
|
||||
© Copyright 2019, Andreas Suter.
|
||||
Last updated on Sep 10, 2019.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Setting up musrfit on Different Platforms — musrfit 1.4.2 documentation</title>
|
||||
<title>Setting up musrfit on Different Platforms — musrfit 1.5.1 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.4.2',
|
||||
VERSION: '1.5.1',
|
||||
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.4.2 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.5.1 documentation" href="index.html" />
|
||||
<link rel="next" title="Setting up musrfit / DKS: High Speed Fitting with GPU’s" 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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -88,7 +88,7 @@ their header packages:</p>
|
||||
<p>Additionally, <em>only</em> if <tt class="docutils literal"><span class="pre">musrfit</span></tt> should support reading of data files in the <cite>NeXus</cite> format the following libraries are needed:</p>
|
||||
<dl class="docutils" id="index-7">
|
||||
<dt><strong>HDF4</strong></dt>
|
||||
<dd>A library and multi-object file format for storing and managing data (see <a class="reference external" href="http://www.hdfgroup.org/products/hdf4/">HDF4</a>). <tt class="docutils literal"><span class="pre">HDF4</span></tt> is “outdated” and its support will soon be dropped.</dd>
|
||||
<dd>A library and multi-object file format for storing and managing data (see <a class="reference external" href="http://www.hdfgroup.org/products/hdf4/">HDF4</a>). <tt class="docutils literal"><span class="pre">HDF4</span></tt> is “outdated” and its support will soon be dropped. The single only reason why it is still required is that ISIS is not able to cope to implement HDF5 V2 of the NeXus muon instrument specification which has been agreed in 2012!</dd>
|
||||
</dl>
|
||||
<dl class="docutils" id="index-8">
|
||||
<dt><strong>HDF5</strong></dt>
|
||||
@ -96,7 +96,8 @@ their header packages:</p>
|
||||
</dl>
|
||||
<dl class="docutils" id="index-9">
|
||||
<dt><strong>minixml</strong></dt>
|
||||
<dd>A small <tt class="docutils literal"><span class="pre">XML</span></tt> library that can be used to read and write <tt class="docutils literal"><span class="pre">XML</span></tt> and <tt class="docutils literal"><span class="pre">XML</span></tt>-like data files. <em>Required version ≥ 2.2</em> (see <a class="reference external" href="http://www.minixml.org/">minixml</a>).</dd>
|
||||
<dd>A small <tt class="docutils literal"><span class="pre">XML</span></tt> library that can be used to read and write <tt class="docutils literal"><span class="pre">XML</span></tt> and <tt class="docutils literal"><span class="pre">XML</span></tt>-like data files. <em>Required version ≥ 2.2</em> (see <a class="reference external" href="http://www.minixml.org/">minixml</a>).
|
||||
Currently the <tt class="docutils literal"><span class="pre">MXML</span></tt> support in <tt class="docutils literal"><span class="pre">NeXus</span></tt> is broken and hence you will <strong>not</strong> need to install <tt class="docutils literal"><span class="pre">minixml</span></tt> for the time being.</dd>
|
||||
</dl>
|
||||
<dl class="docutils" id="index-10">
|
||||
<dt><strong>NeXus</strong></dt>
|
||||
@ -177,24 +178,21 @@ the source code from the corresponding website, or to clone the git repo. If you
|
||||
<span id="index-15"></span><h4>Installation of NeXus requirements (optional)<a class="headerlink" href="#installation-of-nexus-requirements-optional" title="Permalink to this headline">¶</a></h4>
|
||||
<p><em>Only</em> if <tt class="docutils literal"><span class="pre">musrfit</span></tt> should support reading/writing data files in the <tt class="docutils literal"><span class="pre">NeXus</span></tt> format the further required
|
||||
software has to be set up. The required libraries and header files could either be available through the user’s
|
||||
GNU/Linux distribution or if this is not the case, the packages can be installed from the source code. The necessary
|
||||
packages to build <tt class="docutils literal"><span class="pre">NeXus</span></tt> are <tt class="docutils literal"><span class="pre">MXML</span></tt>, (<tt class="docutils literal"><span class="pre">HDF4</span></tt>), and <tt class="docutils literal"><span class="pre">HDF5</span></tt>. This means, for a rpm-package based distro try something like:</p>
|
||||
GNU/Linux distribution or if this is not the case, the packages can be installed from the source code. In principle
|
||||
NeXus should support <tt class="docutils literal"><span class="pre">MXML</span></tt>, <tt class="docutils literal"><span class="pre">HDF4</span></tt>, and <tt class="docutils literal"><span class="pre">HDF5</span></tt>. At the time of this writing, the <tt class="docutils literal"><span class="pre">MXML</span></tt> support in the
|
||||
NeXus project is broken, and <tt class="docutils literal"><span class="pre">HDF4</span></tt> is outdated on most platforms, yet since ISIS/RAL is still <strong>not</strong> up-to-date <tt class="docutils literal"><span class="pre">HDF4</span></tt> still
|
||||
needs to be dragged on (comment: if you are a ISIS user, please complain about <tt class="docutils literal"><span class="pre">HDF4</span></tt>). Hence, the necessary packages to build <tt class="docutils literal"><span class="pre">NeXus</span></tt> are <tt class="docutils literal"><span class="pre">HDF4</span></tt> and <tt class="docutils literal"><span class="pre">HDF5</span></tt>. This means, for a rpm-package based distro try something like:</p>
|
||||
<blockquote>
|
||||
<div><div class="highlight-bash"><div class="highlight"><pre><span></span>$ yum install mxml-devel hdf-devel hdf5-devel
|
||||
<div><div class="highlight-bash"><div class="highlight"><pre><span></span>$ yum install hdf-devel hdf5-devel
|
||||
</pre></div>
|
||||
</div>
|
||||
</div></blockquote>
|
||||
<p>and on a deb-package based distro try something like:</p>
|
||||
<blockquote>
|
||||
<div><div class="highlight-bash"><div class="highlight"><pre><span></span>$ apt-get install libmxml-dev libhdf4-dev libhdf5-dev
|
||||
<div><div class="highlight-bash"><div class="highlight"><pre><span></span>$ apt-get install libhdf4-dev libhdf5-dev
|
||||
</pre></div>
|
||||
</div>
|
||||
</div></blockquote>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last"><tt class="docutils literal"><span class="pre">HDF4</span></tt> support within <tt class="docutils literal"><span class="pre">NeXus</span></tt> will be dropped by <tt class="docutils literal"><span class="pre">musrfit</span></tt> in the near future. If you <em>not</em> urgently need
|
||||
to read old <tt class="docutils literal"><span class="pre">ISIS</span> <span class="pre">NeXus</span></tt> files, you safely can drop it.</p>
|
||||
</div>
|
||||
<p><strong>Only NeXus Version ≥ 4.4 is support!</strong></p>
|
||||
<p>Even though there might exist binary packages for the <tt class="docutils literal"><span class="pre">NeXus</span></tt> library, it is best to build and
|
||||
install it directly from the source code which can be found <a class="reference external" href="https://github.com/nexusformat/code">here</a>.</p>
|
||||
@ -208,10 +206,7 @@ $ git clone https://github.com/nexusformat/code.git
|
||||
$ <span class="c1"># next we will build NeXus out-of-source</span>
|
||||
$ mkdir build
|
||||
$ <span class="nb">cd</span> build
|
||||
$ <span class="c1"># The next line only if HDF4 support is needed</span>
|
||||
$ cmake -DENABLE_HDF5<span class="o">=</span><span class="m">1</span> -DENABLE_HDF4<span class="o">=</span><span class="m">1</span> -DENABLE_MXML<span class="o">=</span><span class="m">1</span> ../code
|
||||
$ <span class="c1"># The next line if HDF4 support is NOT needed</span>
|
||||
$ cmake -DENABLE_HDF5<span class="o">=</span><span class="m">1</span> -DENABLE_MXML<span class="o">=</span><span class="m">1</span> ../code
|
||||
$ cmake -DENABLE_HDF5<span class="o">=</span><span class="m">1</span> -DENABLE_HDF4<span class="o">=</span><span class="m">1</span> -DENABLE_MXML<span class="o">=</span><span class="m">0</span> ../code
|
||||
$ cmake --build ./ --clean-first
|
||||
$ <span class="c1"># make install needs either to be carried out as root or sudo depending on your linux flavour.</span>
|
||||
$ sudo make install
|
||||
@ -500,10 +495,7 @@ the later handling will be easier if a symbolic link to these files is created n
|
||||
to be set up. Under <tt class="docutils literal"><span class="pre">Cygwin</span></tt> of all the required libraries only <tt class="docutils literal"><span class="pre">HDF5</span></tt> is available. The packages <tt class="docutils literal"><span class="pre">hdf5</span></tt> and
|
||||
<tt class="docutils literal"><span class="pre">libhdf5-devel</span></tt> can be installed through the <tt class="docutils literal"><span class="pre">Cygwin</span></tt> setup. One should also make sure that <tt class="docutils literal"><span class="pre">bison</span></tt>, <tt class="docutils literal"><span class="pre">flex</span></tt>
|
||||
and a package containing <tt class="docutils literal"><span class="pre">/usr/lib/librpc.a</span></tt> (<em>e.g.</em> <tt class="docutils literal"><span class="pre">sunrpc</span> <span class="pre">=</span> <span class="pre">4.0-3</span></tt>, but <em>not</em> <tt class="docutils literal"><span class="pre">sunrpc</span> <span class="pre">=</span> <span class="pre">4.0-4</span></tt>) are installed.</p>
|
||||
<p>All other libraries have to be built from the sources. The following lines will track the installation of <tt class="docutils literal"><span class="pre">JPEG</span> <span class="pre">6b</span></tt>,
|
||||
<tt class="docutils literal"><span class="pre">MXML</span> <span class="pre">2.9</span></tt>, <tt class="docutils literal"><span class="pre">HDF</span> <span class="pre">4.2.7-patch1</span></tt>, and <tt class="docutils literal"><span class="pre">NeXus</span> <span class="pre">4.3.2</span></tt>. The version numbers and source-code locations might of
|
||||
course change with time but should be easily adjustable.</p>
|
||||
<p><em>Only</em> <tt class="docutils literal"><span class="pre">NeXus</span></tt> version ≥ 4.4 is support!</p>
|
||||
<p><strong>Only NeXus Version ≥ 4.4 is support!</strong></p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span>
|
||||
$ mkdir nexus
|
||||
$ <span class="nb">cd</span> nexus
|
||||
@ -513,18 +505,6 @@ $ ./configure --prefix<span class="o">=</span>/usr/local --enable-static
|
||||
$ make
|
||||
$ make install
|
||||
$ <span class="nb">cd</span> ..
|
||||
$ curl www.msweet.org/files/project3/mxml-2.9.tar.gz -G <span class="p">|</span> tar xz
|
||||
$ <span class="nb">cd</span> mxml-2.9
|
||||
$ ./configure --prefix<span class="o">=</span>/usr/local --enable-static
|
||||
$ make
|
||||
$ make install
|
||||
$ <span class="nb">cd</span> ..
|
||||
$ curl http://www.hdfgroup.org/ftp/HDF/HDF_Current/src/hdf-4.2.7-patch1.tar.gz -G <span class="p">|</span> tar xz
|
||||
$ <span class="nb">cd</span> hdf-4.2.7-patch1
|
||||
$ ./configure --prefix<span class="o">=</span>/usr/local --enable-static --disable-fortran --with-jpeg<span class="o">=</span>/usr/local
|
||||
$ make
|
||||
$ make install
|
||||
$ <span class="nb">cd</span> ..
|
||||
$ <span class="c1"># create a directory for the NeXus source code</span>
|
||||
$ mkdir nexus
|
||||
$ <span class="nb">cd</span> nexus
|
||||
@ -533,7 +513,7 @@ $ git clone https://github.com/nexusformat/code.git
|
||||
$ <span class="c1"># next we will build NeXus out-of-source</span>
|
||||
$ mkdir build
|
||||
$ <span class="nb">cd</span> build
|
||||
$ cmake -DENABLE_HDF5<span class="o">=</span><span class="m">1</span> -DENABLE_HDF4<span class="o">=</span><span class="m">1</span> -DENABLE_MXML<span class="o">=</span><span class="m">1</span> ../code
|
||||
$ cmake -DENABLE_HDF5<span class="o">=</span><span class="m">1</span> -DENABLE_HDF4<span class="o">=</span><span class="m">1</span> -DENABLE_MXML<span class="o">=</span><span class="m">0</span> ../code
|
||||
$ make
|
||||
$ make install
|
||||
</pre></div>
|
||||
@ -770,20 +750,12 @@ please change over to <tt class="docutils literal"><span class="pre">musredit</s
|
||||
<div class="section" id="index-28">
|
||||
<span id="id14"></span><h4>Installation of NeXus requirements (optional)<a class="headerlink" href="#index-28" title="Permalink to this headline">¶</a></h4>
|
||||
<p><em>Only</em> if <tt class="docutils literal"><span class="pre">musrfit</span></tt> should support reading data files in the <tt class="docutils literal"><span class="pre">NeXus</span></tt> format the further required packages are set up:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ sudo port -v install hdf4 hdf5
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ sudo port -v install hdf5
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Unfortunately, the <tt class="docutils literal"><span class="pre">minixml</span></tt> and <tt class="docutils literal"><span class="pre">NeXus</span></tt> libraries have to be compiled and installed directly from the source code.
|
||||
Given the respective version numbers of 2.9 and 4.4.2 (which are subject to change with time.
|
||||
Only <tt class="docutils literal"><span class="pre">NeXus</span></tt> Version ≥ 4.4 is support!) this can be achieved for example by:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="c1"># get and instal Mini-XML</span>
|
||||
$ <span class="nb">cd</span> <span class="nv">$HOME</span>/Applications
|
||||
$ git clone https://github.com/michaelrsweet/mxml.git
|
||||
$ <span class="nb">cd</span> mxml
|
||||
$ ./configure --prefix<span class="o">=</span>/usr/local
|
||||
$ make
|
||||
$ sudo make install
|
||||
$ <span class="c1"># get and install NeXus</span>
|
||||
<p><strong>Only NeXus Version ≥ 4.4 is support!</strong></p>
|
||||
<p>To get things compiled do:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="c1"># get and install NeXus</span>
|
||||
$ <span class="nb">cd</span> <span class="nv">$HOME</span>/Applications
|
||||
$ <span class="c1"># get the source code from the master repository</span>
|
||||
$ git clone https://github.com/nexusformat/code.git nexus/code
|
||||
@ -791,7 +763,7 @@ $ <span class="c1"># next we will build NeXus out-of-source</span>
|
||||
$ <span class="nb">cd</span> nexus
|
||||
$ mkdir build
|
||||
$ <span class="nb">cd</span> build
|
||||
$ cmake -DENABLE_HDF5<span class="o">=</span><span class="m">1</span> -DENABLE_HDF4<span class="o">=</span><span class="m">1</span> -DENABLE_MXML<span class="o">=</span><span class="m">1</span> ../code
|
||||
$ cmake -DENABLE_HDF5<span class="o">=</span><span class="m">1</span> -DENABLE_HDF4<span class="o">=</span><span class="m">1</span> -DENABLE_MXML<span class="o">=</span><span class="m">0</span> ../code
|
||||
$ make
|
||||
$ sudo make install
|
||||
</pre></div>
|
||||
@ -956,24 +928,17 @@ packages can be installed through Fink (check for the most recent versions):</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span>libjpeg hdf hdf5-cpp11 hdf5-cpp11-shlibs
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Unfortunately, the <tt class="docutils literal"><span class="pre">minixml</span></tt> and <tt class="docutils literal"><span class="pre">NeXus</span></tt> libraries have to be compiled and installed directly from
|
||||
the source code. Given the respective version numbers of 2.9 and 4.3.2 (which are subject to change with time)
|
||||
<p>Unfortunately, the <tt class="docutils literal"><span class="pre">NeXus</span></tt> libraries have to be compiled and installed directly from
|
||||
the source code. Given the respective version number 4.4 (which are subject to change with time)
|
||||
this can be achieved for example by:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="c1"># first build Mini-XML</span>
|
||||
$ <span class="nb">cd</span> <span class="nv">$HOME</span>/Applications
|
||||
$ git clone https://github.com/michaelrsweet/mxml.git
|
||||
$ <span class="nb">cd</span> mxml
|
||||
$ ./configure --prefix<span class="o">=</span>/usr/local
|
||||
$ make
|
||||
$ sudo make install
|
||||
$ <span class="c1"># second build NeXus</span>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="c1"># build NeXus</span>
|
||||
$ <span class="nb">cd</span> ..
|
||||
$ git clone https://github.com/nexusformat/code.git nexus/code
|
||||
$ <span class="nb">cd</span> nexus
|
||||
$ <span class="c1"># build NeXus out-of-source</span>
|
||||
$ mkdir build
|
||||
$ <span class="nb">cd</span> build
|
||||
$ cmake ../code -DENABLE_HDF4<span class="o">=</span><span class="m">1</span> -DENABLE_HDF5<span class="o">=</span><span class="m">1</span> -DENABLE_MXML<span class="o">=</span><span class="m">1</span>
|
||||
$ cmake ../code -DENABLE_HDF5<span class="o">=</span><span class="m">1</span> -DENABLE_HDF4<span class="o">=</span><span class="m">1</span> -DENABLE_MXML<span class="o">=</span><span class="m">0</span>
|
||||
$ cmake --build ./ --clean-first -- -j8
|
||||
$ sudo make install
|
||||
</pre></div>
|
||||
@ -1315,12 +1280,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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2018, Andreas Suter.
|
||||
Last updated on Mar 08, 2019.
|
||||
© Copyright 2019, Andreas Suter.
|
||||
Last updated on Sep 10, 2019.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Tutorial for musrfit — musrfit 1.4.2 documentation</title>
|
||||
<title>Tutorial for musrfit — musrfit 1.5.1 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.4.2',
|
||||
VERSION: '1.5.1',
|
||||
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.4.2 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.5.1 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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2018, Andreas Suter.
|
||||
Last updated on Mar 08, 2019.
|
||||
© Copyright 2019, Andreas Suter.
|
||||
Last updated on Sep 10, 2019.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Documentation of user libs (user functions) — musrfit 1.4.2 documentation</title>
|
||||
<title>Documentation of user libs (user functions) — musrfit 1.5.1 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.4.2',
|
||||
VERSION: '1.5.1',
|
||||
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.4.2 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.5.1 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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -394,28 +394,28 @@ The asymmetry is measured both during the pulse and afterwards. For a a general
|
||||
<p>where <span class="math">\(\tau_{\mathrm{Li}}=1.21\)</span>s is the <span class="math">\(^8\)</span>Li lifetime.</p>
|
||||
<div class="section" id="functions">
|
||||
<h4>Functions<a class="headerlink" href="#functions" title="Permalink to this headline">¶</a></h4>
|
||||
<p>The <tt class="docutils literal"><span class="pre">libLineProfile</span></tt> library currently contains the following functions:</p>
|
||||
<p>The <tt class="docutils literal"><span class="pre">libBNMR</span></tt> library currently contains the following functions:</p>
|
||||
<p id="index-17"><strong>Exponential relaxation</strong></p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libBNMR ExpRlx 1 2
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The parameters are:</p>
|
||||
<ol class="arabic simple">
|
||||
<li>pulse length <span class="math">\(t_0\)</span> (ms)</li>
|
||||
<li>relaxation rate <span class="math">\(\sigma\)</span> (ms<span class="math">\(^{-1}\)</span>)</li>
|
||||
<li>pulse length <span class="math">\(t_0\)</span> (s)</li>
|
||||
<li>relaxation rate <span class="math">\(\lambda\)</span> (s<span class="math">\(^{-1}\)</span>)</li>
|
||||
</ol>
|
||||
<p>This function implements <span class="math">\(f(t)=e^{-\sigma t}\)</span>.</p>
|
||||
<p>This function implements <span class="math">\(f(t)=e^{-\lambda t}\)</span>.</p>
|
||||
<p id="index-18"><strong>Stretched exponential relaxation</strong></p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span>userFcn libBNMR SExpRlx 1 2 3
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The parameters are:</p>
|
||||
<ol class="arabic simple">
|
||||
<li>pulse length <span class="math">\(t_0\)</span> (ms)</li>
|
||||
<li>relaxation rate <span class="math">\(\sigma\)</span> (ms<span class="math">\(^{-1}\)</span>)</li>
|
||||
<li>pulse length <span class="math">\(t_0\)</span> (s)</li>
|
||||
<li>relaxation rate <span class="math">\(\lambda\)</span> (s<span class="math">\(^{-1}\)</span>)</li>
|
||||
<li>stretching exponent <span class="math">\(\beta\)</span></li>
|
||||
</ol>
|
||||
<p>This function implements <span class="math">\(f(t)=e^{-(\sigma t)^{\beta}}\)</span>.</p>
|
||||
<p>This function implements <span class="math">\(f(t)=e^{-(\lambda t)^{\beta}}\)</span>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="liblineprofile">
|
||||
@ -662,12 +662,12 @@ K(m)&=\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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2018, Andreas Suter.
|
||||
Last updated on Mar 08, 2019.
|
||||
© Copyright 2019, Andreas Suter.
|
||||
Last updated on Sep 10, 2019.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>User manual — musrfit 1.4.2 documentation</title>
|
||||
<title>User manual — musrfit 1.5.1 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.4.2',
|
||||
VERSION: '1.5.1',
|
||||
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.4.2 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.5.1 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.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -1023,7 +1023,7 @@ Therefore, this block is only present to potentially shorten the msr file and to
|
||||
<li><tt class="docutils literal"><span class="pre">rrf_freq</span></tt> for fittype 1, 3</li>
|
||||
<li><tt class="docutils literal"><span class="pre">rrf_packing</span></tt> for fittype 1, 3</li>
|
||||
<li><tt class="docutils literal"><span class="pre">rrf_phase</span></tt> for fittype 1, 3</li>
|
||||
<li><tt class="docutils literal"><span class="pre">packing</span></tt> for fittype 0, 2, 4</li>
|
||||
<li><tt class="docutils literal"><span class="pre">packing</span></tt> for fittype 0, 2, 4, 5</li>
|
||||
</ul>
|
||||
<p>For a detailed discussion of these entries see the section <a class="reference internal" href="#msr-run-block"><em>RUN block</em></a>.</p>
|
||||
<p>The single histo RRF fit and asymmetry RRF fit related entries (fittype 1 and 3 only) have the following syntax:</p>
|
||||
@ -1217,6 +1217,8 @@ etc.
|
||||
<dd>Asymmetry RRF Fit (only for online analysis)</dd>
|
||||
<dt><strong>4</strong></dt>
|
||||
<dd>MuMinus Fit. This is a single histogram fit especially for negative muon μSR</dd>
|
||||
<dt><strong>5</strong></dt>
|
||||
<dd>beta-NMR Asymmetry Fit</dd>
|
||||
<dt><strong>8</strong></dt>
|
||||
<dd>Non-μSR Fit</dd>
|
||||
</dl>
|
||||
@ -1227,8 +1229,8 @@ etc.
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-20"></span><dl class="docutils" id="msr-alpha-beta">
|
||||
<dt><strong>alpha, beta</strong> (fit type 2, 3)</dt>
|
||||
<dd><p class="first">These parameters are used to correct the asymmetry for different detector efficiencies, solid angles and initial asymmetries. They are defined as <span class="math">\(\alpha = N_{0,b}/N_{0,f}\)</span> and <span class="math">\(\beta = A_{0,b}/A_{0,f}\)</span>. If the parameters are not specified in the <a class="reference internal" href="#msr-run-block"><em>RUN block</em></a>, for each one the value of 1 is assumed. Example for alpha with fit parameter number 1:</p>
|
||||
<dt><strong>alpha, beta</strong> (fit type 2, 3, 5)</dt>
|
||||
<dd><p class="first">These parameters are used to correct the asymmetry for different detector efficiencies, solid angles and initial asymmetries. They are defined as <span class="math">\(\alpha = N_{0,b}/N_{0,f}\)</span> and <span class="math">\(\beta = A_{0,b}/A_{0,f}\)</span>. If the parameters are not specified in the <a class="reference internal" href="#msr-run-block"><em>RUN block</em></a>, for each one the value of 1 is assumed (for fittype 5, alpha is estimated from the ratio of <span class="math">\(\sum_i \left( N_{\mathrm{bp}}(i)+N_{\mathrm{bm}}(i) \right)\)</span> and <span class="math">\(\sum_i \left( N_{\mathrm{fp}}(i)+N_{\mathrm{fm}}(i) \right)\)</span>). Example for alpha with fit parameter number 1:</p>
|
||||
<div class="last highlight-python"><div class="highlight"><pre><span></span>alpha 1
|
||||
</pre></div>
|
||||
</div>
|
||||
@ -1291,9 +1293,17 @@ backward 7-9
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd>
|
||||
<dt><strong>forward, backward</strong> (fit type 5)</dt>
|
||||
<dd><p class="first">Numbers of the histograms in the data file that should be taken to calculate the asymmetry. Two forward and backward histograms should be given indicationg positive and negative helicities. The asymmetry from opposite helicities will be subtracted. Examples:</p>
|
||||
<div class="last highlight-python"><div class="highlight"><pre><span></span># build forward/backward asymmetry with histogram 1 and 3 then subtract asymmetry built with histograms 2 and 4
|
||||
forward 1 2
|
||||
backward 3 4
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-27"></span><dl class="docutils" id="msr-backgr-fix">
|
||||
<dt><strong>backgr.fix</strong> (fit types 0, 1, 2, 3)</dt>
|
||||
<dt><strong>backgr.fix</strong> (fit types 0, 1, 2, 3, 5)</dt>
|
||||
<dd>A fixed constant background in counts per nanosecond or per bin (see <a class="reference internal" href="#msr-commands-block"><em>below</em></a>) may be given at this point.
|
||||
The background is specified for all histograms in the order <span class="math">\(B_f B_b [B_r B_l]\)</span>. If this keyword is present, <em>any</em> information on a <tt class="docutils literal"><span class="pre">background</span></tt> line is ignored.</dd>
|
||||
</dl>
|
||||
@ -1307,7 +1317,7 @@ In case histograms are being grouped, the specified channels are interpreted wit
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-29"></span><dl class="docutils" id="msr-background-asymmetry">
|
||||
<dt><strong>background</strong> (fit types 2, 3)</dt>
|
||||
<dt><strong>background</strong> (fit types 2, 3, 5)</dt>
|
||||
<dd><p class="first">The numbers of the first and the last channel of an interval from which the constant background should be calculated are specified here.
|
||||
For all the histograms this is done together in the following order: <span class="math">\(k_{f,\rm first} k_{f,\rm last} k_{b,\rm first} k_{b, \rm last} [k_{r,\rm first} k_{r,\rm last} k_{l,\rm first} k_{l,\rm last}]\)</span>.
|
||||
In case histograms are being grouped, the specified channels are interpreted with respect to the first histograms. Example:</p>
|
||||
@ -1327,7 +1337,7 @@ Typically these channels are referred to as <tt class="docutils literal"><span c
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-31"></span><dl class="docutils" id="msr-data-asymmetry">
|
||||
<dt><strong>data</strong> (fit type 2, 3)</dt>
|
||||
<dt><strong>data</strong> (fit type 2, 3, 5)</dt>
|
||||
<dd><p class="first">The numbers of the first and the last channel of an interval from which the data is taken are specified here.
|
||||
Typically these channels are referred to as first good bin / last good bin (fgb/lgb). For all the histograms this is
|
||||
done together in the following order: <span class="math">\(k_{f,\rm first} k_{f,\rm last} k_{b,\rm first} k_{b, \rm last} [k_{r,\rm first} k_{r,\rm last} k_{l,\rm first} k_{l,\rm last}]\)</span>.
|
||||
@ -1347,8 +1357,8 @@ t0 3419 3434 # t0 channels for groupings: forward f1 f2. 3419 t0 for f1, 3434
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-33"></span><dl class="docutils" id="msr-t0-asymmetry">
|
||||
<dt><strong>t0</strong> (fit type 2, 3)</dt>
|
||||
<dd><p class="first">The numbers of time-zero channels of the histograms in the order <span class="math">\(t_{0,f} t_{0,b}\)</span>. Example:</p>
|
||||
<dt><strong>t0</strong> (fit type 2, 3, 5)</dt>
|
||||
<dd><p class="first">The numbers of time-zero channels of the histograms in the order <span class="math">\(t_{0,f} t_{0,b}\)</span>. For fit type 5, the time-zero is the channel of the start of beam pulse. Example:</p>
|
||||
<div class="last highlight-python"><div class="highlight"><pre><span></span>t0 3419 3418 # t0 channels: forward (3419), backward (3418)
|
||||
t0 3419 3418 3417 3416 # t0 channels (assuming forward f1 f2, backward b1 b2): forward (3419, f1), backward (3418, b1); forward (3417, f2), backward (3416, b2)
|
||||
</pre></div>
|
||||
@ -1362,7 +1372,7 @@ same syntax as for <a class="reference internal" href="#msr-t0-single-histo"><em
|
||||
the total number of <a class="reference internal" href="#msr-addrun"><em>ADDRUN</em></a>‘s!</dd>
|
||||
</dl>
|
||||
<span id="index-35"></span><dl class="docutils" id="msr-addt0-asymmetry">
|
||||
<dt><strong>addt0</strong> (fit type 2, 3)</dt>
|
||||
<dt><strong>addt0</strong> (fit type 2, 3, 5)</dt>
|
||||
<dd>The numbers of time-zero channels of the histograms in the order <span class="math">\(t_{0,f} t_{0,b} [t_{0,r} t_{0,l}]\)</span>.
|
||||
If grouping of histograms is present (see <a class="reference internal" href="#msr-forward-backward"><em>forward</em></a>) the same syntax as for <a class="reference internal" href="#msr-t0-asymmetry"><em>t0</em></a> applies.
|
||||
If one addt0 is given, the total number of addt0’s needs to be equal to the total number of <a class="reference internal" href="#msr-addrun"><em>ADDRUN</em></a>‘s!</dd>
|
||||
@ -1868,8 +1878,48 @@ the single histogram RRF fit apply: <strong>if you not urgently need it: do not
|
||||
</div></blockquote>
|
||||
<p>Since MuMinus is quite generic, the full functional depends has to be written in the <a class="reference internal" href="#msr-theory-block"><em>THEORY Block</em></a>.</p>
|
||||
</div>
|
||||
<div class="section" id="beta-nmr-asymmetry-fit-fit-type-5">
|
||||
<span id="bnmr-asymmetry-fit"></span><span id="index-69"></span><h3>beta-NMR Asymmetry Fit (fit type 5)<a class="headerlink" href="#beta-nmr-asymmetry-fit-fit-type-5" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Four histograms are needed for a beta-NMR asymmetry fit (fit type 5), two for positive helecity and two for negative. These are given by the <a class="reference internal" href="#msr-forward-backward"><em>forward</em></a> and <a class="reference internal" href="#msr-forward-backward"><em>backward</em></a> keywords
|
||||
in the <a class="reference internal" href="#msr-run-block"><em>RUN block</em></a>. Additionally, the parameters <a class="reference internal" href="#msr-alpha-beta"><em>alpha</em></a> and <a class="reference internal" href="#msr-alpha-beta"><em>beta</em></a> which relate the detector
|
||||
efficiencies, solid angles and initial asymmetries of the two detectors can be supplied. The constant background for the two histograms is either given by
|
||||
<a class="reference internal" href="#msr-background-asymmetry"><em>background-determined intervals</em></a> or specified through <a class="reference internal" href="#msr-backgr-fix"><em>backgr.fix</em></a> in the <a class="reference internal" href="#msr-run-block"><em>RUN-block</em></a>.</p>
|
||||
<p>The experimental asymmetry <span class="math">\(a(k)\)</span> is then calculated from the four histograms:</p>
|
||||
<div class="math">
|
||||
\[a(k)=\frac{\left[N_{\mathrm{fp}}(k)-B_{\mathrm{fp}}\right]-\left[N_{\mathrm{bp}}(k)-B_{\mathrm{bp}}\right]}{\left[N_{\mathrm{fp}}(k)-B_{\mathrm{fp}}\right]+\left[N_{\mathrm{bp}}(k)-B_{\mathrm{bp}}\right]}
|
||||
- \frac{\left[N_{\mathrm{fm}}(k)-B_{\mathrm{fm}}\right]-\left[N_{\mathrm{bm}}(k)-B_{\mathrm{bm}}\right]}{\left[N_{\mathrm{fm}}(k)-B_{\mathrm{fm}}\right]+\left[N_{\mathrm{bm}}(k)-B_{\mathrm{bm}}\right]},\]</div>
|
||||
<p>with</p>
|
||||
<blockquote>
|
||||
<div><ul class="simple">
|
||||
<li><span class="math">\(N_{\mathrm{fp}}(k)\)</span>: counts in the <strong>forward</strong> histogram channel with positive helicity <span class="math">\(k\)</span></li>
|
||||
<li><span class="math">\(N_{\mathrm{bp}}(k)\)</span>: counts in the <strong>backward</strong> histogram channel with positive helicity <span class="math">\(k\)</span></li>
|
||||
<li><span class="math">\(B_{\mathrm{fp}}\)</span>: constant background in the <strong>forward</strong> histogram with positive helicity (RUN block: <a class="reference internal" href="#msr-backgr-fix"><em>backgr.fix</em></a> or <a class="reference internal" href="#msr-background-asymmetry"><em>background</em></a>)</li>
|
||||
<li><span class="math">\(B_{\mathrm{bp}}\)</span>: constant background in the <strong>backward</strong> histogram with positive helicity (RUN block: <a class="reference internal" href="#msr-backgr-fix"><em>backgr.fix</em></a> or <a class="reference internal" href="#msr-background-asymmetry"><em>background</em></a>)</li>
|
||||
<li><span class="math">\(N_{\mathrm{fm}}(k)\)</span>: counts in the <strong>forward</strong> histogram channel with negative helicity <span class="math">\(k\)</span></li>
|
||||
<li><span class="math">\(N_{\mathrm{bm}}(k)\)</span>: counts in the <strong>backward</strong> histogram channel with negative helicity <span class="math">\(k\)</span></li>
|
||||
<li><span class="math">\(B_{\mathrm{fm}}\)</span>: constant background in the <strong>forward</strong> histogram with negative helicity (RUN block: <a class="reference internal" href="#msr-backgr-fix"><em>backgr.fix</em></a> or <a class="reference internal" href="#msr-background-asymmetry"><em>background</em></a>)</li>
|
||||
<li><span class="math">\(B_{\mathrm{bm}}\)</span>: constant background in the <strong>backward</strong> histogram with negative helicity (RUN block: <a class="reference internal" href="#msr-backgr-fix"><em>backgr.fix</em></a> or <a class="reference internal" href="#msr-background-asymmetry"><em>background</em></a>)</li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
<p>This theoretical asymmetry <span class="math">\(a(t)\)</span> is used to fit the function</p>
|
||||
<div class="math">
|
||||
\[a(t)=\frac{(\alpha\beta +1)A(t)-(\alpha -1)}{(\alpha +1)-(\alpha\beta -1)A(t)} - \frac{(\alpha -1)-(\alpha\beta 1)A(t)}{(\alpha +1)+(\alpha\beta -1)Am(t)},\]</div>
|
||||
<p>where</p>
|
||||
<blockquote>
|
||||
<div><ul class="simple">
|
||||
<li><span class="math">\(\alpha\)</span>: accounts for the different detector efficiencies and solid angles (RUN block: <a class="reference internal" href="#msr-alpha-beta"><em>alpha</em></a>).</li>
|
||||
<li><span class="math">\(\beta\)</span>: accounts for the different detector asymmetries (RUN block: <a class="reference internal" href="#msr-alpha-beta"><em>beta</em></a>).</li>
|
||||
<li><span class="math">\(A(t)\)</span>: is the depolarization function as given in the <a class="reference internal" href="#msr-theory-block"><em>THEORY block</em></a>.</li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
<p>For the graphical representation in plot type 5 the equation above is rearranged to get <span class="math">\(A(t)\)</span>:</p>
|
||||
<div class="math">
|
||||
\[\begin{split}A(t) &= \frac{(\alpha -1)+(\alpha +1)a(t)}{(\alpha\beta+1)+(\alpha\beta -1)a(t)}-\frac{(\alpha +1)a(t)-(\alpha-1)}{(\alpha\beta +1)+(1-\alpha\beta)a(t)} \\
|
||||
&= \frac{\alpha\left[N_{\mathrm{fp}}(t)-B_{\mathrm{fp}}\right]-\left[N_{\mathrm{bp}}(t)-B_{\mathrm{bp}}\right]}{\alpha\beta\left[N_{\mathrm{fp}}(t)-B_{\mathrm{fp}}\right]+\left[N_{\mathrm{bp}}(t)-B_{\mathrm{bp}}\right]} -\frac{\alpha\left[N_{\mathrm{fm}}(t)-B_{\mathrm{fm}}\right]-\left[N_{\mathrm{bm}}(t)-B_{\mathrm{bm}}\right]}{\alpha\beta\left[N_{\mathrm{fm}}(t)-B_{\mathrm{fm}}\right]+\left[N_{\mathrm{bm}}(t)-B_{\mathrm{bm}}\right]}\end{split}\]</div>
|
||||
<p>and plotted together with the function given in the THEORY block.</p>
|
||||
</div>
|
||||
<div class="section" id="non-mgrsr-fit-fit-type-8">
|
||||
<span id="non-musr-fit"></span><span id="index-69"></span><h3>Non-μSR Fit (fit type 8)<a class="headerlink" href="#non-mgrsr-fit-fit-type-8" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="non-musr-fit"></span><span id="index-70"></span><h3>Non-μSR Fit (fit type 8)<a class="headerlink" href="#non-mgrsr-fit-fit-type-8" title="Permalink to this headline">¶</a></h3>
|
||||
<p>In the case of a non-μSR fit (fit type 8) the fitting function is</p>
|
||||
<div class="math">
|
||||
\[y = f(x),\]</div>
|
||||
@ -1878,7 +1928,7 @@ the single histogram RRF fit apply: <strong>if you not urgently need it: do not
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="id22">
|
||||
<span id="index-70"></span><span id="id23"></span><h2>User Functions<a class="headerlink" href="#id22" title="Permalink to this headline">¶</a></h2>
|
||||
<span id="index-71"></span><span id="id23"></span><h2>User Functions<a class="headerlink" href="#id22" title="Permalink to this headline">¶</a></h2>
|
||||
<p><tt class="docutils literal"><span class="pre">musrfit</span></tt> offers the possibility to plug-in user-defined functions implemented in <tt class="docutils literal"><span class="pre">C++</span></tt> classes to the fitting and plotting routines.
|
||||
In order to do so, basically two things are needed:</p>
|
||||
<blockquote>
|
||||
@ -1896,7 +1946,7 @@ In order to do so, basically two things are needed:</p>
|
||||
</div></blockquote>
|
||||
<p>Since the first is simpler this will be explained using an explicit example, before it is discussed why the second option is needed and how it can be used.</p>
|
||||
<div class="section" id="user-function-without-global-user-function-object-access">
|
||||
<span id="user-functions-without-global-part"></span><span id="index-71"></span><h3>User Function without global user-function-object access<a class="headerlink" href="#user-function-without-global-user-function-object-access" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="user-functions-without-global-part"></span><span id="index-72"></span><h3>User Function without global user-function-object access<a class="headerlink" href="#user-function-without-global-user-function-object-access" title="Permalink to this headline">¶</a></h3>
|
||||
<p>In the following it is explained in detail how the implementation of a user function is done using the simple example of <span class="math">\(f_a(x) = \sin(a x)/(a x)\)</span>,
|
||||
where the parameter <span class="math">\(a\)</span> should be determined by the fit. Although not necessary for this simple example, the source code is split into two parts,
|
||||
namely a header file <tt class="docutils literal"><span class="pre">TMyFunction.h</span></tt> containing the class declaration and a second file <tt class="docutils literal"><span class="pre">TMyFunction.cpp</span></tt> including the function implementation
|
||||
@ -1999,7 +2049,7 @@ refer to the <a class="reference external" href="https://root.cern.ch/interactin
|
||||
<p>Finally, please be aware of the <a class="reference internal" href="#user-function-important"><em>remark</em></a> at the end of this section.</p>
|
||||
</div>
|
||||
<div class="section" id="user-function-with-global-user-function-object-access">
|
||||
<span id="user-functions-with-global-part"></span><span id="index-72"></span><h3>User Function with global user-function-object access<a class="headerlink" href="#user-function-with-global-user-function-object-access" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="user-functions-with-global-part"></span><span id="index-73"></span><h3>User Function with global user-function-object access<a class="headerlink" href="#user-function-with-global-user-function-object-access" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Before explaining how to use global objects within user functions, it will be shortly explained where is the problem and why this might be a sensible approach.
|
||||
In <tt class="docutils literal"><span class="pre">musrfit</span></tt> each <a class="reference internal" href="#msr-run-block"><em>RUN block</em></a> (histogram, asymmetry, ...) is owning its own theory-function tree. An example is shown in the figure below.
|
||||
The bluish nodes are default musrfit functions, whereas the red nodes represent user functions (here labeled by <tt class="docutils literal"><span class="pre">uF1</span></tt> and <tt class="docutils literal"><span class="pre">uF2</span></tt>). Without global user-function
|
||||
@ -2139,7 +2189,7 @@ In case this cannot be ensured, the parallelization can be disabled by <em>̵
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="technical-description-of-the-musrfit-framework">
|
||||
<span id="technical-musrfit"></span><span id="index-73"></span><h2>Technical Description of the musrfit framework<a class="headerlink" href="#technical-description-of-the-musrfit-framework" title="Permalink to this headline">¶</a></h2>
|
||||
<span id="technical-musrfit"></span><span id="index-74"></span><h2>Technical Description of the musrfit framework<a class="headerlink" href="#technical-description-of-the-musrfit-framework" title="Permalink to this headline">¶</a></h2>
|
||||
<p>A technical description of the musrfit framework can be found on its own <a class="reference external" href="http://lmu.web.psi.ch/musrfit/technical/index.html">docu</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -2185,6 +2235,7 @@ In case this cannot be ensured, the parallelization can be disabled by <em>̵
|
||||
<li><a class="reference internal" href="#asymmetry-fit-fit-type-2">Asymmetry Fit (fit type 2)</a></li>
|
||||
<li><a class="reference internal" href="#asymmetry-rrf-fit-fit-type-3">Asymmetry RRF Fit (fit type 3)</a></li>
|
||||
<li><a class="reference internal" href="#negative-muon-mgrsr-fit-fit-type-4">Negative Muon μSR Fit (fit type 4)</a></li>
|
||||
<li><a class="reference internal" href="#beta-nmr-asymmetry-fit-fit-type-5">beta-NMR Asymmetry Fit (fit type 5)</a></li>
|
||||
<li><a class="reference internal" href="#non-mgrsr-fit-fit-type-8">Non-μSR Fit (fit type 8)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -2238,12 +2289,12 @@ In case this cannot be ensured, the parallelization can be disabled by <em>̵
|
||||
<li class="right" >
|
||||
<a href="tutorial.html" title="Tutorial for musrfit"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.4.2 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.5.1 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2018, Andreas Suter.
|
||||
Last updated on Mar 08, 2019.
|
||||
© Copyright 2019, Andreas Suter.
|
||||
Last updated on Sep 10, 2019.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
@ -463,8 +463,9 @@ INPUT = musrfit.dox \
|
||||
../src/include/PFitterFcnDKS.h \
|
||||
../src/include/PFitterFcn.h \
|
||||
../src/include/PFitter.h \
|
||||
../src/include/PFourier.h \
|
||||
../src/include/PFourierCanvas.h \
|
||||
../src/include/PFourierCanvasLinkDef.h \
|
||||
../src/include/PFourier.h \
|
||||
../src/include/PFunctionGrammar.h \
|
||||
../src/include/PFunction.h \
|
||||
../src/include/PFunctionHandler.h \
|
||||
@ -477,12 +478,14 @@ INPUT = musrfit.dox \
|
||||
../src/include/PMusrT0LinkDef.h \
|
||||
../src/include/PPrepFourier.h \
|
||||
../src/include/PRunAsymmetry.h \
|
||||
../src/include/PRunAsymmetryRRF.h \
|
||||
../src/include/PRunBase.h \
|
||||
../src/include/PRunDataHandler.h \
|
||||
../src/include/PRunListCollection.h \
|
||||
../src/include/PRunMuMinus.h \
|
||||
../src/include/PRunNonMusr.h \
|
||||
../src/include/PRunSingleHisto.h \
|
||||
../src/include/PRunSingleHistoRRF.h \
|
||||
../src/include/PStartupHandler.h \
|
||||
../src/include/PStartupHandlerLinkDef.h \
|
||||
../src/include/PTheory.h \
|
||||
@ -492,8 +495,8 @@ INPUT = musrfit.dox \
|
||||
../src/classes/PFitter.cpp \
|
||||
../src/classes/PFitterFcnDKS.cpp \
|
||||
../src/classes/PFitterFcn.cpp \
|
||||
../src/classes/PFourier.cpp \
|
||||
../src/classes/PFourierCanvas.cpp \
|
||||
../src/classes/PFourier.cpp \
|
||||
../src/classes/PFunction.cpp \
|
||||
../src/classes/PFunctionHandler.cpp \
|
||||
../src/classes/PMsr2Data.cpp \
|
||||
@ -503,12 +506,14 @@ INPUT = musrfit.dox \
|
||||
../src/classes/PMusrT0.cpp \
|
||||
../src/classes/PPrepFourier.cpp \
|
||||
../src/classes/PRunAsymmetry.cpp \
|
||||
../src/classes/PRunAsymmetryRRF.cpp \
|
||||
../src/classes/PRunBase.cpp \
|
||||
../src/classes/PRunDataHandler.cpp \
|
||||
../src/classes/PRunListCollection.cpp \
|
||||
../src/classes/PRunMuMinus.cpp \
|
||||
../src/classes/PRunNonMusr.cpp \
|
||||
../src/classes/PRunSingleHisto.cpp \
|
||||
../src/classes/PRunSingleHistoRRF.cpp \
|
||||
../src/classes/PStartupHandler.cpp \
|
||||
../src/classes/PTheory.cpp \
|
||||
../src/classes/PUserFcnBase.cpp \
|
||||
|
@ -2,35 +2,55 @@
|
||||
|
||||
#--- generate necessary dictionaries ------------------------------------------
|
||||
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
|
||||
# ROOT requires that the dictonary header files are found at configuration time.
|
||||
# Hence, target_include_directories cannot be used here because, targets are
|
||||
# setup only afterwards.
|
||||
include_directories(${MUSRFIT_INC})
|
||||
|
||||
root_generate_dictionary(
|
||||
PFourierCanvasDict
|
||||
-I${FFTW3_INCLUDE_DIR} ${MUSRFIT_INC}/PFourierCanvas.h
|
||||
PFourierCanvas.h
|
||||
OPTIONS
|
||||
-I${MUSRFIT_INC}
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-inlineInputHeader
|
||||
LINKDEF ${MUSRFIT_INC}/PFourierCanvasLinkDef.h
|
||||
MODULE PFourierCanvas
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PMusrCanvasDict
|
||||
-I${Boost_INCLUDE_DIR} -I${FFTW3_INCLUDE_DIR} ${MUSRFIT_INC}/PMusrCanvas.h
|
||||
PMusrCanvasDict
|
||||
PMusrCanvas.h
|
||||
LINKDEF ${MUSRFIT_INC}/PMusrCanvasLinkDef.h
|
||||
OPTIONS
|
||||
-I${Boost_INCLUDE_DIR} -I${FFTW3_INCLUDE_DIR} -I${MUSRFIT_INC}
|
||||
-inlineInputHeader
|
||||
MODULE PMusrCanvas
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PMusrT0Dict
|
||||
-I${Boost_INCLUDE_DIR} -I${FFTW3_INCLUDE_DIR} ${MUSRFIT_INC}/PMusrT0.h
|
||||
PMusrT0.h
|
||||
LINKDEF ${MUSRFIT_INC}/PMusrT0LinkDef.h
|
||||
OPTIONS
|
||||
-I${Boost_INCLUDE_DIR} -I${FFTW3_INCLUDE_DIR} -I${MUSRFIT_INC}
|
||||
-inlineInputHeader
|
||||
MODULE PMusrT0
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PStartupHandlerDict
|
||||
-I${FFTW3_INCLUDE_DIR} ${MUSRFIT_INC}/PStartupHandler.h
|
||||
PStartupHandler.h
|
||||
LINKDEF ${MUSRFIT_INC}/PStartupHandlerLinkDef.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR} -I${MUSRFIT_INC}
|
||||
-inlineInputHeader
|
||||
MODULE PStartupHandler
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PUserFcnBaseDict
|
||||
-I${FFTW3_INCLUDE_DIR} ${MUSRFIT_INC}/PUserFcnBase.h
|
||||
PUserFcnBaseDict
|
||||
PUserFcnBase.h
|
||||
LINKDEF ${MUSRFIT_INC}/PUserFcnBaseLinkDef.h
|
||||
OPTIONS
|
||||
-inlineInputHeader
|
||||
-I${FFTW3_INCLUDE_DIR} -I${MUSRFIT_INC}
|
||||
MODULE PUserFcnBase
|
||||
)
|
||||
|
||||
@ -39,7 +59,7 @@ set(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
set(exec_prefix "\$\{prefix\}")
|
||||
set(libdir "\$\{exec_prefix\}/lib")
|
||||
set(includedir "\$\{prefix\}/include")
|
||||
set(MUSR_VERSION "1.2.0")
|
||||
set(MUSR_VERSION "1.3.0")
|
||||
set(MUSR_LIBRARY_NAME "PMusr")
|
||||
configure_file("PMusr.pc.in" "PMusr.pc" @ONLY)
|
||||
set(USERFCN_LIBRARY_NAME "PUserFcnBase")
|
||||
@ -66,6 +86,7 @@ add_library(PMusr SHARED
|
||||
PMusrT0Dict.cxx
|
||||
PPrepFourier.cpp
|
||||
PRunAsymmetry.cpp
|
||||
PRunAsymmetryBNMR.cpp
|
||||
PRunAsymmetryRRF.cpp
|
||||
PRunBase.cpp
|
||||
PRunDataHandler.cpp
|
||||
@ -78,13 +99,6 @@ add_library(PMusr SHARED
|
||||
PStartupHandlerDict.cxx
|
||||
PTheory.cpp
|
||||
)
|
||||
|
||||
#--- set target properties, e.g. version --------------------------------------
|
||||
set_target_properties(PMusr
|
||||
PROPERTIES
|
||||
VERSION ${MUSR_VERSION}
|
||||
)
|
||||
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PMusr BEFORE PRIVATE
|
||||
@ -106,11 +120,14 @@ add_library(PUserFcnBase SHARED
|
||||
)
|
||||
|
||||
#--- set target properties, e.g. version --------------------------------------
|
||||
set_target_properties(PMusr
|
||||
PROPERTIES
|
||||
VERSION ${MUSR_VERSION}
|
||||
)
|
||||
set_target_properties(PUserFcnBase
|
||||
PROPERTIES
|
||||
VERSION ${MUSR_VERSION}
|
||||
)
|
||||
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PUserFcnBase BEFORE PRIVATE $<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
@ -174,15 +191,31 @@ install(
|
||||
)
|
||||
|
||||
#--- install headers ----------------------------------------------------------
|
||||
#--- only install headers needed for classes with dictionary
|
||||
install(
|
||||
FILES ${MUSRFIT_INC}/PFourierCanvas.h
|
||||
FILES ${MUSRFIT_INC}/PFitterFcn.h
|
||||
${MUSRFIT_INC}/PFitter.h
|
||||
${MUSRFIT_INC}/PFourierCanvas.h
|
||||
${MUSRFIT_INC}/PFourier.h
|
||||
${MUSRFIT_INC}/PFunctionGrammar.h
|
||||
${MUSRFIT_INC}/PFunction.h
|
||||
${MUSRFIT_INC}/PFunctionHandler.h
|
||||
${MUSRFIT_INC}/PMsr2Data.h
|
||||
${MUSRFIT_INC}/PMsrHandler.h
|
||||
${MUSRFIT_INC}/PMusrCanvas.h
|
||||
${MUSRFIT_INC}/PMusr.h
|
||||
${MUSRFIT_INC}/PMusrT0.h
|
||||
${MUSRFIT_INC}/PPrepFourier.h
|
||||
${MUSRFIT_INC}/PRunAsymmetry.h
|
||||
${MUSRFIT_INC}/PRunAsymmetryRRF.h
|
||||
${MUSRFIT_INC}/PRunBase.h
|
||||
${MUSRFIT_INC}/PRunDataHandler.h
|
||||
${MUSRFIT_INC}/PRunListCollection.h
|
||||
${MUSRFIT_INC}/PRunMuMinus.h
|
||||
${MUSRFIT_INC}/PRunNonMusr.h
|
||||
${MUSRFIT_INC}/PRunSingleHisto.h
|
||||
${MUSRFIT_INC}/PRunSingleHistoRRF.h
|
||||
${MUSRFIT_INC}/PStartupHandler.h
|
||||
${MUSRFIT_INC}/PTheory.h
|
||||
${MUSRFIT_INC}/PUserFcnBase.h
|
||||
DESTINATION include
|
||||
)
|
||||
|
@ -45,8 +45,8 @@
|
||||
#include <limits>
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "Minuit2/FunctionMinimum.h"
|
||||
#include "Minuit2/MnContours.h"
|
||||
|
@ -75,6 +75,7 @@ Double_t PFitterFcn::operator()(const std::vector<Double_t>& par) const
|
||||
value += fRunListCollection->GetSingleHistoRRFChisq(par);
|
||||
value += fRunListCollection->GetAsymmetryChisq(par);
|
||||
value += fRunListCollection->GetAsymmetryRRFChisq(par);
|
||||
value += fRunListCollection->GetAsymmetryBNMRChisq(par);
|
||||
value += fRunListCollection->GetMuMinusChisq(par);
|
||||
value += fRunListCollection->GetNonMusrChisq(par);
|
||||
} else { // max likelihood
|
||||
@ -82,6 +83,7 @@ Double_t PFitterFcn::operator()(const std::vector<Double_t>& par) const
|
||||
value += fRunListCollection->GetSingleHistoRRFMaximumLikelihood(par);
|
||||
value += fRunListCollection->GetAsymmetryMaximumLikelihood(par);
|
||||
value += fRunListCollection->GetAsymmetryRRFMaximumLikelihood(par);
|
||||
value += fRunListCollection->GetAsymmetryBNMRMaximumLikelihood(par);
|
||||
value += fRunListCollection->GetMuMinusMaximumLikelihood(par);
|
||||
value += fRunListCollection->GetNonMusrMaximumLikelihood(par);
|
||||
}
|
||||
|
@ -68,8 +68,6 @@ PMsrHandler::PMsrHandler(const Char_t *fileName, PStartupOptions *startupOptions
|
||||
|
||||
fFuncHandler = nullptr;
|
||||
|
||||
fNoOfMaps = -1;
|
||||
|
||||
// check if the file name given is a path-file-name, and if yes, split it into path and file name.
|
||||
if (fFileName.Contains("/")) {
|
||||
Int_t idx = -1;
|
||||
@ -164,9 +162,9 @@ Int_t PMsrHandler::ReadMsrFile()
|
||||
continue;
|
||||
}
|
||||
|
||||
// remove leading spaces
|
||||
line.Remove(TString::kLeading, ' ');
|
||||
|
||||
// remove leading spaces
|
||||
line.Remove(TString::kLeading, ' ');
|
||||
|
||||
if (!line.IsWhitespace()) { // if not an empty line, handle it
|
||||
// check for a msr block
|
||||
if (line_no == 1) { // title
|
||||
@ -642,6 +640,9 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
|
||||
case MSR_FITTYPE_MU_MINUS:
|
||||
fout << std::left << "fittype" << MSR_FITTYPE_MU_MINUS << " (mu minus fit)" << std::endl ;
|
||||
break;
|
||||
case MSR_FITTYPE_BNMR:
|
||||
fout << std::left << "fittype" << MSR_FITTYPE_BNMR << " (beta-NMR fit)" << std::endl ;
|
||||
break;
|
||||
case MSR_FITTYPE_NON_MUSR:
|
||||
fout << std::left << "fittype" << MSR_FITTYPE_NON_MUSR << " (non muSR fit)" << std::endl ;
|
||||
break;
|
||||
@ -806,6 +807,9 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
|
||||
case MSR_FITTYPE_MU_MINUS:
|
||||
fout << std::left << "fittype" << MSR_FITTYPE_MU_MINUS << " (mu minus fit)" << std::endl ;
|
||||
break;
|
||||
case MSR_FITTYPE_BNMR:
|
||||
fout << std::left << "fittype" << MSR_FITTYPE_BNMR << " (beta-NMR fit)" << std::endl ;
|
||||
break;
|
||||
case MSR_FITTYPE_NON_MUSR:
|
||||
fout << std::left << "fittype" << MSR_FITTYPE_NON_MUSR << " (non muSR fit)" << std::endl ;
|
||||
break;
|
||||
@ -1169,6 +1173,9 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
|
||||
case MSR_PLOT_MU_MINUS:
|
||||
fout << "PLOT " << fPlots[plotNo].fPlotType << " (mu minus plot)" << std::endl;
|
||||
break;
|
||||
case MSR_PLOT_BNMR:
|
||||
fout << "PLOT " << fPlots[plotNo].fPlotType << " (beta-NMR asymmetry plot)" << std::endl;
|
||||
break;
|
||||
case MSR_PLOT_NON_MUSR:
|
||||
fout << "PLOT " << fPlots[plotNo].fPlotType << " (non muSR plot)" << std::endl;
|
||||
break;
|
||||
@ -1718,6 +1725,9 @@ Int_t PMsrHandler::WriteMsrFile(const Char_t *filename, std::map<UInt_t, TString
|
||||
case MSR_FITTYPE_MU_MINUS:
|
||||
fout << std::left << "fittype" << MSR_FITTYPE_MU_MINUS << " (mu minus fit)" << std::endl ;
|
||||
break;
|
||||
case MSR_FITTYPE_BNMR:
|
||||
fout << std::left << "fittype" << MSR_FITTYPE_BNMR << " (beta-NMR fit)" << std::endl ;
|
||||
break;
|
||||
case MSR_FITTYPE_NON_MUSR:
|
||||
fout << std::left << "fittype" << MSR_FITTYPE_NON_MUSR << " (non muSR fit)" << std::endl ;
|
||||
break;
|
||||
@ -1909,6 +1919,9 @@ Int_t PMsrHandler::WriteMsrFile(const Char_t *filename, std::map<UInt_t, TString
|
||||
case MSR_FITTYPE_MU_MINUS:
|
||||
fout << std::left << "fittype" << MSR_FITTYPE_MU_MINUS << " (mu minus fit)" << std::endl ;
|
||||
break;
|
||||
case MSR_FITTYPE_BNMR:
|
||||
fout << std::left << "fittype" << MSR_FITTYPE_BNMR << " (beta-NMR fit)" << std::endl ;
|
||||
break;
|
||||
case MSR_FITTYPE_NON_MUSR:
|
||||
fout << std::left << "fittype" << MSR_FITTYPE_NON_MUSR << " (non muSR fit)" << std::endl ;
|
||||
break;
|
||||
@ -2265,6 +2278,9 @@ Int_t PMsrHandler::WriteMsrFile(const Char_t *filename, std::map<UInt_t, TString
|
||||
case MSR_PLOT_MU_MINUS:
|
||||
fout << "PLOT " << fPlots[i].fPlotType << " (mu minus plot)" << std::endl;
|
||||
break;
|
||||
case MSR_PLOT_BNMR:
|
||||
fout << "PLOT " << fPlots[i].fPlotType << " (beta-NMR asymmetry plot)" << std::endl;
|
||||
break;
|
||||
case MSR_PLOT_NON_MUSR:
|
||||
fout << "PLOT " << fPlots[i].fPlotType << " (non muSR plot)" << std::endl;
|
||||
break;
|
||||
@ -2321,6 +2337,11 @@ Int_t PMsrHandler::WriteMsrFile(const Char_t *filename, std::map<UInt_t, TString
|
||||
fout << "logy" << std::endl;
|
||||
}
|
||||
|
||||
// lifetimecorrection
|
||||
if (fPlots[i].fLifeTimeCorrection) {
|
||||
fout << "lifetimecorrection" << std::endl;
|
||||
}
|
||||
|
||||
// rrf_packing
|
||||
if (fPlots[i].fRRFPacking) {
|
||||
fout << "rrf_packing " << fPlots[i].fRRFPacking << std::endl;
|
||||
@ -2983,6 +3004,7 @@ Bool_t PMsrHandler::HandleGlobalEntry(PMsrLines &lines)
|
||||
(fittype == MSR_FITTYPE_ASYM) ||
|
||||
(fittype == MSR_FITTYPE_ASYM_RRF) ||
|
||||
(fittype == MSR_FITTYPE_MU_MINUS) ||
|
||||
(fittype == MSR_FITTYPE_BNMR) ||
|
||||
(fittype == MSR_FITTYPE_NON_MUSR)) {
|
||||
global.SetFitType(fittype);
|
||||
} else {
|
||||
@ -3212,7 +3234,7 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
||||
UInt_t addT0Counter = 0;
|
||||
|
||||
Int_t ival;
|
||||
Double_t dval;
|
||||
Double_t dval;
|
||||
|
||||
iter = lines.begin();
|
||||
while ((iter != lines.end()) && !error) {
|
||||
@ -3324,6 +3346,7 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
||||
(fittype == MSR_FITTYPE_ASYM) ||
|
||||
(fittype == MSR_FITTYPE_ASYM_RRF) ||
|
||||
(fittype == MSR_FITTYPE_MU_MINUS) ||
|
||||
(fittype == MSR_FITTYPE_BNMR) ||
|
||||
(fittype == MSR_FITTYPE_NON_MUSR)) {
|
||||
param.SetFitType(fittype);
|
||||
} else {
|
||||
@ -4591,6 +4614,7 @@ Bool_t PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
||||
case MSR_PLOT_SINGLE_HISTO: // like: runs 1 5 13
|
||||
case MSR_PLOT_SINGLE_HISTO_RRF:
|
||||
case MSR_PLOT_ASYM:
|
||||
case MSR_PLOT_BNMR:
|
||||
case MSR_PLOT_ASYM_RRF:
|
||||
case MSR_PLOT_NON_MUSR:
|
||||
case MSR_PLOT_MU_MINUS:
|
||||
@ -4778,6 +4802,8 @@ Bool_t PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
||||
param.fLogX = true;
|
||||
} else if (iter1->fLine.Contains("logy", TString::kIgnoreCase)) {
|
||||
param.fLogY = true;
|
||||
} else if (iter1->fLine.Contains("lifetimecorrection", TString::kIgnoreCase)) {
|
||||
param.fLifeTimeCorrection = true;
|
||||
} else if (iter1->fLine.Contains("view_packing", TString::kIgnoreCase)) {
|
||||
tokens = iter1->fLine.Tokenize(" \t");
|
||||
if (!tokens) {
|
||||
@ -5008,6 +5034,7 @@ Bool_t PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
||||
std::cerr << std::endl << ">> 2=forward-backward asym,";
|
||||
std::cerr << std::endl << ">> 3=forward-backward RRF asym,";
|
||||
std::cerr << std::endl << ">> 4=mu minus single histo,";
|
||||
std::cerr << std::endl << ">> 5=forward-backward beta-NMR asym,";
|
||||
std::cerr << std::endl << ">> 8=non muSR.";
|
||||
std::cerr << std::endl << ">> <run_list> is the list of runs, e.g. runs 1 3";
|
||||
std::cerr << std::endl << ">> range is optional";
|
||||
@ -5865,6 +5892,58 @@ Bool_t PMsrHandler::CheckRunBlockIntegrity()
|
||||
fRuns[i].SetPacking(1);
|
||||
}
|
||||
break;
|
||||
case PRUN_ASYMMETRY_BNMR:
|
||||
// check alpha
|
||||
// if ((fRuns[i].GetAlphaParamNo() == -1) && !fFourierOnly) {
|
||||
// std::cerr << std::endl << ">> PMsrHandler::CheckRunBlockIntegrity(): **ERROR** in RUN block number " << i+1;
|
||||
// std::cerr << std::endl << ">> alpha parameter number missing which is needed for an asymmetry fit.";
|
||||
// std::cerr << std::endl << ">> Consider to check the manual ;-)" << std::endl;
|
||||
// return false;
|
||||
// }
|
||||
// check that there is a forward parameter number
|
||||
if (fRuns[i].GetForwardHistoNo() == -1) {
|
||||
std::cerr << std::endl << ">> PMsrHandler::CheckRunBlockIntegrity(): **ERROR** in RUN block number " << i+1;
|
||||
std::cerr << std::endl << ">> forward histogram number not defined. Necessary for asymmetry fits." << std::endl;
|
||||
return false;
|
||||
}
|
||||
// check that there is a backward parameter number
|
||||
if (fRuns[i].GetBackwardHistoNo() == -1) {
|
||||
std::cerr << std::endl << ">> PMsrHandler::CheckRunBlockIntegrity(): **ERROR** in RUN block number " << i+1;
|
||||
std::cerr << std::endl << ">> backward histogram number not defined. Necessary for asymmetry fits." << std::endl;
|
||||
return false;
|
||||
}
|
||||
// check fit range
|
||||
if (!fRuns[i].IsFitRangeInBin()) { // fit range given as times in usec
|
||||
if ((fRuns[i].GetFitRange(0) == PMUSR_UNDEFINED) || (fRuns[i].GetFitRange(1) == PMUSR_UNDEFINED)) {
|
||||
if ((fGlobal.GetFitRange(0) == PMUSR_UNDEFINED) || (fGlobal.GetFitRange(1) == PMUSR_UNDEFINED)) {
|
||||
std::cerr << std::endl << ">> PMsrHandler::CheckRunBlockIntegrity(): **ERROR** in RUN block number " << i+1;
|
||||
std::cerr << std::endl << ">> Fit range is not defined, also NOT present in the GLOBAL block. Necessary for asymmetry fits." << std::endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
// check number of T0's provided
|
||||
if ((fRuns[i].GetT0BinSize() > 2*fRuns[i].GetForwardHistoNoSize()) &&
|
||||
(fGlobal.GetT0BinSize() > 2*fRuns[i].GetForwardHistoNoSize())) {
|
||||
std::cerr << std::endl << ">> PMsrHandler::CheckRunBlockIntegrity(): **ERROR** in RUN block number " << i+1;
|
||||
std::cerr << std::endl << ">> Found " << fRuns[i].GetT0BinSize() << " T0 entries. Expecting only " << 2*fRuns[i].GetForwardHistoNoSize() << " in forward. Needs to be fixed." << std::endl;
|
||||
std::cerr << std::endl << ">> In GLOBAL block: " << fGlobal.GetT0BinSize() << " T0 entries. Expecting only " << 2*fRuns[i].GetForwardHistoNoSize() << ". Needs to be fixed." << std::endl;
|
||||
return false;
|
||||
}
|
||||
if ((fRuns[i].GetT0BinSize() > 2*fRuns[i].GetBackwardHistoNoSize()) &&
|
||||
(fGlobal.GetT0BinSize() > 2*fRuns[i].GetBackwardHistoNoSize())) {
|
||||
std::cerr << std::endl << ">> PMsrHandler::CheckRunBlockIntegrity(): **ERROR** in RUN block number " << i+1;
|
||||
std::cerr << std::endl << ">> Found " << fRuns[i].GetT0BinSize() << " T0 entries. Expecting only " << 2*fRuns[i].GetBackwardHistoNoSize() << " in backward. Needs to be fixed." << std::endl;
|
||||
std::cerr << std::endl << ">> In GLOBAL block: " << fGlobal.GetT0BinSize() << " T0 entries. Expecting only " << 2*fRuns[i].GetBackwardHistoNoSize() << ". Needs to be fixed." << std::endl;
|
||||
return false;
|
||||
}
|
||||
// check packing
|
||||
if ((fRuns[i].GetPacking() == -1) && (fGlobal.GetPacking() == -1)) {
|
||||
std::cerr << std::endl << ">> PMsrHandler::CheckRunBlockIntegrity(): **WARNING** in RUN block number " << i+1;
|
||||
std::cerr << std::endl << ">> Packing is neither defined here, nor in the GLOBAL block, will set it to 1." << std::endl;
|
||||
fRuns[i].SetPacking(1);
|
||||
}
|
||||
break;
|
||||
case PRUN_ASYMMETRY_RRF:
|
||||
// check alpha
|
||||
if ((fRuns[i].GetAlphaParamNo() == -1) && !fFourierOnly) {
|
||||
@ -6221,7 +6300,7 @@ Bool_t PMsrHandler::CheckHistoGrouping()
|
||||
Bool_t result = true;
|
||||
|
||||
for (UInt_t i=0; i<fRuns.size(); i++) {
|
||||
if (fRuns[i].GetFitType() == MSR_FITTYPE_ASYM) {
|
||||
if (fRuns[i].GetFitType() == MSR_FITTYPE_ASYM || fRuns[i].GetFitType() == MSR_FITTYPE_BNMR) {
|
||||
if (fRuns[i].GetForwardHistoNoSize() != fRuns[i].GetBackwardHistoNoSize()) {
|
||||
std::cerr << std::endl << ">> PMsrHandler::CheckHistoGrouping: **ERROR** # of forward histos != # of backward histos.";
|
||||
std::cerr << std::endl << ">> Run #" << i+1;
|
||||
|
@ -1878,6 +1878,19 @@ void PMsrRunBlock::SetMapGlobal(UInt_t idx, Int_t ival)
|
||||
return;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// SetEstimatedAlpha (public)
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p> set the value of estimated alpha at position idx
|
||||
*
|
||||
* \param alpha is the estimated value
|
||||
*/
|
||||
void PMsrRunBlock::SetEstimatedAlpha(Double_t dval)
|
||||
{
|
||||
fAlpha = dval;
|
||||
}
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// implementation PStringNumberList
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
@ -712,6 +712,18 @@ void PMusrCanvas::UpdateDataTheoryPad()
|
||||
// handle data
|
||||
HandleDataSet(i, runNo, data);
|
||||
break;
|
||||
case MSR_FITTYPE_BNMR:
|
||||
data = fRunList->GetAsymmetryBNMR(runNo, PRunListCollection::kRunNo);
|
||||
if (!data) { // something wrong
|
||||
fValid = false;
|
||||
// error message
|
||||
std::cerr << std::endl << ">> PMusrCanvas::UpdateDataTheoryPad(): **ERROR** couldn't obtain run no " << runNo << " for a beta-NMR asymmetry plot";
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
// handle data
|
||||
HandleDataSet(i, runNo, data);
|
||||
break;
|
||||
case MSR_FITTYPE_ASYM_RRF:
|
||||
data = fRunList->GetAsymmetryRRF(runNo, PRunListCollection::kRunNo);
|
||||
if (!data) { // something wrong
|
||||
@ -904,7 +916,8 @@ void PMusrCanvas::UpdateInfoPad()
|
||||
tstr += grouping;
|
||||
tstr += TString(",");
|
||||
} else if ((runs[runNo].GetFitType() == MSR_FITTYPE_ASYM) ||
|
||||
(runs[runNo].GetFitType() == MSR_FITTYPE_ASYM_RRF)) {
|
||||
(runs[runNo].GetFitType() == MSR_FITTYPE_ASYM_RRF) ||
|
||||
(runs[runNo].GetFitType() == MSR_FITTYPE_BNMR)) {
|
||||
tstr += TString("h:");
|
||||
TString grouping;
|
||||
fMsrHandler->GetGroupingString(runNo, "forward", grouping);
|
||||
@ -1599,6 +1612,7 @@ void PMusrCanvas::ExportData(const Char_t *fileName)
|
||||
case MSR_PLOT_SINGLE_HISTO:
|
||||
case MSR_PLOT_SINGLE_HISTO_RRF:
|
||||
case MSR_PLOT_ASYM:
|
||||
case MSR_PLOT_BNMR:
|
||||
case MSR_PLOT_ASYM_RRF:
|
||||
case MSR_PLOT_MU_MINUS:
|
||||
if (fDifferenceView) { // difference view plot
|
||||
@ -1899,7 +1913,7 @@ void PMusrCanvas::ExportData(const Char_t *fileName)
|
||||
xmax = fMultiGraphData->GetXaxis()->GetBinCenter(xmaxBin);
|
||||
|
||||
// fill ascii dump data
|
||||
for (UInt_t i=0; i<fNonMusrData.size(); i++) { // go through all the histogramms
|
||||
for (UInt_t i=0; i<fNonMusrData.size(); i++) { // go through all the graphs
|
||||
// clean up dump
|
||||
dump.dataX.clear();
|
||||
dump.data.clear();
|
||||
@ -1917,6 +1931,15 @@ void PMusrCanvas::ExportData(const Char_t *fileName)
|
||||
}
|
||||
}
|
||||
|
||||
// if anything found keep it
|
||||
if (dump.dataX.size() > 0)
|
||||
dumpVector.push_back(dump);
|
||||
|
||||
// clean up dump
|
||||
dump.dataX.clear();
|
||||
dump.data.clear();
|
||||
dump.dataErr.clear();
|
||||
|
||||
// go through all theory bins
|
||||
for (Int_t j=0; j<fNonMusrData[i].theory->GetN(); j++) {
|
||||
// get x and y value
|
||||
@ -2758,7 +2781,7 @@ void PMusrCanvas::HandleDataSet(UInt_t plotNo, UInt_t runNo, PRunData *data)
|
||||
size = data->GetValue()->size();
|
||||
dataSet.dataRange->SetXRange(start, end); // full possible range
|
||||
// make sure that for asymmetry the y-range is initialized reasonably
|
||||
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fPlotType == MSR_PLOT_ASYM)
|
||||
if ((fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fPlotType == MSR_PLOT_ASYM) || (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fPlotType == MSR_PLOT_BNMR))
|
||||
dataSet.dataRange->SetYRange(-0.4, 0.4);
|
||||
// extract necessary range information
|
||||
if ((fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmin.size() == 0) &&
|
||||
@ -2774,6 +2797,7 @@ void PMusrCanvas::HandleDataSet(UInt_t plotNo, UInt_t runNo, PRunData *data)
|
||||
fXmax = end;
|
||||
}
|
||||
if ((fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fPlotType == MSR_PLOT_ASYM) ||
|
||||
(fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fPlotType == MSR_PLOT_BNMR) ||
|
||||
(fMsrHandler->GetMsrRunList()->at(runNo).IsLifetimeCorrected())) {
|
||||
fYRangePresent = true;
|
||||
fYmin = -0.4;
|
||||
@ -2822,6 +2846,7 @@ void PMusrCanvas::HandleDataSet(UInt_t plotNo, UInt_t runNo, PRunData *data)
|
||||
|
||||
// make sure that for asymmetry the y-range is initialized reasonably
|
||||
if ((fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fPlotType == MSR_PLOT_ASYM) ||
|
||||
(fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fPlotType == MSR_PLOT_BNMR) ||
|
||||
(fMsrHandler->GetMsrRunList()->at(runNo).IsLifetimeCorrected())) {
|
||||
dataSet.dataRange->SetYRange(-0.4, 0.4);
|
||||
}
|
||||
@ -4686,7 +4711,13 @@ void PMusrCanvas::PlotData(Bool_t unzoom)
|
||||
fDataTheoryPad->SetLogy(1);
|
||||
|
||||
// set x-axis label
|
||||
fHistoFrame->GetXaxis()->SetTitle("Time (#mus)");
|
||||
if (fPlotType == MSR_PLOT_BNMR ) {
|
||||
// For BNMR/BNQR runs use seconds
|
||||
fHistoFrame->GetXaxis()->SetTitle("time (s)");
|
||||
} else {
|
||||
fHistoFrame->GetXaxis()->SetTitle("time (#mus)");
|
||||
}
|
||||
|
||||
// set y-axis label
|
||||
TString yAxisTitle;
|
||||
PMsrRunList *runList = fMsrHandler->GetMsrRunList();
|
||||
@ -4708,6 +4739,9 @@ void PMusrCanvas::PlotData(Bool_t unzoom)
|
||||
case MSR_PLOT_ASYM:
|
||||
yAxisTitle = "Asymmetry";
|
||||
break;
|
||||
case MSR_PLOT_BNMR:
|
||||
yAxisTitle = "Asymmetry";
|
||||
break;
|
||||
case MSR_PLOT_MU_MINUS:
|
||||
yAxisTitle = "N(t) per bin";
|
||||
break;
|
||||
@ -4804,7 +4838,8 @@ void PMusrCanvas::PlotData(Bool_t unzoom)
|
||||
}
|
||||
}
|
||||
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fLogY) {
|
||||
dataYmin = 1.0e-4 * dataYmax;
|
||||
if (dataYmin <= 0.0)
|
||||
dataYmin = 1.0e-4 * dataYmax;
|
||||
}
|
||||
|
||||
// create fMultiGraphData, and add all data and theory
|
||||
@ -4969,7 +5004,12 @@ void PMusrCanvas::PlotDifference(Bool_t unzoom)
|
||||
fHistoFrame->SetBins(noOfPoints, dataXmin, dataXmax);
|
||||
|
||||
// set x-axis label
|
||||
if (fPlotType == MSR_PLOT_BNMR) {
|
||||
// For BNMR/BNQR runs use seconds
|
||||
fHistoFrame->GetXaxis()->SetTitle("time (s)");
|
||||
} else {
|
||||
fHistoFrame->GetXaxis()->SetTitle("time (#mus)");
|
||||
}
|
||||
// set y-axis label
|
||||
fHistoFrame->GetYaxis()->SetTitleOffset(1.3);
|
||||
fHistoFrame->GetYaxis()->SetTitle("data-theory");
|
||||
@ -6087,7 +6127,12 @@ void PMusrCanvas::PlotAverage(Bool_t unzoom)
|
||||
// define x-axis title
|
||||
TString xAxisTitle("");
|
||||
if (fCurrentPlotView == PV_DATA) {
|
||||
if (fPlotType == MSR_PLOT_BNMR) {
|
||||
// For BNMR/BNQR runs use seconds
|
||||
xAxisTitle = TString("time (s)");
|
||||
} else {
|
||||
xAxisTitle = TString("time (#mus)");
|
||||
}
|
||||
} else { // all the Fourier
|
||||
if (fFourier.fUnits == FOURIER_UNIT_GAUSS) {
|
||||
xAxisTitle = TString("Field (G)");
|
||||
@ -6120,6 +6165,9 @@ void PMusrCanvas::PlotAverage(Bool_t unzoom)
|
||||
case MSR_PLOT_ASYM:
|
||||
yAxisTitle = "<asymmetry>";
|
||||
break;
|
||||
case MSR_PLOT_BNMR:
|
||||
yAxisTitle = "<asymmetry>";
|
||||
break;
|
||||
case MSR_PLOT_MU_MINUS:
|
||||
yAxisTitle = "<N(t)> per bin";
|
||||
break;
|
||||
@ -6476,8 +6524,8 @@ UInt_t PMusrCanvas::GetNeededAccuracy(PMsrParamStructure param)
|
||||
// find last significant digit
|
||||
for (Int_t i=strlen(str)-1; i>=0; i--) {
|
||||
if (str[i] != '0') {
|
||||
if ((i-decimalPoint) < precLimit)
|
||||
accuracy = i-decimalPoint;
|
||||
if (((UInt_t)i-decimalPoint) < precLimit)
|
||||
accuracy = (UInt_t)i-decimalPoint;
|
||||
else
|
||||
accuracy = precLimit;
|
||||
break;
|
||||
|
@ -1776,7 +1776,7 @@ Bool_t PRunAsymmetry::GetProperDataRange(PRawRunData* runData, UInt_t histoNo[2]
|
||||
}
|
||||
// 3rd check if end is within proper bounds
|
||||
if (end[i] < 0) {
|
||||
std::cerr << std::endl << ">> PRunAsymmetry::GetProperDataRange(): **ERROR** end data bin ("<< end[i] << ") doesn't make any sense!";
|
||||
std::cerr << std::endl << ">> PRunAsymmetry::GetProperDataRange(): **ERROR** end data bin (" << end[i] << ") doesn't make any sense!";
|
||||
std::cerr << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
1775
src/classes/PRunAsymmetryBNMR.cpp
Normal file
1775
src/classes/PRunAsymmetryBNMR.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -596,7 +596,7 @@ Bool_t PRunAsymmetryRRF::PrepareData()
|
||||
for (UInt_t i=1; i<forwardHistoNo.size(); i++) { // loop over the groupings
|
||||
for (UInt_t j=0; j<runData->GetDataBin(forwardHistoNo[i])->size(); j++) { // loop over the bin indices
|
||||
// make sure that the index stays within proper range
|
||||
if ((j+fT0s[2*i]-fT0s[0] >= 0) && (j+fT0s[2*i]-fT0s[0] < runData->GetDataBin(forwardHistoNo[i])->size())) {
|
||||
if (((Int_t)j+fT0s[2*i]-fT0s[0] >= 0) && (j+fT0s[2*i]-fT0s[0] < runData->GetDataBin(forwardHistoNo[i])->size())) {
|
||||
fForward[j] += forward[i][j+(Int_t)fT0s[2*i]-(Int_t)fT0s[0]];
|
||||
}
|
||||
}
|
||||
@ -770,7 +770,7 @@ Bool_t PRunAsymmetryRRF::SubtractEstimatedBkg()
|
||||
}
|
||||
|
||||
// check if start is within histogram bounds
|
||||
if ((start[0] >= fForward.size()) || (start[1] >= fBackward.size())) {
|
||||
if ((start[0] >= fForward.size()) || (start[1] >= fBackward.size())) {
|
||||
std::cerr << std::endl << ">> PRunAsymmetryRRF::SubtractEstimatedBkg(): **ERROR** background bin values out of bound!";
|
||||
std::cerr << std::endl << ">> histo lengths (f/b) = (" << fForward.size() << "/" << fBackward.size() << ").";
|
||||
std::cerr << std::endl << ">> background start (f/b) = (" << start[0] << "/" << start[1] << ").";
|
||||
|
@ -34,11 +34,8 @@
|
||||
#include <TString.h>
|
||||
#include <TObjArray.h>
|
||||
#include <TObjString.h>
|
||||
//#include <TFile.h>
|
||||
#include <TFolder.h>
|
||||
|
||||
#include "TLemRunHeader.h"
|
||||
|
||||
#include "PRunBase.h"
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
@ -3045,8 +3045,9 @@ Bool_t PRunDataHandler::ReadMudFile()
|
||||
setup += TString(str) + TString("/");
|
||||
if (TString(str) == "BNQR" || TString(str) == "BNMR") {
|
||||
std::cerr << "PRunDataHandler::ReadMudFile: **INFORMATION** this run was performed on " << str << std::endl;
|
||||
std::cerr << "PRunDataHandler::ReadMudFile: **INFORMATION** apply correction to time resolution" << std::endl;
|
||||
// identified BNMR/BNQR, correct time resolution.
|
||||
timeResMultiplier = 1.0e15;
|
||||
timeResMultiplier = 1.0e9;
|
||||
}
|
||||
}
|
||||
success = MUD_getApparatus( fh, str, sizeof(str) );
|
||||
@ -3128,8 +3129,8 @@ Bool_t PRunDataHandler::ReadMudFile()
|
||||
}
|
||||
}
|
||||
|
||||
runData.SetTimeResolution(static_cast<Double_t>(timeResolution) * timeResMultiplier); // s -> ns
|
||||
// An additional factor of 1e6 needed for bNMR
|
||||
runData.SetTimeResolution(static_cast<Double_t>(timeResolution) * timeResMultiplier); // s -> ns or s -> ms for bNMR
|
||||
// Other possibility:
|
||||
// Check if it is a bNMR run and fix it or check if "timeres" line
|
||||
// was introduced in the msr file
|
||||
|
||||
|
@ -76,6 +76,12 @@ PRunListCollection::~PRunListCollection()
|
||||
}
|
||||
fRunAsymmetryRRFList.clear();
|
||||
|
||||
for (UInt_t i=0; i<fRunAsymmetryBNMRList.size(); i++) {
|
||||
fRunAsymmetryBNMRList[i]->CleanUp();
|
||||
fRunAsymmetryBNMRList[i]->~PRunAsymmetryBNMR();
|
||||
}
|
||||
fRunAsymmetryBNMRList.clear();
|
||||
|
||||
for (UInt_t i=0; i<fRunMuMinusList.size(); i++) {
|
||||
fRunMuMinusList[i]->CleanUp();
|
||||
fRunMuMinusList[i]->~PRunMuMinus();
|
||||
@ -133,6 +139,11 @@ Bool_t PRunListCollection::Add(Int_t runNo, EPMusrHandleTag tag)
|
||||
if (!fRunAsymmetryRRFList[fRunAsymmetryRRFList.size()-1]->IsValid())
|
||||
success = false;
|
||||
break;
|
||||
case PRUN_ASYMMETRY_BNMR:
|
||||
fRunAsymmetryBNMRList.push_back(new PRunAsymmetryBNMR(fMsrInfo, fData, runNo, tag));
|
||||
if (!fRunAsymmetryBNMRList[fRunAsymmetryBNMRList.size()-1]->IsValid())
|
||||
success = false;
|
||||
break;
|
||||
case PRUN_MU_MINUS:
|
||||
fRunMuMinusList.push_back(new PRunMuMinus(fMsrInfo, fData, runNo, tag));
|
||||
if (!fRunMuMinusList[fRunMuMinusList.size()-1]->IsValid())
|
||||
@ -175,6 +186,8 @@ void PRunListCollection::SetFitRange(const TString fitRange)
|
||||
fRunAsymmetryList[i]->SetFitRangeBin(fitRange);
|
||||
for (UInt_t i=0; i<fRunAsymmetryRRFList.size(); i++)
|
||||
fRunAsymmetryRRFList[i]->SetFitRangeBin(fitRange);
|
||||
for (UInt_t i=0; i<fRunAsymmetryBNMRList.size(); i++)
|
||||
fRunAsymmetryBNMRList[i]->SetFitRangeBin(fitRange);
|
||||
for (UInt_t i=0; i<fRunMuMinusList.size(); i++)
|
||||
fRunMuMinusList[i]->SetFitRangeBin(fitRange);
|
||||
for (UInt_t i=0; i<fRunNonMusrList.size(); i++)
|
||||
@ -201,6 +214,8 @@ void PRunListCollection::SetFitRange(const PDoublePairVector fitRange)
|
||||
fRunAsymmetryList[i]->SetFitRange(fitRange);
|
||||
for (UInt_t i=0; i<fRunAsymmetryRRFList.size(); i++)
|
||||
fRunAsymmetryRRFList[i]->SetFitRange(fitRange);
|
||||
for (UInt_t i=0; i<fRunAsymmetryBNMRList.size(); i++)
|
||||
fRunAsymmetryBNMRList[i]->SetFitRange(fitRange);
|
||||
for (UInt_t i=0; i<fRunMuMinusList.size(); i++)
|
||||
fRunMuMinusList[i]->SetFitRange(fitRange);
|
||||
for (UInt_t i=0; i<fRunNonMusrList.size(); i++)
|
||||
@ -291,6 +306,27 @@ Double_t PRunListCollection::GetAsymmetryRRFChisq(const std::vector<Double_t>& p
|
||||
return chisq;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GetAsymmetryBNMRChisq (public)
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculates chi-square of <em>all</em> asymmetry BNMR runs of a msr-file.
|
||||
*
|
||||
* <b>return:</b>
|
||||
* - chi-square of all asymmetry BNMR runs of the msr-file
|
||||
*
|
||||
* \param par fit parameter vector
|
||||
*/
|
||||
Double_t PRunListCollection::GetAsymmetryBNMRChisq(const std::vector<Double_t>& par) const
|
||||
{
|
||||
Double_t chisq = 0.0;
|
||||
|
||||
for (UInt_t i=0; i<fRunAsymmetryBNMRList.size(); i++)
|
||||
chisq += fRunAsymmetryBNMRList[i]->CalcChiSquare(par);
|
||||
|
||||
return chisq;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GetMuMinusChisq (public)
|
||||
//--------------------------------------------------------------------------
|
||||
@ -372,6 +408,18 @@ Double_t PRunListCollection::GetSingleRunChisqExpected(const std::vector<Double_
|
||||
case PRUN_SINGLE_HISTO:
|
||||
expectedChisq = fRunSingleHistoList[subIdx]->CalcChiSquareExpected(par);
|
||||
break;
|
||||
case PRUN_SINGLE_HISTO_RRF:
|
||||
expectedChisq = fRunSingleHistoRRFList[subIdx]->CalcChiSquareExpected(par);
|
||||
break;
|
||||
case PRUN_ASYMMETRY:
|
||||
expectedChisq = fRunAsymmetryList[subIdx]->CalcChiSquareExpected(par);
|
||||
break;
|
||||
case PRUN_ASYMMETRY_RRF:
|
||||
expectedChisq = fRunAsymmetryRRFList[subIdx]->CalcChiSquareExpected(par);
|
||||
break;
|
||||
case PRUN_ASYMMETRY_BNMR:
|
||||
expectedChisq = fRunAsymmetryBNMRList[subIdx]->CalcChiSquareExpected(par);
|
||||
break;
|
||||
case PRUN_MU_MINUS:
|
||||
expectedChisq = fRunMuMinusList[subIdx]->CalcChiSquareExpected(par);
|
||||
break;
|
||||
@ -430,6 +478,9 @@ Double_t PRunListCollection::GetSingleRunChisq(const std::vector<Double_t>& par,
|
||||
case PRUN_ASYMMETRY_RRF:
|
||||
chisq = fRunAsymmetryRRFList[subIdx]->CalcChiSquare(par);
|
||||
break;
|
||||
case PRUN_ASYMMETRY_BNMR:
|
||||
chisq = fRunAsymmetryBNMRList[subIdx]->CalcChiSquare(par);
|
||||
break;
|
||||
case PRUN_MU_MINUS:
|
||||
chisq = fRunMuMinusList[subIdx]->CalcChiSquare(par);
|
||||
break;
|
||||
@ -529,6 +580,28 @@ Double_t PRunListCollection::GetAsymmetryRRFMaximumLikelihood(const std::vector<
|
||||
return mlh;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GetAsymmetryBNMRMaximumLikelihood (public)
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p> Since it is not clear yet how to handle asymmetry fits with max likelihood
|
||||
* the chi square will be used!
|
||||
*
|
||||
* <b>return:</b>
|
||||
* - chi-square of all asymmetry BNMR runs of the msr-file
|
||||
*
|
||||
* \param par fit parameter vector
|
||||
*/
|
||||
Double_t PRunListCollection::GetAsymmetryBNMRMaximumLikelihood(const std::vector<Double_t>& par) const
|
||||
{
|
||||
Double_t mlh = 0.0;
|
||||
|
||||
for (UInt_t i=0; i<fRunAsymmetryBNMRList.size(); i++)
|
||||
mlh += fRunAsymmetryBNMRList[i]->CalcChiSquare(par);
|
||||
|
||||
return mlh;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GetMuMinusMaximumLikelihood (public)
|
||||
//--------------------------------------------------------------------------
|
||||
@ -710,6 +783,9 @@ UInt_t PRunListCollection::GetNoOfBinsFitted(const UInt_t idx) const
|
||||
case PRUN_ASYMMETRY_RRF:
|
||||
result = fRunAsymmetryRRFList[subIdx]->GetNoOfFitBins();
|
||||
break;
|
||||
case PRUN_ASYMMETRY_BNMR:
|
||||
result = fRunAsymmetryBNMRList[subIdx]->GetNoOfFitBins();
|
||||
break;
|
||||
case PRUN_MU_MINUS:
|
||||
result = fRunMuMinusList[subIdx]->GetNoOfFitBins();
|
||||
break;
|
||||
@ -749,6 +825,9 @@ UInt_t PRunListCollection::GetTotalNoOfBinsFitted() const
|
||||
for (UInt_t i=0; i<fRunAsymmetryRRFList.size(); i++)
|
||||
counts += fRunAsymmetryRRFList[i]->GetNoOfFitBins();
|
||||
|
||||
for (UInt_t i=0; i<fRunAsymmetryBNMRList.size(); i++)
|
||||
counts += fRunAsymmetryBNMRList[i]->GetNoOfFitBins();
|
||||
|
||||
for (UInt_t i=0; i<fRunMuMinusList.size(); i++)
|
||||
counts += fRunMuMinusList[i]->GetNoOfFitBins();
|
||||
|
||||
@ -887,6 +966,49 @@ PRunData* PRunListCollection::GetAsymmetry(UInt_t index, EDataSwitch tag)
|
||||
return data;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GetAsymmetryBNMR (public)
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Get a processed asymmetry from beta-NMR data set.
|
||||
*
|
||||
* <b>return:</b>
|
||||
* - pointer to the run data set (processed data) if data set is found
|
||||
* - null pointer otherwise
|
||||
*
|
||||
* \param index msr-file run index
|
||||
* \param tag kIndex -> data at index, kRunNo -> data of given run no
|
||||
*/
|
||||
PRunData* PRunListCollection::GetAsymmetryBNMR(UInt_t index, EDataSwitch tag)
|
||||
{
|
||||
PRunData *data = 0;
|
||||
|
||||
switch (tag) {
|
||||
case kIndex: // called from musrfit when dumping the data
|
||||
if (index > fRunAsymmetryBNMRList.size()) {
|
||||
std::cerr << std::endl << ">> PRunListCollection::GetAsymmetryBNMR(): **ERROR** index = " << index << " out of bounds";
|
||||
std::cerr << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
fRunAsymmetryBNMRList[index]->CalcTheory();
|
||||
data = fRunAsymmetryBNMRList[index]->GetData();
|
||||
break;
|
||||
case kRunNo: // called from PMusrCanvas
|
||||
for (UInt_t i=0; i<fRunAsymmetryBNMRList.size(); i++) {
|
||||
if (fRunAsymmetryBNMRList[i]->GetRunNo() == index) {
|
||||
data = fRunAsymmetryBNMRList[i]->GetData();
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default: // error
|
||||
break;
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GetAsymmetryRRF (public)
|
||||
//--------------------------------------------------------------------------
|
||||
|
9
src/external/BMWtools/CMakeLists.txt
vendored
9
src/external/BMWtools/CMakeLists.txt
vendored
@ -4,10 +4,17 @@
|
||||
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
|
||||
set(CUBA_INC ${CMAKE_SOURCE_DIR}/src/external/libCuba/src)
|
||||
|
||||
# ROOT requires that the dictonary header files are found at configuration time.
|
||||
# Hence, target_include_directories cannot be used here because, targets are
|
||||
# setup only afterwards.
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
root_generate_dictionary(
|
||||
BMWStartupHandlerDict
|
||||
-I${MUSRFIT_INC}
|
||||
BMWStartupHandler.h
|
||||
OPTIONS
|
||||
-I${MUSRFIT_INC}
|
||||
-inlineInputHeader
|
||||
LINKDEF BMWStartupHandlerLinkDef.h
|
||||
MODULE BMWStartupHandler
|
||||
)
|
||||
|
19
src/external/MagProximity/CMakeLists.txt
vendored
19
src/external/MagProximity/CMakeLists.txt
vendored
@ -5,16 +5,22 @@ set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
|
||||
|
||||
root_generate_dictionary(
|
||||
PMagProximityFitterDict
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
PMagProximityFitter.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-inlineInputHeader
|
||||
LINKDEF PMagProximityFitterLinkDef.h
|
||||
MODULE PMagProximityFitter
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PMPStartupHandlerDict
|
||||
-I${MUSRFIT_INC}
|
||||
PMPStartupHandler.h
|
||||
OPTIONS
|
||||
-I${MUSRFIT_INC}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-inlineInputHeader
|
||||
LINKDEF PMPStartupHandlerLinkDef.h
|
||||
MODULE PMPStartupHandler
|
||||
)
|
||||
@ -36,13 +42,6 @@ add_library(PMagProximityFitter SHARED
|
||||
PMPStartupHandler.cpp
|
||||
PMPStartupHandlerDict.cxx
|
||||
)
|
||||
|
||||
#--- set target properties, e.g. version --------------------------------------
|
||||
set_target_properties(PMagProximityFitter
|
||||
PROPERTIES
|
||||
VERSION ${P_MAG_PROXIMITY_FITTER_VERSION}
|
||||
)
|
||||
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PMagProximityFitter BEFORE PRIVATE
|
||||
|
2141
src/external/MuSRFitGUI/MSR.pm
vendored
Executable file → Normal file
2141
src/external/MuSRFitGUI/MSR.pm
vendored
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
754
src/external/MuSRFitGUI/MuSRFit4.pm
vendored
754
src/external/MuSRFitGUI/MuSRFit4.pm
vendored
File diff suppressed because it is too large
Load Diff
4252
src/external/MuSRFitGUI/MuSRFit4.ui
vendored
4252
src/external/MuSRFitGUI/MuSRFit4.ui
vendored
File diff suppressed because it is too large
Load Diff
1818
src/external/MuSRFitGUI/Ui_MuSRFit4.pm
vendored
1818
src/external/MuSRFitGUI/Ui_MuSRFit4.pm
vendored
File diff suppressed because it is too large
Load Diff
1833
src/external/MuSRFitGUI/devel/MSR.pm
vendored
1833
src/external/MuSRFitGUI/devel/MSR.pm
vendored
File diff suppressed because it is too large
Load Diff
4492
src/external/MuSRFitGUI/devel/MuSRFit.pl
vendored
4492
src/external/MuSRFitGUI/devel/MuSRFit.pl
vendored
File diff suppressed because it is too large
Load Diff
5742
src/external/MuSRFitGUI/devel/MuSRFit.ui
vendored
5742
src/external/MuSRFitGUI/devel/MuSRFit.ui
vendored
File diff suppressed because it is too large
Load Diff
991
src/external/MuSRFitGUI/devel/MuSRFit.ui.h
vendored
991
src/external/MuSRFitGUI/devel/MuSRFit.ui.h
vendored
@ -1,991 +0,0 @@
|
||||
/****************************************************************************
|
||||
** ui.h extension file, included from the uic-generated form implementation.
|
||||
**
|
||||
** If you want to add, delete, or rename functions or slots, use
|
||||
** Qt Designer to update this file, preserving your code.
|
||||
**
|
||||
** You should not define a constructor or destructor in this file.
|
||||
** Instead, write your code in functions called init() and destroy().
|
||||
** These will automatically be called by theform's constructor and
|
||||
** destructor.
|
||||
*****************************************************************************/
|
||||
|
||||
# This file is part of MuSRFitGUI.
|
||||
#
|
||||
# MuSRFitGUI 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 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# MuSRFitGUI 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 MuSRFitGUI. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Copyright 2009 by Zaher Salman and the LEM Group.
|
||||
# <zaher.salman@psi.ch>
|
||||
|
||||
void MuSRFitMenu::fileOpen()
|
||||
{
|
||||
my $file=Qt::FileDialog::getOpenFileName(
|
||||
".",
|
||||
"MSR Files (*.msr *.mlog)",
|
||||
this,
|
||||
"open file dialog",
|
||||
"Choose a MSR file");
|
||||
print "Selected file: $file\n";
|
||||
# TODO: Possibly decipher the MSR file and setup the GUI accordingly
|
||||
# Find run numbers, beamlines etc.
|
||||
# Get theory block and understand it
|
||||
# Get parameters list and update table
|
||||
|
||||
}
|
||||
|
||||
|
||||
void MuSRFitMenu::fileSave()
|
||||
{
|
||||
my %All=CreateAllInput();
|
||||
my $FILENAME=$All{"FILENAME"}.".msr";
|
||||
my $file=Qt::FileDialog::getSaveFileName(
|
||||
"$FILENAME",
|
||||
"MSR Files (*.msr *.mlog)",
|
||||
this,
|
||||
"save file dialog",
|
||||
"Choose a filename to save under");
|
||||
|
||||
# If the user gave a filename the copy to it
|
||||
if ($file ne "") {
|
||||
# TODO: check if the extension is correct, or add it.
|
||||
if (-e $FILENAME) {
|
||||
my $cmd="cp $FILENAME $file";
|
||||
my $pid=system($cmd);
|
||||
} else {
|
||||
if ($file ne "") {
|
||||
my $Warning = "Warning: No MSR file found yet!";
|
||||
my $WarningWindow = Qt::MessageBox::information( this, "Warning",$Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MuSRFitMenu::fileChangeDir()
|
||||
{
|
||||
my $newdir=Qt::FileDialog::getExistingDirectory(
|
||||
"",
|
||||
this,
|
||||
"get existing directory",
|
||||
"Choose a directory",
|
||||
1);
|
||||
chdir ("$newdir");
|
||||
}
|
||||
|
||||
void MuSRFitMenu::filePrint()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void MuSRFitMenu::fileExit()
|
||||
{
|
||||
my $Ans = Qt::MessageBox::question( this, "Quit?","Are you sure you want to quit?","&Yes","&No","",0,1);
|
||||
if ($Ans==0) {
|
||||
# Then quit
|
||||
Qt::Application::exit( 0 );
|
||||
}
|
||||
# Otherwize go back
|
||||
}
|
||||
|
||||
void MuSRFitMenu::parametersExport()
|
||||
{
|
||||
my %All=CreateAllInput();
|
||||
# Add also a flag for header
|
||||
$All{"Header"}=1;
|
||||
my $FILENAME=$All{"FILENAME"}.".dat";
|
||||
my $file=Qt::FileDialog::getSaveFileName(
|
||||
"$FILENAME",
|
||||
"Data Files (*.dat)",
|
||||
this,
|
||||
"export file dialog",
|
||||
"Choose a filename to export to");
|
||||
|
||||
# If the user gave a filename the copy to it
|
||||
if ($file ne "") {
|
||||
my $Text = MSR::ExportParams(\%All);
|
||||
open( DATF,q{>},"$file" );
|
||||
print DATF $Text;
|
||||
close(DATF);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MuSRFitMenu::parametersAppend()
|
||||
{
|
||||
my %All=CreateAllInput();
|
||||
# Add also a flag for header
|
||||
$All{"Header"}=0;
|
||||
my $FILENAME=$All{"FILENAME"}.".dat";
|
||||
my $file=Qt::FileDialog::getOpenFileName(
|
||||
"./",
|
||||
"Data Files (*.dat)",
|
||||
this,
|
||||
"append file dialog",
|
||||
"Choose a filename to append to");
|
||||
|
||||
# If the user gave a filename the copy to it
|
||||
if ($file ne "") {
|
||||
my $Text = MSR::ExportParams(\%All);
|
||||
open( DATF,q{>>},"$file" );
|
||||
print DATF $Text;
|
||||
close(DATF);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MuSRFitMenu::editUndo()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void MuSRFitMenu::editRedo()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void MuSRFitMenu::editCut()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void MuSRFitMenu::editCopy()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void MuSRFitMenu::editPaste()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void MuSRFitMenu::helpIndex()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void MuSRFitMenu::helpContents()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MuSRFitMenu::helpAbout()
|
||||
{
|
||||
my $AboutText="
|
||||
This is a GUI that uses the musrfit binary, developed by Andreas Suter,
|
||||
to fit muSR spectra.
|
||||
|
||||
MuSRFitGUI 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
MuSRFitGUI 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 MuSRFitGUI. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2009 by Zaher Salman and the LEM Group.
|
||||
<zaher.salman\@psi.ch>
|
||||
";
|
||||
my $AboutWindow = Qt::MessageBox::information( this, "About MuSRFit GUI",$AboutText);
|
||||
}
|
||||
|
||||
void MuSRFitform::CreateAllInput()
|
||||
{
|
||||
my %All=();
|
||||
|
||||
# From RUNS Tab
|
||||
# Run data file
|
||||
$All{"RunNumbers"} = RunNumbers->text;
|
||||
$All{"RunFiles"} = RunFiles->text;
|
||||
$All{"BeamLine"} = BeamLine->currentText;
|
||||
$All{"RUNSType"} = ManualFile->isOn();
|
||||
$All{"optionsFourier"} = optionsFourier->isOn();
|
||||
$All{"optionsT0"} = optionsT0->isOn();
|
||||
$All{"YEAR"} =YEAR->currentText;
|
||||
if ($All{"YEAR"} eq "") {
|
||||
# If year combobox is empty fill it up from 2004 up to current year
|
||||
my ($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfWeek, $dayOfYear, $daylightSavings) = localtime();
|
||||
my $current_year = 1900 + $yearOffset;
|
||||
for (my $i=$current_year;$i>=2004;$i--) {
|
||||
YEAR->insertItem($i,-1);
|
||||
}
|
||||
}
|
||||
# Time range and BINS
|
||||
$All{"Tis"} = Tis->text;
|
||||
$All{"Tfs"} = Tfs->text;
|
||||
$All{"BINS"} = BINS->text;
|
||||
$All{"FitAsyType"} = FitAsyType->currentText;
|
||||
$All{"LRBF"} = LRBF->text;
|
||||
my @Hists = split(/,/, $All{"LRBF"} );
|
||||
# Lifetime corrections in enabled/visible only for SingleHis fits
|
||||
if ( $All{"FitAsyType"} eq "Asymmetry" ) {
|
||||
ltc->setHidden(1);
|
||||
}
|
||||
elsif ( $All{"FitAsyType"} eq "SingleHist" ) {
|
||||
ltc->setHidden(0);
|
||||
}
|
||||
|
||||
# From Fitting Tab
|
||||
# Plot range
|
||||
$All{"Xi"}=Xi->text;
|
||||
$All{"Xf"}=Xf->text;
|
||||
$All{"Yi"}=Yi->text;
|
||||
$All{"Yf"}=Yf->text;
|
||||
$All{"ViewBin"}=ViewBin->text;
|
||||
# Life time correction
|
||||
if (ltc->isChecked()) {
|
||||
$All{"ltc"}="y";
|
||||
} else {
|
||||
$All{"ltc"}="n";
|
||||
}
|
||||
# Minuit commands
|
||||
if ( $All{"go"} eq "" ) {
|
||||
$All{"go"}="PLOT";
|
||||
}
|
||||
# Get minimization process
|
||||
$All{"Minimization"} = Minimization->currentText();
|
||||
$All{"go"}=$All{"Minimization"};
|
||||
|
||||
# Get Error calculation process
|
||||
$All{"ErrorCalc"} = ErrorCalc->currentText();
|
||||
$All{"go"}=$All{"ErrorCalc"};
|
||||
|
||||
RunSelectionToggle();
|
||||
my @RUNS = ();
|
||||
if ($All{"RUNSType"} ) {
|
||||
@RUNS = split( /,/, $All{"RunFiles"});
|
||||
} else {
|
||||
$All{"RunNumbers"} =~ s/[\ \.\~\/\&\*\[\;\>\<\^\$\(\)\`\|\]\'\@]/,/g;
|
||||
@RUNS = split( /,/, $All{"RunNumbers"} );
|
||||
}
|
||||
|
||||
# From MSR File Tab
|
||||
$All{"TITLE"}= TITLE->text;
|
||||
$All{"FILENAME"}= FILENAME->text;
|
||||
|
||||
# From Fourier Tab
|
||||
$All{"FUNITS"}= FUnits->currentText;
|
||||
$All{"FAPODIZATION"}= FApodization->currentText;
|
||||
$All{"FPLOT"}= FPlot->currentText;
|
||||
$All{"FPHASE"}=FPHASE->text;
|
||||
# Fourier range
|
||||
$All{"FrqMin"}=FrqMin->text;
|
||||
$All{"FrqMax"}=FrqMax->text;
|
||||
|
||||
# Rotating reference frame parameters
|
||||
$All{"RRFFrq"}=RRFFrq->text;
|
||||
$All{"RRFPack"}=RRFPack->text;
|
||||
$All{"RRFPhase"}=RRFPhase->text;
|
||||
$All{"RRFUnits"}=RRFUnits->currentText;
|
||||
|
||||
# Get values of t0 and Bg/Data bins if given
|
||||
my $NHist = 1;
|
||||
foreach my $Hist (@Hists) {
|
||||
foreach ("t0","Bg1","Bg2","Data1","Data2") {
|
||||
my $Name = "$_$NHist";
|
||||
$All{$Name}=child($Name)->text;
|
||||
# TODO: If empty fill with defaults
|
||||
if ($All{$Name} eq "") {
|
||||
$All{$Name}=MSR::T0BgData($_,$Hist,$All{"BeamLine"});
|
||||
child($Name)->setText($All{$Name});
|
||||
}
|
||||
}
|
||||
$NHist++;
|
||||
}
|
||||
|
||||
# Construct fittypes that can be understood by MSR.pm
|
||||
my %FTs=(0,"Exponential",
|
||||
1,"Gaussian",
|
||||
2,"Stretch",
|
||||
3,"ExponentialCos",
|
||||
4,"GaussianCos",
|
||||
5,"StretchCos",
|
||||
6,"LDKTLF",
|
||||
7,"GDKTLF",
|
||||
8,"Background",
|
||||
9,"LLFExp",
|
||||
10,"GLFExp",
|
||||
11,"LLFSExp",
|
||||
12,"GLFSExp",
|
||||
13,"MolMag",
|
||||
14,"Meissner",
|
||||
15,"None"
|
||||
);
|
||||
|
||||
my $FT1=FitType1->currentItem;
|
||||
my $FT2=FitType2->currentItem;
|
||||
my $FT3=FitType3->currentItem;
|
||||
$All{"FitType1"} = $FTs{$FT1};
|
||||
$All{"FitType2"} = $FTs{$FT2};
|
||||
$All{"FitType3"} = $FTs{$FT3};
|
||||
my @FitTypes =();
|
||||
my $FitType="";
|
||||
foreach $FitType ($All{"FitType1"}, $All{"FitType2"}, $All{"FitType3"}) {
|
||||
if ( $FitType ne "None" ) {
|
||||
push( @FitTypes, $FitType );
|
||||
}
|
||||
}
|
||||
|
||||
# Also theory block and paramets list
|
||||
my ($Full_T_Block,$Paramcomp_ref)= MSR::CreateTheory(@FitTypes);
|
||||
$All{"Full_T_Block"}=$Full_T_Block;
|
||||
$All{"Paramcomp_ref"}=$Paramcomp_ref;
|
||||
my @Paramcomp = @$Paramcomp_ref;
|
||||
|
||||
# Functions block
|
||||
$All{"FunctionsBlock"}=FunctionsBlock->text;
|
||||
# and the associated theory block
|
||||
$All{"Func_T_Block"}=TheoryBlock->text;
|
||||
|
||||
# Shared settings are detected here
|
||||
$All{"EnableSharing"} = buttonGroupSharing->isChecked();
|
||||
|
||||
my $Shared = 0;
|
||||
my $PCount =0;
|
||||
my $Component=1;
|
||||
foreach $FitType (@FitTypes) {
|
||||
my $Parameters=$Paramcomp[$Component-1];
|
||||
my @Params = split( /\s+/, $Parameters );
|
||||
|
||||
if ( $Component == 1 && $All{"FitAsyType"} eq "Asymmetry" ) {
|
||||
unshift( @Params, "Alpha" );
|
||||
}
|
||||
elsif ( $Component == 1 && $All{"FitAsyType"} eq "SingleHist" ) {
|
||||
unshift( @Params, ( "No", "NBg" ) );
|
||||
}
|
||||
|
||||
# This is the counter for parameters of this component
|
||||
my $NP=1;
|
||||
$Shared = 0;
|
||||
# Change state/label of parameters
|
||||
foreach my $Param (@Params) {
|
||||
my $Param_ORG = $Param;
|
||||
# TODO: I need to take care of single hist fits here
|
||||
if ( $All{"FitAsyType"} eq "SingleHist" ) {
|
||||
$Param=$Param.$Hists[0];
|
||||
}
|
||||
if ( $#FitTypes != 0 && ( $Param ne "Alpha" && $Param ne "No" && $Param ne "NBg" ) ){
|
||||
$Param = join( "", $Param, "_", $Component);
|
||||
}
|
||||
|
||||
# Is there any point of sharing, multiple runs?
|
||||
if ( $#RUNS == 0 && $All{"FitAsyType"} eq "Asymmetry") {
|
||||
$Shared = 1;
|
||||
}
|
||||
elsif ( $#RUNS == 0 && $#Hists == 0 && $All{"FitAsyType"} eq "SingleHist" ) {
|
||||
$Shared = 1;
|
||||
} else {
|
||||
# Check if shared or not, construct name of checkbox, find its handle and then
|
||||
# check if it is checked
|
||||
my $ChkName="ShParam_".$Component."_".$NP;
|
||||
my $ChkBx = child($ChkName);
|
||||
$Shared = $ChkBx->isChecked();
|
||||
}
|
||||
$All{"Sh_$Param"}=$Shared;
|
||||
$NP++;
|
||||
}
|
||||
#Loop on parameters
|
||||
$Component++;
|
||||
}
|
||||
# Loop on components
|
||||
# Done with shared parameters detecting
|
||||
|
||||
# Construct a default filename if empty
|
||||
if ( $All{"FILENAME"} eq "" && !$All{"RUNSType"}) {
|
||||
$All{"FILENAME"}=$RUNS[0]."_".$All{"BeamLine"}."_".$All{"YEAR"};
|
||||
if ($All{"BeamLine"} eq "LEM (PPC)") {
|
||||
$All{"FILENAME"}=$RUNS[0]."_LEM_".$All{"YEAR"};
|
||||
}
|
||||
} else {
|
||||
$All{"FILENAME"}="TMP";
|
||||
}
|
||||
|
||||
|
||||
# This has to be at the end of CreateAll
|
||||
my %PTable=MSR::PrepParamTable(\%All);
|
||||
|
||||
# Setup the table with the right size
|
||||
my $NParam=scalar keys( %PTable );
|
||||
|
||||
# Read initial values of paramets from tabel
|
||||
my $erradd = "d";
|
||||
my $minadd = "_min";
|
||||
my $maxadd = "_max";
|
||||
my $Header=InitParamTable->verticalHeader();
|
||||
# TODO: Should not go over all rows, only on parameters.
|
||||
if ($NParam > 0) {
|
||||
for (my $i=0;$i<$NParam;$i++) {
|
||||
# Take label of row, i.e. name of parameter
|
||||
my $Param=$Header->label($i);
|
||||
# Then take the value, error, max and min (as numbers)
|
||||
$All{"$Param"}=1.0*InitParamTable->text($i,0);
|
||||
$All{"$erradd$Param"}=1.0*InitParamTable->text($i,1);
|
||||
$All{"$Param$minadd"}=1.0*InitParamTable->text($i,2);
|
||||
$All{"$Param$maxadd"}=1.0*InitParamTable->text($i,3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Return Hash with all important values
|
||||
return %All;
|
||||
}
|
||||
|
||||
void MuSRFitform::CallMSRCreate()
|
||||
{
|
||||
use MSR;
|
||||
my %All=CreateAllInput();
|
||||
|
||||
# Check if the option for checking for existing files is selected
|
||||
my $FileExistCheck= FileExistCheck->isOn();
|
||||
my $FILENAME=$All{"FILENAME"}.".msr";
|
||||
my $Answer=0;
|
||||
if ($All{"RunNumbers"} ne "" || $All{"RunFiles"} ne "") {
|
||||
if ( $FileExistCheck==1 ) {
|
||||
if (-e $FILENAME) {
|
||||
# Warning: MSR file exists
|
||||
# my $Warning = "Warning: MSR file $FILENAME Already exists!\nIf you continue it will overwriten.";
|
||||
my $Warning = "Warning: MSR file $FILENAME Already exists!\nDo you want to overwrite it?";
|
||||
# my $WarningWindow = Qt::MessageBox::information( this, "Warning",$Warning);
|
||||
# $Answer =1,0 for yes and no
|
||||
$Answer= Qt::MessageBox::warning( this, "Warning",$Warning, "&No", "&Yes", undef, 1,1);
|
||||
}
|
||||
} else {
|
||||
# Just overwrite file
|
||||
$Answer=1;
|
||||
}
|
||||
|
||||
if ($Answer) {
|
||||
if ( $All{"FitAsyType"} eq "Asymmetry" ) {
|
||||
my ($Full_T_Block,$Paramcomp_ref)= MSR::CreateMSR(\%All);
|
||||
}
|
||||
elsif ( $All{"FitAsyType"} eq "SingleHist" ) {
|
||||
my ($Full_T_Block,$Paramcomp_ref)= MSR::CreateMSRSingleHist(\%All);
|
||||
}
|
||||
UpdateMSRFileInitTable();
|
||||
}
|
||||
}
|
||||
return $Answer;
|
||||
}
|
||||
|
||||
void MuSRFitform::UpdateMSRFileInitTable()
|
||||
{
|
||||
my %All=CreateAllInput();
|
||||
my $FILENAME=$All{"FILENAME"};
|
||||
open (MSRF,q{<},"$FILENAME.msr" );
|
||||
my @lines = <MSRF>;
|
||||
close(IFILE);
|
||||
textMSROutput->setText("");
|
||||
foreach my $line (@lines) {
|
||||
textMSROutput->append("$line");
|
||||
}
|
||||
|
||||
(my $TBlock_ref, my $FPBlock_ref)=MSR::ExtractBlks(@lines);
|
||||
my @FPBloc = @$FPBlock_ref;
|
||||
|
||||
my $PCount=0;
|
||||
foreach my $line (@FPBloc) {
|
||||
$PCount++;
|
||||
my @Param=split(/\s+/,$line);
|
||||
|
||||
# Depending on how many elements in @Param determine what they mean
|
||||
# 0th element is empty (always)
|
||||
# 1st element is the order (always)
|
||||
# 2nd element is the name (always)
|
||||
# 3rd element is the value (always)
|
||||
# 4th element can be taken as step/error (always)
|
||||
# 5th element can be
|
||||
# if it is last element or there are two more = positive error, check $#Param=5/7
|
||||
# if there is only one more = minimum, check $#Param=6
|
||||
|
||||
# To summarize, check the value of $#Param
|
||||
my $value=1.0*$Param[3];
|
||||
my $error = 1.0*$Param[4];
|
||||
my $minvalue=0.0;
|
||||
my $maxvalue=0.0;
|
||||
if ($#Param == 4) {
|
||||
$minvalue=0.0;
|
||||
$maxvalue=0.0;
|
||||
}
|
||||
elsif ($#Param == 6) {
|
||||
$minvalue=1.0*$Param[5];
|
||||
$maxvalue=1.0*$Param[6];
|
||||
}
|
||||
elsif ($#Param == 5 || $#Param == 7) {
|
||||
$minvalue=1.0*$Param[6];
|
||||
$maxvalue=1.0*$Param[7];
|
||||
}
|
||||
# Now update the initialization tabel
|
||||
InitParamTable->setText($PCount-1,0,$value);
|
||||
InitParamTable->setText($PCount-1,1,$error);
|
||||
InitParamTable->setText($PCount-1,2,$minvalue);
|
||||
InitParamTable->setText($PCount-1,3,$maxvalue);
|
||||
# Set bg color to mark different runs
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void MuSRFitform::ActivateT0Hists()
|
||||
{
|
||||
my %All=CreateAllInput();
|
||||
my @Hists = split(/,/, $All{"LRBF"} );
|
||||
my $HistBox = "";
|
||||
for (my $iHist=1; $iHist<=4; $iHist++) {
|
||||
$HistBox="groupHist$iHist";
|
||||
my $HistBoxHandle = child($HistBox);
|
||||
if ($iHist<=$#Hists+1) {
|
||||
# Activate this histogram box
|
||||
$HistBoxHandle->setHidden(0);
|
||||
$HistBoxHandle->setEnabled(1);
|
||||
$HistBoxHandle->setTitle("Hist # $Hists[$iHist-1]");
|
||||
} else {
|
||||
# Deactivate this histogram box
|
||||
$HistBoxHandle->setHidden(1);
|
||||
$HistBoxHandle->setEnabled(0);
|
||||
}
|
||||
}
|
||||
|
||||
# TODO: Set default values
|
||||
|
||||
}
|
||||
|
||||
void MuSRFitform::ActivateShComp()
|
||||
{
|
||||
my %All=CreateAllInput();
|
||||
my @RUNS = split( /,/, $All{"RunNumbers"} );
|
||||
|
||||
# Hide all sharing components
|
||||
SharingComp1->setHidden(1);
|
||||
SharingComp2->setHidden(1);
|
||||
SharingComp3->setHidden(1);
|
||||
SharingComp1->setEnabled(0);
|
||||
SharingComp2->setEnabled(0);
|
||||
SharingComp3->setEnabled(0);
|
||||
|
||||
my @FitTypes =();
|
||||
foreach my $FitType ($All{"FitType1"}, $All{"FitType2"}, $All{"FitType3"}) {
|
||||
if ( $FitType ne "None" ) {
|
||||
push( @FitTypes, $FitType );
|
||||
}
|
||||
}
|
||||
|
||||
# Get number of parameters to determine the size of the table
|
||||
my ($Full_T_Block,$Paramcomp_ref)= MSR::CreateTheory(@FitTypes);
|
||||
# For now the line below does not work. Why?
|
||||
# my $Paramcomp_ref=$All{"Paramcomp_ref"};
|
||||
my @Paramcomp = @$Paramcomp_ref;
|
||||
my $Full_T_Block= $All{"Full_T_Block"};
|
||||
|
||||
# Possible to share only if sharing is enabled altogether
|
||||
my $EnableSharing = $All{"EnableSharing"};
|
||||
if ($EnableSharing) {
|
||||
my $Component=1;
|
||||
foreach my $FitType (@FitTypes) {
|
||||
my $Parameters=$Paramcomp[$Component-1];
|
||||
my @Params = split( /\s+/, $Parameters );
|
||||
|
||||
if ( $Component == 1 && $All{"FitAsyType"} eq "Asymmetry" ) {
|
||||
unshift( @Params, "Alpha" );
|
||||
}
|
||||
elsif ( $Component == 1 && $All{"FitAsyType"} eq "SingleHist" ) {
|
||||
unshift( @Params, ( "No", "NBg" ) );
|
||||
}
|
||||
|
||||
|
||||
# Make the component appear first (only if we have multiple runs)
|
||||
my $ShCompG="SharingComp".$Component;
|
||||
my $ShCG = child($ShCompG);
|
||||
if ($#RUNS>0) {
|
||||
$ShCG->setHidden(0);
|
||||
$ShCG->setEnabled(1);
|
||||
}
|
||||
my $CompShLabel = "Comp".$Component."ShLabel";
|
||||
my $CompShL = child($CompShLabel);
|
||||
$CompShL->setText($All{"FitType$Component"});
|
||||
|
||||
# Change state/label of parameters
|
||||
for (my $i=1; $i<=9;$i++) {
|
||||
my $ParamChkBx="ShParam_".$Component."_".$i;
|
||||
my $ChkBx = child($ParamChkBx);
|
||||
if ($Params[$i-1] ne "") {
|
||||
$ChkBx->setHidden(0);
|
||||
$ChkBx->setEnabled(1);
|
||||
$ChkBx ->setText($Params[$i-1]);
|
||||
} else {
|
||||
$ChkBx->setHidden(1);
|
||||
}
|
||||
}
|
||||
$Component++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MuSRFitform::InitializeTab()
|
||||
{
|
||||
my %All=CreateAllInput();
|
||||
InitParamTable->setLeftMargin(100);
|
||||
my $NRows = InitParamTable->numRows();
|
||||
|
||||
# Remove any rows in table
|
||||
if ($NRows > 0) {
|
||||
for (my $i=0;$i<$NRows;$i++) {
|
||||
# TODO: Better remove the row rather than hide it.
|
||||
InitParamTable->hideRow($i);
|
||||
# InitParamTable->removeRow($i);
|
||||
}
|
||||
}
|
||||
|
||||
my %PTable=MSR::PrepParamTable(\%All);
|
||||
|
||||
# Setup the table with the right size
|
||||
my $NParam=scalar keys( %PTable );
|
||||
if ($NParam>$NRows) {
|
||||
InitParamTable->setNumRows($NParam);
|
||||
}
|
||||
|
||||
# Fill the table with labels and values of parametr
|
||||
for (my $PCount=0;$PCount<$NParam;$PCount++) {
|
||||
my ($Param,$value,$error,$minvalue,$maxvalue,$RUN) = split(/,/,$PTable{$PCount});
|
||||
# Now make sure we have no nans
|
||||
if ($error eq "nan") { $error=0.1;}
|
||||
# If you use this then reading the parameters from the table is a problem
|
||||
# You need to extract the correct parameter name from the row label
|
||||
# InitParamTable->verticalHeader()->setLabel( $PCount,"$RUN: $Param");
|
||||
InitParamTable->verticalHeader()->setLabel( $PCount,"$Param");
|
||||
InitParamTable->showRow($PCount);
|
||||
InitParamTable->setText($PCount,0,$value);
|
||||
InitParamTable->setText($PCount,1,$error);
|
||||
InitParamTable->setText($PCount,2,$minvalue);
|
||||
InitParamTable->setText($PCount,3,$maxvalue);
|
||||
}
|
||||
}
|
||||
|
||||
void MuSRFitform::TabChanged()
|
||||
{
|
||||
# TODO: First check if there are some runs given, otherwise disbale
|
||||
my %All=CreateAllInput();
|
||||
|
||||
# First make sure we have sharing initialized
|
||||
ActivateShComp();
|
||||
# Here we need to apply sharing if selected...
|
||||
InitializeTab();
|
||||
UpdateMSRFileInitTable();
|
||||
# And also setup T0 and Bg bins
|
||||
ActivateT0Hists();
|
||||
|
||||
# Initialize FUNCTIONS block only if it has not been initialized yet
|
||||
if ($All{"Func_T_Block"} eq "" ) {
|
||||
InitializeFunctions();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MuSRFitform::GoFit()
|
||||
{
|
||||
my %All=CreateAllInput();
|
||||
# Check here is the number of histograms makes sense
|
||||
# other wise give error.
|
||||
my @Hists = split( /,/, $All{"LRBF"} );
|
||||
if ($All{"FitAsyType"} eq "Asymmetry" && $#Hists != 1) {
|
||||
# we have a problem here send error message
|
||||
my $Warning = "Error: The number of histograms should be 2 for an asymmetry fit!";
|
||||
my $WarningWindow = Qt::MessageBox::information( this, "Error",$Warning);
|
||||
} else {
|
||||
musrfit_tabs->setCurrentPage(1);
|
||||
my $Answer=CallMSRCreate();
|
||||
if ($Answer) {
|
||||
my $FILENAME=$All{"FILENAME"}.".msr";
|
||||
if (-e $FILENAME) {
|
||||
my $cmd="musrfit -t $FILENAME";
|
||||
my $pid = open(FTO,"$cmd 2>&1 |");
|
||||
while (<FTO>) {
|
||||
FitTextOutput->append("$_");
|
||||
}
|
||||
close(FTO);
|
||||
$cmd="musrview $FILENAME &";
|
||||
$pid = system($cmd);
|
||||
} else {
|
||||
FitTextOutput->append("Cannot find MSR file!");
|
||||
}
|
||||
FitTextOutput->append("-----------------------------------------------------------------------------------------------------------------------------");
|
||||
# update MSR File tab and initialization table
|
||||
UpdateMSRFileInitTable();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void MuSRFitform::GoPlot()
|
||||
{
|
||||
my %All=CreateAllInput();
|
||||
# Check here is the number of histograms makes sense
|
||||
# other wise give error.
|
||||
my @Hists = split( /,/, $All{"LRBF"} );
|
||||
if ($All{"FitAsyType"} eq "Asymmetry" && $#Hists != 1) {
|
||||
# we have a problem here send error message
|
||||
my $Warning = "Error: The number of histograms should be 2 for an asymmetry fit!";
|
||||
my $WarningWindow = Qt::MessageBox::information( this, "Error",$Warning);
|
||||
} else {
|
||||
my $Answer=CallMSRCreate();
|
||||
my $FILENAME=$All{"FILENAME"}.".msr";
|
||||
if ($Answer) {
|
||||
if (-e $FILENAME) {
|
||||
my $cmd="musrview $FILENAME &";
|
||||
my $pid = system($cmd);
|
||||
} else {
|
||||
FitTextOutput->append("Cannot find MSR file!");
|
||||
FitTextOutput->append("-----------------------------------------------------------------------------------------------------------------------------");
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void MuSRFitform::ShowMuSRT0()
|
||||
{
|
||||
my %All=CreateAllInput();
|
||||
musrfit_tabs->setCurrentPage(6);
|
||||
# Create MSR file and then run musrt0
|
||||
my $Answer=CallMSRCreate();
|
||||
|
||||
if ($Answer) {
|
||||
my $FILENAME=$All{"FILENAME"}.".msr";
|
||||
if (-e $FILENAME) {
|
||||
my $cmd="musrt0 $FILENAME &";
|
||||
my $pid = system($cmd);
|
||||
t0Update->setEnabled(1)
|
||||
} else {
|
||||
print STDERR "Cannot find MSR file!\n";
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void MuSRFitform::T0Update()
|
||||
{
|
||||
my %All = CreateAllInput();
|
||||
my @Hists = split(/,/, $All{"LRBF"} );
|
||||
|
||||
# Get values of t0 and Bg/Data bins if given
|
||||
my $NHist = 1;
|
||||
foreach my $Hist (@Hists) {
|
||||
foreach ("t0","Bg1","Bg2","Data1","Data2") {
|
||||
my $Name = "$_$NHist";
|
||||
my $tmp=MSR::T0BgData($_,$Hist,$All{"BeamLine"});
|
||||
child($Name)->setText($tmp);
|
||||
}
|
||||
$NHist++
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void MuSRFitform::RunSelectionToggle()
|
||||
{
|
||||
my $ManualFile= ManualFile->isOn();
|
||||
if ($ManualFile) {
|
||||
# Manual RUN selection
|
||||
RUNSMan->setEnabled(1);
|
||||
RUNSMan->setHidden(0);
|
||||
RunNumbers->setText("");
|
||||
RUNSAuto->setEnabled(0);
|
||||
RUNSAuto->setHidden(1);
|
||||
} else {
|
||||
# Auto RUN selection
|
||||
RUNSMan->setEnabled(0);
|
||||
RUNSMan->setHidden(1);
|
||||
RunFiles->setText("");
|
||||
RUNSAuto->setEnabled(1);
|
||||
RUNSAuto->setHidden(0);
|
||||
}
|
||||
|
||||
# Also use this for other options
|
||||
# Fourier toggle
|
||||
my $Fourier=optionsFourier->isOn();
|
||||
if ($Fourier) {
|
||||
# Fourier tab visible
|
||||
# musrfit_tabs->addTab(FourierPage,"Fourier");
|
||||
# musrfit_tabs->showPage(FourierPage);
|
||||
# FourierPage->hide();
|
||||
} else {
|
||||
# Fourier tab invisible
|
||||
# musrfit_tabs->removePage(FourierPage);
|
||||
# FourierPage->show();
|
||||
}
|
||||
}
|
||||
|
||||
void MuSRFitform::fileBrowse()
|
||||
{
|
||||
my $RunFiles=RunFiles->text();
|
||||
print "Runs:$RunFiles\n";
|
||||
my $files_ref=Qt::FileDialog::getOpenFileNames(
|
||||
"Data files (*.root *.bin)",
|
||||
"./",
|
||||
this,
|
||||
"open files dialog",
|
||||
"Select one or more files to fit");
|
||||
my @files = @$files_ref;
|
||||
if ($RunFiles eq "") {
|
||||
# We started with an empty list
|
||||
$RunFiles=join(",",@files);
|
||||
} else {
|
||||
# Add files to existing list
|
||||
$RunFiles=join(",",$RunFiles,@files);
|
||||
}
|
||||
RunFiles->setText($RunFiles);
|
||||
}
|
||||
|
||||
void MuSRFitform::AppendToFunctions()
|
||||
{
|
||||
my $ParName=CParamsCombo->currentText();
|
||||
my $Full_T_Block=TheoryBlock->text;
|
||||
my $Constraint=ConstraintLine->text;
|
||||
# Then clear the text
|
||||
ConstraintLine->setText("");
|
||||
|
||||
# Check how many constraints (lines) in FUNCTIONS Block
|
||||
my $i=FunctionsBlock->lines();
|
||||
my $ConstLine="fun$i = $Constraint\n";
|
||||
FunctionsBlock->append($ConstLine);
|
||||
|
||||
# Replace parameter in theory block with fun$i
|
||||
$Full_T_Block=~ s/$ParName/fun$i/;
|
||||
TheoryBlock->setText($Full_T_Block);
|
||||
}
|
||||
|
||||
void MuSRFitform::InitializeFunctions()
|
||||
{
|
||||
my %All=CreateAllInput();
|
||||
my @RUNS = split( /,/, $All{"RunNumbers"} );
|
||||
|
||||
my @FitTypes =();
|
||||
foreach my $FitType ($All{"FitType1"}, $All{"FitType2"}, $All{"FitType3"}) {
|
||||
if ( $FitType ne "None" ) {
|
||||
push( @FitTypes, $FitType );
|
||||
}
|
||||
}
|
||||
|
||||
# Get number of parameters to determine the size of the table
|
||||
my ($Full_T_Block,$Paramcomp_ref)= MSR::CreateTheory(@FitTypes);
|
||||
my @Paramcomp = @$Paramcomp_ref;
|
||||
my $Full_T_Block= $All{"Full_T_Block"};
|
||||
|
||||
# Initialize Parameters List in function block (constraints).
|
||||
my $ParametersList="";
|
||||
ParametersList->setText("");
|
||||
# Counter for function block (with out Alpha etc.)
|
||||
my $ParCount=0;
|
||||
CParamsCombo->clear();
|
||||
|
||||
# Possibly use the parameters block to axtract names for the dropdown menu
|
||||
# this makes sense if we can use fun in map line. Check!
|
||||
my $Component=1;
|
||||
foreach my $FitType (@FitTypes) {
|
||||
my $Parameters=$Paramcomp[$Component-1];
|
||||
my @Params = split( /\s+/, $Parameters );
|
||||
|
||||
# Alpha, No and NBg are counted in the parameters
|
||||
if ( $Component == 1 && $All{"FitAsyType"} eq "Asymmetry" ) {
|
||||
unshift( @Params, "Alpha" );
|
||||
}
|
||||
elsif ( $Component == 1 && $All{"FitAsyType"} eq "SingleHist" ) {
|
||||
unshift( @Params, ( "No", "NBg" ) );
|
||||
}
|
||||
|
||||
# Add list to the constraints drop down menu
|
||||
for (my $i=1; $i<=9;$i++) {
|
||||
my $CParam = $Params[$i-1]."_".$Component;
|
||||
if ($Params[$i-1] ne "" ) {
|
||||
if ($Params[$i-1] ne "Alpha" && $Params[$i-1] ne "No" && $Params[$i-1] ne "NBg") {
|
||||
CParamsCombo->insertItem($CParam,-1);
|
||||
$Full_T_Block=~ s/\b$Params[$i-1]\b/$CParam/;
|
||||
}
|
||||
# also enumerate the parameters as should be used in the FUNCTIONS Block
|
||||
$ParCount++;
|
||||
$ParametersList=$ParametersList."$CParam \t is \t par$ParCount\n";
|
||||
ParametersList->setText($ParametersList);
|
||||
}
|
||||
}
|
||||
$Component++;
|
||||
}
|
||||
# Set theory block in Constraints
|
||||
TheoryBlock->setText($Full_T_Block);
|
||||
# Then clear the text
|
||||
ConstraintLine->setText("");
|
||||
FunctionsBlock->setText("");
|
||||
}
|
||||
|
||||
|
||||
void MuSRFitform::optionConfigure()
|
||||
{
|
||||
use Customize;
|
||||
|
||||
my $Customize = Qt::Dialog(this);
|
||||
my $w = Customize;
|
||||
$w->setModal(1);
|
||||
$w->exec();
|
||||
# $Customize->setMainWidget($w);
|
||||
# $w->show;
|
||||
# exit $Customize->exec;
|
||||
|
||||
}
|
||||
|
||||
void MuSRFitform::t0UpdateClicked()
|
||||
{
|
||||
# Read MSR file and get new values of t0,Bg and Data
|
||||
my %All=CreateAllInput();
|
||||
my $FILENAME=$All{"FILENAME"};
|
||||
open (MSRF,q{<},"$FILENAME.msr" );
|
||||
my @lines = <MSRF>;
|
||||
close(IFILE);
|
||||
|
||||
my @T0s = grep {/t0 /} @lines;
|
||||
my @Bgs = grep {/background /} @lines;
|
||||
my @Datas = grep {/data /} @lines;
|
||||
|
||||
my @Hists = split(/,/, $All{"LRBF"} );
|
||||
my $NHist = $#Hists+1;
|
||||
print "Histograms: $NHist\n";
|
||||
|
||||
my $FinHist = 1;
|
||||
# First T0s
|
||||
while ($FinHist) {
|
||||
my $counter=0;
|
||||
(my $tmp,my @SplitT0) = split( /\s+/, $T0s[$counter]);
|
||||
(my $tmp,my @SplitBg) = split( /\s+/, $Bgs[$counter]);
|
||||
(my $tmp,my @SplitData) = split( /\s+/, $Datas[$counter]);
|
||||
if ($#SplitBg>0) {
|
||||
foreach (@SplitBg) {
|
||||
print $_."\n";
|
||||
}
|
||||
}
|
||||
$counter++;
|
||||
if ($counter>=$#Bgs) {$FinHist=0;}
|
||||
}
|
||||
|
||||
# Finally, disable the update button
|
||||
t0Update->setEnabled(0);
|
||||
# t0Update->setText("musrt0")
|
||||
}
|
BIN
src/external/MuSRFitGUI/icos/MuSRFit.odg
vendored
BIN
src/external/MuSRFitGUI/icos/MuSRFit.odg
vendored
Binary file not shown.
BIN
src/external/MuSRFitGUI/icos/MuSRFit.png
vendored
BIN
src/external/MuSRFitGUI/icos/MuSRFit.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 46 KiB |
22
src/external/MusrRoot/CMakeLists.txt
vendored
22
src/external/MusrRoot/CMakeLists.txt
vendored
@ -1,8 +1,19 @@
|
||||
# - TMusrRunHeader library ----------------------------------------------------
|
||||
|
||||
#--- generate necessary dictionaries ------------------------------------------
|
||||
set(MUSRROOT_INC ${CMAKE_SOURCE_DIR}/src/external/MusrRoot)
|
||||
# ROOT requires that the dictonary header files are found at configuration time.
|
||||
# Hence, target_include_directories cannot be used here because, targets are
|
||||
# setup only afterwards.
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
root_generate_dictionary(
|
||||
TMusrRunHeaderDict TMusrRunHeader.h LINKDEF TMusrRunHeaderLinkDef.h
|
||||
TMusrRunHeaderDict
|
||||
TMusrRunHeader.h
|
||||
OPTIONS
|
||||
-I${MUSRROOT_INC}
|
||||
-inlineInputHeader
|
||||
LINKDEF TMusrRunHeaderLinkDef.h
|
||||
MODULE TMusrRunHeader
|
||||
)
|
||||
|
||||
@ -20,6 +31,10 @@ add_library(TMusrRunHeader SHARED
|
||||
TMusrRunHeader.cpp
|
||||
TMusrRunHeaderDict.cxx
|
||||
)
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
TMusrRunHeader BEFORE PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
)
|
||||
|
||||
#--- set target properties, e.g. version --------------------------------------
|
||||
set_target_properties(TMusrRunHeader
|
||||
@ -27,11 +42,6 @@ set_target_properties(TMusrRunHeader
|
||||
VERSION ${MUSR_ROOT_VERSION}
|
||||
)
|
||||
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
TMusrRunHeader BEFORE PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
)
|
||||
|
||||
#--- add library dependencies -------------------------------------------------
|
||||
target_link_libraries(TMusrRunHeader ${ROOT_LIBRARIES})
|
||||
|
||||
|
32
src/external/Nonlocal/CMakeLists.txt
vendored
32
src/external/Nonlocal/CMakeLists.txt
vendored
@ -2,17 +2,32 @@
|
||||
|
||||
#--- generate necessary dictionaries ------------------------------------------
|
||||
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
|
||||
set(NONLOCAL_INC ${CMAKE_SOURCE_DIR}/src/external/Nonlocal)
|
||||
# ROOT requires that the dictonary header files are found at configuration time.
|
||||
# Hence, target_include_directories cannot be used here because, targets are
|
||||
# setup only afterwards.
|
||||
include_directories(${MUSRFIT_INC} ${NONLOCAL_INC})
|
||||
|
||||
root_generate_dictionary(
|
||||
PNL_PippardFitterDict
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
PNL_PippardFitter.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${NONLOCAL_INC}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-inlineInputHeader
|
||||
LINKDEF PNL_PippardFitterLinkDef.h
|
||||
MODULE PNL_PippardFitter
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PNL_StartupHandlerDict PNL_StartupHandler.h LINKDEF PNL_StartupHandlerLinkDef.h
|
||||
PNL_StartupHandlerDict
|
||||
PNL_StartupHandler.h
|
||||
OPTIONS
|
||||
-I${NONLOCAL_INC}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-inlineInputHeader
|
||||
LINKDEF PNL_StartupHandlerLinkDef.h
|
||||
MODULE PNL_StartupHandler
|
||||
)
|
||||
|
||||
@ -33,19 +48,13 @@ add_library(PNL_PippardFitter SHARED
|
||||
PNL_StartupHandler.cpp
|
||||
PNL_StartupHandlerDict.cxx
|
||||
)
|
||||
|
||||
#--- set target properties, e.g. version --------------------------------------
|
||||
set_target_properties(PNL_PippardFitter
|
||||
PROPERTIES
|
||||
VERSION ${PNL_PIPPARDFITTER_VERSION}
|
||||
)
|
||||
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PNL_PippardFitter BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
|
||||
)
|
||||
|
||||
#--- set target properties, e.g. version --------------------------------------
|
||||
@ -71,7 +80,8 @@ install(
|
||||
|
||||
#--- install PNL_PippardFitter header -----------------------------------------
|
||||
install(
|
||||
FILES
|
||||
FILES
|
||||
PNonlocal.h
|
||||
PNL_PippardFitter.h
|
||||
PNL_RgeHandler.h
|
||||
PNL_StartupHandler.h
|
||||
|
19
src/external/TLemRunHeader/CMakeLists.txt
vendored
19
src/external/TLemRunHeader/CMakeLists.txt
vendored
@ -1,12 +1,27 @@
|
||||
# -TLemRunHeader library ------------------------------------------------------
|
||||
|
||||
#--- generate necessary dictionaries ------------------------------------------
|
||||
# ROOT requires that the dictonary header files are found at configuration time.
|
||||
# Hence, target_include_directories cannot be used here because, targets are
|
||||
# setup only afterwards.
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
root_generate_dictionary(
|
||||
TLemRunHeaderDict TLemRunHeader.h LINKDEF TLemRunHeaderLinkDef.h
|
||||
TLemRunHeaderDict
|
||||
TLemRunHeader.h
|
||||
OPTIONS
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-inlineInputHeader
|
||||
LINKDEF TLemRunHeaderLinkDef.h
|
||||
MODULE TLemRunHeader
|
||||
)
|
||||
root_generate_dictionary(
|
||||
TLemStatsDict TLemStats.h LINKDEF TLemStatsLinkDef.h
|
||||
TLemStatsDict
|
||||
TLemStats.h
|
||||
OPTIONS
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-inlineInputHeader
|
||||
LINKDEF TLemStatsLinkDef.h
|
||||
MODULE TLemStats
|
||||
)
|
||||
|
||||
|
96
src/external/libBNMR/45377.dat
vendored
96
src/external/libBNMR/45377.dat
vendored
@ -1,96 +0,0 @@
|
||||
DATA
|
||||
592.75 0.0466642055 0.00075601151
|
||||
693.25 0.042699595 0.0007136273
|
||||
793.75 0.03943051 0.000679583922
|
||||
894.25 0.0366291886 0.000652378784
|
||||
994.75 0.0355316716 0.000664640277
|
||||
1095.25 0.033304272 0.000610910492
|
||||
1195.75 0.0322397741 0.000595454518
|
||||
1296.25 0.0308209315 0.000581648459
|
||||
1396.75 0.0301227967 0.000569861788
|
||||
1497.25 0.0289808195 0.000559611024
|
||||
1597.75 0.0284020831 0.000550685264
|
||||
1698.25 0.0272996592 0.000542785334
|
||||
1798.75 0.0259033059 0.000536112979
|
||||
1899.25 0.0257421462 0.000529928146
|
||||
1999.75 0.0252476607 0.000524276201
|
||||
2100.25 0.0252439822 0.00049508141
|
||||
2200.75 0.0244494569 0.000514789454
|
||||
2301.25 0.0248826473 0.000510792766
|
||||
2401.75 0.0252364689 0.000507093213
|
||||
2502.25 0.024077753 0.000503959631
|
||||
2602.75 0.0239705744 0.000501170092
|
||||
2703.25 0.023648613 0.000498351823
|
||||
2803.75 0.0236132062 0.000496113677
|
||||
2904.25 0.0232728359 0.000494038794
|
||||
3004.75 0.0229806315 0.00049216698
|
||||
3105.25 0.0226408705 0.000490122174
|
||||
3205.75 0.022949639 0.000488517677
|
||||
3306.25 0.0236152274 0.000487206227
|
||||
3406.75 0.022514855 0.000485776619
|
||||
3507.25 0.0232919509 0.000484617162
|
||||
3607.75 0.0227762445 0.000483435077
|
||||
3708.25 0.0225740091 0.000482352785
|
||||
3808.75 0.0217810425 0.000481423643
|
||||
3909.25 0.0210459719 0.000480488676
|
||||
4009.75 0.0200829485 0.0004835672
|
||||
4110.25 0.0144273479 0.000480165881
|
||||
4210.75 0.0104726937 0.000526210282
|
||||
4311.25 0.00977670745 0.000548717033
|
||||
4411.75 0.00734786823 0.000572069626
|
||||
4512.25 0.0071749696 0.000596458669
|
||||
4612.75 0.0061713664 0.000621795033
|
||||
4713.25 0.00457656715 0.000648552578
|
||||
4813.75 0.00253947053 0.000676064828
|
||||
4914.25 0.00298436429 0.000705158693
|
||||
5014.75 0.00520775648 0.000735097152
|
||||
5115.25 0.00372267868 0.000766213043
|
||||
5215.75 0.00284020846 0.000798853062
|
||||
5316.25 0.00158717036 0.000832862333
|
||||
5416.75 0.00200819085 0.000868342561
|
||||
5517.25 0.0044706107 0.000905327348
|
||||
5617.75 0.00135523051 0.000943421323
|
||||
5718.25 0.000261760966 0.000983714257
|
||||
5818.75 0.000210009562 0.00102515713
|
||||
5919.25 -0.000157024642 0.00106890614
|
||||
6019.75 0.000611697915 0.00111378026
|
||||
6120.25 0.000353532075 0.00111004546
|
||||
6220.75 0.00120570511 0.00121565301
|
||||
6321.25 -0.00126499964 0.00126730997
|
||||
6421.75 0.0029594966 0.00132005144
|
||||
6522.25 -0.00180278144 0.00137777581
|
||||
6622.75 0.00154819637 0.00143478041
|
||||
6723.25 0.00137296473 0.00149757271
|
||||
6823.75 -0.000271202669 0.00155948172
|
||||
6924.25 -0.00306837271 0.00162568622
|
||||
7024.75 0.00346602562 0.00169188976
|
||||
7125.25 -8.40576554E-05 0.00176525436
|
||||
7225.75 0.00141055893 0.00183909095
|
||||
7326.25 -0.00170315946 0.00191744238
|
||||
7426.75 0.00399357243 0.00199844555
|
||||
7527.25 0.00378603394 0.00208493839
|
||||
7627.75 -0.0015303158 0.00216992033
|
||||
7728.25 -0.000931658073 0.00226567509
|
||||
7828.75 0.0011671311 0.00235924947
|
||||
7929.25 0.00147725609 0.00245769641
|
||||
8029.75 -0.00100983925 0.00256942322
|
||||
8130.25 -0.00329542124 0.00255286858
|
||||
8230.75 0.000636890228 0.00279597795
|
||||
8331.25 -0.000814018633 0.00291290155
|
||||
8431.75 0.000101912547 0.00303673191
|
||||
8532.25 0.00311038784 0.0031603991
|
||||
8632.75 0.000473049572 0.00329964113
|
||||
8733.25 8.36732E-05 0.00343974064
|
||||
8833.75 0.000275585165 0.00358184548
|
||||
8934.25 0.0059381551 0.00373021006
|
||||
9034.75 -0.0014588358 0.0038926573
|
||||
9135.25 -0.00158156038 0.00405870998
|
||||
9235.75 -0.00125287442 0.00422594705
|
||||
9336.25 -0.00212622165 0.00439704849
|
||||
9436.75 -0.00477056006 0.0045911195
|
||||
9537.25 -0.00229735693 0.00479087708
|
||||
9637.75 0.00575469607 0.00498561109
|
||||
9738.25 -7.52893075E-05 0.00519483122
|
||||
9838.75 -0.00368605583 0.0054198485
|
||||
9939.25 -0.00862419517 0.00564201231
|
||||
10039.75 -0.0323936833 0.0181186246
|
10
src/external/libBNMR/CMakeLists.txt
vendored
10
src/external/libBNMR/CMakeLists.txt
vendored
@ -5,12 +5,18 @@ add_subdirectory(libLineProfile)
|
||||
|
||||
#--- generate necessary dictionaries ------------------------------------------
|
||||
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
|
||||
# ROOT requires that the dictonary header files are found at configuration time.
|
||||
# Hence, target_include_directories cannot be used here because, targets are
|
||||
# setup only afterwards.
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
root_generate_dictionary(
|
||||
TBNMRDict
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
TBNMR.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-inlineInputHeader
|
||||
LINKDEF TBNMRLinkDef.h
|
||||
MODULE TBNMR
|
||||
)
|
||||
|
45
src/external/libBNMR/ExpRlx.msr
vendored
45
src/external/libBNMR/ExpRlx.msr
vendored
@ -1,45 +0,0 @@
|
||||
Title
|
||||
###############################################################
|
||||
FITPARAMETER
|
||||
# Nr. Name Value Step Pos_Error Boundaries
|
||||
1 Asy1 0.0812706 0.00149848 none 0 none
|
||||
2 T 4000 0 none 0 none
|
||||
3 Lam1 0.00239816 6.05947e-05 none 0 none
|
||||
|
||||
###############################################################
|
||||
THEORY
|
||||
asymmetry 1
|
||||
userFcn /usr/local/lib/libBNMR.so ExpRlx 2 3
|
||||
|
||||
###############################################################
|
||||
RUN 45377 MUE4 PSI ASCII (name beamline institute data-file-format)
|
||||
fittype 8 (non muSR fit)
|
||||
map 0 0 0 0 0 0 0 0 0 0
|
||||
xy-data 1 2
|
||||
fit 0.00 8000.00
|
||||
packing 1
|
||||
|
||||
###############################################################
|
||||
COMMANDS
|
||||
STRATEGY 1
|
||||
MINIMIZE
|
||||
#MINOS
|
||||
SAVE
|
||||
END RETURN
|
||||
|
||||
###############################################################
|
||||
PLOT 8 (non muSR plot)
|
||||
runs 1
|
||||
range 0.00 8000.00
|
||||
|
||||
###############################################################
|
||||
FOURIER
|
||||
units MHz # units either 'Gauss', 'MHz', or 'Mc/s'
|
||||
fourier_power 12
|
||||
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
|
||||
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE
|
||||
phase 8.50
|
||||
#range FRQMIN FRQMAX
|
||||
###############################################################
|
||||
STATISTIC --- 2010-09-02 17:44:20
|
||||
chisq = 186.322493286053, NDF = 72, chisq/NDF = 2.5878124067507362
|
46
src/external/libBNMR/SExpRlx.msr
vendored
46
src/external/libBNMR/SExpRlx.msr
vendored
@ -1,46 +0,0 @@
|
||||
Title
|
||||
###############################################################
|
||||
FITPARAMETER
|
||||
# Nr. Name Value Step Pos_Error Boundaries
|
||||
1 Asy1 0.262789 0.0465582 none 0 none
|
||||
2 T 4000 0 none 0 none
|
||||
3 Lam1 0.0233569 0.0094885 none 0 none
|
||||
4 Bet1 0.399259 0.0353915 none 0 none
|
||||
|
||||
###############################################################
|
||||
THEORY
|
||||
asymmetry 1
|
||||
userFcn /usr/local/lib/libBNMR.so SExpRlx 2 3 4
|
||||
|
||||
###############################################################
|
||||
RUN 45377 MUE4 PSI ASCII (name beamline institute data-file-format)
|
||||
fittype 8 (non muSR fit)
|
||||
map 0 0 0 0 0 0 0 0 0 0
|
||||
xy-data 1 2
|
||||
fit 0.00 8000.00
|
||||
packing 1
|
||||
|
||||
###############################################################
|
||||
COMMANDS
|
||||
STRATEGY 1
|
||||
MINIMIZE
|
||||
#MINOS
|
||||
SAVE
|
||||
END RETURN
|
||||
|
||||
###############################################################
|
||||
PLOT 8 (non muSR plot)
|
||||
runs 1
|
||||
range 0.00 8000.00
|
||||
|
||||
###############################################################
|
||||
FOURIER
|
||||
units MHz # units either 'Gauss', 'MHz', or 'Mc/s'
|
||||
fourier_power 12
|
||||
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
|
||||
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE
|
||||
phase 8.50
|
||||
#range FRQMIN FRQMAX
|
||||
###############################################################
|
||||
STATISTIC --- 2010-09-02 17:51:10
|
||||
chisq = 93.71265965991455, NDF = 71, chisq/NDF = 1.319896614928374
|
39
src/external/libBNMR/TBNMR.cpp
vendored
39
src/external/libBNMR/TBNMR.cpp
vendored
@ -31,55 +31,50 @@
|
||||
|
||||
#include "TBNMR.h"
|
||||
|
||||
#define tau_Li 1210
|
||||
#define gamma_Li 6.3018 // In units kHz/mT
|
||||
#define PI 3.14159265358979323846
|
||||
#define TWOPI 6.28318530717958647692
|
||||
|
||||
ClassImp(ExpRlx) // for the ROOT-dictionary
|
||||
ClassImp(SExpRlx)
|
||||
|
||||
|
||||
double ExpRlx::operator()(double x, const std::vector<double> &par) const {
|
||||
assert(par.size()==2); // make sure the number of parameters handed to the function is correct
|
||||
|
||||
// par[0] time of beam off
|
||||
// par[1] is the relaxation rate
|
||||
// par[0] time of beam on (pulse length) in seconds
|
||||
// par[1] is the relaxation rate in 1/s
|
||||
double tau_p;
|
||||
double y;
|
||||
|
||||
tau_p = (tau_Li/(1.+par[1]*tau_Li));
|
||||
|
||||
|
||||
// x should be in seconds, otherwise it should be rescaled here
|
||||
if ( x <= par[0] && x >= 0) {
|
||||
y=(tau_p/tau_Li)*(1-exp(-x/tau_p))/(1-exp(-x/tau_Li));
|
||||
return (tau_p/tau_Li)*(1-exp(-x/tau_p))/(1-exp(-x/tau_Li));
|
||||
} else if ( x > par[0] ){
|
||||
y=(tau_p/tau_Li)*(1-exp(-par[0]/tau_p))/(1-exp(-par[0]/tau_Li))*exp(-par[1]*(x-par[0]));
|
||||
} else {
|
||||
y = 0;
|
||||
}
|
||||
|
||||
return y;
|
||||
return (tau_p/tau_Li)*(1-exp(-par[0]/tau_p))/(1-exp(-par[0]/tau_Li))*exp(-par[1]*(x-par[0]));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//initialize Integrators
|
||||
TF1 SExpRlx::sexp1=TF1("sexp", "exp(-([0]-x)/[3])*exp(-pow(([1]*([0]-x)),[2]))", 0.0, 20000.0);
|
||||
TF1 SExpRlx::sexp2=TF1("sexp", "exp(-([3]-x)/[4])*exp(-pow(([1]*([0]-x)),[2]))", 0.0, 20000.0);
|
||||
|
||||
double SExpRlx::operator()(double x, const std::vector<double> &par) const {
|
||||
|
||||
assert(par.size()==3); // make sure the number of parameters handed to the function is correct
|
||||
|
||||
// par[0] time of beam off
|
||||
// par[1] is the relaxation rate
|
||||
// par[0] beam of beam on (pulse length) in seconds
|
||||
// par[1] is the relaxation rate in 1/s
|
||||
// par[2] is the exponent
|
||||
|
||||
// x should be in seconds, otherwise it should be rescaled here
|
||||
if ( x >= 0 && x <= par[0] ) {
|
||||
TF1 sexp1("sexp1", "exp(-([0]-x)/[3])*exp(-pow(([1]*([0]-x)),[2]))", 0.0, 20.0);
|
||||
sexp1.SetParameters(x, par[1], par[2],tau_Li);
|
||||
sexp1.SetNpx(1000);
|
||||
return sexp1.Integral(0.0,x)/(1-exp(-x/tau_Li))/tau_Li;
|
||||
} else if ( x > par[0] ) {
|
||||
TF1 sexp2("sexp2", "exp(-([3]-x)/[4])*exp(-pow(([1]*([0]-x)),[2]))", 0.0, 20.0);
|
||||
sexp2.SetParameters(x, par[1], par[2], par[0],tau_Li);
|
||||
sexp2.SetNpx(1000);
|
||||
return sexp2.Integral(0.0,par[0])/(1-exp(-par[0]/tau_Li))/tau_Li;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
4
src/external/libBNMR/TBNMR.h
vendored
4
src/external/libBNMR/TBNMR.h
vendored
@ -41,6 +41,10 @@
|
||||
#ifndef LIBBNMRH
|
||||
#define LIBBNMRH
|
||||
|
||||
#define tau_Li 1.210 // In seconds
|
||||
#define PI 3.14159265358979323846
|
||||
#define TWOPI 6.28318530717958647692
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
@ -2,12 +2,17 @@
|
||||
|
||||
#--- generate necessary dictionaries ------------------------------------------
|
||||
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
|
||||
# ROOT requires that the dictonary header files are found at configuration time.
|
||||
# Hence, target_include_directories cannot be used here because, targets are
|
||||
# setup only afterwards.
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
root_generate_dictionary(
|
||||
LineProfileDict
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
LineProfile.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
LINKDEF LineProfileLinkDef.h
|
||||
MODULE LineProfile
|
||||
)
|
||||
|
14
src/external/libCalcMeanFieldsLEM/CMakeLists.txt
vendored
14
src/external/libCalcMeanFieldsLEM/CMakeLists.txt
vendored
@ -4,14 +4,20 @@
|
||||
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
|
||||
set(BMW_TOOLS_INC ${CMAKE_SOURCE_DIR}/src/external/BMWtools)
|
||||
set(POFB_INC ${CMAKE_SOURCE_DIR}/src/external/libFitPofB/include)
|
||||
# ROOT requires that the dictonary header files are found at configuration time.
|
||||
# Hence, target_include_directories cannot be used here because, targets are
|
||||
# setup only afterwards.
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
root_generate_dictionary(
|
||||
TCalcMeanFieldsLEMDict
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
-I${POFB_INC}
|
||||
TCalcMeanFieldsLEM.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
-I${POFB_INC}
|
||||
-inlineInputHeader
|
||||
LINKDEF TCalcMeanFieldsLEMLinkDef.h
|
||||
MODULE TCalcMeanFieldsLEM
|
||||
)
|
||||
|
46
src/external/libFitPofB/classes/CMakeLists.txt
vendored
46
src/external/libFitPofB/classes/CMakeLists.txt
vendored
@ -3,39 +3,47 @@
|
||||
#--- generate necessary dictionaries ------------------------------------------
|
||||
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
|
||||
set(BMW_TOOLS_INC ${CMAKE_SOURCE_DIR}/src/external/BMWtools)
|
||||
set(POFB_INC ${CMAKE_SOURCE_DIR}/src/external/libFitPofB/include)
|
||||
set(FIT_P_OF_B_INC ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||
# ROOT requires that the dictonary header files are found at configuration time.
|
||||
# Hence, target_include_directories cannot be used here because, targets are
|
||||
# setup only afterwards.
|
||||
include_directories(${FIT_P_OF_B_INC})
|
||||
|
||||
root_generate_dictionary(
|
||||
TLondon1DDict
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
-I${POFB_INC}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
|
||||
TLondon1D.h
|
||||
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/TLondon1DLinkDef.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
-I${FIT_P_OF_B_INC}
|
||||
-inlineInputHeader
|
||||
LINKDEF ${FIT_P_OF_B_INC}/TLondon1DLinkDef.h
|
||||
MODULE TLondon1D
|
||||
)
|
||||
root_generate_dictionary(
|
||||
TVortexDict
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
-I${POFB_INC}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
|
||||
TVortex.h
|
||||
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/TVortexLinkDef.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
-I${FIT_P_OF_B_INC}
|
||||
-inlineInputHeader
|
||||
LINKDEF ${FIT_P_OF_B_INC}/TVortexLinkDef.h
|
||||
MODULE TVortex
|
||||
)
|
||||
root_generate_dictionary(
|
||||
TSkewedGssDict
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
-I${POFB_INC}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
|
||||
TSkewedGss.h
|
||||
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/TSkewedGssLinkDef.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
-I${POFB_INC}
|
||||
-I${FIT_P_OF_B_INC}
|
||||
-inlineInputHeader
|
||||
LINKDEF ${FIT_P_OF_B_INC}/TSkewedGssLinkDef.h
|
||||
MODULE TSkewedGss
|
||||
)
|
||||
|
||||
|
13
src/external/libGapIntegrals/CMakeLists.txt
vendored
13
src/external/libGapIntegrals/CMakeLists.txt
vendored
@ -3,13 +3,20 @@
|
||||
#--- generate necessary dictionaries ------------------------------------------
|
||||
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
|
||||
set(BMW_TOOLS_INC ${CMAKE_SOURCE_DIR}/src/external/BMWtools)
|
||||
# ROOT requires that the dictonary header files are found at configuration time.
|
||||
# Hence, target_include_directories cannot be used here because, targets are
|
||||
# setup only afterwards.
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
root_generate_dictionary(
|
||||
TGapIntegralsDict
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
TGapIntegrals.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-inlineInputHeader
|
||||
LINKDEF TGapIntegralsLinkDef.h
|
||||
MODULE TGapIntegrals
|
||||
)
|
||||
|
16
src/external/libGbGLF/CMakeLists.txt
vendored
16
src/external/libGbGLF/CMakeLists.txt
vendored
@ -2,18 +2,20 @@
|
||||
|
||||
#--- generate necessary dictionaries ------------------------------------------
|
||||
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
|
||||
set(GBGLF_INC ${CMAKE_SOURCE_DIR}/src/external/libGbGLF)
|
||||
set(PREFIX_INC ${CMAKE_INSTALL_PREFIX}/include)
|
||||
|
||||
# ROOT requires that the dictonary header files are found at configuration time.
|
||||
# Hence, target_include_directories cannot be used here because, targets are
|
||||
# setup only afterwards.
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
root_generate_dictionary(
|
||||
PGbGLFDict
|
||||
-I${GBGLF_INC}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-I${PREFIX_INC}
|
||||
PGbGLF.h
|
||||
OPTIONS
|
||||
-I${MUSRFIT_INC}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-inlineInputHeader
|
||||
LINKDEF PGbGLFLinkDef.h
|
||||
OPTIONS -inlineInputHeader
|
||||
MODULE PGbGLF
|
||||
)
|
||||
|
||||
|
12
src/external/libLFRelaxation/CMakeLists.txt
vendored
12
src/external/libLFRelaxation/CMakeLists.txt
vendored
@ -3,13 +3,19 @@
|
||||
#--- generate necessary dictionaries ------------------------------------------
|
||||
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
|
||||
set(BMW_TOOLS_INC ${CMAKE_SOURCE_DIR}/src/external/BMWtools)
|
||||
# ROOT requires that the dictonary header files are found at configuration time.
|
||||
# Hence, target_include_directories cannot be used here because, targets are
|
||||
# setup only afterwards.
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
root_generate_dictionary(
|
||||
TLFRelaxationDict
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
TLFRelaxation.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
-inlineInputHeader
|
||||
LINKDEF TLFRelaxationLinkDef.h
|
||||
MODULE TLFRelaxation
|
||||
)
|
||||
|
@ -2,24 +2,33 @@
|
||||
|
||||
#--- generate necessary dictionaries ------------------------------------------
|
||||
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
|
||||
set(PHOTO_MEISSNER_INC ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||
# ROOT requires that the dictonary header files are found at configuration time.
|
||||
# Hence, target_include_directories cannot be used here because, targets are
|
||||
# setup only afterwards.
|
||||
include_directories(${PHOTO_MEISSNER_INC})
|
||||
|
||||
root_generate_dictionary(
|
||||
PPhotoMeissnerDict
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${GSL_INCLUDE_DIRS}
|
||||
-I${ROOT_INCLUDE_DIRS}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
|
||||
PPhotoMeissner.h
|
||||
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/PPhotoMeissnerLinkDef.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${GSL_INCLUDE_DIRS}
|
||||
-I${ROOT_INCLUDE_DIRS}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${PHOTO_MEISSNER_INC}
|
||||
-inlineInputHeader
|
||||
LINKDEF ${PHOTO_MEISSNER_INC}/PPhotoMeissnerLinkDef.h
|
||||
MODULE PPhotoMeissner
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PStartupHandler_PMDict
|
||||
-I${MUSRFIT_INC}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
|
||||
PStartupHandler_PM.h
|
||||
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/PStartupHandler_PMLinkDef.h
|
||||
OPTIONS
|
||||
-I${MUSRFIT_INC}
|
||||
-I${PHOTO_MEISSNER_INC}
|
||||
-inlineInputHeader
|
||||
LINKDEF ${PHOTO_MEISSNER_INC}/PStartupHandler_PMLinkDef.h
|
||||
MODULE PStartupHandler_PM
|
||||
)
|
||||
|
||||
|
21
src/external/libSpinValve/classes/CMakeLists.txt
vendored
21
src/external/libSpinValve/classes/CMakeLists.txt
vendored
@ -2,21 +2,30 @@
|
||||
|
||||
#--- generate necessary dictionaries ------------------------------------------
|
||||
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
|
||||
set(SPIN_VALVE_INC ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||
# ROOT requires that the dictonary header files are found at configuration time.
|
||||
# Hence, target_include_directories cannot be used here because, targets are
|
||||
# setup only afterwards.
|
||||
include_directories(${SPIN_VALVE_INC})
|
||||
|
||||
root_generate_dictionary(
|
||||
PSkewedLorentzianDict
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
|
||||
PSkewedLorentzian.h
|
||||
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/PSkewedLorentzianLinkDef.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${SPIN_VALVE_INC}
|
||||
-inlineInputHeader
|
||||
LINKDEF ${SPIN_VALVE_INC}/PSkewedLorentzianLinkDef.h
|
||||
MODULE PSkewedLorentzian
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PStartupHandler_SVDict
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
|
||||
PStartupHandler_SV.h
|
||||
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/PStartupHandler_SVLinkDef.h
|
||||
OPTIONS
|
||||
-I${SPIN_VALVE_INC}
|
||||
-inlineInputHeader
|
||||
LINKDEF ${SPIN_VALVE_INC}/PStartupHandler_SVLinkDef.h
|
||||
MODULE PStartupHandler_SV
|
||||
)
|
||||
|
||||
|
12
src/external/libZFRelaxation/CMakeLists.txt
vendored
12
src/external/libZFRelaxation/CMakeLists.txt
vendored
@ -3,13 +3,19 @@
|
||||
#--- generate necessary dictionaries ------------------------------------------
|
||||
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
|
||||
set(BMW_TOOLS_INC ${CMAKE_SOURCE_DIR}/src/external/BMWtools)
|
||||
# ROOT requires that the dictonary header files are found at configuration time.
|
||||
# Hence, target_include_directories cannot be used here because, targets are
|
||||
# setup only afterwards.
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
root_generate_dictionary(
|
||||
ZFRelaxationDict
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
ZFRelaxation.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
-inlineInputHeader
|
||||
LINKDEF ZFRelaxationLinkDef.h
|
||||
MODULE ZFRelaxation
|
||||
)
|
||||
|
@ -30,9 +30,7 @@
|
||||
#ifndef _PFOURIER_H_
|
||||
#define _PFOURIER_H_
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <vector>
|
||||
|
||||
#ifndef HAVE_DKS
|
||||
#include <vector>
|
||||
@ -45,6 +43,8 @@
|
||||
|
||||
#include <TH1F.h>
|
||||
|
||||
#include <TH1F.h>
|
||||
|
||||
#include "Minuit2/FCNBase.h"
|
||||
|
||||
#include "PMusr.h"
|
||||
|
@ -58,6 +58,7 @@
|
||||
#define PRUN_ASYMMETRY 2
|
||||
#define PRUN_ASYMMETRY_RRF 3
|
||||
#define PRUN_MU_MINUS 4
|
||||
#define PRUN_ASYMMETRY_BNMR 5
|
||||
#define PRUN_NON_MUSR 8
|
||||
|
||||
// muon life time in (us), see PRL99, 032001 (2007)
|
||||
@ -100,6 +101,7 @@
|
||||
#define MSR_FITTYPE_ASYM 2
|
||||
#define MSR_FITTYPE_ASYM_RRF 3
|
||||
#define MSR_FITTYPE_MU_MINUS 4
|
||||
#define MSR_FITTYPE_BNMR 5
|
||||
#define MSR_FITTYPE_NON_MUSR 8
|
||||
|
||||
//-------------------------------------------------------------
|
||||
@ -109,6 +111,7 @@
|
||||
#define MSR_PLOT_ASYM 2
|
||||
#define MSR_PLOT_ASYM_RRF 3
|
||||
#define MSR_PLOT_MU_MINUS 4
|
||||
#define MSR_PLOT_BNMR 5
|
||||
#define MSR_PLOT_NON_MUSR 8
|
||||
|
||||
//-------------------------------------------------------------
|
||||
@ -575,6 +578,7 @@ class PMsrGlobalBlock {
|
||||
virtual Double_t GetFitRange(UInt_t idx);
|
||||
virtual Int_t GetFitRangeOffset(UInt_t idx);
|
||||
virtual Int_t GetPacking() { return fPacking; }
|
||||
virtual Double_t GetEstimatedAlpha() { return fAlpha; }
|
||||
|
||||
virtual void SetGlobalPresent(Bool_t bval) { fGlobalPresent = bval; }
|
||||
virtual void SetRRFFreq(Double_t freq, const char *unit);
|
||||
@ -603,6 +607,7 @@ class PMsrGlobalBlock {
|
||||
Double_t fFitRange[2]; ///< fit range in (us)
|
||||
Int_t fFitRangeOffset[2]; ///< if fit range is given in bins it can have the form fit fgb+n0 lgb-n1. This variable holds the n0 and n1.
|
||||
Int_t fPacking; ///< packing/rebinning
|
||||
Double_t fAlpha; ///< estimated alpha value from F/B counts
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------
|
||||
@ -650,6 +655,7 @@ class PMsrRunBlock {
|
||||
virtual Double_t GetFitRange(UInt_t idx);
|
||||
virtual Int_t GetFitRangeOffset(UInt_t idx);
|
||||
virtual Int_t GetPacking() { return fPacking; }
|
||||
virtual Double_t GetEstimatedAlpha() { return fAlpha; }
|
||||
virtual Int_t GetXDataIndex() { return fXYDataIndex[0]; }
|
||||
virtual Int_t GetYDataIndex() { return fXYDataIndex[1]; }
|
||||
virtual TString* GetXDataLabel() { return &fXYDataLabel[0]; }
|
||||
@ -672,6 +678,7 @@ class PMsrRunBlock {
|
||||
virtual void SetForwardHistoNo(Int_t histoNo, Int_t idx=-1);
|
||||
virtual void SetBackwardHistoNo(Int_t histoNo, Int_t idx=-1);
|
||||
virtual void SetBkgEstimated(Double_t dval, Int_t idx);
|
||||
virtual void SetEstimatedAlpha(Double_t dval);
|
||||
virtual void SetBkgFix(Double_t dval, Int_t idx);
|
||||
virtual void SetBkgRange(Int_t ival, Int_t idx);
|
||||
virtual void SetDataRange(Int_t ival, Int_t idx);
|
||||
@ -712,6 +719,7 @@ class PMsrRunBlock {
|
||||
Bool_t fFitRangeInBins; ///< flag telling if fit range is given in time or in bins
|
||||
Double_t fFitRange[2]; ///< fit range in (us)
|
||||
Int_t fFitRangeOffset[2]; ///< if fit range is given in bins it can have the form fit fgb+n0 lgb-n1. This variable holds the n0 and n1.
|
||||
Double_t fAlpha; ///< estimated alpha value from F/B counts
|
||||
Int_t fPacking; ///< packing/rebinning
|
||||
Int_t fXYDataIndex[2]; ///< used to get the data indices when using db-files (fit type 8)
|
||||
TString fXYDataLabel[2]; ///< used to get the indices via labels when using db-files (fit type 8)
|
||||
|
@ -247,7 +247,7 @@ class PMusrCanvas : public TObject, public TQObject
|
||||
Bool_t fDifferenceView; ///< tag showing that the shown data, fourier, are the difference between data and theory
|
||||
Int_t fCurrentPlotView; ///< tag showing what the current plot view is: data, fourier, ...
|
||||
Int_t fPreviousPlotView; ///< tag showing the previous plot view
|
||||
Int_t fPlotType; ///< plot type tag: -1 == undefined, MSR_PLOT_SINGLE_HISTO == single histogram, MSR_PLOT_ASYM == asymmetry, MSR_PLOT_MU_MINUS == mu minus (not yet implemented), MSR_PLOT_NON_MUSR == non-muSR
|
||||
Int_t fPlotType; ///< plot type tag: -1 == undefined, MSR_PLOT_SINGLE_HISTO == single histogram, MSR_PLOT_ASYM == asymmetry, MSR_PLOT_BNMR == beta-NMR asymmetry, MSR_PLOT_MU_MINUS == mu minus (not yet implemented), MSR_PLOT_NON_MUSR == non-muSR
|
||||
Int_t fPlotNumber; ///< plot number
|
||||
|
||||
Bool_t fXRangePresent, fYRangePresent; ///< flag indicating if x-/y-range is present
|
||||
|
94
src/include/PRunAsymmetryBNMR.h
Normal file
94
src/include/PRunAsymmetryBNMR.h
Normal file
@ -0,0 +1,94 @@
|
||||
/***************************************************************************
|
||||
|
||||
PRunAsymmetryBNMR.h
|
||||
|
||||
Author: Zaher Salman
|
||||
Based on PRunAsymmetry.h by Andreas Suter
|
||||
e-mail: zaher.salman@psi.ch
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2018-2019 by Zaher Salman *
|
||||
* zaher.salman@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 _PRUNASYMMETRYBNMR_H_
|
||||
#define _PRUNASYMMETRYBNMR_H_
|
||||
|
||||
#include "PRunBase.h"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Class handling the asymmetry fit.
|
||||
*/
|
||||
class PRunAsymmetryBNMR : public PRunBase
|
||||
{
|
||||
public:
|
||||
PRunAsymmetryBNMR();
|
||||
PRunAsymmetryBNMR(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag);
|
||||
virtual ~PRunAsymmetryBNMR();
|
||||
|
||||
virtual Double_t CalcChiSquare(const std::vector<Double_t>& par);
|
||||
virtual Double_t CalcChiSquareExpected(const std::vector<Double_t>& par);
|
||||
virtual Double_t CalcMaxLikelihood(const std::vector<Double_t>& par);
|
||||
virtual void CalcTheory();
|
||||
|
||||
virtual UInt_t GetNoOfFitBins();
|
||||
|
||||
virtual void SetFitRangeBin(const TString fitRange);
|
||||
|
||||
virtual Int_t GetStartTimeBin() { return fStartTimeBin; }
|
||||
virtual Int_t GetEndTimeBin() { return fEndTimeBin; }
|
||||
virtual Int_t GetPacking() { return fPacking; }
|
||||
|
||||
protected:
|
||||
virtual void CalcNoOfFitBins();
|
||||
virtual Bool_t PrepareData();
|
||||
virtual Bool_t PrepareFitData();
|
||||
virtual Bool_t PrepareViewData(PRawRunData* runData, UInt_t histoNo[2]);
|
||||
|
||||
private:
|
||||
UInt_t fAlphaBetaTag; ///< \f$ 1 \to \alpha = \beta = 1\f$; \f$ 2 \to \alpha \neq 1, \beta = 1\f$; \f$ 3 \to \alpha = 1, \beta \neq 1\f$; \f$ 4 \to \alpha \neq 1, \beta \neq 1\f$.
|
||||
UInt_t fNoOfFitBins; ///< number of bins to be be fitted
|
||||
Int_t fPacking; ///< packing for this particular run. Either given in the RUN- or GLOBAL-block.
|
||||
|
||||
PDoubleVector fForwardp; ///< pos hel forward histo data
|
||||
PDoubleVector fForwardpErr; ///< pos hel forward histo errors
|
||||
PDoubleVector fBackwardp; ///< pos hel backward histo data
|
||||
PDoubleVector fBackwardpErr; ///< pos hel backward histo errors
|
||||
PDoubleVector fForwardm; ///< neg hel forward histo data
|
||||
PDoubleVector fForwardmErr; ///< neg hel forward histo errors
|
||||
PDoubleVector fBackwardm; ///< neg hel backward histo data
|
||||
PDoubleVector fBackwardmErr; ///< neg hel backward histo errors
|
||||
|
||||
Int_t fGoodBins[4]; ///< keep first/last good bins. 0=fgb, 1=lgb (forward); 2=fgb, 3=lgb (backward)
|
||||
|
||||
Int_t fStartTimeBin; ///< bin at which the fit starts
|
||||
Int_t fEndTimeBin; ///< bin at which the fit ends
|
||||
|
||||
Bool_t SubtractFixBkg();
|
||||
Bool_t SubtractEstimatedBkg();
|
||||
|
||||
virtual Bool_t GetProperT0(PRawRunData* runData, PMsrGlobalBlock *globalBlock, PUIntVector &forwardHisto, PUIntVector &backwardHistoNo);
|
||||
virtual Bool_t GetProperDataRange(PRawRunData* runData, UInt_t histoNo[2]);
|
||||
virtual void GetProperFitRange(PMsrGlobalBlock *globalBlock);
|
||||
virtual Double_t EstimateAlpha();
|
||||
};
|
||||
|
||||
#endif // _PRUNASYMMETRYBNMR_H_
|
@ -39,6 +39,7 @@
|
||||
#include "PRunSingleHistoRRF.h"
|
||||
#include "PRunAsymmetry.h"
|
||||
#include "PRunAsymmetryRRF.h"
|
||||
#include "PRunAsymmetryBNMR.h"
|
||||
#include "PRunMuMinus.h"
|
||||
#include "PRunNonMusr.h"
|
||||
|
||||
@ -81,6 +82,7 @@ class PRunListCollection
|
||||
virtual Double_t GetSingleHistoRRFChisq(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetAsymmetryChisq(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetAsymmetryRRFChisq(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetAsymmetryBNMRChisq(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetMuMinusChisq(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetNonMusrChisq(const std::vector<Double_t>& par) const;
|
||||
|
||||
@ -91,6 +93,7 @@ class PRunListCollection
|
||||
virtual Double_t GetSingleHistoRRFMaximumLikelihood(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetAsymmetryMaximumLikelihood(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetAsymmetryRRFMaximumLikelihood(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetAsymmetryBNMRMaximumLikelihood(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetMuMinusMaximumLikelihood(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetNonMusrMaximumLikelihood(const std::vector<Double_t>& par) const;
|
||||
|
||||
@ -104,6 +107,7 @@ class PRunListCollection
|
||||
virtual UInt_t GetNoOfSingleHistoRRF() const { return fRunSingleHistoRRFList.size(); } ///< returns the number of single histogram RRF data sets present in the msr-file
|
||||
virtual UInt_t GetNoOfAsymmetry() const { return fRunAsymmetryList.size(); } ///< returns the number of asymmetry data sets present in the msr-file
|
||||
virtual UInt_t GetNoOfAsymmetryRRF() const { return fRunAsymmetryRRFList.size(); } ///< returns the number of asymmetry RRF data sets present in the msr-file
|
||||
virtual UInt_t GetNoOfAsymmetryBNMR() const { return fRunAsymmetryBNMRList.size(); } ///< returns the number of asymmetry BNMR data sets present in the msr-file
|
||||
virtual UInt_t GetNoOfMuMinus() const { return fRunMuMinusList.size(); } ///< returns the number of mu minus data sets present in the msr-file
|
||||
virtual UInt_t GetNoOfNonMusr() const { return fRunNonMusrList.size(); } ///< returns the number of non-muSR data sets present in the msr-file
|
||||
|
||||
@ -111,6 +115,7 @@ class PRunListCollection
|
||||
virtual PRunData* GetSingleHistoRRF(UInt_t index, EDataSwitch tag=kIndex);
|
||||
virtual PRunData* GetAsymmetry(UInt_t index, EDataSwitch tag=kIndex);
|
||||
virtual PRunData* GetAsymmetryRRF(UInt_t index, EDataSwitch tag=kIndex);
|
||||
virtual PRunData* GetAsymmetryBNMR(UInt_t index, EDataSwitch tag=kIndex);
|
||||
virtual PRunData* GetMuMinus(UInt_t index, EDataSwitch tag=kIndex);
|
||||
virtual PRunData* GetNonMusr(UInt_t index, EDataSwitch tag=kIndex);
|
||||
|
||||
@ -138,6 +143,7 @@ class PRunListCollection
|
||||
std::vector<PRunSingleHistoRRF*> fRunSingleHistoRRFList; ///< stores all processed single histogram RRF data
|
||||
std::vector<PRunAsymmetry*> fRunAsymmetryList; ///< stores all processed asymmetry data
|
||||
std::vector<PRunAsymmetryRRF*> fRunAsymmetryRRFList; ///< stores all processed asymmetry RRF data
|
||||
std::vector<PRunAsymmetryBNMR*> fRunAsymmetryBNMRList; ///< stores all processed asymmetry BNMR data
|
||||
std::vector<PRunMuMinus*> fRunMuMinusList; ///< stores all processed mu-minus data
|
||||
std::vector<PRunNonMusr*> fRunNonMusrList; ///< stores all processed non-muSR data
|
||||
|
||||
|
@ -369,6 +369,10 @@ PmuppGui::PmuppGui( QStringList fln, QWidget *parent, Qt::WindowFlags f )
|
||||
|
||||
fCentralWidget->setLayout(fBoxLayout_Main);
|
||||
setCentralWidget(fCentralWidget);
|
||||
|
||||
// in case there is no db/dat file list given open the db/dat file open menu automatically.
|
||||
if (fln.size() == 0)
|
||||
fileOpen();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
|
@ -24,21 +24,29 @@ set(SOURCE
|
||||
set ( PLOT_DIR
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
# ROOT requires that the dictonary header files are found at configuration time.
|
||||
# Hence, target_include_directories cannot be used here because, targets are
|
||||
# setup only afterwards.
|
||||
include_directories(${PLOT_DIR})
|
||||
|
||||
#--- generate necessary dictionaries ------------------------------------------
|
||||
root_generate_dictionary(
|
||||
PMuppCanvasDict
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
PMuppCanvas.h
|
||||
OPTIONS
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
-inlineInputHeader
|
||||
LINKDEF PMuppCanvasLinkDef.h
|
||||
MODULE PMuppCanvas
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PMuppStartupHandlerDict
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
PMuppStartupHandler.h
|
||||
OPTIONS
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
-inlineInputHeader
|
||||
LINKDEF PMuppStartupHandlerLinkDef.h
|
||||
MODULE PMuppStartupHandler
|
||||
)
|
||||
@ -71,3 +79,22 @@ if (APPLE)
|
||||
else (APPLE)
|
||||
install(TARGETS mupp_plot DESTINATION bin)
|
||||
endif (APPLE)
|
||||
|
||||
#--- install root pcm's and rootmaps ------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libPMuppCanvas_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMuppCanvas.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMuppStartupHandler_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMuppStartupHandler.rootmap
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
#--- install headers ----------------------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_SOURCE_DIR}/../mupp.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mupp_plot.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/PMuppCanvas.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/PMuppStartupHandler.h
|
||||
DESTINATION include
|
||||
)
|
||||
|
||||
|
@ -54,11 +54,11 @@
|
||||
<lgb>63000</lgb>
|
||||
<asym_bkg_range>200 1500</asym_bkg_range>
|
||||
<logic_detector name="L" rel_phase="0.0" forward="1 5"/>
|
||||
<logic_detector name="T" rel_phase="90.0" forward="2 6"/>
|
||||
<logic_detector name="T" rel_phase="-90.0" forward="2 6"/>
|
||||
<logic_detector name="R" rel_phase="180.0" forward="3 7"/>
|
||||
<logic_detector name="B" rel_phase="270.0" forward="4 8"/>
|
||||
<logic_detector name="B" rel_phase="90.0" forward="4 8"/>
|
||||
<logic_asym_detector name="LR" rel_phase="0.0" forward="1 5" backward="3 7" alpha="1.0"/>
|
||||
<logic_asym_detector name="TB" rel_phase="90.0" forward="2 6" backward="4 8" alpha="1.0"/>
|
||||
<logic_asym_detector name="TB" rel_phase="-90.0" forward="2 6" backward="4 8" alpha="1.0"/>
|
||||
</tf>
|
||||
<tf name="WEW PPC">
|
||||
<no_of_detectors>8</no_of_detectors>
|
||||
@ -66,11 +66,11 @@
|
||||
<lgb>63000</lgb>
|
||||
<asym_bkg_range>200 1500</asym_bkg_range>
|
||||
<logic_detector name="L" rel_phase="0.0" forward="21 25"/>
|
||||
<logic_detector name="T" rel_phase="90.0" forward="22 26"/>
|
||||
<logic_detector name="T" rel_phase="-90.0" forward="22 26"/>
|
||||
<logic_detector name="R" rel_phase="180.0" forward="23 27"/>
|
||||
<logic_detector name="B" rel_phase="270.0" forward="24 28"/>
|
||||
<logic_detector name="B" rel_phase="90.0" forward="24 28"/>
|
||||
<logic_asym_detector name="LR" rel_phase="0.0" forward="21 25" backward="23 27" alpha="1.0"/>
|
||||
<logic_asym_detector name="TB" rel_phase="90.0" forward="22 26" backward="24 28" alpha="1.0"/>
|
||||
<logic_asym_detector name="TB" rel_phase="-90.0" forward="22 26" backward="24 28" alpha="1.0"/>
|
||||
</tf>
|
||||
<tf name="Bpar NPP">
|
||||
<no_of_detectors>4</no_of_detectors>
|
||||
|
@ -53,7 +53,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (argc == 2) {
|
||||
if (!strcmp(argv[1], "--version") || (!strcmp(argv[1], "-v"))) {
|
||||
std::cout << std::endl << "musrWiz - alpha - git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
|
||||
std::cout << std::endl << "musrWiz - git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
|
||||
return 0;
|
||||
} else if (!strcmp(argv[1], "--help")) {
|
||||
musrWiz_syntax();
|
||||
|
@ -951,7 +951,7 @@ void PTextEdit::setupHelpActions()
|
||||
menu->addAction(a);
|
||||
|
||||
a = new QAction(tr( "Author(s) ..." ), this );
|
||||
a->setStatusTip( tr("Author(s)") );
|
||||
a->setStatusTip( tr("Help About") );
|
||||
connect( a, SIGNAL( triggered() ), this, SLOT( helpAbout() ));
|
||||
menu->addAction(a);
|
||||
|
||||
@ -2547,8 +2547,8 @@ void PTextEdit::musrView()
|
||||
|
||||
// make sure that the system environment variables are properly set
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
env.insert("LD_LIBRARY_PATH", env.value("ROOTSYS") + "/lib:" +
|
||||
env.value("DKS") + "/lib:" +
|
||||
env.insert("LD_LIBRARY_PATH", env.value("ROOTSYS") + "/lib:" +
|
||||
env.value("DKS") + "/lib:" +
|
||||
env.value("LD_LIBRARY_PATH"));
|
||||
proc->setProcessEnvironment(env);
|
||||
proc->setWorkingDirectory(workDir);
|
||||
@ -2620,8 +2620,8 @@ void PTextEdit::musrT0()
|
||||
|
||||
// make sure that the system environment variables are properly set
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
env.insert("LD_LIBRARY_PATH", env.value("ROOTSYS") + "/lib:" +
|
||||
env.value("DKS") + "/lib:" +
|
||||
env.insert("LD_LIBRARY_PATH", env.value("ROOTSYS") + "/lib:" +
|
||||
env.value("DKS") + "/lib:" +
|
||||
env.value("LD_LIBRARY_PATH"));
|
||||
proc->setProcessEnvironment(env);
|
||||
proc->setWorkingDirectory(workDir);
|
||||
@ -2659,8 +2659,8 @@ void PTextEdit::musrFT()
|
||||
proc->setStandardErrorFile("musrFT.log");
|
||||
QString cmd = fAdmin->getExecPath() + "/musrFT";
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
env.insert("LD_LIBRARY_PATH", env.value("ROOTSYS") + "/lib:" +
|
||||
env.value("DKS") + "/lib:" +
|
||||
env.insert("LD_LIBRARY_PATH", env.value("ROOTSYS") + "/lib:" +
|
||||
env.value("DKS") + "/lib:" +
|
||||
env.value("LD_LIBRARY_PATH"));
|
||||
proc->setProcessEnvironment(env);
|
||||
proc->start(cmd, fMusrFTPrevCmd);
|
||||
|
@ -1,10 +1,14 @@
|
||||
#---------------------------------------------------------------------
|
||||
# README
|
||||
# Andreas Suter, 2010/10/06
|
||||
# Andreas Suter, 2018/05/22
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
musrgui requires >= Qt 3.3.x and < Qt 4. If you have Qt 4.6.y or newer,
|
||||
use musredit instead.
|
||||
use musredit instead. If you have Qt 5.x, use musredit_qt5 instead.
|
||||
|
||||
musrgui by now should be considered as not only outdated, but it will
|
||||
be hard to find a platform on which it is still compiling. So, if there
|
||||
is no urgent need: don't use it!
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# this is the end ...
|
||||
|
164
src/musrt0.cpp
164
src/musrt0.cpp
@ -645,6 +645,169 @@ Int_t main(Int_t argc, Char_t *argv[])
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MSR_FITTYPE_BNMR:
|
||||
if ((runList->at(i).GetRunNameSize() == 1) && (runList->at(i).GetForwardHistoNoSize() == 1)) { // no addruns / no grouping
|
||||
// handle forward histo
|
||||
// get histo number
|
||||
histoNo = runList->at(i).GetForwardHistoNo();
|
||||
runName = runList->at(i).GetRunName();
|
||||
// get bin position of maximal data
|
||||
t0Bin = musrt0_getMaxBin(dataHandler->GetRunData(*runName)->GetDataBin(histoNo));
|
||||
// set t0 to maximum data position
|
||||
runList->at(i).SetT0Bin(t0Bin, 0);
|
||||
// set data range as well if firstGoodBinOffset is given
|
||||
if (firstGoodBinOffsetPresent) {
|
||||
start = t0Bin + firstGoodBinOffset;
|
||||
end = dataHandler->GetRunData(*runName)->GetDataBin(histoNo)->size();
|
||||
runList->at(i).SetDataRange(start, 0);
|
||||
runList->at(i).SetDataRange(end, 1);
|
||||
}
|
||||
// handle backward histo
|
||||
// get histo number
|
||||
histoNo = runList->at(i).GetBackwardHistoNo();
|
||||
runName = runList->at(i).GetRunName();
|
||||
// get bin position of maximal data
|
||||
t0Bin = musrt0_getMaxBin(dataHandler->GetRunData(*runName)->GetDataBin(histoNo));
|
||||
// set t0 to maximum data position
|
||||
runList->at(i).SetT0Bin(t0Bin, 1);
|
||||
// set data range as well if firstGoodBinOffset is given
|
||||
if (firstGoodBinOffsetPresent) {
|
||||
start = t0Bin + firstGoodBinOffset;
|
||||
end = dataHandler->GetRunData(*runName)->GetDataBin(histoNo)->size();
|
||||
runList->at(i).SetDataRange(start, 2);
|
||||
runList->at(i).SetDataRange(end, 3);
|
||||
}
|
||||
} else if ((runList->at(i).GetRunNameSize() > 1) && (runList->at(i).GetForwardHistoNoSize() == 1)) { // addruns / no grouping
|
||||
// handle forward histo
|
||||
// get histo number
|
||||
histoNo = runList->at(i).GetForwardHistoNo();
|
||||
runName = runList->at(i).GetRunName();
|
||||
// get bin position of maximal data
|
||||
t0Bin = musrt0_getMaxBin(dataHandler->GetRunData(*runName)->GetDataBin(histoNo));
|
||||
// set t0 to maximum data position
|
||||
runList->at(i).SetT0Bin(t0Bin, 0);
|
||||
// set data range as well if firstGoodBinOffset is given
|
||||
if (firstGoodBinOffsetPresent) {
|
||||
start = t0Bin + firstGoodBinOffset;
|
||||
end = dataHandler->GetRunData(*runName)->GetDataBin(histoNo)->size();
|
||||
runList->at(i).SetDataRange(start, 0);
|
||||
runList->at(i).SetDataRange(end, 1);
|
||||
}
|
||||
// handle addruns
|
||||
for (UInt_t j=1; j<runList->at(i).GetRunNameSize(); j++) {
|
||||
runName = runList->at(i).GetRunName(j);
|
||||
// get bin position of maximal data
|
||||
t0Bin = musrt0_getMaxBin(dataHandler->GetRunData(*runName)->GetDataBin(histoNo));
|
||||
// set t0 to maximum data position
|
||||
runList->at(i).SetAddT0Bin(t0Bin, j-1, 0);
|
||||
}
|
||||
// handle backward histo
|
||||
// get histo number
|
||||
histoNo = runList->at(i).GetBackwardHistoNo();
|
||||
runName = runList->at(i).GetRunName();
|
||||
// get bin position of maximal data
|
||||
t0Bin = musrt0_getMaxBin(dataHandler->GetRunData(*runName)->GetDataBin(histoNo));
|
||||
// set t0 to maximum data position
|
||||
runList->at(i).SetT0Bin(t0Bin, 1);
|
||||
// set data range as well if firstGoodBinOffset is given
|
||||
if (firstGoodBinOffsetPresent) {
|
||||
start = t0Bin + firstGoodBinOffset;
|
||||
end = dataHandler->GetRunData(*runName)->GetDataBin(histoNo)->size();
|
||||
runList->at(i).SetDataRange(start, 2);
|
||||
runList->at(i).SetDataRange(end, 3);
|
||||
}
|
||||
// handle addruns
|
||||
for (UInt_t j=1; j<runList->at(i).GetRunNameSize(); j++) {
|
||||
runName = runList->at(i).GetRunName(j);
|
||||
// get bin position of maximal data
|
||||
t0Bin = musrt0_getMaxBin(dataHandler->GetRunData(*runName)->GetDataBin(histoNo));
|
||||
// set t0 to maximum data position
|
||||
runList->at(i).SetAddT0Bin(t0Bin, j-1, 1);
|
||||
}
|
||||
} else if ((runList->at(i).GetRunNameSize() == 1) && (runList->at(i).GetForwardHistoNoSize() > 1)) { // no addruns / grouping
|
||||
// handle forward histo
|
||||
for (UInt_t j=0; j<runList->at(i).GetForwardHistoNoSize(); j++) {
|
||||
// get histo number
|
||||
histoNo = runList->at(i).GetForwardHistoNo(j);
|
||||
runName = runList->at(i).GetRunName();
|
||||
// get bin position of maximal data
|
||||
t0Bin = musrt0_getMaxBin(dataHandler->GetRunData(*runName)->GetDataBin(histoNo));
|
||||
// set t0 to maximum data position
|
||||
runList->at(i).SetT0Bin(t0Bin, 2*j);
|
||||
if (firstGoodBinOffsetPresent && (j==0)) {
|
||||
start = t0Bin + firstGoodBinOffset;
|
||||
end = dataHandler->GetRunData(*runName)->GetDataBin(histoNo)->size();
|
||||
runList->at(i).SetDataRange(start, 0);
|
||||
runList->at(i).SetDataRange(end, 1);
|
||||
}
|
||||
}
|
||||
// handle backward histo
|
||||
for (UInt_t j=0; j<runList->at(i).GetBackwardHistoNoSize(); j++) {
|
||||
// get histo number
|
||||
histoNo = runList->at(i).GetBackwardHistoNo(j);
|
||||
runName = runList->at(i).GetRunName();
|
||||
// get bin position of maximal data
|
||||
t0Bin = musrt0_getMaxBin(dataHandler->GetRunData(*runName)->GetDataBin(histoNo));
|
||||
// set t0 to maximum data position
|
||||
runList->at(i).SetT0Bin(t0Bin, 2*j+1);
|
||||
if (firstGoodBinOffsetPresent && (j==0)) {
|
||||
start = t0Bin + firstGoodBinOffset;
|
||||
end = dataHandler->GetRunData(*runName)->GetDataBin(histoNo)->size();
|
||||
runList->at(i).SetDataRange(start, 2);
|
||||
runList->at(i).SetDataRange(end, 3);
|
||||
}
|
||||
}
|
||||
} else { // addruns / grouping
|
||||
// handle forward histo
|
||||
for (UInt_t j=0; j<runList->at(i).GetForwardHistoNoSize(); j++) {
|
||||
// get histo number
|
||||
histoNo = runList->at(i).GetForwardHistoNo(j);
|
||||
runName = runList->at(i).GetRunName();
|
||||
// get bin position of maximal data
|
||||
t0Bin = musrt0_getMaxBin(dataHandler->GetRunData(*runName)->GetDataBin(histoNo));
|
||||
// set t0 to maximum data position
|
||||
runList->at(i).SetT0Bin(t0Bin, 2*j);
|
||||
if (firstGoodBinOffsetPresent && (j==0)) {
|
||||
start = t0Bin + firstGoodBinOffset;
|
||||
end = dataHandler->GetRunData(*runName)->GetDataBin(histoNo)->size();
|
||||
runList->at(i).SetDataRange(start, 0);
|
||||
runList->at(i).SetDataRange(end, 1);
|
||||
}
|
||||
// handle addruns
|
||||
for (UInt_t k=1; k<runList->at(i).GetRunNameSize(); k++) {
|
||||
runName = runList->at(i).GetRunName(k);
|
||||
// get bin position of maximal data
|
||||
t0Bin = musrt0_getMaxBin(dataHandler->GetRunData(*runName)->GetDataBin(histoNo));
|
||||
// set t0 to maximum data position
|
||||
runList->at(i).SetAddT0Bin(t0Bin, k-1, 2*j);
|
||||
}
|
||||
}
|
||||
// handle backward histo
|
||||
for (UInt_t j=0; j<runList->at(i).GetBackwardHistoNoSize(); j++) {
|
||||
// get histo number
|
||||
histoNo = runList->at(i).GetBackwardHistoNo(j);
|
||||
runName = runList->at(i).GetRunName();
|
||||
// get bin position of maximal data
|
||||
t0Bin = musrt0_getMaxBin(dataHandler->GetRunData(*runName)->GetDataBin(histoNo));
|
||||
// set t0 to maximum data position
|
||||
runList->at(i).SetT0Bin(t0Bin, 2*j+1);
|
||||
if (firstGoodBinOffsetPresent && (j==0)) {
|
||||
start = t0Bin + firstGoodBinOffset;
|
||||
end = dataHandler->GetRunData(*runName)->GetDataBin(histoNo)->size();
|
||||
runList->at(i).SetDataRange(start, 2);
|
||||
runList->at(i).SetDataRange(end, 3);
|
||||
}
|
||||
// handle addruns
|
||||
for (UInt_t k=1; k<runList->at(i).GetRunNameSize(); k++) {
|
||||
runName = runList->at(i).GetRunName(k);
|
||||
// get bin position of maximal data
|
||||
t0Bin = musrt0_getMaxBin(dataHandler->GetRunData(*runName)->GetDataBin(histoNo));
|
||||
// set t0 to maximum data position
|
||||
runList->at(i).SetAddT0Bin(t0Bin, k-1, 2*j+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -806,6 +969,7 @@ Int_t main(Int_t argc, Char_t *argv[])
|
||||
}
|
||||
break;
|
||||
case MSR_FITTYPE_ASYM:
|
||||
case MSR_FITTYPE_BNMR:
|
||||
case MSR_FITTYPE_ASYM_RRF:
|
||||
if ((runList->at(i).GetRunNameSize() == 1) && (runList->at(i).GetForwardHistoNoSize() == 1)) { // no addruns / no grouping
|
||||
// feed necessary data forward
|
||||
|
@ -100,10 +100,13 @@ PSimulateMuTransition::PSimulateMuTransition(UInt_t seed)
|
||||
}
|
||||
|
||||
fNmuons = 100; // number of muons to simulate
|
||||
fNshowProgress = 100; // print progress on screen every fNshowProgress events
|
||||
fMuPrecFreq34 = 4463.; // vacuum Mu hyperfine coupling constant
|
||||
fMuPrecFreq12 = 0.; // Mu precession frequency of a 12 transition
|
||||
fMuPrecFreq23 = 0.; // Mu precession frequency of a 23 transition
|
||||
fMuPrecFreq14 = 0.; // Mu precession frequency of a 14 transition
|
||||
fMuPrecFreq13 = 0.; // Mu precession frequency of a 13 transition
|
||||
fMuPrecFreq24 = 0.; // Mu precession frequency of a 24 transition
|
||||
fMuonPrecFreq = 0.; // muon precession frequency
|
||||
fBfield = 0.01; // magnetic field (T)
|
||||
fCaptureRate = 0.01; // Mu+ capture rate (MHz)
|
||||
@ -118,6 +121,9 @@ PSimulateMuTransition::PSimulateMuTransition(UInt_t seed)
|
||||
fMuFractionState34 = 0.25;
|
||||
fMuFractionState23 = 0.25;
|
||||
fMuFractionState14 = 0.25;
|
||||
fMuFractionState13 = 0.;
|
||||
fMuFractionState24 = 0.;
|
||||
|
||||
fDebugFlag = kFALSE;
|
||||
}
|
||||
|
||||
@ -147,6 +153,8 @@ void PSimulateMuTransition::PrintSettings() const
|
||||
cout << endl << "Mu0 precession frequency 34 (MHz) = " << fMuPrecFreq34;
|
||||
cout << endl << "Mu0 precession frequency 23 (MHz) = " << fMuPrecFreq23;
|
||||
cout << endl << "Mu0 precession frequency 14 (MHz) = " << fMuPrecFreq14;
|
||||
cout << endl << "Mu0 precession frequency 13 (MHz) = " << fMuPrecFreq13;
|
||||
cout << endl << "Mu0 precession frequency 24 (MHz) = " << fMuPrecFreq24;
|
||||
cout << endl << "Mu+ precession frequency (MHz) = " << fMuonGyroRatio * fBfield;
|
||||
cout << endl << "B field (T) = " << fBfield;
|
||||
cout << endl << "Mu+ electron capture rate (MHz) = " << fCaptureRate;
|
||||
@ -164,7 +172,10 @@ void PSimulateMuTransition::PrintSettings() const
|
||||
cout << endl << "Muonium fraction state34 = " << fMuFractionState34;
|
||||
cout << endl << "Muonium fraction state23 = " << fMuFractionState23;
|
||||
cout << endl << "Muonium fraction state14 = " << fMuFractionState14;
|
||||
cout << endl << "Muonium fraction state13 = " << fMuFractionState13;
|
||||
cout << endl << "Muonium fraction state24 = " << fMuFractionState24;
|
||||
cout << endl << "Number of particles to simulate = " << fNmuons;
|
||||
cout << endl << "Print progress on screen frequency = " << fNshowProgress;
|
||||
cout << endl << "Initial muon spin phase (degree) = " << fInitialPhase;
|
||||
cout << endl << "Debug flag = " << fDebugFlag;
|
||||
cout << endl << endl;
|
||||
@ -224,7 +235,7 @@ void PSimulateMuTransition::Run(TH1F *histoForward, TH1F *histoBackward)
|
||||
else
|
||||
histoBackward->Fill(fMuonDecayTime*1000., 1. - fAsymmetry*TMath::Cos(fMuonPhase));
|
||||
|
||||
if ( (i%100000) == 0) cout << "number of events processed: " << i << endl;
|
||||
if ( (i%fNshowProgress) == 0) cout << "number of events processed: " << i << endl;
|
||||
}
|
||||
cout << "number of events processed: " << i << endl;
|
||||
return;
|
||||
@ -291,11 +302,14 @@ TComplex PSimulateMuTransition::GTFunction(const Double_t &time, const TString c
|
||||
complexPol = TComplex::Exp(-TComplex::I()*twoPi*fMuonPrecFreq*time);
|
||||
else{
|
||||
complexPol =
|
||||
(fMuFractionState12 * TComplex::Exp(TComplex::I()*twoPi*fMuPrecFreq12*time) +
|
||||
(fMuFractionState12 * TComplex::Exp(+TComplex::I()*twoPi*fMuPrecFreq12*time) +
|
||||
fMuFractionState34 * TComplex::Exp(-TComplex::I()*twoPi*fMuPrecFreq34*time))
|
||||
+
|
||||
(fMuFractionState23 * TComplex::Exp(TComplex::I()*twoPi*fMuPrecFreq23*time) +
|
||||
fMuFractionState14 * TComplex::Exp(TComplex::I()*twoPi*fMuPrecFreq14*time));
|
||||
(fMuFractionState23 * TComplex::Exp(+TComplex::I()*twoPi*fMuPrecFreq23*time) +
|
||||
fMuFractionState14 * TComplex::Exp(+TComplex::I()*twoPi*fMuPrecFreq14*time))
|
||||
+
|
||||
(fMuFractionState13 * TComplex::Exp(+TComplex::I()*twoPi*fMuPrecFreq13*time) +
|
||||
fMuFractionState24 * TComplex::Exp(+TComplex::I()*twoPi*fMuPrecFreq24*time));
|
||||
}
|
||||
|
||||
return complexPol;
|
||||
@ -354,9 +368,6 @@ Double_t PSimulateMuTransition::GTSpinFlip(const Double_t &time)
|
||||
* after ionization process is given by Px(t_i+1)*Px(t_i).
|
||||
* 4) get the next electron capture time, continue until t_d is reached.
|
||||
*
|
||||
* <p> For isotropic muonium, TF:
|
||||
* nu_12 and nu_34 with equal probabilities, probability for both states fMuFractionState12
|
||||
* ni_23 and nu_14 with equal probabilities, probability for both states fMuFractionState23
|
||||
*
|
||||
* <p>Calculates Mu0 polarization in x direction during cyclic charge exchange.
|
||||
* See M. Senba, J.Phys. B23, 1545 (1990), equations (9), (11)
|
||||
|
@ -47,13 +47,16 @@ class PSimulateMuTransition : public TObject
|
||||
virtual ~PSimulateMuTransition();
|
||||
|
||||
virtual void PrintSettings() const;
|
||||
virtual void SetNmuons(Int_t value) { fNmuons = value; } //!< number of muons
|
||||
virtual void SetDebugFlag(Bool_t value) { fDebugFlag = value; } //!< debug flag
|
||||
virtual void SetBfield(Double_t value) { fBfield = value; } //!< sets magnetic field (T)
|
||||
virtual void SetNmuons(Int_t value) { fNmuons = value; } //!< number of muons
|
||||
virtual void SetNshowProgress(Int_t value) { fNshowProgress = value; } //!< frequency of output on screen how many muons have been processed
|
||||
virtual void SetDebugFlag(Bool_t value) { fDebugFlag = value; } //!< debug flag
|
||||
virtual void SetBfield(Double_t value) { fBfield = value; } //!< sets magnetic field (T)
|
||||
virtual void SetMuPrecFreq12(Double_t value) { fMuPrecFreq12 = value; } //!< sets Mu transition frequency (MHz)
|
||||
virtual void SetMuPrecFreq34(Double_t value) { fMuPrecFreq34 = value; } //!< sets Mu transition frequency (MHz)
|
||||
virtual void SetMuPrecFreq23(Double_t value) { fMuPrecFreq23 = value; } //!< sets Mu transition frequency (MHz)
|
||||
virtual void SetMuPrecFreq14(Double_t value) { fMuPrecFreq14 = value; } //!< sets Mu transition frequency (MHz)
|
||||
virtual void SetMuPrecFreq13(Double_t value) { fMuPrecFreq13 = value; } //!< sets Mu transition frequency (MHz)
|
||||
virtual void SetMuPrecFreq24(Double_t value) { fMuPrecFreq24 = value; } //!< sets Mu transition frequency (MHz)
|
||||
virtual void SetCaptureRate(Double_t value){ fCaptureRate = value; } //!< sets Mu+ electron capture rate (MHz)
|
||||
virtual void SetIonizationRate(Double_t value){ fIonizationRate = value; } //!< sets Mu0 ionization rate (MHz)
|
||||
virtual void SetSpinFlipRate(Double_t value){ fSpinFlipRate = value; } //!< sets Mu0 spin flip rate (MHz)
|
||||
@ -63,6 +66,8 @@ class PSimulateMuTransition : public TObject
|
||||
virtual void SetMuFractionState34(Double_t value){ fMuFractionState34 = value; }
|
||||
virtual void SetMuFractionState23(Double_t value){ fMuFractionState23 = value; }
|
||||
virtual void SetMuFractionState14(Double_t value){ fMuFractionState14 = value; }
|
||||
virtual void SetMuFractionState13(Double_t value){ fMuFractionState13 = value; }
|
||||
virtual void SetMuFractionState24(Double_t value){ fMuFractionState24 = value; }
|
||||
|
||||
virtual Bool_t IsValid() { return fValid; }
|
||||
virtual void SetSeed(UInt_t seed);
|
||||
@ -81,6 +86,8 @@ class PSimulateMuTransition : public TObject
|
||||
Double_t fMuPrecFreq34; //!< Mu transition frequency 34 (MHz)
|
||||
Double_t fMuPrecFreq23; //!< Mu transition frequency 23 (MHz)
|
||||
Double_t fMuPrecFreq14; //!< Mu transition frequency 14 (MHz)
|
||||
Double_t fMuPrecFreq13; //!< Mu transition frequency 13 (MHz)
|
||||
Double_t fMuPrecFreq24; //!< Mu transition frequency 24 (MHz)
|
||||
Double_t fMuonPrecFreq; //!< muon precession frequency (MHz)
|
||||
Double_t fCaptureRate; //!< Mu+ electron capture rate (MHz)
|
||||
Double_t fIonizationRate; //!< Mu0 ionization rate (MHz)
|
||||
@ -94,8 +101,11 @@ class PSimulateMuTransition : public TObject
|
||||
Double_t fMuFractionState34; //!< fraction of Mu in state 34
|
||||
Double_t fMuFractionState23; //!< fraction of Mu in state 23
|
||||
Double_t fMuFractionState14; //!< fraction of Mu in state 14
|
||||
Int_t fNmuons; //!< number of muons to simulate
|
||||
Bool_t fDebugFlag; //!< debug flag
|
||||
Double_t fMuFractionState13; //!< fraction of Mu in state 13
|
||||
Double_t fMuFractionState24; //!< fraction of Mu in state 24
|
||||
Int_t fNmuons; //!< number of muons to simulate
|
||||
Int_t fNshowProgress; //!< output on screen how many muons have been processed
|
||||
Bool_t fDebugFlag; //!< debug flag
|
||||
|
||||
virtual Double_t NextEventTime(const Double_t &EventRate);
|
||||
// virtual Double_t PrecessionPhase(const Double_t &time, const TString chargeState);
|
||||
|
@ -63,32 +63,47 @@ void runMuSimulation()
|
||||
Double_t T = 300.; //temperature
|
||||
Double_t EA = 100; //activation energy (meV)
|
||||
Double_t spinFlipRate = 0.01; //if spinFlipRate > 0.001 only spin-flip processes will be simulated
|
||||
Double_t capRate = 0.0001;//*sqrt(T/200.); //assume that capture rate varies as sqrt(T), capRate = sigma*v*p , v ~ sqrt(T)
|
||||
Double_t capRate = 0.001;//*sqrt(T/200.); //assume that capture rate varies as sqrt(T), capRate = sigma*v*p , v ~ sqrt(T)
|
||||
Double_t preFac = 6.7e7;
|
||||
Double_t ionRate; //assume Arrhenius behaviour ionRate = preFac*exp(-EA/kT)
|
||||
ionRate = 0.1; //2.9e7 * exp(-EA/(0.08625*T)); // Ge: 2.9*10^7MHz "attempt" frequency; 1K = 0.08625 meV
|
||||
Double_t B = 106.5; //field in G
|
||||
Double_t Bvar = 0.; //field variance
|
||||
Double_t Freq12 = 40.433; //Mu freq of the 12 transition
|
||||
Double_t Freq34 = 59.567; //Mu freq of the 34 transition
|
||||
Double_t Freq23 = 256.245; //Mu freq of the 23 transition
|
||||
Double_t Freq14 = 356.245; //Mu freq of the 14 transition
|
||||
Double_t MuFrac = 1.0; //total Mu fraction
|
||||
Double_t MuFrac12 = 0.487; //weight of transition 12
|
||||
Double_t MuFrac34 = 0.487; //weight of transition 34
|
||||
Double_t MuFrac23 = 0.013; //weight of transition 23
|
||||
Double_t MuFrac14 = 0.013; //weight of transition 14
|
||||
Int_t Nmuons = 5e6; //number of muons
|
||||
Double_t Asym = 0.27; //muon decay asymmetry
|
||||
Int_t debugFlag = 0; //print debug information on screen
|
||||
ionRate = 0.001; //preFac * exp(-EA/(0.08625*T)); // Ge: 2.9*10^7MHz "attempt" frequency; 1K = 0.08625 meV
|
||||
Double_t B = 100.0; //field in G
|
||||
Double_t Bvar = 0.; //field variance
|
||||
Double_t Freq12 = 40.023; //Mu freq of the 12 transition
|
||||
Double_t Freq34 = 59.977; //Mu freq of the 34 transition
|
||||
Double_t Freq23 = 238.549; //Mu freq of the 23 transition
|
||||
Double_t Freq14 = 338.549; //Mu freq of the 14 transition
|
||||
Double_t Freq13 = 278.571; //Mu freq of the 23 transition
|
||||
Double_t Freq24 = 325.165; //Mu freq of the 14 transition
|
||||
|
||||
Double_t MuFrac = 1.0; //total Mu fraction
|
||||
Double_t MuFrac12 = 0.486; //weight of transition 12
|
||||
Double_t MuFrac34 = 0.486; //weight of transition 34
|
||||
Double_t MuFrac23 = 0.014; //weight of transition 23
|
||||
Double_t MuFrac14 = 0.014; //weight of transition 14
|
||||
Double_t MuFrac13 = 0.0; //weight of transition 13
|
||||
Double_t MuFrac24 = 0.0; //weight of transition 24
|
||||
|
||||
Int_t Nmuons = 5e6; //number of muons
|
||||
Int_t NshowProgress = 1e4; //frequency to show progress on screen
|
||||
Double_t Asym = 0.27; //muon decay asymmetry
|
||||
Int_t debugFlag = 0; //print debug information on screen
|
||||
|
||||
TTimeStamp *timeStampStart = new TTimeStamp();
|
||||
cout << endl << "Simulation started on:" << endl;
|
||||
timeStampStart->Print("l");
|
||||
cout << endl;
|
||||
|
||||
histogramFileName = TString("0");
|
||||
histogramFileName += runNo;
|
||||
histogramFileName += TString(".root");
|
||||
|
||||
sprintf(titleStr,"- complexMuPol, A0 100MHz, Mu-frac %3.2f, Mu12 %6.2f MHz(%3.2f), Mu23 %6.2f MHz(%3.2f), ionRate %8.3f MHz, capRate %6.3f MHz, SF rate %6.3f MHz, %5.1f G", MuFrac, Freq12, MuFrac12/2, Freq23, MuFrac23/2, ionRate, capRate, spinFlipRate, B);
|
||||
sprintf(titleStr,"- complexMuPol, A0 100MHz, Mu-frac %3.2f, Mu12 %6.2f MHz(%3.2f), Mu23 %6.2f MHz(%3.2f), ionRate %8.3f MHz, capRate %6.3f MHz, SF rate %6.3f MHz, %5.1f G", MuFrac, Freq12, MuFrac12, Freq23, MuFrac23, ionRate, capRate, spinFlipRate, B);
|
||||
runTitle = TString("0");
|
||||
runTitle += runNo;
|
||||
runTitle += TString(titleStr);
|
||||
|
||||
cout << runTitle << endl << endl;
|
||||
|
||||
PSimulateMuTransition *simulateMuTransition = new PSimulateMuTransition();
|
||||
if (!simulateMuTransition->IsValid()){
|
||||
@ -99,15 +114,20 @@ void runMuSimulation()
|
||||
simulateMuTransition->SetMuPrecFreq34(Freq34); // MHz
|
||||
simulateMuTransition->SetMuPrecFreq23(Freq23); // MHz
|
||||
simulateMuTransition->SetMuPrecFreq14(Freq14); // MHz
|
||||
simulateMuTransition->SetMuPrecFreq13(Freq13); // MHz
|
||||
simulateMuTransition->SetMuPrecFreq24(Freq24); // MHz
|
||||
simulateMuTransition->SetMuFraction(MuFrac); // initial Mu fraction
|
||||
simulateMuTransition->SetMuFractionState12(MuFrac12);
|
||||
simulateMuTransition->SetMuFractionState34(MuFrac34);
|
||||
simulateMuTransition->SetMuFractionState23(MuFrac23);
|
||||
simulateMuTransition->SetMuFractionState14(MuFrac14);
|
||||
simulateMuTransition->SetMuFractionState14(MuFrac14);
|
||||
simulateMuTransition->SetMuFractionState13(MuFrac13);
|
||||
simulateMuTransition->SetMuFractionState24(MuFrac24);
|
||||
simulateMuTransition->SetBfield(B/10000.); // Tesla
|
||||
simulateMuTransition->SetCaptureRate(capRate); // MHz
|
||||
simulateMuTransition->SetIonizationRate(ionRate); // MHz
|
||||
simulateMuTransition->SetSpinFlipRate(spinFlipRate); // MHz
|
||||
simulateMuTransition->SetNshowProgress(NshowProgress);
|
||||
simulateMuTransition->SetNmuons(Nmuons);
|
||||
simulateMuTransition->SetDecayAsymmetry(Asym);
|
||||
simulateMuTransition->SetDebugFlag(debugFlag); // to print time and phase during charge-changing cycle
|
||||
@ -179,12 +199,18 @@ void runMuSimulation()
|
||||
header->Set("Simulation/Mu0 Precession frequency 34", Freq34);
|
||||
header->Set("Simulation/Mu0 Precession frequency 23", Freq23);
|
||||
header->Set("Simulation/Mu0 Precession frequency 14", Freq14);
|
||||
header->Set("Simulation/Mu0 Precession frequency 13", Freq13);
|
||||
header->Set("Simulation/Mu0 Precession frequency 24", Freq24);
|
||||
header->Set("Simulation/Mu0 Fraction", MuFrac);
|
||||
header->Set("Simulation/Mu0 Fraction 12", MuFrac12);
|
||||
header->Set("Simulation/Mu0 Fraction 34", MuFrac34);
|
||||
header->Set("Simulation/Mu0 Fraction 23", MuFrac23);
|
||||
header->Set("Simulation/Mu0 Fraction 14", MuFrac14);
|
||||
header->Set("Simulation/muon Capture Rate", capRate);
|
||||
header->Set("Simulation/Mu0 Fraction 13", MuFrac13);
|
||||
header->Set("Simulation/Mu0 Fraction 24", MuFrac24);
|
||||
header->Set("Simulation/Mu0 Activation Energy", EA);
|
||||
header->Set("Simulation/Mu0 Activation PreFactor", preFac);
|
||||
header->Set("Simulation/Mux Capture Rate", capRate);
|
||||
header->Set("Simulation/Mu0 Ionization Rate", ionRate);
|
||||
header->Set("Simulation/Mu0 Spin Flip Rate", spinFlipRate);
|
||||
header->Set("Simulation/Number of Muons", Nmuons);
|
||||
@ -206,7 +232,7 @@ void runMuSimulation()
|
||||
histo[i] = new TH1F(str, str, 18001, -0.5, 18000.5);
|
||||
}
|
||||
|
||||
for (i=0; i<NDECAYHISTS; i++)
|
||||
for (UInt_t i=0; i<NDECAYHISTS; i++)
|
||||
decayAnaModule->Add(histo[i]);
|
||||
|
||||
// run simulation
|
||||
@ -230,6 +256,11 @@ void runMuSimulation()
|
||||
gRunHeader->Write();
|
||||
fout->Close();
|
||||
cout << "Histograms written to " << histogramFileName.Data() << endl;
|
||||
|
||||
cout << endl << "Simulation stopped on:" << endl;
|
||||
TTimeStamp *timeStampEnd = new TTimeStamp();
|
||||
timeStampEnd->Print("l");
|
||||
cout << endl;
|
||||
|
||||
// delete fout;
|
||||
// delete header;
|
||||
|
Loading…
x
Reference in New Issue
Block a user