29 Commits

Author SHA1 Message Date
cac1415c3e update of the docu. 2021-04-09 15:41:52 +02:00
692e7e44db propagate ROOT_GRTEQ_24 properly to the compile options. 2021-04-09 11:08:35 +02:00
911c31fb1e applies already for 6.24-rc which is 6.23.99, hence the odd adaptation. 2021-04-09 11:07:14 +02:00
c06f510aff changes needed since upcoming ROOT6.24 (minuit2) will break the backward compatibility. 2021-04-09 10:03:34 +02:00
38b289b99f add ROOT version information for better diagnostics. 2021-04-09 09:33:08 +02:00
7089e4b3d6 switched libPhotoMeissner to the new centralized PRgeHandler. 2021-04-01 20:41:00 +02:00
7de55705d2 slightly more modern c++ init style. 2021-04-01 20:38:32 +02:00
56f094dad0 slightly improved the rge handler. 2021-04-01 20:37:08 +02:00
cab8703f85 fix an error number of theory points for the view data. 2021-04-01 20:30:53 +02:00
72c085a0a8 make PRgeHandler to a shared libs. Adopted Nonlocal and PMagProximity accordingly. 2021-04-01 14:26:26 +02:00
113996aa4e changed the user function for nonlocal fitting to the new rge-handler. This breaks the backwards compatibility! 2021-03-30 15:48:51 +02:00
cb0e8d2e65 update of the ChangeLog. 2021-03-30 15:43:26 +02:00
0dc1c4d975 add some boost component checks. Increase the musrfit version number. 2021-03-30 15:41:38 +02:00
21213a45eb add a central rge-handler which can be used by all user function classes. 2021-03-30 15:39:45 +02:00
e6e951e8f4 update the copyright info. 2021-03-29 08:22:38 +02:00
551fa4e4a6 refresh of the setup docu. 2021-03-01 15:40:10 +01:00
6d61cfd4d9 modernized the msr input file. 2021-02-26 15:18:12 +01:00
cc8ac60713 by changing the behaviour of the global parts of the class PUserFcnBase from pure virtual default NeedGlobalPart=false, the code can be simplified in many places. 2021-02-26 15:17:41 +01:00
1372a8b782 xml schema more flexible about the order of 'histos' and 'RunHeader' 2021-02-18 14:59:35 +01:00
27607a2fa1 fix of a typo. 2021-02-18 11:56:39 +01:00
88b4e7600d fixed wrong casting originating from a copy/paste error. 2021-02-18 11:55:34 +01:00
01ce90e97e better version for icons under macosx. 2021-02-16 20:46:52 +01:00
457adc7e7e add macOS BigSur icon to musredit. 2021-02-14 22:13:40 +01:00
90fb81f16a add new method GetTypeOfPath to TMusrRunHeader. It allows deduce the type of a given path-name. 2021-02-06 19:05:40 +01:00
bfd7229252 Merge branch 'root6' of https://git.psi.ch/nemu/musrfit into root6 2021-01-26 10:33:13 +01:00
f9581ae9d5 fix typo. Increase minimal root version from rpm. 2021-01-26 10:21:06 +01:00
cd785b8e5d update of the docu. 2021-01-23 15:58:04 +01:00
9cc9792054 some bug fixing in the cmake chain concerning the new Qt6 stuff. 2021-01-23 10:21:55 +01:00
ad9cf0abf9 remove comment. 2021-01-22 22:25:43 +01:00
327 changed files with 2555 additions and 2283 deletions

View File

@ -5,7 +5,7 @@ if (CMAKE_VERSION GREATER_EQUAL 3.12)
cmake_policy(SET CMP0075 NEW)
endif (CMAKE_VERSION GREATER_EQUAL 3.12)
project(musrfit VERSION 1.6.5 LANGUAGES C CXX)
project(musrfit VERSION 1.7.1 LANGUAGES C CXX)
#--- musrfit specific options -------------------------------------------------
option(nexus "build optional NeXus support. Needed for ISIS" OFF)
@ -82,8 +82,22 @@ if (ROOT_mathmore_FOUND)
include(${ROOT_USE_FILE})
endif (ROOT_mathmore_FOUND)
#--- the next check is need to set a flag, since root 6.24 (minuit2) breaks
#--- the backwards compatibility. ---------------------------------------------
if (ROOT_VERSION VERSION_LESS "6.23")
set(ROOT_GRTEQ_24 0)
else ()
set(ROOT_GRTEQ_24 1)
endif ()
set(ROOT_GRTEQ_24 ${ROOT_GRTEQ_24} CACHE INTERNAL "ROOT Version check")
#--- check for boost ----------------------------------------------------------
find_package(Boost REQUIRED)
find_package(Boost REQUIRED
COMPONENTS
system
filesystem
)
message(STATUS "Boost libs: ${Boost_LIBRARIES}")
#--- check for gsl ------------------------------------------------------------
find_package(GSL REQUIRED)
@ -114,7 +128,7 @@ if (qt_based_tools)
# check for any Qt, i.e. AUTO
if (qt_version STREQUAL AUTO)
# try Qt6
find_package(Qt6Core)
find_package(Qt6Core QUIET)
if (Qt6Core_FOUND)
find_package(Qt6Widgets CONFIG REQUIRED)
find_package(Qt6Xml CONFIG REQUIRED)
@ -123,14 +137,16 @@ if (qt_based_tools)
find_package(Qt6PrintSupport CONFIG REQUIRED)
endif (Qt6Core_FOUND)
# try Qt5
find_package(Qt5Core)
if (NOT Qt5Core_FOUND)
find_package(Qt5Widgets CONFIG REQUIRED)
find_package(Qt5Xml CONFIG REQUIRED)
find_package(Qt5Network CONFIG REQUIRED)
find_package(Qt5Svg CONFIG REQUIRED)
find_package(Qt5PrintSupport CONFIG REQUIRED)
endif (NOT Qt5Core_FOUND)
if (NOT Qt6Core_FOUND)
find_package(Qt5Core QUIET)
if (Qt5Core_FOUND)
find_package(Qt5Widgets CONFIG REQUIRED)
find_package(Qt5Xml CONFIG REQUIRED)
find_package(Qt5Network CONFIG REQUIRED)
find_package(Qt5Svg CONFIG REQUIRED)
find_package(Qt5PrintSupport CONFIG REQUIRED)
endif (Qt5Core_FOUND)
endif (NOT Qt6Core_FOUND)
# if Qt6 and Qt5 is not found, try Qt4
if (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND)
@ -191,7 +207,7 @@ endif (qt_based_tools)
#--- if NeXus check also for HDF4, HDF5, and MXML -----------------------------
if (nexus)
find_package(HDF5 COMPONENTS CXX REQUIRED )
#as35 find_package(HDF4 REQUIRED)
find_package(HDF4 REQUIRED)
find_package(NeXus REQUIRED)
add_definitions(-DPNEXUS_ENABLED)
endif (nexus)

View File

@ -12,6 +12,11 @@ or
https://bitbucket.org/muonspin/musrfit/commits/all
Release of V1.7.0, 2021/03/30
=============================
Centralize the rge-handling for user functions.
Release of V1.6.5, 2021/01/22
=============================

View File

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

View File

@ -1,6 +1,10 @@
// config.h
#define PACKAGE_VERSION "@PROJECT_VERSION@"
#define ROOT_VERSION_USED "@ROOT_VERSION@"
// define to 1 if minor ROOT6 version is >= 24
#define ROOT_GRTEQ_24 @ROOT_GRTEQ_24@
// define to 1 if you have <alloca.h> and it should be used
#cmakedefine HAVE_ALLOCA_H 1

View File

@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<nonlocal xmlns="http://nemu.web.psi.ch/musrfit/nonlocal">
<comment>
$Id: nonlocal_startup.xml 4047 2009-07-02 13:36:18Z nemu $
nonlocal_startup.xml
</comment>
<nonlocal_par>
<fourier_points>262144</fourier_points>
</nonlocal_par>
<trim_sp_part>
<data_path>profiles/Sn_E</data_path>
<trim_sp>
<data_path>./profiles/</data_path>
<rge_fln_pre>Sn_E</rge_fln_pre>
<energy_list>
<energy>1000</energy>
<energy>2000</energy>
@ -22,5 +23,5 @@
<energy>25000</energy>
<energy>27300</energy>
</energy_list>
</trim_sp_part>
</trim_sp>
</nonlocal>

View File

@ -4,21 +4,21 @@ FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 one 1 0 none
2 zero 0 0 none
3 Asy 0.2235 -0.0066 0.0072 0 0.33
4 energy 22 0 none
3 Asy 0.2235 -0.0065 0.0072 0 0.33
4 energy 22000 0 none
5 redTemp 0.8683 0 none
6 thickness 5000 0 none
7 ell 12000 0 none
8 xi 94 0 none
9 lambdaL 52.5 -1.4 1.2
9 lambdaL 52.5 -1.3 1.2
10 Bext 47.11 0 none
11 deadLayer 0.00052 -0.00052 6.89563 0 none
11 deadLayer 0.0004 0.0037 none 0 none
12 RateSmear 0.418 -0.015 0.015
13 N0_L 301.61 0.62 none
14 Bkg_L 24.442 0.076 none
13 N0_L 301.6 -1.1 1.2
14 Bkg_L 24.441 -0.092 0.092
15 Phase_L 42.0 -2.2 2.2
16 Alpha_LR 1.0614 -0.0066 0.0064
17 Bkg_R 27.646 -0.090 0.090
16 Alpha_LR 1.0613 -0.0066 0.0064
17 Bkg_R 27.646 -0.089 0.090
18 RelPhase_R 154.4 -1.1 1.1
###############################################################
@ -37,7 +37,6 @@ RUN data/lem10_his_0825 MUE4 PSI ROOT-NPP (name beamline institute data-file-f
fittype 0 (single histogram fit)
norm 13
backgr.fit 14
lifetimecorrection
map 1 2 0 0 0 0 0 0 0 0
forward 1
data 3289 65000
@ -49,7 +48,6 @@ RUN data/lem10_his_0825 MUE4 PSI ROOT-NPP (name beamline institute data-file-f
fittype 0 (single histogram fit)
norm fun1
backgr.fit 17
lifetimecorrection
map 16 18 0 0 0 0 0 0 0 0
forward 3
data 3289 65000
@ -69,23 +67,27 @@ SAVE
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2
range 0 9 -0.3 0.3
view_packing 500
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'MHz', or 'Mc/s'
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 10
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.5
#range_for_phase_correction 50.0 70.0
range 0.0 200.0
range 0 200
###############################################################
STATISTIC --- 2014-11-05 12:34:54
maxLH = 415.6, NDF = 358, maxLH/NDF = 1.160933
STATISTIC --- 2021-03-30 15:04:30
maxLH = 415.6, NDF = 358, maxLH/NDF = 1.160942
expected maxLH = 418.1, NDF = 358, expected maxLH/NDF = 1.168011
run block 1: (NDF/red.maxLH/red.maxLH_e) = (177/1.072511/1.087460)
run block 2: (NDF/red.maxLH/red.maxLH_e) = (175/1.290186/1.289528)

View File

@ -2,23 +2,23 @@ LSCO x=0.195 single
###############################################################
FITPARAMETER
# No Name Value Step Pos_Error Boundaries
1 phase 8.09 0.30 none
2 field 107.08786 0.00052 none
3 lambda 195.5703 0.0029 none 1 none
1 phase 10.34 0.21 none
2 field 112.82363 0.00033 none
3 lambda 170.4570 0.0022 none 1 none
4 xi 4 0 none 0 10
5 asym1 0.1980 0.0011 none 0 0.3
6 rate1 0.7697 0.0063 none
5 asym1 0.19219 -0.00079 0.00079 0 0.3
6 rate1 0.7955 0.0043 none
7 asymBg 0 0 none 0 0.3
8 rateBg 0 0 none 0 none
9 N01 3311.3 1.7 none 0 none
10 bg1 68.70 0.30 none 0 none
11 N02 3577.8 1.7 none 0 none
12 bg2 69.62 0.31 none 0 none
13 relphase 181.63 0.41 none 150 210
9 N01 3313.6 1.2 none 0 none
10 bg1 68.54 0.21 none 0 none
11 N02 3575.9 1.2 none 0 none
12 bg2 69.82 0.22 none 0 none
13 relphase 181.46 0.29 none 150 210
14 zero 0 0 none
15 relasy 1.0325 0.0075 none
15 relasy 1.0365 0.0051 none
16 one 1 0 none
###############################################################
@ -39,52 +39,51 @@ fun3 = par5 * map2
fun4 = par7 * map2
###############################################################
RUN data/deltat_pta_gps_3093 PIM3 PSI PSI-BIN (name beamline institute data-file-format)
GLOBAL
fittype 0 (single histogram fit)
fit 0 8
packing 30
###############################################################
RUN data/deltat_pta_gps_3093 PIM3 PSI PSI-BIN (name beamline institute data-file-format)
map 14 16 0 0 0 0 0 0 0 0
forward 3
norm 9
lifetimecorrection
backgr.fit 10
t0 125.0
data 128 8001
fit 0 8
packing 30
RUN data/deltat_pta_gps_3093 PIM3 PSI PSI-BIN (name beamline institute data-file-format)
fittype 0 (single histogram fit)
map 13 15 0 0 0 0 0 0 0 0
forward 4
norm 11
lifetimecorrection
backgr.fit 12
t0 124.0
data 127 8000
fit 0 8
packing 30
###############################################################
COMMANDS
MAX_LIKELIHOOD
MINIMIZE
#MIGRAD
HESSE
#MINOS
MINOS
SAVE
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'MHz', or 'Mc/s'
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 9
apodization NONE # 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 par1
range 0 500
###############################################################
PLOT 0 (single histo plot)
lifetimecorrection
runs 1 2
range 0 4 -0.25 0.25
###############################################################
STATISTIC --- 2013-05-03 09:08:20
chisq = 1200.8, NDF = 415, chisq/NDF = 2.893391
STATISTIC --- 2021-02-26 14:54:47
maxLH = 1497.5, NDF = 415, maxLH/NDF = 3.608471

View File

@ -4,19 +4,19 @@ FITPARAMETER
# No Name Value Step Pos_Error Boundaries
1 field 94.717 0 none
2 deadlayer 10.5 0 none
3 lambda 115.96 -0.92 0.88
3 lambda 115.98 -0.65 0.63
# E = 22keV
4 phase22 25.4956 0 none
5 asym22 0.1047 -0.0029 0.0030 0 0.3
6 rate22 0.559 -0.032 0.033
7 NormL22 753.00 -0.86 0.87
8 BGL22 51.08 -0.13 0.13
9 NormR22 545.93 -0.77 0.76
10 BGR22 38.60 -0.11 0.12
11 relasyR22 1.068 -0.038 0.039 0.2 2
12 relphaR22 162.8 -1.5 1.5 110 210
5 asym22 0.1047 -0.0021 0.0021 0 0.3
6 rate22 0.558 -0.023 0.023
7 NormL22 752.98 -0.61 0.61
8 BGL22 51.114 -0.094 0.094
9 NormR22 545.95 -0.54 0.54
10 BGR22 38.634 -0.082 0.082
11 relasyR22 1.068 -0.027 0.027 0.2 2
12 relphaR22 162.8 -1.1 1.1 110 210
13 energy22 22 0 none
14 one 1 0 none
@ -35,53 +35,48 @@ fun2 = map1 + map5
fun3 = par1 * gamma_mu
###############################################################
RUN data/lem09_his_0916 MUE4 PSI ROOT-NPP (name beamline institute data-file-format)
GLOBAL
fittype 0 (single histogram fit)
norm 7
backgr.fit 8
lifetimecorrection
map 4 5 6 14 15 13 0 0 0 0
forward 1
background 65000 66500
data 3419 63000
t0 3419.0
fit 0.15 10
packing 150
RUN data/lem09_his_0916 MUE4 PSI ROOT-NPP (name beamline institute data-file-format)
fittype 0 (single histogram fit)
norm 9
backgr.fit 10
lifetimecorrection
map 4 5 6 11 12 13 0 0 0 0
forward 3
background 65000 66500
data 3419 63000
t0 3419.0
fit 0.15 10
packing 150
###############################################################
RUN data/lem09_his_0916 MUE4 PSI ROOT-NPP (name beamline institute data-file-format)
norm 7
backgr.fit 8
map 4 5 6 14 15 13 0 0 0 0
forward 1
RUN data/lem09_his_0916 MUE4 PSI ROOT-NPP (name beamline institute data-file-format)
norm 9
backgr.fit 10
map 4 5 6 11 12 13 0 0 0 0
forward 3
###############################################################
COMMANDS
#MAX_LIKELIHOOD
MAX_LIKELIHOOD
MINIMIZE
MINOS
SAVE
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'MHz', or 'Mc/s'
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 10
apodization WEAK # 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 par4
range 0 200
###############################################################
PLOT 0 (single histo plot)
runs 1 2
lifetimecorrection
runs 1 2
range 0 4 -0.25 0.25
###############################################################
STATISTIC --- 2013-11-12 10:25:11
chisq = 696.9, NDF = 663, chisq/NDF = 1.051076
STATISTIC --- 2021-02-26 14:50:08
maxLH = 695.5, NDF = 663, maxLH/NDF = 1.049008

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

View File

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

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Acknowledgements &mdash; musrfit 1.6.4 documentation</title>
<title>Acknowledgements &mdash; musrfit 1.7.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.6.4',
VERSION: '1.7.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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.7.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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
@ -112,12 +112,12 @@ extremely competent way to deal with his projects as well as to deal with the ch
<li class="right" >
<a href="musr-root.html" title="MusrRoot - an Extensible Open File Format for μSR"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Apr 09, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>any2many - a Universal μSR-file-format converter &mdash; musrfit 1.6.4 documentation</title>
<title>any2many - a Universal μSR-file-format converter &mdash; musrfit 1.7.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.6.4',
VERSION: '1.7.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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.7.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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
@ -102,12 +102,12 @@ For a detailed description see <a class="reference internal" href="user-manual.h
<li class="right" >
<a href="msr2data.html" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Apr 09, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bugtracking &mdash; musrfit 1.6.4 documentation</title>
<title>Bugtracking &mdash; musrfit 1.7.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.6.4',
VERSION: '1.7.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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.7.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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
@ -93,12 +93,12 @@ or send an e-mail to A. Suter at PSI.</p>
<li class="right" >
<a href="acknowledgement.html" title="Acknowledgements"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Apr 09, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>How to Cite musrfit? &mdash; musrfit 1.6.4 documentation</title>
<title>How to Cite musrfit? &mdash; musrfit 1.7.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.6.4',
VERSION: '1.7.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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.7.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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
@ -114,12 +114,12 @@
<li class="right" >
<a href="index.html" title="Welcome to the musrfit documentation!"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Apr 09, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -7,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Index &mdash; musrfit 1.6.4 documentation</title>
<title>Index &mdash; musrfit 1.7.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.6.4',
VERSION: '1.7.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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.7.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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
@ -795,6 +795,10 @@
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="user-manual.html#index-78">rge-handler</a>
</dt>
<dt><a href="setup-standard.html#index-32">root-build-fink</a>
</dt>
@ -802,12 +806,12 @@
<dt><a href="setup-standard.html#index-16">root-build-linux</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="setup-standard.html#index-29">root-build-macports</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="setup-standard.html#index-23">root-build-windows</a>
</dt>
@ -863,7 +867,7 @@
</dt>
<dt><a href="user-manual.html#index-78">technical-musrfit</a>
<dt><a href="user-manual.html#index-79">technical-musrfit</a>
</dt>
@ -990,12 +994,12 @@
<li class="right" style="margin-right: 10px">
<a href="#" title="General Index"
>index</a></li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Apr 09, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome to the musrfit documentation! &mdash; musrfit 1.6.4 documentation</title>
<title>Welcome to the musrfit documentation! &mdash; musrfit 1.7.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.6.4',
VERSION: '1.7.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.6.4 documentation" href="#" />
<link rel="top" title="musrfit 1.7.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.6.4 documentation</a> &raquo;</li>
<li><a href="#">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
@ -180,12 +180,12 @@
<li class="right" >
<a href="cite.html" title="How to Cite musrfit?"
>next</a> |</li>
<li><a href="#">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="#">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Apr 09, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>msr2data - A Program for Automatically Processing Multiple musrfit msr Files &mdash; musrfit 1.6.4 documentation</title>
<title>msr2data - A Program for Automatically Processing Multiple musrfit msr Files &mdash; musrfit 1.7.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.6.4',
VERSION: '1.7.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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.7.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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
@ -434,12 +434,12 @@ fit serves as template for the second and so on. The template field stays empty
<li class="right" >
<a href="mupp.html" title="mupp - μSR Parameter Plotter"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Apr 09, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>mupp - μSR Parameter Plotter &mdash; musrfit 1.6.4 documentation</title>
<title>mupp - μSR Parameter Plotter &mdash; musrfit 1.7.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.6.4',
VERSION: '1.7.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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.7.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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
@ -324,12 +324,12 @@ SCRIPT COMMANDS:
<li class="right" >
<a href="musredit.html" title="musredit: the GUI Based Interface to musrfit"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Apr 09, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MusrRoot - an Extensible Open File Format for μSR &mdash; musrfit 1.6.4 documentation</title>
<title>MusrRoot - an Extensible Open File Format for μSR &mdash; musrfit 1.7.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.6.4',
VERSION: '1.7.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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.7.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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
@ -923,12 +923,12 @@ the entry has been added. The last token, <tt class="docutils literal"><span cla
<li class="right" >
<a href="any2many.html" title="any2many - a Universal μSR-file-format converter"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Apr 09, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>musredit: the GUI Based Interface to musrfit &mdash; musrfit 1.6.4 documentation</title>
<title>musredit: the GUI Based Interface to musrfit &mdash; musrfit 1.7.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.6.4',
VERSION: '1.7.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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.7.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 GPUs" href="setup-dks.html" />
</head>
@ -41,7 +41,7 @@
<li class="right" >
<a href="setup-dks.html" title="Setting up musrfit / DKS: High Speed Fitting with GPUs"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
@ -55,8 +55,8 @@
<div class="section" id="introduction">
<h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline"></a></h2>
<p><tt class="docutils literal"><span class="pre">musredit</span></tt> is an editor which also provide a graphical user interface to the programs contained in the <tt class="docutils literal"><span class="pre">musrfit</span></tt> suite and are intended
to help the user handle <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr files. It is implemented in <tt class="docutils literal"><span class="pre">C++</span></tt> and use the <a class="reference external" href="https://qt.io">Qt</a> framework. <tt class="docutils literal"><span class="pre">musredit</span></tt> is based on Qt 4.6 or Qt 5.6 (or above).
The Qt 5.6 version of <tt class="docutils literal"><span class="pre">musredit</span></tt> will be actively developed, whereas the Qt 4.x version will only get bug fixing and eventually will be dropped.
to help the user handle <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr files. It is implemented in <tt class="docutils literal"><span class="pre">C++</span></tt> and use the <a class="reference external" href="https://qt.io">Qt</a> framework. <tt class="docutils literal"><span class="pre">musredit</span></tt> is based on Qt 4.6, Qt 5.6 (or above), or Qt6.x.
The Qt 5.6 and Qt 6.x version of <tt class="docutils literal"><span class="pre">musredit</span></tt> will be actively developed, whereas the Qt 4.x version will only get bug fixing and eventually will be dropped.
On this documentation page only the features related to <tt class="docutils literal"><span class="pre">musrfit</span></tt> are described — the basic editor functions which should be self-explanatory are <em>not</em>.
<tt class="docutils literal"><span class="pre">musrgui</span></tt> is an outdated early version of <tt class="docutils literal"><span class="pre">musredit</span></tt> and will not described anymore. If still in use, the user is urged to switch to <tt class="docutils literal"><span class="pre">musredit</span></tt>.</p>
<div class="admonition note">
@ -550,12 +550,12 @@ the corresponding fit parameter value, except the phases where the step will be
<li class="right" >
<a href="setup-dks.html" title="Setting up musrfit / DKS: High Speed Fitting with GPUs"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Apr 09, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

Binary file not shown.

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Search &mdash; musrfit 1.6.4 documentation</title>
<title>Search &mdash; musrfit 1.7.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.6.4',
VERSION: '1.7.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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.7.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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
@ -89,12 +89,12 @@
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Apr 09, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

File diff suppressed because one or more lines are too long

View File

@ -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 GPUs &mdash; musrfit 1.6.4 documentation</title>
<title>Setting up musrfit / DKS: High Speed Fitting with GPUs &mdash; musrfit 1.7.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.6.4',
VERSION: '1.7.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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.7.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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Apr 09, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Setting up musrfit on Different Platforms &mdash; musrfit 1.6.4 documentation</title>
<title>Setting up musrfit on Different Platforms &mdash; musrfit 1.7.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.6.4',
VERSION: '1.7.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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.7.1 documentation" href="index.html" />
<link rel="next" title="Setting up musrfit / DKS: High Speed Fitting with GPUs" href="setup-dks.html" />
<link rel="prev" title="Documentation of user libs (user functions)" href="user-libs.html" />
</head>
@ -41,7 +41,7 @@
<li class="right" >
<a href="user-libs.html" title="Documentation of user libs (user functions)"
accesskey="P">previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
@ -106,7 +106,7 @@ Currently the <tt class="docutils literal"><span class="pre">MXML</span></tt> su
<p>If <em>optionally</em> the editor and graphical user interface <tt class="docutils literal"><span class="pre">musrgui</span></tt> / <tt class="docutils literal"><span class="pre">musredit</span></tt> is going to be installed there is one further requirement:</p>
<dl class="docutils" id="index-11">
<dt><strong>Qt</strong></dt>
<dd>A cross-platform application and user interface framework. <em>Required version ≥ 4.6</em> (musredit) (see <a class="reference external" href="http://qt.io/">Qt</a>).</dd>
<dd>A cross-platform application and user interface framework. <em>Required version ≥ 4.6</em> (musredit) (see <a class="reference external" href="http://qt.io/">Qt</a>). Currently the <strong>Qt5</strong> is the main development part. Qt6 just kicked in, but is not widely available yet.</dd>
</dl>
<p>Each of the following sections focusing on the installation of <tt class="docutils literal"><span class="pre">musrfit</span></tt> on the different operating systems will also give a brief introduction on the installation of the requirements before the actual musrfit installation is described.</p>
</div>
@ -150,7 +150,7 @@ from the shell will do the trick (never type the &#8216;$&#8217; it is the shell
<p>For <strong>Qt5</strong>:</p>
<blockquote>
<div><div class="highlight-bash"><div class="highlight"><pre><span></span>$ yum install epel-release
$ yum install git cmake boost-devel gsl-devel fftw-devel libxml2-devel qt5-qtbase-devel qt5-qtsvg-devel qt5-qtwebkit-devel
$ yum install git cmake boost-devel gsl-devel fftw-devel libxml2-devel qt5-qtbase-devel qt5-qtsvg-devel
</pre></div>
</div>
</div></blockquote>
@ -165,7 +165,7 @@ the installation would look like:</p>
</div></blockquote>
<p>For <strong>Qt5</strong>:</p>
<blockquote>
<div><div class="highlight-bash"><div class="highlight"><pre><span></span>$ apt-get install git cmake libboost-dev libgsl-dev libfftw3-dev libxml2-dev qt5-default qtbase5-dev libqt5svg5-dev libqt5webkit5-dev
<div><div class="highlight-bash"><div class="highlight"><pre><span></span>$ apt-get install git cmake libboost-dev libgsl-dev libfftw3-dev libxml2-dev qt5-default qtbase5-dev libqt5svg5-dev
</pre></div>
</div>
</div></blockquote>
@ -241,9 +241,9 @@ $ <span class="nb">cd</span> Apps
$ git clone http://github.com/root-project/root.git
$ <span class="nb">cd</span> root
$ git tag -l
$ <span class="c1"># git tag -l will list all available tags. In the next command choose the tag v6-16-00</span>
$ <span class="c1"># git tag -l will list all available tags. In the next command choose the tag v6-22-06</span>
$ <span class="c1"># or the latest official release number</span>
$ git checkout -b v6-16-00 v6-16-00
$ git checkout -b v6-22-06 v6-22-06
$ <span class="c1"># now ROOT is ready to be configured. Below you will find the minimal ROOT configuration needed.</span>
$ <span class="c1"># since we are using cmake build now, first we will need to create the build directory.</span>
$ mkdir root_build
@ -339,7 +339,7 @@ switch is not provided is <tt class="docutils literal"><span class="pre">BMWlibs
<dd>Will try to get <tt class="docutils literal"><span class="pre">musredit</span></tt>, <tt class="docutils literal"><span class="pre">musrWiz</span></tt>, <tt class="docutils literal"><span class="pre">musrStep</span></tt>, and <tt class="docutils literal"><span class="pre">mupp</span></tt> installed, if <tt class="docutils literal"><span class="pre">Qt</span></tt> is found.
By default this is enabled. Again &lt;value&gt;=0 means disabled, &lt;value&gt;=1 enabled.</dd>
<dt><strong>-Dqt_version=&lt;value&gt;</strong></dt>
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. &lt;value&gt; can take the values: <tt class="docutils literal"><span class="pre">AUTO,</span> <span class="pre">3,</span> <span class="pre">4,</span> <span class="pre">5</span></tt>.
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. &lt;value&gt; can take the values: <tt class="docutils literal"><span class="pre">AUTO,</span> <span class="pre">3,</span> <span class="pre">4,</span> <span class="pre">5,</span> <span class="pre">6</span></tt>.
If the value is set to <tt class="docutils literal"><span class="pre">AUTO</span></tt>, this highest installed version is chosen, otherwise the specified version is used.</dd>
<dt><strong>-Dtry_OpenMP=&lt;value&gt;</strong></dt>
<dd>Will check if <tt class="docutils literal"><span class="pre">OpenMP</span></tt> support is possible, and if yes use it. The default is enabled</dd>
@ -380,23 +380,10 @@ detailed information on this XML file refer to the <a class="reference internal"
<div class="section" id="musredit">
<span id="index-20"></span><h3>musredit<a class="headerlink" href="#musredit" title="Permalink to this headline"></a></h3>
<p>In the latest version of <tt class="docutils literal"><span class="pre">musrfit</span></tt> the configure script tries to determine automatically the highest available <tt class="docutils literal"><span class="pre">Qt</span></tt> version.
In case this is found, the editor <tt class="docutils literal"><span class="pre">musredit</span></tt> is built already together with <tt class="docutils literal"><span class="pre">musrfit</span></tt>.
To install this editor separately, <em>i.e.</em> by &#8220;hand&#8221; do</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> <span class="nv">$HOME</span>/Apps/musrfit/src/musredit_qt5
$ <span class="c1"># for some distributions you will need qmake-qt5 for the next command</span>
$ qmake musredit.pro
</pre></div>
In case this is found, the editor <tt class="docutils literal"><span class="pre">musredit</span></tt> is built already together with <tt class="docutils literal"><span class="pre">musrfit</span></tt>.</p>
</div>
<p>If everything went fine, <tt class="docutils literal"><span class="pre">musredit</span></tt> can be compiled and installed:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ make
$ make install
</pre></div>
</div>
<p>In case one does not like the executable <tt class="docutils literal"><span class="pre">musredit</span></tt> to be copied to the default installation directory <tt class="docutils literal"><span class="pre">$ROOTSYS/bin</span></tt>
the last <em>make install</em> can be skipped and the executable can be copied somewhere else instead.</p>
</div>
<div class="section" id="musrgui-obsolate">
<h3>musrgui (obsolate)<a class="headerlink" href="#musrgui-obsolate" title="Permalink to this headline"></a></h3>
<div class="section" id="musrgui-depreciated">
<h3>musrgui (depreciated)<a class="headerlink" href="#musrgui-depreciated" title="Permalink to this headline"></a></h3>
<p>If <tt class="docutils literal"><span class="pre">Qt4.6</span></tt> or higher is not available but <tt class="docutils literal"><span class="pre">Qt3</span></tt> is set up <tt class="docutils literal"><span class="pre">musrgui</span></tt> can be installed. For this please
follow the instructions for the <tt class="docutils literal"><span class="pre">musredit</span></tt> installation where simply every <tt class="docutils literal"><span class="pre">musredit</span></tt> occurrence has to
be replaced by <tt class="docutils literal"><span class="pre">musrgui</span></tt>. If there are problems during the <tt class="docutils literal"><span class="pre">qmake</span></tt> step, <em>e.g.</em>
@ -603,7 +590,7 @@ The default setting, <em>i.e.</em> the switch is not provided is <tt class="docu
<dd>Will try to get <tt class="docutils literal"><span class="pre">musredit</span></tt>, <tt class="docutils literal"><span class="pre">musrWiz</span></tt>, <tt class="docutils literal"><span class="pre">musrStep</span></tt>, and <tt class="docutils literal"><span class="pre">mupp</span></tt> installed, if <tt class="docutils literal"><span class="pre">Qt</span></tt> is found.
By default this is <em>enabled</em>. Again &lt;value&gt;=0 means disabled, &lt;value&gt;=1 enabled.</dd>
<dt><strong>-Dqt_version=&lt;value&gt;</strong></dt>
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. &lt;value&gt; can take the values: <tt class="docutils literal"><span class="pre">AUTO,</span> <span class="pre">3,</span> <span class="pre">4,</span> <span class="pre">5</span></tt>.
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. &lt;value&gt; can take the values: <tt class="docutils literal"><span class="pre">AUTO,</span> <span class="pre">3,</span> <span class="pre">4,</span> <span class="pre">5,</span> <span class="pre">6</span></tt>.
If the value is set to <tt class="docutils literal"><span class="pre">AUTO</span></tt>, this highest installed version is chosen, otherwise the specified version is used.</dd>
<dt><strong>-Dtry_OpenMP=&lt;value&gt;</strong></dt>
<dd>Will check if <tt class="docutils literal"><span class="pre">OpenMP</span></tt> support is possible, and if yes use it. The default is <em>enabled</em>.</dd>
@ -652,7 +639,7 @@ musredit <span class="p">&amp;</span>
</div>
</div>
<div class="section" id="id12">
<h3>musrgui (obsolate)<a class="headerlink" href="#id12" title="Permalink to this headline"></a></h3>
<h3>musrgui (depreciated)<a class="headerlink" href="#id12" title="Permalink to this headline"></a></h3>
<p>If <tt class="docutils literal"><span class="pre">Qt4.5</span></tt> or higher is not available but <tt class="docutils literal"><span class="pre">Qt3</span></tt> is set up <tt class="docutils literal"><span class="pre">musrgui</span></tt> can be installed. For this
please follow the instructions for the <tt class="docutils literal"><span class="pre">musredit</span></tt> installation where simply every <tt class="docutils literal"><span class="pre">musredit</span></tt> occurrence
has to be replaced by <tt class="docutils literal"><span class="pre">musrgui</span></tt>, and <tt class="docutils literal"><span class="pre">qt4</span></tt> is replaced by <tt class="docutils literal"><span class="pre">qt3</span></tt>.</p>
@ -686,6 +673,11 @@ and <tt class="docutils literal"><span class="pre">C:\cygwin\bin\bash.exe</span>
<h2>Mac OS X / macOS<a class="headerlink" href="#mac-os-x-macos" title="Permalink to this headline"></a></h2>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">macOS 11 alias <strong>Big Sur</strong>: <tt class="docutils literal"><span class="pre">musrfit</span></tt> is ready for <strong>Big Sur</strong> on Intel based macs. The <tt class="docutils literal"><span class="pre">DKS</span></tt> version of
<tt class="docutils literal"><span class="pre">musrfit</span></tt> for macOS <strong>Big Sur</strong> is ready as well.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">macOS Catalina is slightly different in some aspects, so if it happens that you have it installed, please
first check <a class="reference internal" href="#note-on-catalina"><em>Notes on macOS Catalina</em></a> before you proceed.</p>
</div>
@ -753,7 +745,7 @@ add a new line pointing to your local copy, <em>e.g.</em></p>
</ol>
<p>Then the MacPorts system should be set up and can be used to install additional software.</p>
<p>The installation of the software mentioned above is then done in the terminal:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ sudo port -v install pkgconfig autoconf automake libtool cmake fftw-3 fftw-3-single gsl boost libxml2 qt5 qt5-qtsvg qt5-qtwebengine
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ sudo port -v install pkgconfig autoconf automake libtool cmake fftw-3 fftw-3-single gsl boost libxml2 qt5 qt5-qtsvg
</pre></div>
</div>
<p>With <tt class="docutils literal"><span class="pre">Qt5</span></tt>, <tt class="docutils literal"><span class="pre">musredit</span></tt> will be installed. If it happens that you used <tt class="docutils literal"><span class="pre">musrgui</span></tt> in the past,
@ -792,9 +784,9 @@ it is at the time of writting <tt class="docutils literal"><span class="pre">roo
<tt class="docutils literal"><span class="pre">ROOT</span></tt> will be installed under <tt class="docutils literal"><span class="pre">/Application</span></tt> as owner root. In order to ease your life for the
steps to follow and assuming you are the only guy working on your Mac, you could change the owner and group of the <tt class="docutils literal"><span class="pre">ROOT</span></tt> directory:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> /Applications
$ sudo chown -R &lt;username&gt; root_v6.16.00
$ sudo chgrp -R staff root_v6.16.00
$ sudo ln -s root_v6.16.00 root
$ sudo chown -R &lt;username&gt; root_v6.22.00
$ sudo chgrp -R staff root_v6.22.00
$ sudo ln -s root_v6.22.00 root
</pre></div>
</div>
</div>
@ -811,14 +803,14 @@ comments will be added starting with a &#8216;#&#8217; which can be omitted. The
$ git clone http://github.com/root-project/root.git
$ <span class="nb">cd</span> root
$ git tag -l
$ <span class="c1"># git tag -l will list all available tags. In the next command choose the tag v6-10-xx</span>
$ <span class="c1"># where xx is the highest listed number, e.g. v6-16-00</span>
$ git checkout -b v6-16-00 v6-16-00
$ <span class="c1"># git tag -l will list all available tags. In the next command choose the tag v6-xx-yy</span>
$ <span class="c1"># where xx is the highest listed number, e.g. v6-22-06</span>
$ git checkout -b v6-22-06 v6-22-06
$ <span class="c1"># now ROOT is ready to be configured. Below you will find the minimal ROOT configuration needed.</span>
$ <span class="c1"># We will use the cmake out-of-source approach here.</span>
$ mkdir root_build
$ <span class="nb">cd</span> root_build
$ cmake ../ -Dgminimal<span class="o">=</span>ON -Dasimage<span class="o">=</span>ON -Dmathmore<span class="o">=</span>ON -Dminuit2<span class="o">=</span>ON -Dxml<span class="o">=</span>ON -DCMAKE_INSTALL_PREFIX<span class="o">=</span><span class="nv">$HOME</span>/Applications/root/root_exec
$ cmake ../ -Dgminimal<span class="o">=</span><span class="m">1</span> -Dasimage<span class="o">=</span><span class="m">1</span> -Dmathmore<span class="o">=</span><span class="m">1</span> -Dminuit2<span class="o">=</span><span class="m">1</span> -Dxml<span class="o">=</span><span class="m">1</span> -Dopengl<span class="o">=</span><span class="m">1</span> -Dbuiltin_glew<span class="o">=</span><span class="m">1</span> -DCMAKE_INSTALL_PREFIX<span class="o">=</span><span class="nv">$HOME</span>/Applications/root/root_exec
$ <span class="c1"># next will be the make. If running on a multicore CPU you can speed up tremendously by calling</span>
$ <span class="c1"># make with the option -j &lt;number&gt;, where &lt;number&gt; is the number of threads which you want to give,</span>
$ <span class="c1"># e.g. make -j8</span>
@ -927,8 +919,7 @@ is necessary to compile a few packages from source since no binary packages are
automatically by the FinkCommander after you have chosen the software packages for installation:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span>autoconf automake cmake boost1.63-nopython boost1.63.nopython-shlibs fftw3 fftw3-shlibs gsl gsl-shlibs
libtool2 libtool2-shlibs libxml2 libxml2-bin libxml2-shlibs pkgconfig qt5-mac-qtbase qt5-mac-qtbase-dev-tools
qt5-mac-qtsvg qt5-mac-qtsvg-shlibs qt5-mac-qtwebengine qt5-mac-qtwebengine-shlibs qt5-mac-qtwebenginecore-shlibs
qt5-mac-qtwebenginewidgets-shlibs
qt5-mac-qtsvg qt5-mac-qtsvg-shlibs
</pre></div>
</div>
<p>Under OS X 10.6 Snow Leopard it will <em>not</em> be possible to install <tt class="docutils literal"><span class="pre">qt3mac</span></tt> since the system is by default a 64-bit
@ -1005,14 +996,14 @@ comments will be added starting with a &#8216;#&#8217; which can be omitted. The
$ git clone http://github.com/root-project/root.git
$ <span class="nb">cd</span> root
$ git tag -l
$ <span class="c1"># git tag -l will list all available tags. In the next command choose the tag v6-10-xx</span>
$ <span class="c1"># where xx is the highest listed number, e.g. v6-16-00</span>
$ git checkout -b v6-16-00 v6-16-00
$ <span class="c1"># git tag -l will list all available tags. In the next command choose the tag v6-xx-yy</span>
$ <span class="c1"># where xx is the highest listed number, e.g. v6-22-06</span>
$ git checkout -b v6-22-06 v6-22-06
$ <span class="c1"># now ROOT is ready to be configured. Below you will find the minimal ROOT configuration needed.</span>
$ <span class="c1"># We will use the cmake out-of-source approach here.</span>
$ mkdir root_build
$ <span class="nb">cd</span> root_build
$ cmake ../ -Dgminimal<span class="o">=</span>ON -Dasimage<span class="o">=</span>ON -Dmathmore<span class="o">=</span>ON -Dminuit2<span class="o">=</span>ON -Dxml<span class="o">=</span>ON -DCMAKE_INSTALL_PREFIX<span class="o">=</span><span class="nv">$HOME</span>/Applications/root/root_exec
$ cmake ../ -Dgminimal<span class="o">=</span><span class="m">1</span> -Dasimage<span class="o">=</span><span class="m">1</span> -Dmathmore<span class="o">=</span><span class="m">1</span> -Dminuit2<span class="o">=</span><span class="m">1</span> -Dxml<span class="o">=</span><span class="m">1</span> -Dopengl<span class="o">=</span><span class="m">1</span> -Dbuiltin_glew<span class="o">=</span><span class="m">1</span> -DCMAKE_INSTALL_PREFIX<span class="o">=</span><span class="nv">$HOME</span>/Applications/root/root_exec
$ <span class="c1"># next will be the make. If running on a multicore CPU you can speed up tremendously by calling</span>
$ <span class="c1"># make with the option -j &lt;number&gt;, where &lt;number&gt; is the number of threads which you want to give,</span>
$ <span class="c1"># e.g. make -j8</span>
@ -1112,7 +1103,7 @@ switch is not provided is <tt class="docutils literal"><span class="pre">BMWlibs
<dd>Will try to get <tt class="docutils literal"><span class="pre">musredit</span></tt>, <tt class="docutils literal"><span class="pre">musrWiz</span></tt>, <tt class="docutils literal"><span class="pre">musrStep</span></tt>, and <tt class="docutils literal"><span class="pre">mupp</span></tt> installed, if <tt class="docutils literal"><span class="pre">Qt</span></tt> is found.
By default this is enabled. Again &lt;value&gt;=0 means disabled, &lt;value&gt;=1 enabled.</dd>
<dt><strong>-Dqt_version=&lt;value&gt;</strong></dt>
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. &lt;value&gt; can take the values: <tt class="docutils literal"><span class="pre">AUTO,</span> <span class="pre">3,</span> <span class="pre">4,</span> <span class="pre">5</span></tt>.
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. &lt;value&gt; can take the values: <tt class="docutils literal"><span class="pre">AUTO,</span> <span class="pre">3,</span> <span class="pre">4,</span> <span class="pre">5,</span> <span class="pre">6</span></tt>.
If the value is set to <tt class="docutils literal"><span class="pre">AUTO</span></tt>, this highest installed version is chosen, otherwise the specified version is used.</dd>
<dt><strong>-Dtry_OpenMP=&lt;value&gt;</strong></dt>
<dd>Will check if <tt class="docutils literal"><span class="pre">OpenMP</span></tt> support is possible, and if yes use it. The default is enabled</dd>
@ -1223,7 +1214,7 @@ $ musrview test-histo-ROOT-NPP.msr
</ul>
</li>
<li><a class="reference internal" href="#musredit">musredit</a></li>
<li><a class="reference internal" href="#musrgui-obsolate">musrgui (obsolate)</a></li>
<li><a class="reference internal" href="#musrgui-depreciated">musrgui (depreciated)</a></li>
<li><a class="reference internal" href="#check-the-installation">Check the installation</a></li>
</ul>
</li>
@ -1240,7 +1231,7 @@ $ musrview test-histo-ROOT-NPP.msr
</ul>
</li>
<li><a class="reference internal" href="#index-26">musredit</a></li>
<li><a class="reference internal" href="#id12">musrgui (obsolate)</a></li>
<li><a class="reference internal" href="#id12">musrgui (depreciated)</a></li>
<li><a class="reference internal" href="#id13">Check the installation</a></li>
<li><a class="reference internal" href="#potential-problems">Potential Problems</a></li>
</ul>
@ -1311,12 +1302,12 @@ $ musrview test-histo-ROOT-NPP.msr
<li class="right" >
<a href="user-libs.html" title="Documentation of user libs (user functions)"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Apr 09, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Tutorial for musrfit &mdash; musrfit 1.6.4 documentation</title>
<title>Tutorial for musrfit &mdash; musrfit 1.7.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.6.4',
VERSION: '1.7.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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.7.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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
@ -443,12 +443,12 @@ For a complete description please refer to the manuals of <a class="reference in
<li class="right" >
<a href="cite.html" title="How to Cite musrfit?"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Apr 09, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documentation of user libs (user functions) &mdash; musrfit 1.6.4 documentation</title>
<title>Documentation of user libs (user functions) &mdash; musrfit 1.7.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.6.4',
VERSION: '1.7.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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.7.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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
@ -662,12 +662,12 @@ K(m)&amp;=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
<li class="right" >
<a href="user-manual.html" title="User manual"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Apr 09, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>User manual &mdash; musrfit 1.6.4 documentation</title>
<title>User manual &mdash; musrfit 1.7.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.6.4',
VERSION: '1.7.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.6.4 documentation" href="index.html" />
<link rel="top" title="musrfit 1.7.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.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
@ -2242,11 +2242,6 @@ In this abstract base class a function operator is defined that takes two argume
<span class="n">TMyFunction</span><span class="p">(){}</span>
<span class="o">~</span><span class="n">TMyFunction</span><span class="p">(){}</span>
<span class="c1">// global user-function-access functions, here without any functionality</span>
<span class="n">Bool_t</span> <span class="n">NeedGlobalPart</span><span class="p">()</span> <span class="k">const</span> <span class="p">{</span> <span class="k">return</span> <span class="nb">false</span><span class="p">;</span> <span class="p">}</span>
<span class="kt">void</span> <span class="n">SetGlobalPart</span><span class="p">(</span><span class="n">vector</span><span class="o">&lt;</span><span class="kt">void</span><span class="o">*&gt;</span> <span class="o">&amp;</span><span class="n">globalPart</span><span class="p">,</span> <span class="n">UInt_t</span> <span class="n">idx</span><span class="p">)</span> <span class="p">{</span> <span class="p">}</span>
<span class="n">Bool_t</span> <span class="n">GlobalPartIsValid</span><span class="p">()</span> <span class="k">const</span> <span class="p">{</span> <span class="k">return</span> <span class="nb">true</span><span class="p">;</span> <span class="p">}</span>
<span class="c1">// function operator</span>
<span class="n">Double_t</span> <span class="k">operator</span><span class="p">()(</span><span class="n">Double_t</span><span class="p">,</span> <span class="k">const</span> <span class="n">vector</span><span class="o">&lt;</span><span class="n">Double_t</span><span class="o">&gt;&amp;</span><span class="p">)</span> <span class="k">const</span><span class="p">;</span>
@ -2455,9 +2450,152 @@ parallelized and the operator() is expected to evaluate to reasonable values for
In case this cannot be ensured, the parallelization can be disabled by <em>&#8211;disable-omp</em> on the configure level of the program installation.</p>
</div>
</div>
<div class="section" id="rge-file-handler-for-low-energy-mgrsr">
<span id="rge-handler"></span><span id="index-78"></span><h3>rge-file handler for Low-Energy μSR<a class="headerlink" href="#rge-file-handler-for-low-energy-mgrsr" title="Permalink to this headline"></a></h3>
<p>In the case of LE-μSR, the muon stopping distribution might have a profound impact on the muon polarization function <span class="math">\(P(t)\)</span>. In case of transverse field μSR measurements it can be written as</p>
<div class="math">
\[P(t) = \int_0^\infty n(z) \cos(\gamma_\mu B(z) t + \varphi) \, dz\]</div>
<p>where <span class="math">\(n(z)\)</span> is the normaized muon stopping distribution obtained from the Monte-Carlo code <tt class="docutils literal"><span class="pre">TRIM.SP</span></tt>. Normalized means</p>
<div class="math">
\[\int_0^\infty n(z) \, dz = 1.\]</div>
<p><span class="math">\(\gamma_\mu = 2 \pi \times 135.54\)</span> MHz/T is the gyromagnetic ratio of the muon and <span class="math">\(\varphi\)</span>
is the initial phase of the muon spins with respect to the positron detector. Typically <span class="math">\(B(z)\)</span> is the function which needs to be dealt with in a specific user function. A simple example would be the Meissner screening of a superconductor, for which</p>
<div class="math">
\[B(z) = B_0\, \exp(-z/\lambda),\]</div>
<p>with <span class="math">\(B_0\)</span> being the applied magnetic field, and <span class="math">\(\lambda\)</span> is the magnetic penetration depth.</p>
<p>This means that one needs to deal with the <span class="math">\(n(z)\)</span> objects in all these user functions. <span class="math">\(n(z)\)</span> does not only depend on the depth, but also on the implantation energy <span class="math">\(E_{\rm impl}\)</span>. For a real experiment this means that one is calculating a collection (various energies) of muon stopping distribution profiles with <tt class="docutils literal"><span class="pre">TRIM.SP</span></tt>. In the language of <tt class="docutils literal"><span class="pre">TRIM.SP</span></tt>, these files are called rge-files.</p>
<p>Since this is often needed in a detailed analysis of LE-μSR spectra, there is a special rge-file handler class implemented which deals with the loading, normalization and interpolation of these <span class="math">\(n(z, E_{\rm impl})\)</span> objects. The essential user-interface of this class with the name <tt class="docutils literal"><span class="pre">PRgeHandler</span></tt> is given
here:</p>
<div class="highlight-c++"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">PRgeHandler</span> <span class="o">:</span> <span class="k">public</span> <span class="n">TObject</span>
<span class="p">{</span>
<span class="k">public</span><span class="o">:</span>
<span class="n">PRgeHandler</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">fln</span><span class="o">=</span><span class="s">&quot;&quot;</span><span class="p">);</span>
<span class="k">virtual</span> <span class="o">~</span><span class="n">PRgeHandler</span><span class="p">()</span> <span class="p">{}</span>
<span class="k">virtual</span> <span class="kt">bool</span> <span class="n">IsValid</span><span class="p">()</span> <span class="p">{</span> <span class="k">return</span> <span class="n">fValid</span><span class="p">;</span> <span class="p">}</span>
<span class="k">virtual</span> <span class="n">PRgeDataList</span> <span class="n">GetRgeData</span><span class="p">()</span> <span class="p">{</span> <span class="k">return</span> <span class="n">fData</span><span class="p">;</span> <span class="p">}</span>
<span class="k">virtual</span> <span class="n">Double_t</span> <span class="n">GetZmax</span><span class="p">(</span><span class="k">const</span> <span class="n">Double_t</span> <span class="n">energy</span><span class="p">);</span>
<span class="k">virtual</span> <span class="n">Double_t</span> <span class="nf">GetZmax</span><span class="p">(</span><span class="k">const</span> <span class="n">Int_t</span> <span class="n">idx</span><span class="p">);</span>
<span class="k">virtual</span> <span class="n">Double_t</span> <span class="nf">Get_n</span><span class="p">(</span><span class="k">const</span> <span class="n">Double_t</span> <span class="n">energy</span><span class="p">,</span> <span class="k">const</span> <span class="n">Double_t</span> <span class="n">z</span><span class="p">);</span>
<span class="k">virtual</span> <span class="n">Double_t</span> <span class="nf">Get_n</span><span class="p">(</span><span class="k">const</span> <span class="n">Int_t</span> <span class="n">idx</span><span class="p">,</span> <span class="k">const</span> <span class="n">Double_t</span> <span class="n">z</span><span class="p">);</span>
<span class="k">virtual</span> <span class="n">Int_t</span> <span class="nf">GetEnergyIndex</span><span class="p">(</span><span class="k">const</span> <span class="n">Double_t</span> <span class="n">energy</span><span class="p">);</span>
<span class="k">private</span><span class="o">:</span>
<span class="kt">bool</span> <span class="n">fValid</span><span class="p">{</span><span class="nb">false</span><span class="p">};</span>
<span class="n">PRgeDataList</span> <span class="n">fData</span><span class="p">;</span>
<span class="k">virtual</span> <span class="kt">bool</span> <span class="nf">ReadRgeFile</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">fln</span><span class="p">,</span> <span class="n">PRgeData</span> <span class="o">&amp;</span><span class="n">data</span><span class="p">);</span>
<span class="p">};</span>
</pre></div>
</div>
<p>The rge-file objects are loaded internally (see below) and can easily be accessed via this interface. The <span class="math">\(n(z, E_{\rm impl})\)</span> data can either be accessed via <tt class="docutils literal"><span class="pre">Get_n(const</span> <span class="pre">Double_t</span> <span class="pre">energy,</span> <span class="pre">const</span> <span class="pre">Double_t</span> <span class="pre">z)</span></tt>, i.e. via the implantation energy (given in eV), or via <tt class="docutils literal"><span class="pre">Get_n(const</span> <span class="pre">Int_t</span> <span class="pre">idx,</span> <span class="pre">const</span> <span class="pre">Double_t</span> <span class="pre">z)</span></tt> with the index <tt class="docutils literal"><span class="pre">idx</span></tt> which is the energy index of the collection. Both this routines deliver <span class="math">\(n(z, E_{\rm impl})\)</span> in normalized form. The on via the energy index is slightly more efficient. The routine <tt class="docutils literal"><span class="pre">GetEnergyIndex(const</span> <span class="pre">Double_t</span> <span class="pre">energy)</span></tt> allows the get the proper energy index of the collection.</p>
<p>In order that class can find the rge-files at runtime, a xml-file is needed when calling the constructor. Very often, specific user-function need some additional input which is not delivered via the msr-files, but via a startup xml-file. In this case the rge-file will be just a part of the startup xml-file. For instance in the case of the Nonlocal Meissner screening user-function class, this looks like this</p>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
<span class="nt">&lt;nonlocal</span> <span class="na">xmlns=</span><span class="s">&quot;http://nemu.web.psi.ch/musrfit/nonlocal&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;comment&gt;</span>
Fourier and TrimSp information
<span class="nt">&lt;/comment&gt;</span>
<span class="nt">&lt;nonlocal_par&gt;</span>
<span class="nt">&lt;fourier_points&gt;</span>262144<span class="nt">&lt;/fourier_points&gt;</span>
<span class="nt">&lt;/nonlocal_par&gt;</span>
<span class="nt">&lt;trim_sp&gt;</span>
<span class="nt">&lt;data_path&gt;</span>./profiles/<span class="nt">&lt;/data_path&gt;</span>
<span class="nt">&lt;rge_fln_pre&gt;</span>Sn_E<span class="nt">&lt;/rge_fln_pre&gt;</span>
<span class="nt">&lt;energy_list&gt;</span>
<span class="nt">&lt;energy&gt;</span>1000<span class="nt">&lt;/energy&gt;</span>
<span class="nt">&lt;energy&gt;</span>2000<span class="nt">&lt;/energy&gt;</span>
<span class="nt">&lt;energy&gt;</span>4000<span class="nt">&lt;/energy&gt;</span>
<span class="nt">&lt;energy&gt;</span>6000<span class="nt">&lt;/energy&gt;</span>
<span class="nt">&lt;energy&gt;</span>8000<span class="nt">&lt;/energy&gt;</span>
<span class="nt">&lt;energy&gt;</span>10000<span class="nt">&lt;/energy&gt;</span>
<span class="nt">&lt;energy&gt;</span>12000<span class="nt">&lt;/energy&gt;</span>
<span class="nt">&lt;energy&gt;</span>14100<span class="nt">&lt;/energy&gt;</span>
<span class="nt">&lt;energy&gt;</span>18000<span class="nt">&lt;/energy&gt;</span>
<span class="nt">&lt;energy&gt;</span>22000<span class="nt">&lt;/energy&gt;</span>
<span class="nt">&lt;energy&gt;</span>25000<span class="nt">&lt;/energy&gt;</span>
<span class="nt">&lt;energy&gt;</span>27300<span class="nt">&lt;/energy&gt;</span>
<span class="nt">&lt;/energy_list&gt;</span>
<span class="nt">&lt;/trim_sp&gt;</span>
<span class="nt">&lt;/nonlocal&gt;</span>
</pre></div>
</div>
<p>The relevant portion for the rge-file handler class is starting with the xml tag <tt class="docutils literal"><span class="pre">&lt;trim_sp&gt;</span></tt> and contains four further tags:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">&lt;data_path&gt;</span></tt>: Here the path where to find the rge-files needs to be given</li>
<li><tt class="docutils literal"><span class="pre">&lt;rge_fln_pre&gt;</span></tt>: Start portion of the rge-file name.</li>
<li><tt class="docutils literal"><span class="pre">&lt;energy_list&gt;</span></tt>: This will embrace all the implantation energies available.</li>
<li><tt class="docutils literal"><span class="pre">&lt;energy&gt;</span></tt>: A single energy (in eV)</li>
</ul>
<p>In the given example the files are searched for in the sub-directory call <tt class="docutils literal"><span class="pre">profiles</span></tt> of the current directory. The rge-files have file names like
<tt class="docutils literal"><span class="pre">Sn_E1000.rge</span></tt>, <tt class="docutils literal"><span class="pre">Sn_E2000.rge</span></tt>, etc.</p>
<p>In the aforementioned Nonlocal Meissner screening class, in the constructor you will find the following invocation of the rge-handler object:</p>
<div class="highlight-c++"><div class="highlight"><pre><span></span><span class="n">PNL_PippardFitterGlobal</span><span class="o">::</span><span class="n">PNL_PippardFitterGlobal</span><span class="p">()</span>
<span class="p">{</span>
<span class="p">...</span>
<span class="c1">// load all the TRIM.SP rge-files</span>
<span class="n">fRgeHandler</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PRgeHandler</span><span class="p">(</span><span class="s">&quot;./nonlocal_startup.xml&quot;</span><span class="p">);</span>
<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">fRgeHandler</span><span class="o">-&gt;</span><span class="n">IsValid</span><span class="p">())</span> <span class="p">{</span>
<span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span> <span class="o">&lt;&lt;</span> <span class="s">&quot;&gt;&gt; PNL_PippardFitterGlobal::PNL_PippardFitterGlobal **PANIC ERROR**&quot;</span><span class="p">;</span>
<span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span> <span class="o">&lt;&lt;</span> <span class="s">&quot;&gt;&gt; rge data handler too unhappy. Will terminate unfriendly, sorry.&quot;</span><span class="p">;</span>
<span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
<span class="n">fValid</span> <span class="o">=</span> <span class="nb">false</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">...</span>
<span class="p">}</span>
</pre></div>
</div>
<p>And in the <tt class="docutils literal"><span class="pre">operator()</span></tt> function call which calculates the muon spin polarization, it will look like this</p>
<div class="highlight-c++"><div class="highlight"><pre><span></span><span class="n">Double_t</span> <span class="n">PNL_PippardFitter</span><span class="o">::</span><span class="k">operator</span><span class="p">()(</span><span class="n">Double_t</span> <span class="n">t</span><span class="p">,</span> <span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">Double_t</span><span class="o">&gt;</span> <span class="o">&amp;</span><span class="n">param</span><span class="p">)</span> <span class="k">const</span>
<span class="p">{</span>
<span class="p">...</span>
<span class="c1">// calculate field if parameter have changed</span>
<span class="n">fPippardFitterGlobal</span><span class="o">-&gt;</span><span class="n">CalculateField</span><span class="p">(</span><span class="n">param</span><span class="p">);</span>
<span class="n">Int_t</span> <span class="n">energyIndex</span> <span class="o">=</span> <span class="n">fPippardFitterGlobal</span><span class="o">-&gt;</span><span class="n">GetEnergyIndex</span><span class="p">(</span><span class="n">param</span><span class="p">[</span><span class="mi">0</span><span class="p">]);</span>
<span class="k">if</span> <span class="p">(</span><span class="n">energyIndex</span> <span class="o">==</span> <span class="o">-</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span> <span class="c1">// energy not found</span>
<span class="n">std</span><span class="o">::</span><span class="n">cerr</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span> <span class="o">&lt;&lt;</span> <span class="s">&quot;&gt;&gt; PNL_PippardFitter::operator() energy &quot;</span> <span class="o">&lt;&lt;</span> <span class="n">param</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">&lt;&lt;</span> <span class="s">&quot; not found. Will terminate.&quot;</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
<span class="n">assert</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">...</span>
<span class="c1">// calcualte polarization</span>
<span class="n">Bool_t</span> <span class="n">done</span> <span class="o">=</span> <span class="nb">false</span><span class="p">;</span>
<span class="n">Double_t</span> <span class="n">pol</span> <span class="o">=</span> <span class="mf">0.0</span><span class="p">,</span> <span class="n">dPol</span> <span class="o">=</span> <span class="mf">0.0</span><span class="p">;</span>
<span class="n">Double_t</span> <span class="n">z</span><span class="o">=</span><span class="mf">0.0</span><span class="p">;</span>
<span class="n">Int_t</span> <span class="n">terminate</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
<span class="n">Double_t</span> <span class="n">dz</span> <span class="o">=</span> <span class="mf">1.0</span><span class="p">;</span>
<span class="k">do</span> <span class="p">{</span>
<span class="k">if</span> <span class="p">(</span><span class="n">z</span> <span class="o">&lt;</span> <span class="n">param</span><span class="p">[</span><span class="mi">8</span><span class="p">])</span> <span class="p">{</span> <span class="c1">// z &lt; dead-layer</span>
<span class="n">dPol</span> <span class="o">=</span> <span class="n">fPippardFitterGlobal</span><span class="o">-&gt;</span><span class="n">GetMuonStoppingDensity</span><span class="p">(</span><span class="n">energyIndex</span><span class="p">,</span> <span class="n">z</span><span class="p">)</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">GAMMA_MU</span> <span class="o">*</span> <span class="n">param</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">*</span> <span class="n">t</span> <span class="o">+</span> <span class="n">param</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">*</span> <span class="n">DEGREE2RAD</span><span class="p">);</span>
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
<span class="n">dPol</span> <span class="o">=</span> <span class="n">fPippardFitterGlobal</span><span class="o">-&gt;</span><span class="n">GetMuonStoppingDensity</span><span class="p">(</span><span class="n">energyIndex</span><span class="p">,</span> <span class="n">z</span><span class="p">)</span> <span class="o">*</span> <span class="n">cos</span><span class="p">(</span><span class="n">GAMMA_MU</span> <span class="o">*</span> <span class="n">param</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">*</span> <span class="n">fPippardFitterGlobal</span><span class="o">-&gt;</span><span class="n">GetMagneticField</span><span class="p">(</span><span class="n">z</span><span class="o">-</span><span class="n">param</span><span class="p">[</span><span class="mi">8</span><span class="p">])</span> <span class="o">*</span> <span class="n">t</span> <span class="o">+</span> <span class="n">param</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span> <span class="o">*</span> <span class="n">DEGREE2RAD</span><span class="p">);</span>
<span class="p">}</span>
<span class="n">z</span> <span class="o">+=</span> <span class="n">dz</span><span class="p">;</span>
<span class="n">pol</span> <span class="o">+=</span> <span class="n">dPol</span><span class="p">;</span>
<span class="c1">// change in polarization is very small hence start termination counting</span>
<span class="k">if</span> <span class="p">(</span><span class="n">fabs</span><span class="p">(</span><span class="n">dPol</span><span class="p">)</span> <span class="o">&lt;</span> <span class="mf">1.0e-9</span><span class="p">)</span> <span class="p">{</span>
<span class="n">terminate</span><span class="o">++</span><span class="p">;</span>
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
<span class="n">terminate</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">if</span> <span class="p">(</span><span class="n">terminate</span> <span class="o">&gt;</span> <span class="mi">10</span><span class="p">)</span> <span class="c1">// polarization died out hence one can stop</span>
<span class="n">done</span> <span class="o">=</span> <span class="nb">true</span><span class="p">;</span>
<span class="p">}</span> <span class="k">while</span> <span class="p">(</span><span class="o">!</span><span class="n">done</span><span class="p">);</span>
<span class="k">return</span> <span class="n">pol</span><span class="o">*</span><span class="n">dz</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="technical-description-of-the-musrfit-framework">
<span id="technical-musrfit"></span><span id="index-78"></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-79"></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>
@ -2510,6 +2648,7 @@ In case this cannot be ensured, the parallelization can be disabled by <em>&#821
<li><a class="reference internal" href="#id38">User Functions</a><ul>
<li><a class="reference internal" href="#user-function-without-global-user-function-object-access">User Function without global user-function-object access</a></li>
<li><a class="reference internal" href="#user-function-with-global-user-function-object-access">User Function with global user-function-object access</a></li>
<li><a class="reference internal" href="#rge-file-handler-for-low-energy-mgrsr">rge-file handler for Low-Energy μSR</a></li>
</ul>
</li>
<li><a class="reference internal" href="#technical-description-of-the-musrfit-framework">Technical Description of the musrfit framework</a></li>
@ -2557,12 +2696,12 @@ In case this cannot be ensured, the parallelization can be disabled by <em>&#821
<li class="right" >
<a href="tutorial.html" title="Tutorial for musrfit"
>previous</a> |</li>
<li><a href="index.html">musrfit 1.6.4 documentation</a> &raquo;</li>
<li><a href="index.html">musrfit 1.7.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2020, Andreas Suter.
Last updated on Aug 29, 2020.
&copy; Copyright 2021, Andreas Suter.
Last updated on Apr 09, 2021.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@ -9,7 +9,7 @@ elseif (Qt4_FOUND)
add_subdirectory(musredit)
elseif (QT_FOUND)
add_subdirectory(musrgui)
endif (Qt5Core_FOUND)
endif ()
#--- define the musrfit libs --------------------------------------------------
set(MUSRFIT_LIBS ${MUSRFIT_LIBS} mud)

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@ -197,7 +197,7 @@ int main(int argc, char *argv[])
any2many_syntax();
else if (strstr(argv[1], "--v")) {
#ifdef HAVE_CONFIG_H
std::cout << std::endl << "any2many version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
std::cout << std::endl << "any2many version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << ", ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
#else
std::cout << std::endl << "any2many git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
#endif

View File

@ -1,4 +1,4 @@
#--- build the PMusr and PUserFcnBase libs ------------------------------------
#--- build the PMusr, PUserFcnBase, and PRgeHandler libs ----------------------
#--- generate necessary dictionaries ------------------------------------------
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
@ -53,6 +53,18 @@ root_generate_dictionary(
-I${FFTW3_INCLUDE_DIR} -I${MUSRFIT_INC}
MODULE PUserFcnBase
)
root_generate_dictionary(
PRgeHandlerDict
PRgeHandler.h
OPTIONS
-I${NONLOCAL_INC}
-I${MUSRFIT_INC}
-I${CMAKE_CURRENT_SOURCE_DIR}
-inlineInputHeader
LINKDEF ${MUSRFIT_INC}/PRgeHandlerLinkDef.h
MODULE PRgeHandler
)
#--- create pkg-config info ---------------------------------------------------
set(prefix "${CMAKE_INSTALL_PREFIX}")
@ -64,6 +76,8 @@ set(MUSR_LIBRARY_NAME "PMusr")
configure_file("PMusr.pc.in" "PMusr.pc" @ONLY)
set(USERFCN_LIBRARY_NAME "PUserFcnBase")
configure_file("PUserFcnBase.pc.in" "PUserFcnBase.pc" @ONLY)
set(PRGEHANDLER_LIBRARY_NAME "PRgeHandler")
configure_file("PRgeHandler.pc.in" "PRgeHandler.pc" @ONLY)
#--- lib creation -------------------------------------------------------------
add_library(PMusr SHARED
@ -117,6 +131,11 @@ add_library(PUserFcnBase SHARED
PUserFcnBaseDict.cxx
)
add_library(PRgeHandler SHARED
PRgeHandler.cpp
PRgeHandlerDict.cxx
)
#--- set target properties, e.g. version --------------------------------------
set_target_properties(PMusr
PROPERTIES
@ -126,11 +145,25 @@ set_target_properties(PUserFcnBase
PROPERTIES
VERSION ${MUSR_VERSION}
)
set_target_properties(PRgeHandler
PROPERTIES
VERSION ${MUSR_VERSION}
)
#--- make sure that the include directory is found ----------------------------
target_include_directories(
PUserFcnBase BEFORE PRIVATE $<BUILD_INTERFACE:${MUSRFIT_INC}>
)
target_include_directories(
PRgeHandler BEFORE PRIVATE $<BUILD_INTERFACE:${MUSRFIT_INC}>
)
#--- add ROOT Version >= 6.24 compile options if needed -----------------------
if (ROOT_GRTEQ_24)
target_compile_options(PMusr BEFORE PRIVATE "-DROOT_GRTEQ_24")
endif(ROOT_GRTEQ_24)
#--- add OpenMP compile options if needed -------------------------------------
if (OpenMP_FOUND)
target_compile_options(PMusr PUBLIC ${OpenMP_CXX_FLAGS})
@ -157,11 +190,15 @@ if (OpenMP_FOUND)
endif (OpenMP_FOUND)
target_link_libraries(PUserFcnBase ${ROOT_LIBRARIES})
target_link_libraries(PRgeHandler ${Boost_LIBRARIES} ${ROOT_LIBRARIES})
target_link_libraries(PMusr ${DependOnLibs})
#--- install PUserFcnBase solib -----------------------------------------------
install(TARGETS PUserFcnBase DESTINATION lib)
#--- install PRgeHandler solib -----------------------------------------------
install(TARGETS PRgeHandler DESTINATION lib)
#--- install PMusr solib ------------------------------------------------------
install(TARGETS PMusr DESTINATION lib)
@ -173,6 +210,8 @@ install(
${CMAKE_CURRENT_BINARY_DIR}/libPMusrCanvas.rootmap
${CMAKE_CURRENT_BINARY_DIR}/libPMusrT0_rdict.pcm
${CMAKE_CURRENT_BINARY_DIR}/libPMusrT0.rootmap
${CMAKE_CURRENT_BINARY_DIR}/libPRgeHandler_rdict.pcm
${CMAKE_CURRENT_BINARY_DIR}/libPRgeHandler.rootmap
${CMAKE_CURRENT_BINARY_DIR}/libPStartupHandler_rdict.pcm
${CMAKE_CURRENT_BINARY_DIR}/libPStartupHandler.rootmap
${CMAKE_CURRENT_BINARY_DIR}/libPUserFcnBase_rdict.pcm
@ -195,6 +234,7 @@ install(
${MUSRFIT_INC}/PMusr.h
${MUSRFIT_INC}/PMusrT0.h
${MUSRFIT_INC}/PPrepFourier.h
${MUSRFIT_INC}/PRgeHandler.h
${MUSRFIT_INC}/PRunAsymmetry.h
${MUSRFIT_INC}/PRunAsymmetryBNMR.h
${MUSRFIT_INC}/PRunAsymmetryRRF.h
@ -214,6 +254,7 @@ install(
#--- install pkg-config info --------------------------------------------------
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/PUserFcnBase.pc
${CMAKE_CURRENT_BINARY_DIR}/PRgeHandler.pc
${CMAKE_CURRENT_BINARY_DIR}/PMusr.pc
DESTINATION lib/pkgconfig
)

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@ -1840,7 +1840,11 @@ Bool_t PFitter::ExecutePrintLevel(UInt_t lineNo)
return false;
}
#ifdef ROOT_GRTEQ_24
ROOT::Minuit2::MnPrint::SetGlobalLevel(fPrintLevel);
#else
ROOT::Minuit2::MnPrint::SetLevel(fPrintLevel);
#endif
// clean up
if (tokens) {

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2019 by Bastian M. Wojek / Andreas Suter *
* Copyright (C) 2009-2021 by Bastian M. Wojek / Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

603
src/classes/PRgeHandler.cpp Normal file
View File

@ -0,0 +1,603 @@
/***************************************************************************
PRgeHandler.cpp
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <fstream>
#include <iostream>
#include <vector>
#include <string>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
#include "PRgeHandler.h"
ClassImpQ(PXmlRgeHandler)
//--------------------------------------------------------------------------
// OnStartDocument
//--------------------------------------------------------------------------
/**
* <p>Called on start of the XML file reading. Initializes all necessary variables.
*/
void PXmlRgeHandler::OnStartDocument()
{
fKey = eEmpty;
}
//--------------------------------------------------------------------------
// OnEndDocument
//--------------------------------------------------------------------------
/**
* <p>Called on end of XML file reading.
*/
void PXmlRgeHandler::OnEndDocument()
{
if (!fIsValid)
return;
// check if anything was set
if (fTrimSpDataPath.empty()) {
std::string err = "<data_path> content is missing!";
fIsValid = false;
OnError(err.c_str());
}
if (fTrimSpFlnPre.empty()) {
std::string err = "<rge_fln_pre> content is missing!";
fIsValid = false;
OnError(err.c_str());
}
if (fTrimSpDataEnergyList.size()==0) {
std::string err = "no implantation energies present!";
fIsValid = false;
OnError(err.c_str());
}
}
//--------------------------------------------------------------------------
// OnStartElement
//--------------------------------------------------------------------------
/**
* <p>Called when a XML start element is found. Filters out the needed elements
* and sets a proper key.
*
* \param str XML element name
* \param attributes not used
*/
void PXmlRgeHandler::OnStartElement(const Char_t *str, const TList *attributes)
{
if (!strcmp(str, "trim_sp")) {
isTrimSp=true;
} else if (!strcmp(str, "data_path") && isTrimSp) {
fKey = eDataPath;
} else if (!strcmp(str, "rge_fln_pre") && isTrimSp) {
fKey = eFlnPre;
} else if (!strcmp(str, "energy") && isTrimSp) {
fKey = eEnergy;
}
}
//--------------------------------------------------------------------------
// OnEndElement
//--------------------------------------------------------------------------
/**
* <p>Called when a XML end element is found. Resets the handler key.
*
* \param str not used
*/
void PXmlRgeHandler::OnEndElement(const Char_t *str)
{
if (!strcmp(str, "trim_sp")) {
isTrimSp=false;
}
fKey = eEmpty;
}
//--------------------------------------------------------------------------
// OnCharacters
//--------------------------------------------------------------------------
/**
* <p>Content of a given XML element. Filters out the data and feeds them to
* the internal variables.
*
* \param str XML element string
*/
void PXmlRgeHandler::OnCharacters(const Char_t *str)
{
int ival;
std::string msg(""), sstr(str);
size_t pos;
switch(fKey) {
case eDataPath:
fTrimSpDataPath=str;
break;
case eFlnPre:
fTrimSpFlnPre=str;
break;
case eEnergy:
try {
ival = std::stoi(str, &pos);
} catch(std::invalid_argument& e) {
fIsValid = false;
msg = "The found energy '" + sstr + "' which is not a number";
OnError(msg.c_str());
} catch(std::out_of_range& e) {
fIsValid = false;
msg = "The found energy '" + sstr + "' which is out-of-range.";
OnError(msg.c_str());
} catch(...) {
fIsValid = false;
msg = "The found energy '" + sstr + "' which generates an error.";
OnError(msg.c_str());
}
if (pos != sstr.length()) {
fIsValid = false;
msg = "The found energy '" + sstr + "' which is not an integer";
OnError(msg.c_str());
}
fTrimSpDataEnergyList.push_back(ival);
break;
default:
break;
}
}
//--------------------------------------------------------------------------
// OnComment
//--------------------------------------------------------------------------
/**
* <p>Called when a XML comment is found. Not used.
*
* \param str not used.
*/
void PXmlRgeHandler::OnComment(const Char_t *str)
{
// nothing to be done for now
}
//--------------------------------------------------------------------------
// OnWarning
//--------------------------------------------------------------------------
/**
* <p>Called when the XML parser emits a warning.
*
* \param str warning string
*/
void PXmlRgeHandler::OnWarning(const Char_t *str)
{
std::cerr << std::endl << "PXmlRgeHandler **WARNING** " << str;
std::cerr << std::endl;
}
//--------------------------------------------------------------------------
// OnError
//--------------------------------------------------------------------------
/**
* <p>Called when the XML parser emits an error.
*
* \param str error string
*/
void PXmlRgeHandler::OnError(const Char_t *str)
{
std::cerr << std::endl << "PXmlRgeHandler **ERROR** " << str;
std::cerr << std::endl;
}
//--------------------------------------------------------------------------
// OnFatalError
//--------------------------------------------------------------------------
/**
* <p>Called when the XML parser emits a fatal error.
*
* \param str fatal error string
*/
void PXmlRgeHandler::OnFatalError(const Char_t *str)
{
std::cerr << std::endl << "PXmlRgeHandler **FATAL ERROR** " << str;
std::cerr << std::endl;
}
//--------------------------------------------------------------------------
// OnCdataBlock
//--------------------------------------------------------------------------
/**
* <p>Not used.
*
* \param str not used
* \param len not used
*/
void PXmlRgeHandler::OnCdataBlock(const Char_t *str, Int_t len)
{
// nothing to be done for now
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ClassImp(PRgeHandler)
//--------------------------------------------------------------------------
// Ctor
//--------------------------------------------------------------------------
/**
* @brief PRgeHandler::PRgeHandler
* @param fln
*/
PRgeHandler::PRgeHandler(const std::string fln)
{
// make sure there is an xml-startup file name
if (fln.empty()) { // fln not given
std::cerr << std::endl;
std::cerr << "**ERROR** NO xml file name provided." << std::endl;
std::cerr << std::endl;
fValid=false;
return;
}
// read the startup xml-file to extract the necessary rge infos.
if (!boost::filesystem::exists(fln)) {
std::cerr << std::endl;
std::cerr << "**ERROR** xml file named: " << fln << " does not exist." << std::endl;
std::cerr << std::endl;
fValid=false;
return;
}
// create the rge xml handler
PXmlRgeHandler *xmlRge = new PXmlRgeHandler();
if (xmlRge == nullptr) {
std::cerr << std::endl;
std::cerr << "**ERROR** couldn't invoke PXmlRgeHandler." << std::endl;
std::cerr << std::endl;
fValid=false;
return;
}
// create the SAX parser
TSAXParser *saxParser = new TSAXParser();
if (saxParser == nullptr) {
std::cerr << std::endl;
std::cerr << "**ERROR** couldn't invoke TSAXParser." << std::endl;
std::cerr << std::endl;
fValid=false;
return;
}
saxParser->SetStopOnError();
// connect SAX parser and rge handler
saxParser->ConnectToHandler("PXmlRgeHandler", xmlRge);
int status = saxParser->ParseFile(fln.c_str());
if (status != 0) {
std::cerr << std::endl;
std::cerr << "**ERROR** parsing the xml-file: " << fln << "." << std::endl;
std::cerr << std::endl;
fValid=false;
return;
}
if (xmlRge->IsValid())
fValid = true;
else
fValid = false;
// read the rge-file(s) content if everything went fine so far
std::string rgeFln;
PRgeData dataSet;
if (fValid) {
const PIntVector energy = xmlRge->GetTrimSpDataVectorList();
for (int i=0; i<energy.size(); i++) {
// construct the file name
rgeFln = xmlRge->GetTrimSpDataPath();
if (rgeFln[rgeFln.size()-1] != '/')
rgeFln += "/";
rgeFln += xmlRge->GetTrimSpFlnPre();
rgeFln += std::to_string(energy[i]);
rgeFln += ".rge";
if (!boost::filesystem::exists(rgeFln)) {
fValid = false;
std::cerr << std::endl;
std::cerr << "**ERROR** rge-file: " << rgeFln << " not found." << std::endl;
std::cerr << std::endl;
break;
}
// init data set
dataSet.energy = energy[i];
dataSet.depth.clear();
dataSet.amplitude.clear();
if (!ReadRgeFile(rgeFln, dataSet)) {
fValid = false;
std::cerr << std::endl;
std::cerr << "**ERROR** read error in rge-file: " << rgeFln << " not found." << std::endl;
std::cerr << std::endl;
break;
}
// get the total number of particles
double tot=0.0;
for (int j=0; j<dataSet.amplitude.size(); j++)
tot += dataSet.amplitude[j];
dataSet.noOfParticles = tot;
// sum_j nn dzz == 1, (dzz_j = depth[j]-depth[j-1])
dataSet.nn.resize(dataSet.amplitude.size());
tot = 0.0;
double zz=0.0; // "previous" zz (since depth[j]-depth[j-1] != const) it needs to be done this way.
for (int j=0; j<dataSet.nn.size(); j++) {
tot += dataSet.amplitude[j] * (dataSet.depth[j] - zz);
zz = dataSet.depth[j];
}
for (int j=0; j<dataSet.nn.size(); j++) {
dataSet.nn[j] = dataSet.amplitude[j] / tot;
}
fData.push_back(dataSet);
}
}
delete saxParser;
delete xmlRge;
}
//--------------------------------------------------------------------------
// ReadRgeFile
//--------------------------------------------------------------------------
/**
* <p>Read the content of a rge-file.
*
* @param fln file name of the rge-file
* @return true on success.
*/
bool PRgeHandler::ReadRgeFile(const std::string fln, PRgeData &data)
{
std::ifstream fin(fln);
if (!fin.is_open())
return false;
std::string line, msg;
std::vector<std::string> tok;
Double_t zz, nn;
size_t pos;
int lineNo=0;
while (fin.good() && fValid) {
std::getline(fin, line);
lineNo++;
boost::algorithm::trim(line);
if (line.empty())
continue;
if (!std::isdigit(line[0]))
continue;
tok.clear();
boost::algorithm::split(tok, line, boost::algorithm::is_any_of(" \t"), boost::algorithm::token_compress_on);
if (tok.size() != 2) {
std::cerr << std::endl;
std::cerr << "**ERROR** in rge-file: " << fln << ", unexpected number of tokens (" << tok.size() << ")." << std::endl;
std::cerr << std::endl;
fin.close();
return false;
}
// check distance
try {
zz = std::stod(tok[0], &pos);
} catch(std::invalid_argument& e) {
fValid = false;
msg = "The found depth '" + tok[0] + "' which is not a number";
std::cerr << std::endl;
std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
std::cerr << " " << msg << std::endl;
std::cerr << std::endl;
} catch(std::out_of_range& e) {
fValid = false;
msg = "The found depth '" + tok[0] + "' which is out-of-range.";
std::cerr << std::endl;
std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
std::cerr << " " << msg << std::endl;
std::cerr << std::endl;
} catch(...) {
fValid = false;
msg = "The found depth '" + tok[0] + "' which generates an error.";
std::cerr << std::endl;
std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
std::cerr << " " << msg << std::endl;
std::cerr << std::endl;
}
if (pos != tok[0].length()) {
fValid = false;
msg = "The found depth '" + tok[0] + "' which is not an number.";
std::cerr << std::endl;
std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
std::cerr << " " << msg << std::endl;
std::cerr << std::endl;
}
// check number of implanted particles
try {
nn = std::stod(tok[1], &pos);
} catch(std::invalid_argument& e) {
fValid = false;
msg = "The found #particles '" + tok[1] + "' which is not a number";
std::cerr << std::endl;
std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
std::cerr << " " << msg << std::endl;
std::cerr << std::endl;
} catch(std::out_of_range& e) {
fValid = false;
msg = "The found #particles '" + tok[1] + "' which is out-of-range.";
std::cerr << std::endl;
std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
std::cerr << " " << msg << std::endl;
std::cerr << std::endl;
} catch(...) {
fValid = false;
msg = "The found #particles '" + tok[1] + "' which generates an error.";
std::cerr << std::endl;
std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
std::cerr << " " << msg << std::endl;
std::cerr << std::endl;
}
if (pos != tok[1].length()) {
fValid = false;
msg = "The found #particles '" + tok[1] + "' which is not an integer.";
std::cerr << std::endl;
std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
std::cerr << " " << msg << std::endl;
std::cerr << std::endl;
}
data.depth.push_back(zz/10.0); // distance in nm
data.amplitude.push_back(nn);
}
fin.close();
return true;
}
//--------------------------------------------------------------------------
// GetZmax via energy
//--------------------------------------------------------------------------
/**
* <p>Get maximal depth for a given energy.
*
* @param energy energy in (eV)
* @return zMax if energy is found, -1 otherwise.
*/
Double_t PRgeHandler::GetZmax(const Double_t energy)
{
int idx=-1;
for (int i=0; i<fData.size(); i++) {
if (fabs(fData[i].energy-energy) < 1.0) {
idx = i;
break;
}
}
if (idx != -1)
return GetZmax(idx);
return -1.0;
}
//--------------------------------------------------------------------------
// GetZmax via index
//--------------------------------------------------------------------------
/**
* <p>Get maximal depth for a given index.
*
* @param idx index for which zMax is requested.
* @return zMax if idx is in range, -1 otherwise.
*/
Double_t PRgeHandler::GetZmax(const Int_t idx)
{
if ((idx < 0) || (idx >= fData.size()))
return -1.0;
return fData[idx].depth[fData[idx].depth.size()-1];
}
//--------------------------------------------------------------------------
// Get_n via energy
//--------------------------------------------------------------------------
/**
* <p>Get the normalized n(E,z) value.
*
* @param energy (eV)
* @param z (nm)
* @return n(E,z) if energy and z are in proper range, -1.0 otherwise.
*/
Double_t PRgeHandler::Get_n(const Double_t energy, const Double_t z)
{
int idx=-1;
for (int i=0; i<fData.size(); i++) {
if (fabs(fData[i].energy-energy) < 1.0) {
idx = i;
break;
}
}
if (idx == -1)
return 0.0;
return Get_n(idx, z);
}
//--------------------------------------------------------------------------
// Get_n via index
//--------------------------------------------------------------------------
/**
* <p>Get the normalized n(idx,z) value.
*
* @param idx index of the rge-dataset
* @param z (nm)
* @return n(idx,z) if idx and z are in proper range, -1.0 otherwise.
*/
Double_t PRgeHandler::Get_n(const Int_t idx, const Double_t z)
{
if ((idx < 0) || (idx >= fData.size()))
return 0.0;
if ((z < 0.0) || (z > GetZmax(idx)))
return 0.0;
int pos=0;
for (int i=0; i<fData[idx].depth.size(); i++) {
if (z <= fData[idx].depth[i]) {
pos = i-1;
break;
}
}
Double_t nn=0.0;
if (pos < 0) {
nn = fData[idx].nn[0] * z/(fData[idx].depth[1]-fData[idx].depth[0]);
} else { // linear interpolation
nn = fData[idx].nn[pos] +
(fData[idx].nn[pos+1] - fData[idx].nn[pos]) *
(z-fData[idx].depth[pos])/(fData[idx].depth[pos+1]-fData[idx].depth[pos]);
}
return nn;
}
//--------------------------------------------------------------------------
// GetEnergyIndex
//--------------------------------------------------------------------------
/**
* <p>Get the energy index by providing an energy in (eV).
*
* @param energy in (eV).
* @return energy index if energy was found, -1 otherwise.
*/
Int_t PRgeHandler::GetEnergyIndex(const Double_t energy)
{
int idx=-1;
for (int i=0; i<fData.size(); i++) {
if (fabs(fData[i].energy-energy) < 1.0) {
idx = i;
break;
}
}
return idx;
}

View File

@ -0,0 +1,10 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: PRgeHandler
Description: C++ shared library providing the support for handling of TrimSP rge-files
Version: @MUSR_VERSION@
Libs: -L${libdir} -l@PRGEHANDLER_LIBRARY_NAME@
Cflags: -I${includedir}

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@ -1297,7 +1297,7 @@ Bool_t PRunAsymmetry::PrepareViewData(PRawRunData* runData, UInt_t histoNo[2])
// calculate theory
Double_t time;
UInt_t size = runData->GetDataBin(histoNo[0])->size();
UInt_t size = runData->GetDataBin(histoNo[0])->size()/packing;
Int_t factor = 8; // 8 times more points for the theory (if fTheoAsData == false)
fData.SetTheoryTimeStart(fData.GetDataTimeStart());

View File

@ -9,7 +9,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2018-2019 by Zaher Salman *
* Copyright (C) 2018-2021 by Zaher Salman *
* zaher.salman@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@ -1315,7 +1315,7 @@ Bool_t PRunSingleHisto::PrepareViewData(PRawRunData* runData, const UInt_t histo
// calculate theory
Double_t theoryValue;
UInt_t size = fForward.size();
UInt_t size = fForward.size()/packing;
Int_t factor = 8; // 8 times more points for the theory (if fTheoAsData == false)
UInt_t rebinRRF = 0;

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@ -34,26 +34,6 @@
ClassImp(PUserFcnBase)
//--------------------------------------------------------------------------
// Constructor
//--------------------------------------------------------------------------
/**
* <p>Constructor
*/
PUserFcnBase::PUserFcnBase()
{
}
//--------------------------------------------------------------------------
// Destructor
//--------------------------------------------------------------------------
/**
* <p>Destructor
*/
PUserFcnBase::~PUserFcnBase()
{
}
//--------------------------------------------------------------------------
// This function is a replacement for the ParseFile method of TSAXParser.
// It is needed because in certain environments ParseFile does not work but ParseBuffer does.

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@ -776,7 +776,7 @@ int main(int argc, char *argv[])
return 0;
} else if (!strcmp(argv[i], "--version") || !strcmp(argv[i], "-v")) {
#ifdef HAVE_CONFIG_H
std::cout << std::endl << "dump_header version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
std::cout << std::endl << "dump_header version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << ", ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
#else
std::cout << std::endl << "dump_header git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
#endif

View File

@ -11,7 +11,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter, Bastian M. Wojek *
* Copyright (C) 2007-2021 by Andreas Suter, Bastian M. Wojek *
* *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -11,7 +11,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter, Bastian M. Wojek *
* Copyright (C) 2007-2021 by Andreas Suter, Bastian M. Wojek *
* *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -38,7 +38,6 @@ configure_file("PMagProximityFitter.pc.in" "PMagProximityFitter.pc" @ONLY)
add_library(PMagProximityFitter SHARED
PMagProximityFitter.cpp
PMagProximityFitterDict.cxx
PMPRgeHandler.cpp
PMPStartupHandler.cpp
PMPStartupHandlerDict.cxx
)
@ -57,7 +56,7 @@ set_target_properties(PMagProximityFitter
)
#--- add library dependencies -------------------------------------------------
target_link_libraries(PMagProximityFitter ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PUserFcnBase)
target_link_libraries(PMagProximityFitter ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PRgeHandler PUserFcnBase)
#--- install PMagProximityFitter solib ----------------------------------------
install(TARGETS PMagProximityFitter DESTINATION lib)
@ -76,7 +75,6 @@ install(
FILES
PMagProximity.h
PMagProximityFitter.h
PMPRgeHandler.h
PMPStartupHandler.h
DESTINATION
include

View File

@ -1,212 +0,0 @@
/***************************************************************************
PMPRgeHandler.cpp
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
***************************************************************************/
/***************************************************************************
* Copyright (C) 2011-2019 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <cassert>
#include <iostream>
#include <fstream>
#include "PMPRgeHandler.h"
//--------------------------------------------------------------------------
// Constructor
//--------------------------------------------------------------------------
/**
*
*/
PMPRgeHandler::PMPRgeHandler(const PStringVector &rgeDataPathList, const PDoubleVector &rgeDataEnergyList)
{
fIsValid = false;
fIsValid = LoadRgeData(rgeDataPathList, rgeDataEnergyList);
}
//--------------------------------------------------------------------------
// Destructor
//--------------------------------------------------------------------------
/**
*
*/
PMPRgeHandler::~PMPRgeHandler()
{
fRgeDataList.clear();
}
//--------------------------------------------------------------------------
// GetRgeEnergyIndex
//--------------------------------------------------------------------------
/**
*
* \param energy in (keV)
*/
Int_t PMPRgeHandler::GetRgeEnergyIndex(const Double_t energy)
{
Int_t idx = -1;
for (UInt_t i=0; i<fRgeDataList.size(); i++) {
if (energy == fRgeDataList[i].energy) {
idx = i;
break;
}
}
return idx;
}
//--------------------------------------------------------------------------
// GetRgeValue
//--------------------------------------------------------------------------
/**
*
* \param energy in (keV)
* \param dist in (nm)
*/
Double_t PMPRgeHandler::GetRgeValue(const Int_t index, const Double_t dist)
{
Double_t rgeVal = 0.0;
UInt_t distIdx = static_cast<UInt_t>(dist/(fRgeDataList[index].stoppingDistance[1]-fRgeDataList[index].stoppingDistance[0]));
if (distIdx >= fRgeDataList[index].stoppingDistance.size()) {
rgeVal = 0.0;
} else {
rgeVal = fRgeDataList[index].stoppingAmplitude[distIdx] +
(fRgeDataList[index].stoppingAmplitude[distIdx+1] - fRgeDataList[index].stoppingAmplitude[distIdx]) *
(dist-fRgeDataList[index].stoppingDistance[distIdx])/(fRgeDataList[index].stoppingDistance[distIdx+1]-fRgeDataList[index].stoppingDistance[distIdx]);
}
return rgeVal;
}
//--------------------------------------------------------------------------
// GetRgeValue
//--------------------------------------------------------------------------
/**
*
* \param energy in (keV)
* \param dist in (nm)
*/
Double_t PMPRgeHandler::GetRgeValue(const Double_t energy, const Double_t dist)
{
// check if energy is present in rge data list
Int_t idx = -1;
for (UInt_t i=0; i<fRgeDataList.size(); i++) {
if (energy == fRgeDataList[i].energy) {
idx = i;
break;
}
}
// energy not found
if (idx == -1)
return -1.0;
return GetRgeValue(idx, dist);
}
//--------------------------------------------------------------------------
// LoadRgeData
//--------------------------------------------------------------------------
/**
*
*/
Bool_t PMPRgeHandler::LoadRgeData(const PStringVector &rgeDataPathList, const PDoubleVector &rgeDataEnergyList)
{
std::ifstream fin;
PMPRgeData data;
Int_t idx=0;
TString dataName, tstr;
char line[512];
int result;
double dist, val;
for (UInt_t i=0; i<rgeDataPathList.size(); i++) {
// open rge-file for reading
fin.open(rgeDataPathList[i].Data(), std::iostream::in);
if (!fin.is_open()) {
std::cout << std::endl << "PMPRgeHandler::LoadRgeData **ERROR**";
std::cout << std::endl << " Could not open file " << rgeDataPathList[i].Data();
std::cout << std::endl;
return false;
}
// keep energy (in keV)
data.energy = rgeDataEnergyList[i]/1000.0;
// read msr-file
idx = 0;
while (!fin.eof()) {
// read a line
fin.getline(line, sizeof(line));
idx++;
// ignore first line
if (idx <= 1)
continue;
// ignore empty lines
tstr = line;
if (tstr.IsWhitespace())
continue;
// get values
result = sscanf(line, "%lf %lf", &dist, &val);
// check if data are valid
if (result != 2) {
fin.close();
return false;
}
// feed fRgeDataList
data.stoppingDistance.push_back(dist/10.0); // keep distancies in (nm)
data.stoppingAmplitude.push_back(val);
}
// normalize stopping distribution
Double_t norm = 0.0;
for (UInt_t j=0; j<data.stoppingAmplitude.size(); j++)
norm += data.stoppingAmplitude[j];
norm *= (data.stoppingDistance[1] - data.stoppingDistance[0]);
for (UInt_t j=0; j<data.stoppingAmplitude.size(); j++)
data.stoppingAmplitude[j] /= norm;
// keep data
fRgeDataList.push_back(data);
// clean up
data.stoppingAmplitude.clear();
data.stoppingDistance.clear();
fin.close();
}
return true;
}

View File

@ -1,53 +0,0 @@
/***************************************************************************
PMPRgeHandler.h
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
***************************************************************************/
/***************************************************************************
* Copyright (C) 2011-2019 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef _PMPRGEHANDLER_H_
#define _PMPRGEHANDLER_H_
#include "PMagProximity.h"
class PMPRgeHandler
{
public:
PMPRgeHandler(const PStringVector &rgeDataPathList, const PDoubleVector &rgeDataEnergyList);
virtual ~PMPRgeHandler();
virtual Bool_t IsValid() { return fIsValid; }
virtual Int_t GetRgeEnergyIndex(const Double_t energy);
virtual Double_t GetRgeValue(const Double_t energy, const Double_t dist);
virtual Double_t GetRgeValue(const Int_t index, const Double_t dist);
private:
Bool_t fIsValid;
PMPRgeDataList fRgeDataList;
virtual Bool_t LoadRgeData(const PStringVector &rgeDataPathList, const PDoubleVector &rgeDataEnergyList);
};
#endif // _PMPRGEHANDLER_H_

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2011-2019 by Andreas Suter *
* Copyright (C) 2011-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2011-2019 by Andreas Suter *
* Copyright (C) 2011-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2011-2019 by Andreas Suter *
* Copyright (C) 2011-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2011-2019 by Andreas Suter *
* Copyright (C) 2011-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -10,7 +10,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2011-2019 by Andreas Suter *
* Copyright (C) 2011-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@ -89,7 +89,7 @@ PMagProximityFitterGlobal::PMagProximityFitterGlobal()
}
// load all the TRIM.SP rge-files
fRgeHandler = new PMPRgeHandler(fStartupHandler->GetTrimSpDataPathList(), fStartupHandler->GetTrimSpDataVectorList());
fRgeHandler = new PRgeHandler();
if (!fRgeHandler->IsValid()) {
std::cout << std::endl << ">> PMagProximityFitterGlobal::PMagProximityFitterGlobal **PANIC ERROR**";
std::cout << std::endl << ">> rge data handler too unhappy. Will terminate unfriendly, sorry.";

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2019 by Andreas Suter *
* Copyright (C) 2009-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@ -32,7 +32,7 @@
#include "PUserFcnBase.h"
#include "PMPStartupHandler.h"
#include "PMPRgeHandler.h"
#include "PRgeHandler.h"
class PMagProximityFitterGlobal
{
@ -42,15 +42,15 @@ class PMagProximityFitterGlobal
Bool_t IsValid() { return fValid; }
virtual void CalculateField(const std::vector<Double_t> &param) const;
virtual Int_t GetEnergyIndex(const Double_t energy) { return fRgeHandler->GetRgeEnergyIndex(energy); }
virtual Double_t GetMuonStoppingDensity(const Int_t energyIndex, const Double_t z) const { return fRgeHandler->GetRgeValue(energyIndex, z); }
virtual Int_t GetEnergyIndex(const Double_t energy) { return fRgeHandler->GetEnergyIndex(energy); }
virtual Double_t GetMuonStoppingDensity(const Int_t energyIndex, const Double_t z) const { return fRgeHandler->Get_n(energyIndex, z); }
virtual Double_t GetMagneticField(const Double_t z) const;
private:
Bool_t fValid;
PMPStartupHandler *fStartupHandler;
PMPRgeHandler *fRgeHandler;
PRgeHandler *fRgeHandler;
mutable std::vector<Double_t> fPreviousParam;

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2011-2019 by Andreas Suter *
* Copyright (C) 2011-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -3,13 +3,14 @@
<comment>
contains meta file infromation of the needed trim.sp files.
</comment>
<trim_sp_part>
<data_path>/mnt/home/nemu/analysis/2010/EuS-Co/trimsp2/EuS-Co_E</data_path>
<trim_sp>
<data_path>/afs/psi.ch/project/nemu/analysis/2010/EuS-Co/trimsp2</data_path>
<rge_fln_pre>EuS-Co_E</rge_fln_pre>
<energy_list>
<energy>5030</energy>
<energy>6330</energy>
<energy>7530</energy>
<energy>8730</energy>
</energy_list>
</trim_sp_part>
</trim_sp>
</mag_proximity>

View File

@ -15,8 +15,10 @@
<xs:complexType name="musrRoot">
<xs:sequence>
<xs:element ref="histos"/>
<xs:element name="RunHeader" type="runHeaderFolder"/>
<xs:choice>
<xs:element ref="histos"/>
<xs:element name="RunHeader" type="runHeaderFolder"/>
</xs:choice>
<xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/> <!-- here can go any additional stuff you like -->
</xs:sequence>
</xs:complexType>
@ -100,8 +102,8 @@
<xs:element name="Generic_Validator_URL" type="TString"/>
<xs:element name="Specific_Validator_URL" type="TString"/>
<xs:element name="Generator" type="TString"/>
<xs:element name="Proposal Number" type="Int_t" minOccurs="0" maxOccurs="1"/>
<xs:element name="Main Proposer" type="TString" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Proposal_Number" type="Int_t" minOccurs="0" maxOccurs="1"/>
<xs:element name="Main_Proposer" type="TString" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="File_Name" type="TString"/>
<xs:element name="Run_Title" type="TString"/>
<xs:element name="Run_Number" type="Int_t"/>

View File

@ -14,8 +14,10 @@
<xs:complexType name="musrRoot">
<xs:sequence>
<xs:element ref="histos"/>
<xs:element name="RunHeader" type="runHeaderFolder"/>
<xs:choice>
<xs:element ref="histos"/>
<xs:element name="RunHeader" type="runHeaderFolder"/>
</xs:choice>
<xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/> <!-- here can go any additional stuff you like -->
</xs:sequence>
</xs:complexType>
@ -101,8 +103,8 @@
<xs:element name="Generic_Validator_URL" type="TString"/>
<xs:element name="Specific_Validator_URL" type="TString"/>
<xs:element name="Generator" type="TString"/>
<xs:element name="Proposal Number" type="Int_t" minOccurs="0" maxOccurs="1"/>
<xs:element name="Main Proposer" type="TString" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Proposal_Number" type="Int_t" minOccurs="0" maxOccurs="1"/>
<xs:element name="Main_Proposer" type="TString" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="File_Name" type="TString"/>
<xs:element name="Run_Title" type="TString"/>
<xs:element name="Run_Number" type="Int_t"/>

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@ -394,6 +394,68 @@ Bool_t TMusrRunHeader::FillFolder(TFolder *folder)
return true;
}
//--------------------------------------------------------------------------
// GetTypeOfPath (public)
//--------------------------------------------------------------------------
/**
* <p>Get type of path-name, e.g. RunInfo/Sample Name.
*
* @param pathName path-name for which the type is requested
*
* @return the type, or 'undef' if path-name is not found.
*/
TString TMusrRunHeader::GetTypeOfPath(TString pathName)
{
TString type("undef");
// find pathName
for (Int_t i=0; i<fStringObj.size(); i++) {
if (fStringObj[i].GetPathName() == pathName) {
type = fStringObj[i].GetType();
return type;
}
}
for (Int_t i=0; i<fIntObj.size(); i++) {
if (fIntObj[i].GetPathName() == pathName) {
type = fIntObj[i].GetType();
return type;
}
}
for (Int_t i=0; i<fDoubleObj.size(); i++) {
if (fDoubleObj[i].GetPathName() == pathName) {
type = fDoubleObj[i].GetType();
return type;
}
}
for (Int_t i=0; i<fMusrRunPhysQuantityObj.size(); i++) {
if (fMusrRunPhysQuantityObj[i].GetPathName() == pathName) {
type = fMusrRunPhysQuantityObj[i].GetType();
return type;
}
}
for (Int_t i=0; i<fStringVectorObj.size(); i++) {
if (fStringVectorObj[i].GetPathName() == pathName) {
type = fStringVectorObj[i].GetType();
return type;
}
}
for (Int_t i=0; i<fIntVectorObj.size(); i++) {
if (fIntVectorObj[i].GetPathName() == pathName) {
type = fIntVectorObj[i].GetType();
return type;
}
}
for (Int_t i=0; i<fDoubleVectorObj.size(); i++) {
if (fDoubleVectorObj[i].GetPathName() == pathName) {
type = fDoubleVectorObj[i].GetType();
return type;
}
}
return type;
}
//--------------------------------------------------------------------------
// Get (public)
//--------------------------------------------------------------------------

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@ -133,6 +133,8 @@ public:
virtual Bool_t ExtractAll(TFolder *folder);
virtual Bool_t ExtractHeaderInformation(TObjArray *headerInfo, TString path);
virtual TString GetTypeOfPath(TString pathName);
virtual void Get(TString pathName, TString &value, Bool_t &ok);
virtual void Get(TString pathName, Int_t &value, Bool_t &ok);
virtual void Get(TString pathName, Double_t &value, Bool_t &ok);

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2020 by Andreas Suter *
* Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -36,7 +36,7 @@ set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "\$\{prefix\}")
set(libdir "\$\{exec_prefix\}/lib")
set(includedir "\$\{prefix\}/include")
set(PNL_PIPPARDFITTER_VERSION "1.0.0")
set(PNL_PIPPARDFITTER_VERSION "1.1.0")
set(PNL_PIPPARDFITTER_LIBRARY_NAME "PNL_PippardFitter")
configure_file("PNL_PippardFitter.pc.in" "PNL_PippardFitter.pc" @ONLY)
@ -44,7 +44,6 @@ configure_file("PNL_PippardFitter.pc.in" "PNL_PippardFitter.pc" @ONLY)
add_library(PNL_PippardFitter SHARED
PNL_PippardFitter.cpp
PNL_PippardFitterDict.cxx
PNL_RgeHandler.cpp
PNL_StartupHandler.cpp
PNL_StartupHandlerDict.cxx
)
@ -63,7 +62,7 @@ set_target_properties(PNL_PippardFitter
)
#--- add library dependencies -------------------------------------------------
target_link_libraries(PNL_PippardFitter ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PUserFcnBase)
target_link_libraries(PNL_PippardFitter ${Boost_LIBRARIES} ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PRgeHandler PUserFcnBase)
#--- install PNL_PippardFitter solib ------------------------------------------
install(TARGETS PNL_PippardFitter DESTINATION lib)
@ -80,9 +79,7 @@ install(
#--- install PNL_PippardFitter header -----------------------------------------
install(
FILES
PNonlocal.h
PNL_PippardFitter.h
PNL_RgeHandler.h
PNL_StartupHandler.h
DESTINATION
include

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2019 by Andreas Suter *
* Copyright (C) 2009-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@ -31,7 +31,6 @@
#include <cmath>
#include <iostream>
using namespace std;
#include <TSAXParser.h>
#include <TMath.h>
@ -51,10 +50,6 @@ ClassImp(PNL_PippardFitterGlobal)
*/
PNL_PippardFitterGlobal::PNL_PippardFitterGlobal()
{
fValid = true;
fStartupHandler = 0;
fRgeHandler = 0;
// read XML startup file
char startup_path_name[128];
TSAXParser *saxParser = new TSAXParser();
@ -67,8 +62,8 @@ PNL_PippardFitterGlobal::PNL_PippardFitterGlobal()
Int_t status = parseXmlFile(saxParser, startup_path_name);
// check for parse errors
if (status) { // error
cout << endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal: **WARNING** Reading/parsing nonlocal_startup.xml failed.";
cout << endl;
std::cout << std::endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal: **WARNING** Reading/parsing nonlocal_startup.xml failed.";
std::cout << std::endl;
fValid = false;
}
@ -80,20 +75,20 @@ PNL_PippardFitterGlobal::PNL_PippardFitterGlobal()
// check if everything went fine with the startup handler
if (!fStartupHandler->IsValid()) {
cout << endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal **PANIC ERROR**";
cout << endl << ">> startup handler too unhappy. Will terminate unfriendly, sorry.";
cout << endl;
std::cout << std::endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal **PANIC ERROR**";
std::cout << std::endl << ">> startup handler too unhappy. Will terminate unfriendly, sorry.";
std::cout << std::endl;
fValid = false;
}
fFourierPoints = fStartupHandler->GetFourierPoints();
// load all the TRIM.SP rge-files
fRgeHandler = new PNL_RgeHandler(fStartupHandler->GetTrimSpDataPathList(), fStartupHandler->GetTrimSpDataVectorList());
fRgeHandler = new PRgeHandler("./nonlocal_startup.xml");
if (!fRgeHandler->IsValid()) {
cout << endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal **PANIC ERROR**";
cout << endl << ">> rge data handler too unhappy. Will terminate unfriendly, sorry.";
cout << endl;
std::cout << std::endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal **PANIC ERROR**";
std::cout << std::endl << ">> rge data handler too unhappy. Will terminate unfriendly, sorry.";
std::cout << std::endl;
fValid = false;
}
@ -182,16 +177,16 @@ void PNL_PippardFitterGlobal::CalculateField(const std::vector<Double_t> &param)
if (fFieldq == 0) {
fFieldq = (fftw_complex *) fftw_malloc(sizeof(fftw_complex) * fFourierPoints);
if (fFieldq == 0) {
cout << endl << "PPippard::CalculateField(): **ERROR** couldn't allocate memory for fFieldq";
cout << endl;
std::cout << std::endl << "PPippard::CalculateField(): **ERROR** couldn't allocate memory for fFieldq";
std::cout << std::endl;
return;
}
}
if (fFieldB == 0) {
fFieldB = (fftw_complex *) fftw_malloc(sizeof(fftw_complex) * fFourierPoints);
if (fFieldB == 0) {
cout << endl << "PPippard::CalculateField(): **ERROR** couldn't allocate memory for fFieldB";
cout << endl;
std::cout << std::endl << "PPippard::CalculateField(): **ERROR** couldn't allocate memory for fFieldB";
std::cout << std::endl;
return;
}
}
@ -349,19 +344,6 @@ Double_t PNL_PippardFitterGlobal::XiP_T(const Double_t xi0, const Double_t meanF
ClassImp(PNL_PippardFitter)
//--------------------------------------------------------------------------
// Constructor
//--------------------------------------------------------------------------
/**
*
*/
PNL_PippardFitter::PNL_PippardFitter()
{
fValid = false;
fInvokedGlobal = false;
fPippardFitterGlobal = 0;
}
//--------------------------------------------------------------------------
// Destructor
//--------------------------------------------------------------------------
@ -387,18 +369,18 @@ PNL_PippardFitter::~PNL_PippardFitter()
* \param globalPart
* \param idx
*/
void PNL_PippardFitter::SetGlobalPart(vector<void*> &globalPart, UInt_t idx)
void PNL_PippardFitter::SetGlobalPart(std::vector<void*> &globalPart, UInt_t idx)
{
fIdxGlobal = static_cast<Int_t>(idx);
if ((Int_t)globalPart.size() <= fIdxGlobal) {
fPippardFitterGlobal = new PNL_PippardFitterGlobal();
if (fPippardFitterGlobal == 0) {
if (fPippardFitterGlobal == nullptr) {
fValid = false;
cerr << endl << ">> PNL_PippardFitter::SetGlobalPart(): **ERROR** Couldn't invoke global user function object, sorry ..." << endl;
std::cerr << std::endl << ">> PNL_PippardFitter::SetGlobalPart(): **ERROR** Couldn't invoke global user function object, sorry ..." << std::endl;
} else if (!fPippardFitterGlobal->IsValid()) {
fValid = false;
cerr << endl << ">> PNL_PippardFitter::SetGlobalPart(): **ERROR** initialization of global user function object failed, sorry ..." << endl;
std::cerr << std::endl << ">> PNL_PippardFitter::SetGlobalPart(): **ERROR** initialization of global user function object failed, sorry ..." << std::endl;
} else {
fValid = true;
fInvokedGlobal = true;
@ -447,7 +429,7 @@ Double_t PNL_PippardFitter::operator()(Double_t t, const std::vector<Double_t> &
fPippardFitterGlobal->CalculateField(param);
Int_t energyIndex = fPippardFitterGlobal->GetEnergyIndex(param[0]);
if (energyIndex == -1) { // energy not found
cerr << endl << ">> PNL_PippardFitter::operator() energy " << param[0] << " not found. Will terminate." << endl;
std::cerr << std::endl << ">> PNL_PippardFitter::operator() energy " << param[0] << " not found. Will terminate." << std::endl;
assert(0);
}

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2019 by Andreas Suter *
* Copyright (C) 2009-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@ -36,9 +36,10 @@
//#endif
#include <fftw3.h>
#include "PMusr.h"
#include "PUserFcnBase.h"
#include "PNL_StartupHandler.h"
#include "PNL_RgeHandler.h"
#include "PRgeHandler.h"
class PNL_PippardFitterGlobal
{
@ -49,15 +50,15 @@ class PNL_PippardFitterGlobal
Bool_t IsValid() { return fValid; }
virtual void SetTempExponent(const Double_t nn) { f_nn = nn; }
virtual void CalculateField(const std::vector<Double_t> &param) const;
virtual Int_t GetEnergyIndex(const Double_t energy) { return fRgeHandler->GetRgeEnergyIndex(energy); }
virtual Double_t GetMuonStoppingDensity(const Int_t energyIndex, const Double_t z) const { return fRgeHandler->GetRgeValue(energyIndex, z); }
virtual Int_t GetEnergyIndex(const Double_t energy) { return fRgeHandler->GetEnergyIndex(energy); }
virtual Double_t GetMuonStoppingDensity(const Int_t energyIndex, const Double_t z) const { return fRgeHandler->Get_n(energyIndex, z); }
virtual Double_t GetMagneticField(const Double_t z) const;
private:
Bool_t fValid;
Bool_t fValid{true};
PNL_StartupHandler *fStartupHandler;
PNL_RgeHandler *fRgeHandler;
PNL_StartupHandler *fStartupHandler{nullptr};
PRgeHandler *fRgeHandler{nullptr};
mutable std::vector<Double_t> fPreviousParam;
@ -85,21 +86,21 @@ class PNL_PippardFitterGlobal
class PNL_PippardFitter : public PUserFcnBase
{
public:
PNL_PippardFitter();
PNL_PippardFitter() {}
virtual ~PNL_PippardFitter();
virtual Bool_t NeedGlobalPart() const { return true; }
virtual void SetGlobalPart(vector<void*> &globalPart, UInt_t idx);
virtual void SetGlobalPart(std::vector<void*> &globalPart, UInt_t idx);
virtual Bool_t GlobalPartIsValid() const;
virtual Double_t operator()(Double_t t, const std::vector<Double_t> &param) const;
private:
Bool_t fValid;
Bool_t fInvokedGlobal;
Bool_t fValid{true};
Bool_t fInvokedGlobal{false};
Int_t fIdxGlobal;
PNL_PippardFitterGlobal *fPippardFitterGlobal;
PNL_PippardFitterGlobal *fPippardFitterGlobal{nullptr};
ClassDef(PNL_PippardFitter, 1)
};

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2019 by Andreas Suter *
* Copyright (C) 2009-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -1,208 +0,0 @@
/***************************************************************************
PNL_RgeHandler.cpp
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
$Id$
***************************************************************************/
/***************************************************************************
* Copyright (C) 2009 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <cassert>
#include <iostream>
#include <fstream>
#include "PNL_RgeHandler.h"
//--------------------------------------------------------------------------
// Constructor
//--------------------------------------------------------------------------
/**
*
*/
PNL_RgeHandler::PNL_RgeHandler(const PStringVector &rgeDataPathList, const PDoubleVector &rgeDataEnergyList)
{
fIsValid = false;
fIsValid = LoadRgeData(rgeDataPathList, rgeDataEnergyList);
}
//--------------------------------------------------------------------------
// Destructor
//--------------------------------------------------------------------------
/**
*
*/
PNL_RgeHandler::~PNL_RgeHandler()
{
fRgeDataList.clear();
}
//--------------------------------------------------------------------------
// GetRgeEnergyIndex
//--------------------------------------------------------------------------
/**
*
*/
Int_t PNL_RgeHandler::GetRgeEnergyIndex(const Double_t energy)
{
Int_t idx = -1;
for (UInt_t i=0; i<fRgeDataList.size(); i++) {
if (energy == fRgeDataList[i].energy) {
idx = i;
break;
}
}
return idx;
}
//--------------------------------------------------------------------------
// GetRgeValue
//--------------------------------------------------------------------------
/**
*
*/
Double_t PNL_RgeHandler::GetRgeValue(const Int_t index, const Double_t dist)
{
Double_t rgeVal = 0.0;
// find the proper position index
Int_t distIdx = -2;
for (UInt_t i=0; i<fRgeDataList[index].stoppingDistance.size(); i++) {
if (fRgeDataList[index].stoppingDistance[i] > dist) {
distIdx = i-1;
break;
}
}
// get the proper n(z) value
if (distIdx < 0) {
rgeVal = 0.0;
} else {
rgeVal = fRgeDataList[index].stoppingAmplitude[distIdx] +
(fRgeDataList[index].stoppingAmplitude[distIdx+1] - fRgeDataList[index].stoppingAmplitude[distIdx]) *
(dist-fRgeDataList[index].stoppingDistance[distIdx])/(fRgeDataList[index].stoppingDistance[distIdx+1]-fRgeDataList[index].stoppingDistance[distIdx]);
}
return rgeVal;
}
//--------------------------------------------------------------------------
// GetRgeValue
//--------------------------------------------------------------------------
/**
*
*/
Double_t PNL_RgeHandler::GetRgeValue(const Double_t energy, const Double_t dist)
{
// check if energy is present in rge data list
Int_t idx = -1;
for (UInt_t i=0; i<fRgeDataList.size(); i++) {
if (energy == fRgeDataList[i].energy) {
idx = i;
break;
}
}
// energy not found
if (idx == -1)
return -1.0;
return GetRgeValue(idx, dist);
}
//--------------------------------------------------------------------------
// LoadRgeData
//--------------------------------------------------------------------------
/**
*
*/
Bool_t PNL_RgeHandler::LoadRgeData(const PStringVector &rgeDataPathList, const PDoubleVector &rgeDataEnergyList)
{
std::ifstream fin;
PNL_RgeData data;
TString tstr;
char line[512];
int result;
double dist, val;
for (UInt_t i=0; i<rgeDataPathList.size(); i++) {
// open rge-file for reading
fin.open(rgeDataPathList[i].Data(), std::iostream::in);
if (!fin.is_open()) {
std::cout << std::endl << "PNL_RgeHandler::LoadRgeData **ERROR**";
std::cout << std::endl << " Could not open file " << rgeDataPathList[i].Data();
std::cout << std::endl;
return false;
}
// keep energy (in keV)
data.energy = rgeDataEnergyList[i]/1000.0;
// read msr-file
while (!fin.eof()) {
// read a line
fin.getline(line, sizeof(line));
// ignore empty lines
tstr = line;
if (tstr.IsWhitespace())
continue;
// get values
result = sscanf(line, "%lf %lf", &dist, &val);
// check if data are valid, otherwise ignore it
if (result != 2) {
continue;
}
// feed fRgeDataList
data.stoppingDistance.push_back(dist/10.0);
data.stoppingAmplitude.push_back(val);
}
// normalize stopping distribution
Double_t norm = 0.0;
for (UInt_t j=0; j<data.stoppingAmplitude.size(); j++)
norm += data.stoppingAmplitude[j];
norm *= (data.stoppingDistance[1] - data.stoppingDistance[0]);
for (UInt_t j=0; j<data.stoppingAmplitude.size(); j++)
data.stoppingAmplitude[j] /= norm;
// keep data
fRgeDataList.push_back(data);
// clean up
data.stoppingAmplitude.clear();
data.stoppingDistance.clear();
fin.close();
}
return true;
}

View File

@ -1,55 +0,0 @@
/***************************************************************************
PNL_RgeHandler.h
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
$Id$
***************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2019 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef _PNL_RGEHANDLER_H_
#define _PNL_RGEHANDLER_H_
#include "PNonlocal.h"
class PNL_RgeHandler
{
public:
PNL_RgeHandler(const PStringVector &rgeDataPathList, const PDoubleVector &rgeDataEnergyList);
virtual ~PNL_RgeHandler();
virtual Bool_t IsValid() { return fIsValid; }
virtual Int_t GetRgeEnergyIndex(const Double_t energy);
virtual Double_t GetRgeValue(const Double_t energy, const Double_t dist);
virtual Double_t GetRgeValue(const Int_t index, const Double_t dist);
private:
Bool_t fIsValid;
PNL_RgeDataList fRgeDataList;
virtual Bool_t LoadRgeData(const PStringVector &rgeDataPathList, const PDoubleVector &rgeDataEnergyList);
};
#endif // _PNL_RGEHANDLER_H_

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2019 by Andreas Suter *
* Copyright (C) 2009-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@ -32,6 +32,8 @@
#include <iostream>
#include <fstream>
#include <boost/filesystem.hpp>
#include "PNL_StartupHandler.h"
ClassImpQ(PNL_StartupHandler)
@ -44,46 +46,26 @@ ClassImpQ(PNL_StartupHandler)
*/
PNL_StartupHandler::PNL_StartupHandler()
{
fIsValid = true;
fStartupFileFound = false;
fStartupFilePath = "";
fFourierPoints = 0;
fTrimSpDataPath = TString("");
// get default path (for the moment only linux like)
char startup_path_name[512];
char *home_str=0;
// check if the startup file is found in the current directory
strcpy(startup_path_name, "./nonlocal_startup.xml");
if (StartupFileExists(startup_path_name)) {
if (boost::filesystem::exists(startup_path_name)) {
fStartupFileFound = true;
fStartupFilePath = TString(startup_path_name);
} else { // startup file is not found in the current directory
std::cout << std::endl << "PNL_StartupHandler(): **WARNING** Couldn't find nonlocal_startup.xml in the current directory, will try default one." << std::endl;
home_str = getenv("HOME");
snprintf(startup_path_name, sizeof(startup_path_name), "%s/.musrfit/nonlocal_startup.xml", home_str);
if (StartupFileExists(startup_path_name)) {
if (boost::filesystem::exists(startup_path_name)) {
fStartupFileFound = true;
fStartupFilePath = TString(startup_path_name);
}
}
}
//--------------------------------------------------------------------------
// Destructor
//--------------------------------------------------------------------------
/**
*
*/
PNL_StartupHandler::~PNL_StartupHandler()
{
fTrimSpDataPathList.clear();
fTrimSpDataEnergyList.clear();
}
//--------------------------------------------------------------------------
// OnStartDocument
//--------------------------------------------------------------------------
@ -124,10 +106,6 @@ void PNL_StartupHandler::OnStartElement(const char *str, const TList *attributes
{
if (!strcmp(str, "fourier_points")) {
fKey = eFourierPoints;
} else if (!strcmp(str, "data_path")) {
fKey = eDataPath;
} else if (!strcmp(str, "energy")) {
fKey = eEnergy;
}
}
@ -167,23 +145,6 @@ void PNL_StartupHandler::OnCharacters(const char *str)
std::cout << std::endl;
}
break;
case eDataPath:
fTrimSpDataPath = str;
break;
case eEnergy:
tstr = str;
if (tstr.IsFloat()) {
fTrimSpDataEnergyList.push_back(tstr.Atof());
tstr = fTrimSpDataPath;
tstr += str;
tstr += ".rge";
fTrimSpDataPathList.push_back(tstr);
} else {
std::cout << std::endl << "PNL_StartupHandler::OnCharacters: **ERROR** when finding energy:";
std::cout << std::endl << "\"" << str << "\" is not a floating point number, will ignore it and use the default value.";
std::cout << std::endl;
}
break;
default:
break;
}
@ -257,29 +218,6 @@ void PNL_StartupHandler::OnCdataBlock(const char *str, Int_t len)
// nothing to be done for now
}
//--------------------------------------------------------------------------
// StartupFileExists
//--------------------------------------------------------------------------
/**
* <p>
*
*/
bool PNL_StartupHandler::StartupFileExists(char *fln)
{
bool result = false;
std::ifstream ifile(fln);
if (ifile.fail()) {
result = false;
} else {
result = true;
ifile.close();
}
return result;
}
// -------------------------------------------------------------------------
// end
// -------------------------------------------------------------------------

View File

@ -5,12 +5,10 @@
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
$Id$
***************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2019 by Andreas Suter *
* Copyright (C) 2009-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@ -36,13 +34,11 @@
#include <TQObject.h>
#include <TString.h>
#include "PNonlocal.h"
class PNL_StartupHandler : public TObject
{
public:
PNL_StartupHandler();
virtual ~PNL_StartupHandler();
virtual ~PNL_StartupHandler() {}
virtual void OnStartDocument(); // SLOT
virtual void OnEndDocument(); // SLOT
@ -58,26 +54,18 @@ class PNL_StartupHandler : public TObject
virtual bool IsValid() { return fIsValid; }
virtual TString GetStartupFilePath() { return fStartupFilePath; }
virtual const Int_t GetFourierPoints() const { return fFourierPoints; }
virtual const PStringVector GetTrimSpDataPathList() const { return fTrimSpDataPathList; }
virtual const PDoubleVector GetTrimSpDataVectorList() const { return fTrimSpDataEnergyList; }
virtual bool StartupFileFound() { return fStartupFileFound; }
private:
enum EKeyWords {eEmpty, eComment, eFourierPoints, eDataPath, eEnergy};
enum EKeyWords {eEmpty, eFourierPoints};
EKeyWords fKey;
bool fIsValid;
bool fIsValid{true};
bool fStartupFileFound;
TString fStartupFilePath;
bool fStartupFileFound{false};
TString fStartupFilePath{""};
Int_t fFourierPoints;
TString fTrimSpDataPath;
PStringVector fTrimSpDataPathList;
PDoubleVector fTrimSpDataEnergyList;
bool StartupFileExists(char *fln);
Int_t fFourierPoints{0};
ClassDef(PNL_StartupHandler, 1)
};

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2019 by Andreas Suter *
* Copyright (C) 2009-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -1,65 +0,0 @@
/***************************************************************************
PNonlocal.h
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
***************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2019 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef _PNONLOCAL_H_
#define _PNONLOCAL_H_
#include <vector>
#include <TString.h>
//-------------------------------------------------------------
/**
* <p> typedef to make to code more readable.
*/
typedef std::vector<TString> PStringVector;
//-------------------------------------------------------------
/**
* <p> typedef to make to code more readable.
*/
typedef std::vector<Double_t> PDoubleVector;
//-------------------------------------------------------------
/**
* <p>
*/
typedef struct {
Double_t energy;
PDoubleVector stoppingDistance;
PDoubleVector stoppingAmplitude;
} PNL_RgeData;
//-------------------------------------------------------------
/**
* <p>
*/
typedef std::vector<PNL_RgeData> PNL_RgeDataList;
#endif // _PNONLOCAL_H_

View File

@ -1,25 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<nonlocal xmlns="http://nemu.web.psi.ch/musrfit/nonlocal">
<comment>
trim.sp meta information
Fourier and TrimSp information
</comment>
<nonlocal_par>
<fourier_points>262144</fourier_points>
</nonlocal_par>
<trim_sp_part>
<data_path>/afs/psi.ch/project/nemu/analysis/2009/Nonlocal/trimsp/InSne</data_path>
<trim_sp>
<data_path>./profiles/</data_path>
<rge_fln_pre>Sn_E</rge_fln_pre>
<energy_list>
<energy>2.5</energy>
<energy>4.0</energy>
<energy>6.0</energy>
<energy>8.0</energy>
<energy>10.0</energy>
<energy>12.5</energy>
<energy>14.1</energy>
<energy>17.5</energy>
<energy>22.0</energy>
<energy>25.0</energy>
<energy>28.2</energy>
<energy>1000</energy>
<energy>2000</energy>
<energy>4000</energy>
<energy>6000</energy>
<energy>8000</energy>
<energy>10000</energy>
<energy>12000</energy>
<energy>14100</energy>
<energy>18000</energy>
<energy>22000</energy>
<energy>25000</energy>
<energy>27300</energy>
</energy_list>
</trim_sp_part>
</trim_sp>
</nonlocal>

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