Compare commits
No commits in common. "root6" and "v1.9.0" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
# ignore all files generated from an in-repo build
|
||||
build/
|
@ -1,7 +1,7 @@
|
||||
# - musrfit
|
||||
cmake_minimum_required(VERSION 3.17)
|
||||
|
||||
project(musrfit VERSION 1.9.9 LANGUAGES C CXX)
|
||||
project(musrfit VERSION 1.9.0 LANGUAGES C CXX)
|
||||
|
||||
#--- musrfit specific options -------------------------------------------------
|
||||
option(nexus "build optional NeXus support. Needed for ISIS" OFF)
|
||||
@ -109,13 +109,13 @@ find_package(FFTW3 REQUIRED)
|
||||
find_package(LibXml2 REQUIRED)
|
||||
|
||||
#--- check for OpenMP ---------------------------------------------------------
|
||||
if (try_OpenMP)
|
||||
if (try_OpenMP AND NOT APPLE)
|
||||
find_package(OpenMP)
|
||||
if (OpenMP_CXX_FOUND)
|
||||
if (OpenMP_FOUND)
|
||||
add_definitions(-DHAVE_GOMP)
|
||||
set(HAVE_GOMP 1 CACHE INTERNAL "Have GOMP")
|
||||
endif (OpenMP_CXX_FOUND)
|
||||
endif (try_OpenMP)
|
||||
endif (OpenMP_FOUND)
|
||||
endif (try_OpenMP AND NOT APPLE)
|
||||
|
||||
#--- check for Qt -------------------------------------------------------------
|
||||
if (qt_based_tools)
|
||||
@ -200,10 +200,8 @@ endif (qt_based_tools)
|
||||
|
||||
#--- if NeXus check also for HDF4, HDF5, and MXML -----------------------------
|
||||
if (nexus)
|
||||
find_package(HDF5 COMPONENTS CXX REQUIRED)
|
||||
if (HAVE_HDF4)
|
||||
find_package(HDF4 REQUIRED)
|
||||
endif (HAVE_HDF4)
|
||||
find_package(HDF5 COMPONENTS CXX REQUIRED )
|
||||
find_package(HDF4 REQUIRED)
|
||||
find_package(NEXUS REQUIRED)
|
||||
add_definitions(-DPNEXUS_ENABLED)
|
||||
endif (nexus)
|
||||
@ -224,48 +222,10 @@ else ()
|
||||
set(IS_GIT_REPO 0)
|
||||
endif ()
|
||||
|
||||
#--- start create git-revision.h ----------------------------------------------
|
||||
if (IS_GIT_REPO)
|
||||
execute_process(COMMAND sh ${CMAKE_SOURCE_DIR}/src/git_revision.sh)
|
||||
|
||||
set(HAVE_GIT_REV_H "-DHAVE_GIT_REV_H")
|
||||
set(GIT_REV_H "git-revision.h")
|
||||
else (IS_GIT_REPO)
|
||||
set(HAVE_GIT_REV_H "")
|
||||
set(GIT_REV_H "")
|
||||
endif (IS_GIT_REPO)
|
||||
|
||||
#--- end create git-revision.h ------------------------------------------------
|
||||
|
||||
#--- rpath related things -----------------------------------------------------
|
||||
# use, i.e. don't skip the full RPATH for the build tree
|
||||
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||
|
||||
# when building, don't use the install RPATH already
|
||||
# (but later on when installing)
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||
|
||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
|
||||
# add the automatically determined parts of the RPATH
|
||||
# which point to directories outside the build tree to the install RPATH
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
# the RPATH to be used when installing, but only if it's not a system directory
|
||||
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
|
||||
if("${isSystemDir}" STREQUAL "-1")
|
||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
endif("${isSystemDir}" STREQUAL "-1")
|
||||
set(rpath ${CMAKE_INSTALL_RPATH})
|
||||
string(APPEND rpath ";/usr/local/lib")
|
||||
set(CMAKE_INSTALL_RPATH "${rpath}")
|
||||
|
||||
#--- propagate to the sub-directories -----------------------------------------
|
||||
add_subdirectory(src)
|
||||
|
||||
#--- write summary of the installation
|
||||
cmake_host_system_information(RESULT PROCESSOR QUERY PROCESSOR_DESCRIPTION)
|
||||
|
||||
message("")
|
||||
message("|-----------------------------------------------------------------------|")
|
||||
message("| |")
|
||||
@ -273,9 +233,8 @@ message("| Summary
|
||||
message("| |")
|
||||
message("|-----------------------------------------------------------------------|")
|
||||
message("")
|
||||
message(" System: ${CMAKE_HOST_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR} - ${CMAKE_HOST_SYSTEM_VERSION}")
|
||||
message(" Processor: ${PROCESSOR} (${CMAKE_SYSTEM_PROCESSOR})")
|
||||
message(" ----------")
|
||||
message(" System: ${CMAKE_HOST_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR} - ${CMAKE_HOST_SYSTEM_VERSION}")
|
||||
message(" -------")
|
||||
message("")
|
||||
message(" musrfit Version: ${musrfit_VERSION}")
|
||||
message(" ----------------")
|
||||
@ -301,11 +260,7 @@ endif (OpenMP_FOUND)
|
||||
|
||||
if (nexus)
|
||||
message("")
|
||||
if (HAVE_HDF4)
|
||||
message(" HDF4 found in ${HDF4_INCLUDE_DIRS}")
|
||||
else (HAVE_HDF4)
|
||||
message(" HDF4 not present.")
|
||||
endif (HAVE_HDF4)
|
||||
message(" HDF4 found in ${HDF4_INCLUDE_DIRS}")
|
||||
message(" HDF5 found in ${HDF5_INCLUDE_DIRS}, Version: ${HDF5_VERSION}")
|
||||
message(" NeXus found in ${NEXUS_INCLUDE_DIR}, Version: ${NEXUS_VERSION_STRING}")
|
||||
endif (nexus)
|
||||
|
48
ChangeLog
48
ChangeLog
@ -12,54 +12,6 @@ or
|
||||
|
||||
https://bitbucket.org/muonspin/musrfit/commits/all
|
||||
|
||||
Release of V1.9.9, 2025/06/08
|
||||
=============================
|
||||
|
||||
add THEORY functions for local Gaussian / global Lorentzian, and a simple F-mu-F function.
|
||||
|
||||
Release of V1.9.8, 2025/03/24
|
||||
=============================
|
||||
|
||||
add a user interface option to export data from a msr-file view (single- or multiple files).
|
||||
|
||||
Release of V1.9.7, 2025/01/18
|
||||
=============================
|
||||
|
||||
allow spaces in RUN block path-filename
|
||||
|
||||
Release of V1.9.6, 2024/12/02
|
||||
=============================
|
||||
|
||||
added jump to block feature in musredit.
|
||||
|
||||
|
||||
Release of V1.9.5, 2024/06/24
|
||||
=============================
|
||||
|
||||
yaml export of ALL fit-parameters, as initiated by R.M.L. McFadden.
|
||||
|
||||
Release of V1.9.4, 2024/06/08
|
||||
=============================
|
||||
|
||||
enable OpenMP for macOS.
|
||||
|
||||
Release of V1.9.3, 2024/04/19
|
||||
=============================
|
||||
|
||||
fix of function string generation from AST.
|
||||
|
||||
Release of V1.9.2, 2023/10/25
|
||||
=============================
|
||||
|
||||
switch over to smart pointers wherever possible.
|
||||
|
||||
Release of V1.9.1, 2023/05/16
|
||||
=============================
|
||||
|
||||
add option [-c, --count] to dump_header which will dump the number of counts
|
||||
per detector and the total number of counts. Currently for MusrRoot data format
|
||||
only. For the other data formats it will be implement asap
|
||||
|
||||
Release of V1.9.0, 2023/02/17
|
||||
=============================
|
||||
|
||||
|
@ -32,6 +32,7 @@ For a more exhaustive user documentation see:
|
||||
|
||||
<andreas.suter@psi.ch>
|
||||
|
||||
For the beta-NMR related parts, please contact Zaher Salman
|
||||
For the beta-NMR related parts, please contact
|
||||
|
||||
<zaher.salman@psi.ch>
|
||||
|
||||
|
@ -75,7 +75,7 @@ endfunction()
|
||||
#as35 endif()
|
||||
|
||||
find_path(FFTW3_INCLUDE NAMES fftw3.h
|
||||
HINTS "/usr/include" "/opt/local/include" "/app/include"
|
||||
HINTS "/usr/include" "/opt/local/include"
|
||||
)
|
||||
|
||||
find_library(FFTW3_LIBRARY fftw3)
|
||||
|
30
cmake/configure_musrfit_version_file.cmake.in
Normal file
30
cmake/configure_musrfit_version_file.cmake.in
Normal file
@ -0,0 +1,30 @@
|
||||
# configure_musrfit_version_file.cmake.in:
|
||||
set(SRC_DIR "@CMAKE_SOURCE_DIR@")
|
||||
set(BIN_DIR "@CMAKE_CURRENT_BINARY_DIR@")
|
||||
|
||||
# Set variables
|
||||
set(CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
|
||||
set(MUSRFIT_VERSION "@MUSRFIT_VERSION@")
|
||||
|
||||
# Get the current working branch
|
||||
execute_process(
|
||||
COMMAND git rev-parse --abbrev-ref HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_BRANCH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
# Get the latest abbreviated commit hash of the working branch
|
||||
execute_process(
|
||||
COMMAND git log -1 --pretty="%h, %ci"
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_CURRENT_SHA1
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
configure_file(
|
||||
${SRC_DIR}/cmake/git-revision.h.in
|
||||
${BIN_DIR}/git-revision.h
|
||||
@ONLY
|
||||
)
|
||||
# EOF
|
BIN
doc/.DS_Store
vendored
Normal file
BIN
doc/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
doc/examples/.DS_Store
vendored
Normal file
BIN
doc/examples/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
doc/examples/ASlibs/.DS_Store
vendored
Normal file
BIN
doc/examples/ASlibs/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
doc/examples/DepthProfiles/.DS_Store
vendored
Normal file
BIN
doc/examples/DepthProfiles/.DS_Store
vendored
Normal file
Binary file not shown.
@ -1,11 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<depthProf xmlns="http://nemu.web.psi.ch/musrfit/depthProf">
|
||||
<nonlocal xmlns="http://nemu.web.psi.ch/musrfit/nonlocal">
|
||||
<comment>
|
||||
TrimSp information
|
||||
</comment>
|
||||
<trim_sp>
|
||||
<data_path>./TRIMSP/</data_path>
|
||||
<rge_fln_pre>SiC_1300x_52nm_48nm_E</rge_fln_pre>
|
||||
<energy_vect start="1000" stop="22000" step="1000"/>
|
||||
<energy_list>
|
||||
<energy>1000</energy>
|
||||
<energy>2000</energy>
|
||||
<energy>3000</energy>
|
||||
<energy>4000</energy>
|
||||
<energy>5000</energy>
|
||||
<energy>6000</energy>
|
||||
<energy>7000</energy>
|
||||
<energy>8000</energy>
|
||||
<energy>9000</energy>
|
||||
<energy>10000</energy>
|
||||
<energy>11000</energy>
|
||||
<energy>12000</energy>
|
||||
<energy>13000</energy>
|
||||
<energy>14000</energy>
|
||||
<energy>15000</energy>
|
||||
<energy>16000</energy>
|
||||
<energy>17000</energy>
|
||||
<energy>17000</energy>
|
||||
<energy>18000</energy>
|
||||
<energy>19000</energy>
|
||||
<energy>20000</energy>
|
||||
<energy>21000</energy>
|
||||
<energy>22000</energy>
|
||||
</energy_list>
|
||||
</trim_sp>
|
||||
</depthProf>
|
||||
</nonlocal>
|
||||
|
@ -1,11 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<depthProf xmlns="http://nemu.web.psi.ch/musrfit/depthProf">
|
||||
<nonlocal xmlns="http://nemu.web.psi.ch/musrfit/nonlocal">
|
||||
<comment>
|
||||
TrimSp information
|
||||
</comment>
|
||||
<trim_sp>
|
||||
<data_path>./TRIMSP/</data_path>
|
||||
<rge_fln_pre>SiC_1300x_52nm_48nm_E</rge_fln_pre>
|
||||
<energy_vect start="1000" stop="22000" step="1000"/>
|
||||
<energy_list>
|
||||
<energy>1000</energy>
|
||||
<energy>2000</energy>
|
||||
<energy>3000</energy>
|
||||
<energy>4000</energy>
|
||||
<energy>5000</energy>
|
||||
<energy>6000</energy>
|
||||
<energy>7000</energy>
|
||||
<energy>8000</energy>
|
||||
<energy>9000</energy>
|
||||
<energy>10000</energy>
|
||||
<energy>11000</energy>
|
||||
<energy>12000</energy>
|
||||
<energy>13000</energy>
|
||||
<energy>14000</energy>
|
||||
<energy>15000</energy>
|
||||
<energy>16000</energy>
|
||||
<energy>17000</energy>
|
||||
<energy>17000</energy>
|
||||
<energy>18000</energy>
|
||||
<energy>19000</energy>
|
||||
<energy>20000</energy>
|
||||
<energy>21000</energy>
|
||||
<energy>22000</energy>
|
||||
</energy_list>
|
||||
</trim_sp>
|
||||
</depthProf>
|
||||
</nonlocal>
|
||||
|
@ -1,11 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<depthProf xmlns="http://nemu.web.psi.ch/musrfit/depthProf">
|
||||
<nonlocal xmlns="http://nemu.web.psi.ch/musrfit/nonlocal">
|
||||
<comment>
|
||||
TrimSp information
|
||||
</comment>
|
||||
<trim_sp>
|
||||
<data_path>./TRIMSP/</data_path>
|
||||
<rge_fln_pre>Si10_2.0_E</rge_fln_pre>
|
||||
<energy_vect start="1000" stop="22000" step="1000"/>
|
||||
<energy_list>
|
||||
<energy>1000</energy>
|
||||
<energy>2000</energy>
|
||||
<energy>3000</energy>
|
||||
<energy>4000</energy>
|
||||
<energy>5000</energy>
|
||||
<energy>6000</energy>
|
||||
<energy>7000</energy>
|
||||
<energy>8000</energy>
|
||||
<energy>9000</energy>
|
||||
<energy>10000</energy>
|
||||
<energy>11000</energy>
|
||||
<energy>12000</energy>
|
||||
<energy>13000</energy>
|
||||
<energy>14000</energy>
|
||||
<energy>15000</energy>
|
||||
<energy>16000</energy>
|
||||
<energy>17000</energy>
|
||||
<energy>17000</energy>
|
||||
<energy>18000</energy>
|
||||
<energy>19000</energy>
|
||||
<energy>20000</energy>
|
||||
<energy>21000</energy>
|
||||
<energy>22000</energy>
|
||||
</energy_list>
|
||||
</trim_sp>
|
||||
</depthProf>
|
||||
</nonlocal>
|
||||
|
@ -1,11 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<depthProf xmlns="http://nemu.web.psi.ch/musrfit/depthProf">
|
||||
<nonlocal xmlns="http://nemu.web.psi.ch/musrfit/nonlocal">
|
||||
<comment>
|
||||
TrimSp information
|
||||
</comment>
|
||||
<trim_sp>
|
||||
<data_path>./TRIMSP/</data_path>
|
||||
<rge_fln_pre>SiO2_70nm2.0_30nm2.2_SiC_E</rge_fln_pre>
|
||||
<energy_vect start="1000" stop="22000" step="1000"/>
|
||||
<energy_list>
|
||||
<energy>1000</energy>
|
||||
<energy>2000</energy>
|
||||
<energy>3000</energy>
|
||||
<energy>4000</energy>
|
||||
<energy>5000</energy>
|
||||
<energy>6000</energy>
|
||||
<energy>7000</energy>
|
||||
<energy>8000</energy>
|
||||
<energy>9000</energy>
|
||||
<energy>10000</energy>
|
||||
<energy>11000</energy>
|
||||
<energy>12000</energy>
|
||||
<energy>13000</energy>
|
||||
<energy>14000</energy>
|
||||
<energy>15000</energy>
|
||||
<energy>16000</energy>
|
||||
<energy>17000</energy>
|
||||
<energy>17000</energy>
|
||||
<energy>18000</energy>
|
||||
<energy>19000</energy>
|
||||
<energy>20000</energy>
|
||||
<energy>21000</energy>
|
||||
<energy>22000</energy>
|
||||
</energy_list>
|
||||
</trim_sp>
|
||||
</depthProf>
|
||||
</nonlocal>
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 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 *
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 1c72e3ac8764a6fbfdf66c0cdf797d3d
|
||||
config: 429dcaf60d751fc64b55c07d7174ea6f
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
|
BIN
doc/html/_static/alert_info_32.png
Normal file
BIN
doc/html/_static/alert_info_32.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
doc/html/_static/alert_warning_32.png
Normal file
BIN
doc/html/_static/alert_warning_32.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 944 B |
BIN
doc/html/_static/bg-page.png
Normal file
BIN
doc/html/_static/bg-page.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 82 B |
BIN
doc/html/_static/bullet_orange.png
Normal file
BIN
doc/html/_static/bullet_orange.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 165 B |
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
||||
VERSION: '1.9.5',
|
||||
VERSION: '1.8.2',
|
||||
LANGUAGE: 'None',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
|
376
doc/html/_static/haiku.css
Normal file
376
doc/html/_static/haiku.css
Normal file
@ -0,0 +1,376 @@
|
||||
/*
|
||||
* haiku.css_t
|
||||
* ~~~~~~~~~~~
|
||||
*
|
||||
* Sphinx stylesheet -- haiku theme.
|
||||
*
|
||||
* Adapted from http://haiku-os.org/docs/Haiku-doc.css.
|
||||
* Original copyright message:
|
||||
*
|
||||
* Copyright 2008-2009, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Francois Revol <revol@free.fr>
|
||||
* Stephan Assmus <superstippi@gmx.de>
|
||||
* Braden Ewing <brewin@gmail.com>
|
||||
* Humdinger <humdingerb@gmail.com>
|
||||
*
|
||||
* :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
@import url("basic.css");
|
||||
|
||||
html {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
background: #FFF url(bg-page.png) top left repeat-x;
|
||||
}
|
||||
|
||||
body {
|
||||
line-height: 1.5;
|
||||
margin: auto;
|
||||
padding: 0px;
|
||||
font-family: "DejaVu Sans", Arial, Helvetica, sans-serif;
|
||||
min-width: 59em;
|
||||
max-width: 70em;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
div.footer {
|
||||
padding: 8px;
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
/* link colors and text decoration */
|
||||
|
||||
a:link {
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
color: #dc3c01;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
color: #892601;
|
||||
}
|
||||
|
||||
a:hover, a:active {
|
||||
text-decoration: underline;
|
||||
color: #ff4500;
|
||||
}
|
||||
|
||||
/* Some headers act as anchors, don't give them a hover effect */
|
||||
|
||||
h1 a:hover, a:active {
|
||||
text-decoration: none;
|
||||
color: #0c3762;
|
||||
}
|
||||
|
||||
h2 a:hover, a:active {
|
||||
text-decoration: none;
|
||||
color: #0c3762;
|
||||
}
|
||||
|
||||
h3 a:hover, a:active {
|
||||
text-decoration: none;
|
||||
color: #0c3762;
|
||||
}
|
||||
|
||||
h4 a:hover, a:active {
|
||||
text-decoration: none;
|
||||
color: #0c3762;
|
||||
}
|
||||
|
||||
a.headerlink {
|
||||
color: #a7ce38;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
a.headerlink:hover {
|
||||
color: #a7ce38;
|
||||
}
|
||||
|
||||
/* basic text elements */
|
||||
|
||||
div.content {
|
||||
margin-top: 20px;
|
||||
margin-left: 40px;
|
||||
margin-right: 40px;
|
||||
margin-bottom: 50px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
/* heading and navigation */
|
||||
|
||||
div.header {
|
||||
position: relative;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
height: 85px;
|
||||
/* background: #eeeeee; */
|
||||
padding: 0 40px;
|
||||
}
|
||||
div.header h1 {
|
||||
font-size: 1.6em;
|
||||
font-weight: normal;
|
||||
letter-spacing: 1px;
|
||||
color: #0c3762;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding-top: 15px;
|
||||
}
|
||||
div.header h1 a {
|
||||
font-weight: normal;
|
||||
color: #0c3762;
|
||||
}
|
||||
div.header h2 {
|
||||
font-size: 1.3em;
|
||||
font-weight: normal;
|
||||
letter-spacing: 1px;
|
||||
text-transform: uppercase;
|
||||
color: #aaa;
|
||||
border: 0;
|
||||
margin-top: -3px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.header img.rightlogo {
|
||||
float: right;
|
||||
}
|
||||
|
||||
|
||||
div.title {
|
||||
font-size: 1.3em;
|
||||
font-weight: bold;
|
||||
color: #0c3762;
|
||||
border-bottom: dotted thin #e0e0e0;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
div.topnav {
|
||||
/* background: #e0e0e0; */
|
||||
}
|
||||
div.topnav p {
|
||||
margin-top: 0;
|
||||
margin-left: 40px;
|
||||
margin-right: 40px;
|
||||
margin-bottom: 0px;
|
||||
text-align: right;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
div.bottomnav {
|
||||
background: #eeeeee;
|
||||
}
|
||||
div.bottomnav p {
|
||||
margin-right: 40px;
|
||||
text-align: right;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
a.uplink {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
/* contents box */
|
||||
|
||||
table.index {
|
||||
margin: 0px 0px 30px 30px;
|
||||
padding: 1px;
|
||||
border-width: 1px;
|
||||
border-style: dotted;
|
||||
border-color: #e0e0e0;
|
||||
}
|
||||
table.index tr.heading {
|
||||
background-color: #e0e0e0;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
table.index tr.index {
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
table.index td {
|
||||
padding: 5px 20px;
|
||||
}
|
||||
|
||||
table.index a:link, table.index a:visited {
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
color: #dc3c01;
|
||||
}
|
||||
table.index a:hover, table.index a:active {
|
||||
text-decoration: underline;
|
||||
color: #ff4500;
|
||||
}
|
||||
|
||||
|
||||
/* Haiku User Guide styles and layout */
|
||||
|
||||
/* Rounded corner boxes */
|
||||
/* Common declarations */
|
||||
div.admonition {
|
||||
-webkit-border-radius: 10px;
|
||||
-khtml-border-radius: 10px;
|
||||
-moz-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
border-style: dotted;
|
||||
border-width: thin;
|
||||
border-color: #dcdcdc;
|
||||
padding: 10px 15px 10px 15px;
|
||||
margin-bottom: 15px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
div.note {
|
||||
padding: 10px 15px 10px 80px;
|
||||
background: #e4ffde url(alert_info_32.png) 15px 15px no-repeat;
|
||||
min-height: 42px;
|
||||
}
|
||||
div.warning {
|
||||
padding: 10px 15px 10px 80px;
|
||||
background: #fffbc6 url(alert_warning_32.png) 15px 15px no-repeat;
|
||||
min-height: 42px;
|
||||
}
|
||||
div.seealso {
|
||||
background: #e4ffde;
|
||||
}
|
||||
|
||||
/* More layout and styles */
|
||||
h1 {
|
||||
font-size: 1.3em;
|
||||
font-weight: bold;
|
||||
color: #0c3762;
|
||||
border-bottom: dotted thin #e0e0e0;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.2em;
|
||||
font-weight: normal;
|
||||
color: #0c3762;
|
||||
border-bottom: dotted thin #e0e0e0;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.1em;
|
||||
font-weight: normal;
|
||||
color: #0c3762;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.0em;
|
||||
font-weight: normal;
|
||||
color: #0c3762;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
p {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
p.last {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
ol {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 5px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
li {
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
div.content ul > li {
|
||||
-moz-background-clip:border;
|
||||
-moz-background-inline-policy:continuous;
|
||||
-moz-background-origin:padding;
|
||||
background: transparent url(bullet_orange.png) no-repeat scroll left 0.45em;
|
||||
list-style-image: none;
|
||||
list-style-type: none;
|
||||
padding: 0 0 0 1.666em;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
code {
|
||||
background-color: #e2e2e2;
|
||||
font-size: 1.0em;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
pre {
|
||||
border-color: #0c3762;
|
||||
border-style: dotted;
|
||||
border-width: thin;
|
||||
margin: 0 0 12px 0;
|
||||
padding: 0.8em;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
hr {
|
||||
border-top: 1px solid #ccc;
|
||||
border-bottom: 0;
|
||||
border-right: 0;
|
||||
border-left: 0;
|
||||
margin-bottom: 10px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/* printer only pretty stuff */
|
||||
@media print {
|
||||
.noprint {
|
||||
display: none;
|
||||
}
|
||||
/* for acronyms we want their definitions inlined at print time */
|
||||
acronym[title]:after {
|
||||
font-size: small;
|
||||
content: " (" attr(title) ")";
|
||||
font-style: italic;
|
||||
}
|
||||
/* and not have mozilla dotted underline */
|
||||
acronym {
|
||||
border: none;
|
||||
}
|
||||
div.topnav, div.bottomnav, div.header, table.index {
|
||||
display: none;
|
||||
}
|
||||
div.content {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
html {
|
||||
background: #FFF;
|
||||
}
|
||||
}
|
||||
|
||||
.viewcode-back {
|
||||
font-family: "DejaVu Sans", Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
div.viewcode-block:target {
|
||||
background-color: #f4debf;
|
||||
border-top: 1px solid #ac9;
|
||||
border-bottom: 1px solid #ac9;
|
||||
margin: -1px -10px;
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
/* math display */
|
||||
div.math p {
|
||||
text-align: center;
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
/* dynamic content width, see https://stackoverflow.com/questions/23211695/modifying-content-width-of-the-sphinx-theme-read-the-docs */
|
||||
|
||||
.wy-nav-content {
|
||||
max-width: none;
|
||||
}
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Acknowledgements — musrfit 1.9.5 documentation</title>
|
||||
<title>Acknowledgements — musrfit 1.8.2 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -30,9 +30,7 @@
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="Bugtracking" href="bugtracking.html" />
|
||||
<link rel="prev" title="MusrRoot - an Extensible Open File Format for μSR" href="musr-root.html" />
|
||||
<link href="_static/style.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<link rel="prev" title="MusrRoot - an Extensible Open File Format for μSR" href="musr-root.html" />
|
||||
|
||||
|
||||
<script src="_static/js/modernizr.min.js"></script>
|
||||
@ -60,10 +58,6 @@
|
||||
|
||||
|
||||
|
||||
<div class="version">
|
||||
1.9
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -96,7 +90,6 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Acknowledgements</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||
@ -200,8 +193,8 @@ extremely competent way to deal with his projects as well as to deal with the ch
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 24, 2024.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on Dec 12, 2022.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -223,7 +216,7 @@ extremely competent way to deal with his projects as well as to deal with the ch
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.5',
|
||||
VERSION:'1.8.2',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>any2many - a Universal μSR-file-format converter — musrfit 1.9.5 documentation</title>
|
||||
<title>any2many - a Universal μSR-file-format converter — musrfit 1.8.2 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -29,10 +29,8 @@
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="Short description and references to the supported file-formats" href="file-formats.html" />
|
||||
<link rel="prev" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files" href="msr2data.html" />
|
||||
<link href="_static/style.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<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" />
|
||||
|
||||
|
||||
<script src="_static/js/modernizr.min.js"></script>
|
||||
@ -60,10 +58,6 @@
|
||||
|
||||
|
||||
|
||||
<div class="version">
|
||||
1.9
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -96,7 +90,6 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">any2many - a Universal μSR-file-format converter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||
@ -178,7 +171,7 @@ For a detailed description see <a class="reference internal" href="user-manual.h
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="file-formats.html" class="btn btn-neutral float-right" title="Short description and references to the supported file-formats" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
<a href="musr-root.html" class="btn btn-neutral float-right" title="MusrRoot - an Extensible Open File Format for μSR" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="msr2data.html" class="btn btn-neutral" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
@ -190,8 +183,8 @@ For a detailed description see <a class="reference internal" href="user-manual.h
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 24, 2024.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on Dec 12, 2022.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -213,7 +206,7 @@ For a detailed description see <a class="reference internal" href="user-manual.h
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.5',
|
||||
VERSION:'1.8.2',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Bugtracking — musrfit 1.9.5 documentation</title>
|
||||
<title>Bugtracking — musrfit 1.8.2 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -29,9 +29,7 @@
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="prev" title="Acknowledgements" href="acknowledgement.html" />
|
||||
<link href="_static/style.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<link rel="prev" title="Acknowledgements" href="acknowledgement.html" />
|
||||
|
||||
|
||||
<script src="_static/js/modernizr.min.js"></script>
|
||||
@ -59,10 +57,6 @@
|
||||
|
||||
|
||||
|
||||
<div class="version">
|
||||
1.9
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -95,7 +89,6 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Bugtracking</a></li>
|
||||
@ -188,8 +181,8 @@ or send an e-mail to A. Suter at PSI.</p>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 24, 2024.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on Dec 12, 2022.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -211,7 +204,7 @@ or send an e-mail to A. Suter at PSI.</p>
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.5',
|
||||
VERSION:'1.8.2',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>How to Cite musrfit? — musrfit 1.9.5 documentation</title>
|
||||
<title>How to Cite musrfit? — musrfit 1.8.2 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -30,9 +30,7 @@
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="Tutorial for musrfit" href="tutorial.html" />
|
||||
<link rel="prev" title="Welcome to the musrfit documentation!" href="index.html" />
|
||||
<link href="_static/style.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<link rel="prev" title="Welcome to the musrfit documentation!" href="index.html" />
|
||||
|
||||
|
||||
<script src="_static/js/modernizr.min.js"></script>
|
||||
@ -60,10 +58,6 @@
|
||||
|
||||
|
||||
|
||||
<div class="version">
|
||||
1.9
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -96,7 +90,6 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||
@ -202,8 +195,8 @@
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 24, 2024.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on Dec 12, 2022.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -225,7 +218,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.5',
|
||||
VERSION:'1.8.2',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -1,555 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
|
||||
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Short description and references to the supported file-formats — musrfit 1.9.5 documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="MusrRoot - an Extensible Open File Format for μSR" href="musr-root.html" />
|
||||
<link rel="prev" title="any2many - a Universal μSR-file-format converter" href="any2many.html" />
|
||||
<link href="_static/style.css" rel="stylesheet" type="text/css">
|
||||
|
||||
|
||||
|
||||
<script src="_static/js/modernizr.min.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search">
|
||||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home"> musrfit
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="version">
|
||||
1.9
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="cite.html">How to Cite <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>?</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial for <code class="docutils literal notranslate"><span class="pre">musrfit</span></code></a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="user-manual.html">User manual</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="user-libs.html">Documentation of user libs (user functions)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="setup-standard.html">Setting up <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> on Different Platforms</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="setup-dks.html">Setting up <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> / <code class="docutils literal notranslate"><span class="pre">DKS</span></code>: High Speed Fitting with GPU’s</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="musredit.html"><code class="docutils literal notranslate"><span class="pre">musredit</span></code>: the GUI Based Interface to <code class="docutils literal notranslate"><span class="pre">musrfit</span></code></a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Short description and references to the supported file-formats</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#ascii-file-format-for-non-mgrsr">ASCII file format for non-μSR</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#db-file-format-for-non-mgrsr">DB file format for non-μSR</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#dat-csv-like-file-format-for-non-mgrsr">DAT: CSV like file format for non-μSR</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#mdu-file-format-psi-for-mgrsr">MDU file format (psi) for μSR</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#mud-file-format-triumf-for-mgrsr">MUD file format (triumf) for μSR</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#musrroot-file-format-psi-for-mgrsr">MusrRoot file format (PSI) for μSR</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#nexus-file-format-isis-for-mgrsr">NeXus file format (isis) for μSR</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#psi-bin-file-format-psi-for-mgrsr">PSI-BIN file format (psi) for μSR</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#root-file-format-psi-lem-before-2012-for-mgrsr">ROOT file format (psi/lem before 2012) for μSR</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#wkm-file-format-for-mgrsr">WKM file format for μSR</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="index.html">musrfit</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="index.html">Docs</a> »</li>
|
||||
|
||||
<li>Short description and references to the supported file-formats</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="_sources/file-formats.rst.txt" rel="nofollow"> View page source</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="short-description-and-references-to-the-supported-file-formats">
|
||||
<span id="file-formats"></span><span id="index-0"></span><h1>Short description and references to the supported file-formats<a class="headerlink" href="#short-description-and-references-to-the-supported-file-formats" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Currently the following μSR and non-μSR file formats are supported (in alphabetic order):</p>
|
||||
<ul class="simple">
|
||||
<li>ascii (non-μSR): <a class="reference internal" href="#ascii-file-format"><span class="std std-ref">ASCII file format for non-uSR</span></a></li>
|
||||
<li>db (non-μSR): <a class="reference internal" href="#db-file-format"><span class="std std-ref">DB (triumf)</span></a></li>
|
||||
<li>dat (non-μSR): <a class="reference internal" href="#dat-file-format"><span class="std std-ref">DAT: CSV like data file</span></a></li>
|
||||
<li>mdu (μSR): <a class="reference internal" href="#mdu-file-format"><span class="std std-ref">MDU file format (PSI)</span></a></li>
|
||||
<li>mud (μSR): <a class="reference internal" href="#mud-file-format"><span class="std std-ref">MUon Data access file format (TRIUMF)</span></a></li>
|
||||
<li>musr-root (μSR): <a class="reference internal" href="musr-root.html#musrroot"><span class="std std-ref">MusrRoot - an Extensible Open File Format for uSR</span></a></li>
|
||||
<li>nexus (μSR): used to read NeXus files from ISIS (HDF4 and HDF5): <a class="reference internal" href="#nexus-file-format"><span class="std std-ref">NeXus</span></a></li>
|
||||
<li>psi-bin (μSR): <a class="reference internal" href="#psi-bin-file-format"><span class="std std-ref">PSI-BIN file format (PSI)</span></a></li>
|
||||
<li>root (μSR): specific version for LEM before 2012 <a class="reference internal" href="#root-file-format"><span class="std std-ref">LEM ROOT file format</span></a></li>
|
||||
<li>wkm (μSR): special ascii file format used in the past by the TU Braunschweig (outdated): <a class="reference internal" href="#wkm-file-format"><span class="std std-ref">WKM</span></a></li>
|
||||
</ul>
|
||||
<div class="section" id="ascii-file-format-for-non-mgrsr">
|
||||
<span id="ascii-file-format"></span><span id="index-1"></span><h2>ASCII file format for non-μSR<a class="headerlink" href="#ascii-file-format-for-non-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||
<p>This for instance can be used to fit <span class="math notranslate nohighlight">\(1/\lambda^2 ~ \mathrm{vs} ~ T\)</span> to study gap properties of superconductors.
|
||||
Details about the gap-intergrals can be found in the memo <em>GapIntegrals.pdf</em> which can be found in the source code of musrfit
|
||||
under <musrfit-home-dir>/src/external/libGapIntegrals.</p>
|
||||
<p>This primitive file format has the following structure:</p>
|
||||
<p>Comment lines start with a ‘#’ or ‘%’ character.
|
||||
The file can start with some header info. The header is optional, as all its tags, but
|
||||
if present it has the following format:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">HEADER</span>
|
||||
<span class="n">TITLE</span><span class="p">:</span> <span class="n">title</span>
|
||||
<span class="n">X</span><span class="o">-</span><span class="n">AXIS</span><span class="o">-</span><span class="n">TITLE</span><span class="p">:</span> <span class="n">x</span><span class="o">-</span><span class="n">axis</span> <span class="n">title</span>
|
||||
<span class="n">Y</span><span class="o">-</span><span class="n">AXIS</span><span class="o">-</span><span class="n">TITLE</span><span class="p">:</span> <span class="n">y</span><span class="o">-</span><span class="n">axis</span> <span class="n">title</span>
|
||||
<span class="n">SETUP</span><span class="p">:</span> <span class="n">setup</span>
|
||||
<span class="n">FIELD</span><span class="p">:</span> <span class="n">field</span>
|
||||
<span class="n">TEMP</span><span class="p">:</span> <span class="n">temperature</span>
|
||||
<span class="n">ENERGY</span><span class="p">:</span> <span class="n">energy</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Field has to be given in (G), temperature in (K) and energy in (keV).</p>
|
||||
<p>The data are read column like and start with the data tag DATA, followed by the
|
||||
data columns, i.e.:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">DATA</span>
|
||||
<span class="n">x</span><span class="p">,</span> <span class="n">y</span> <span class="p">[,</span> <span class="n">error</span> <span class="n">y</span><span class="p">]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>where spaces, column, are a tab are possible separations.
|
||||
If no error in y is present, the weighting in the fit will be equal.</p>
|
||||
<p>A full example might look like this:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># libGapIntegrals-test.dat</span>
|
||||
<span class="c1"># This is a comment</span>
|
||||
<span class="o">%</span> <span class="n">This</span> <span class="k">as</span> <span class="n">well</span>
|
||||
<span class="n">HEADER</span>
|
||||
<span class="n">TITLE</span><span class="p">:</span> <span class="n">Test</span> <span class="n">superconductor</span> <span class="n">data</span>
|
||||
<span class="n">X</span><span class="o">-</span><span class="n">AXIS</span><span class="o">-</span><span class="n">TITLE</span><span class="p">:</span> <span class="n">T</span> <span class="p">(</span><span class="n">K</span><span class="p">)</span>
|
||||
<span class="n">Y</span><span class="o">-</span><span class="n">AXIS</span><span class="o">-</span><span class="n">TITLE</span><span class="p">:</span> <span class="c1">#lambda^{-2} (#mum^{-2})</span>
|
||||
<span class="n">SETUP</span><span class="p">:</span> <span class="n">H</span> <span class="c1">#parallel c</span>
|
||||
<span class="n">FIELD</span><span class="p">:</span> <span class="mi">100</span>
|
||||
<span class="n">TEMP</span><span class="p">:</span> <span class="mf">0.0</span>
|
||||
<span class="n">ENERGY</span><span class="p">:</span> <span class="mi">4200</span>
|
||||
<span class="c1"># here the data will follow</span>
|
||||
<span class="n">DATA</span>
|
||||
<span class="c1"># x, y, error y</span>
|
||||
<span class="mf">0.0318411</span><span class="p">,</span> <span class="mf">7.77455</span><span class="p">,</span> <span class="mf">0.2</span>
|
||||
<span class="mf">0.0629929</span><span class="p">,</span> <span class="mf">7.9869</span><span class="p">,</span> <span class="mf">0.15</span>
|
||||
<span class="mf">0.113914</span><span class="p">,</span> <span class="mf">7.64209</span><span class="p">,</span> <span class="mf">0.15</span>
|
||||
<span class="mf">0.202492</span><span class="p">,</span> <span class="mf">7.37699</span><span class="p">,</span> <span class="mf">0.15</span>
|
||||
<span class="mf">0.302725</span><span class="p">,</span> <span class="mf">7.70893</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||
<span class="mf">0.447456</span><span class="p">,</span> <span class="mf">7.77565</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||
<span class="mf">0.611685</span><span class="p">,</span> <span class="mf">7.45768</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||
<span class="mf">0.813613</span><span class="p">,</span> <span class="mf">7.19287</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||
<span class="mf">1.00822</span><span class="p">,</span> <span class="mf">7.57813</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||
<span class="mf">1.24793</span><span class="p">,</span> <span class="mf">7.31343</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||
<span class="mf">1.50635</span><span class="p">,</span> <span class="mf">7.16818</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||
<span class="mf">1.74591</span><span class="p">,</span> <span class="mf">6.99634</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||
<span class="mf">1.99795</span><span class="p">,</span> <span class="mf">6.90414</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||
<span class="mf">2.25061</span><span class="p">,</span> <span class="mf">6.41393</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||
<span class="mf">2.4958</span><span class="p">,</span> <span class="mf">6.66666</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||
<span class="mf">2.75514</span><span class="p">,</span> <span class="mf">5.93766</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||
<span class="mf">3.00753</span><span class="p">,</span> <span class="mf">5.61992</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||
<span class="mf">3.26056</span><span class="p">,</span> <span class="mf">4.89091</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||
<span class="mf">3.49414</span><span class="p">,</span> <span class="mf">4.52005</span><span class="p">,</span> <span class="mf">0.08</span>
|
||||
<span class="mf">3.75356</span><span class="p">,</span> <span class="mf">3.73799</span><span class="p">,</span> <span class="mf">0.08</span>
|
||||
<span class="mf">3.99425</span><span class="p">,</span> <span class="mf">2.84974</span><span class="p">,</span> <span class="mf">0.08</span>
|
||||
<span class="mf">4.30518</span><span class="p">,</span> <span class="mf">1.35139</span><span class="p">,</span> <span class="mf">0.08</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="db-file-format-for-non-mgrsr">
|
||||
<span id="db-file-format"></span><span id="index-2"></span><h2>DB file format for non-μSR<a class="headerlink" href="#db-file-format-for-non-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||
<p>The DB file format is an <em>archaic</em> ascii file format from TRIUMF which is intended to be used to collect parameter summaries of various runs, which can be read directly by <a class="reference internal" href="mupp.html#mupp"><span class="std std-ref">mupp</span></a>.</p>
|
||||
<p>The DB file is organized in a couple of tags defining various properties, followed by the parameter data with its errors.
|
||||
Tags and is content are always separated by an empty line.
|
||||
The first tag is the <strong>TITLE</strong>. Followed by the title in the next line</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">TITLE</span>
|
||||
<span class="n">This</span> <span class="ow">is</span> <span class="n">the</span> <span class="n">best</span> <span class="n">data</span> <span class="n">ever</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The next tag is the <strong>ABSTRACT</strong>, followed a potentially multi-line abstract, e.g.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ABSTRACT</span>
|
||||
<span class="n">Here</span> <span class="n">comes</span> <span class="n">the</span> <span class="n">detailed</span> <span class="n">description</span> <span class="o">...</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The next tag, <strong>LABELS</strong>, are used to define human readable names for the data parameters to be followed:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">LABELS</span>
|
||||
<span class="n">T</span> <span class="p">(</span><span class="n">K</span><span class="p">)</span>
|
||||
<span class="n">B</span> <span class="p">(</span><span class="n">G</span><span class="p">)</span>
|
||||
<span class="o">...</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The number of labels have to fit the number of parameters present!</p>
|
||||
<p>The next tag is <strong>DATA</strong>, which is a list of the parameter names as found in you msr-file.
|
||||
Unlike the other tags, here the list of names follow directly after the <strong>DATA</strong> tag</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">DATA</span> <span class="n">dataT</span> <span class="n">dataB</span> <span class="n">dataE</span> <span class="n">dataTr</span> <span class="o">...</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Next there will be a line with the tag <strong>\-e</strong>, followed by</p>
|
||||
<p>The parameters are afterwards listed as</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">param</span><span class="o">-</span><span class="n">name</span> <span class="o">=</span> <span class="n">val</span><span class="p">,</span> <span class="n">pos</span><span class="o">-</span><span class="n">err</span><span class="p">,</span> <span class="n">neg</span><span class="o">-</span><span class="n">err</span><span class="p">,</span>\
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>After all the parameters listed of a specific run, the <strong>run number</strong> with the run title ends a run data set.
|
||||
This might look like this (be aware of the comma!):</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="mi">11231</span><span class="p">,,,</span> <span class="n">AgPlate</span> <span class="mi">250</span><span class="n">nm</span> <span class="p">(</span><span class="n">T5034</span><span class="p">),</span> <span class="n">T</span><span class="o">=</span><span class="mf">200.00</span> <span class="n">K</span><span class="p">,</span> <span class="n">E</span><span class="o">=</span><span class="mf">12.99</span> <span class="n">keV</span><span class="p">,</span> <span class="n">B</span><span class="o">=~</span><span class="mi">50</span><span class="p">(</span><span class="n">G</span><span class="p">)</span><span class="o">/</span><span class="mf">8.65</span><span class="p">(</span><span class="n">A</span><span class="p">),</span> <span class="n">Tr</span><span class="o">/</span><span class="n">Sa</span><span class="o">=</span><span class="mf">12.00</span><span class="o">/-</span><span class="mf">1.80</span> <span class="n">kV</span><span class="p">,</span> <span class="n">SR</span><span class="o">=-</span><span class="mf">10.00</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>A full example might look like this:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">TITLE</span>
|
||||
<span class="n">Ag</span> <span class="n">Plate</span> <span class="mi">2023</span> <span class="n">runs</span><span class="p">,</span> <span class="n">Tr12kV</span><span class="p">,</span> <span class="n">E</span><span class="o">=</span><span class="mi">13</span><span class="n">keV</span><span class="p">,</span> <span class="n">TF</span> <span class="n">B</span><span class="o">=</span><span class="mi">50</span><span class="n">G</span>
|
||||
|
||||
<span class="n">Abstract</span>
|
||||
<span class="n">Summary</span> <span class="n">of</span> <span class="n">the</span>
|
||||
|
||||
<span class="n">LABELS</span>
|
||||
<span class="n">T</span> <span class="p">(</span><span class="n">K</span><span class="p">)</span>
|
||||
<span class="n">B</span> <span class="p">(</span><span class="n">G</span><span class="p">)</span>
|
||||
<span class="n">Implantation</span> <span class="n">Energy</span> <span class="p">(</span><span class="n">keV</span><span class="p">)</span>
|
||||
<span class="n">Transport</span> <span class="p">(</span><span class="n">kV</span><span class="p">)</span>
|
||||
<span class="n">RAL</span><span class="o">-</span><span class="n">RAR</span> <span class="p">(</span><span class="n">kV</span><span class="p">)</span>
|
||||
<span class="n">RAT</span><span class="o">-</span><span class="n">RAB</span> <span class="p">(</span><span class="n">kV</span><span class="p">)</span>
|
||||
<span class="n">Spin</span> <span class="n">Rotation</span> <span class="n">Angle</span> <span class="p">(</span><span class="n">degree</span><span class="p">)</span>
|
||||
<span class="n">Asy</span>
|
||||
<span class="n">Lambda</span>
|
||||
<span class="n">Ph</span>
|
||||
<span class="n">Field</span>
|
||||
<span class="n">RelPh_L</span>
|
||||
<span class="n">N0_L</span>
|
||||
<span class="n">N_bkg_L</span>
|
||||
<span class="n">RelPh_T</span>
|
||||
<span class="n">N0_T</span>
|
||||
<span class="n">N_bkg_T</span>
|
||||
<span class="n">RelPh_R</span>
|
||||
<span class="n">alpha_LR</span>
|
||||
<span class="n">N_bkg_R</span>
|
||||
<span class="n">RelPh_B</span>
|
||||
<span class="n">alpha_TB</span>
|
||||
<span class="n">N_bkg_B</span>
|
||||
<span class="n">maxLH</span>
|
||||
<span class="n">NDF</span>
|
||||
<span class="n">maxLHred</span>
|
||||
<span class="n">RUN</span>
|
||||
|
||||
<span class="n">Data</span> <span class="n">dataT</span> <span class="n">dataB</span> <span class="n">dataE</span> <span class="n">dataTr</span> <span class="n">dataRALRAR</span> <span class="n">dataRATRAB</span> <span class="n">dataSpinRot</span> <span class="n">Asy</span> <span class="n">Lambda</span> <span class="n">Ph</span> <span class="n">Field</span> <span class="n">RelPh_L</span> <span class="n">N0_L</span> <span class="n">N_bkg_L</span> <span class="n">RelPh_T</span> <span class="n">N0_T</span> <span class="n">N_bkg_T</span> <span class="n">RelPh_R</span> <span class="n">alpha_LR</span> <span class="n">N_bkg_R</span> <span class="n">RelPh_B</span> <span class="n">alpha_TB</span> <span class="n">N_bkg_B</span> <span class="n">maxLH</span> <span class="n">NDF</span> <span class="n">maxLHred</span> <span class="n">RUN</span>
|
||||
\<span class="o">-</span><span class="n">e</span>
|
||||
<span class="n">dataT</span> <span class="o">=</span> <span class="mf">200.001</span><span class="p">,</span> <span class="mf">0.0009</span><span class="p">,</span> <span class="mf">0.0009</span><span class="p">,</span>\
|
||||
<span class="n">dataB</span> <span class="o">=</span> <span class="mf">49.49</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="n">dataE</span> <span class="o">=</span> <span class="mf">12.9952</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="n">dataTr</span> <span class="o">=</span> <span class="mf">11.9993</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="n">dataRALRAR</span> <span class="o">=</span> <span class="o">-</span><span class="mf">0.008</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="n">dataRATRAB</span> <span class="o">=</span> <span class="o">-</span><span class="mf">0.009</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="n">dataSpinRot</span> <span class="o">=</span> <span class="o">-</span><span class="mi">10</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="n">Asy</span> <span class="o">=</span> <span class="mf">0.22466</span><span class="p">,</span> <span class="mf">0.00084</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.00084</span><span class="p">,</span>\
|
||||
<span class="n">Lambda</span> <span class="o">=</span> <span class="mf">0.0081</span><span class="p">,</span> <span class="mf">0.0014</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.0014</span><span class="p">,</span>\
|
||||
<span class="n">Ph</span> <span class="o">=</span> <span class="mf">12.14</span><span class="p">,</span> <span class="mf">0.32</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.32</span><span class="p">,</span>\
|
||||
<span class="n">Field</span> <span class="o">=</span> <span class="mf">50.837</span><span class="p">,</span> <span class="mf">0.017</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.017</span><span class="p">,</span>\
|
||||
<span class="n">RelPh_L</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="n">N0_L</span> <span class="o">=</span> <span class="mf">430.67</span><span class="p">,</span> <span class="mf">0.39</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.39</span><span class="p">,</span>\
|
||||
<span class="n">N_bkg_L</span> <span class="o">=</span> <span class="mf">6.81</span><span class="p">,</span> <span class="mf">0.048</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.048</span><span class="p">,</span>\
|
||||
<span class="n">RelPh_T</span> <span class="o">=</span> <span class="o">-</span><span class="mf">89.95</span><span class="p">,</span> <span class="mf">0.4</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.4</span><span class="p">,</span>\
|
||||
<span class="n">N0_T</span> <span class="o">=</span> <span class="mf">422.6</span><span class="p">,</span> <span class="mf">0.37</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.37</span><span class="p">,</span>\
|
||||
<span class="n">N_bkg_T</span> <span class="o">=</span> <span class="mf">7.125</span><span class="p">,</span> <span class="mf">0.047</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.048</span><span class="p">,</span>\
|
||||
<span class="n">RelPh_R</span> <span class="o">=</span> <span class="o">-</span><span class="mf">178.55</span><span class="p">,</span> <span class="mf">0.39</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.39</span><span class="p">,</span>\
|
||||
<span class="n">alpha_LR</span> <span class="o">=</span> <span class="mf">0.9729</span><span class="p">,</span> <span class="mf">0.0012</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.0012</span><span class="p">,</span>\
|
||||
<span class="n">N_bkg_R</span> <span class="o">=</span> <span class="mf">7.375</span><span class="p">,</span> <span class="mf">0.048</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.048</span><span class="p">,</span>\
|
||||
<span class="n">RelPh_B</span> <span class="o">=</span> <span class="mf">90.38</span><span class="p">,</span> <span class="mf">0.4</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.4</span><span class="p">,</span>\
|
||||
<span class="n">alpha_TB</span> <span class="o">=</span> <span class="mf">0.9522</span><span class="p">,</span> <span class="mf">0.0012</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.0012</span><span class="p">,</span>\
|
||||
<span class="n">N_bkg_B</span> <span class="o">=</span> <span class="mf">6.546</span><span class="p">,</span> <span class="mf">0.047</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.047</span><span class="p">,</span>\
|
||||
<span class="n">maxLH</span> <span class="o">=</span> <span class="mf">20303.3</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="n">NDF</span> <span class="o">=</span> <span class="mi">20361</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="n">maxLHred</span> <span class="o">=</span> <span class="mf">0.997166</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="mi">11231</span><span class="p">,,,</span> <span class="n">AgPlate</span> <span class="mi">250</span><span class="n">nm</span> <span class="p">(</span><span class="n">T5034</span><span class="p">),</span> <span class="n">T</span><span class="o">=</span><span class="mf">200.00</span> <span class="n">K</span><span class="p">,</span> <span class="n">E</span><span class="o">=</span><span class="mf">12.99</span> <span class="n">keV</span><span class="p">,</span> <span class="n">B</span><span class="o">=~</span><span class="mi">50</span><span class="p">(</span><span class="n">G</span><span class="p">)</span><span class="o">/</span><span class="mf">8.65</span><span class="p">(</span><span class="n">A</span><span class="p">),</span> <span class="n">Tr</span><span class="o">/</span><span class="n">Sa</span><span class="o">=</span><span class="mf">12.00</span><span class="o">/-</span><span class="mf">1.80</span> <span class="n">kV</span><span class="p">,</span> <span class="n">SR</span><span class="o">=-</span><span class="mf">10.00</span>
|
||||
<span class="n">dataT</span> <span class="o">=</span> <span class="mi">153</span><span class="p">,</span> <span class="mf">0.7</span><span class="p">,</span> <span class="mf">0.7</span><span class="p">,</span>\
|
||||
<span class="n">dataB</span> <span class="o">=</span> <span class="mf">49.49</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="n">dataE</span> <span class="o">=</span> <span class="mf">12.9952</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="n">dataTr</span> <span class="o">=</span> <span class="mf">11.9993</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="n">dataRALRAR</span> <span class="o">=</span> <span class="o">-</span><span class="mf">0.008</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="n">dataRATRAB</span> <span class="o">=</span> <span class="o">-</span><span class="mf">0.009</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="n">dataSpinRot</span> <span class="o">=</span> <span class="o">-</span><span class="mi">10</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="n">Asy</span> <span class="o">=</span> <span class="mf">0.22253</span><span class="p">,</span> <span class="mf">0.00084</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.00083</span><span class="p">,</span>\
|
||||
<span class="n">Lambda</span> <span class="o">=</span> <span class="mf">0.0055</span><span class="p">,</span> <span class="mf">0.0014</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.0014</span><span class="p">,</span>\
|
||||
<span class="n">Ph</span> <span class="o">=</span> <span class="mf">11.53</span><span class="p">,</span> <span class="mf">0.32</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.32</span><span class="p">,</span>\
|
||||
<span class="n">Field</span> <span class="o">=</span> <span class="mf">51.026</span><span class="p">,</span> <span class="mf">0.017</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.017</span><span class="p">,</span>\
|
||||
<span class="n">RelPh_L</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="n">N0_L</span> <span class="o">=</span> <span class="mf">430.31</span><span class="p">,</span> <span class="mf">0.39</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.39</span><span class="p">,</span>\
|
||||
<span class="n">N_bkg_L</span> <span class="o">=</span> <span class="mf">6.762</span><span class="p">,</span> <span class="mf">0.048</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.048</span><span class="p">,</span>\
|
||||
<span class="n">RelPh_T</span> <span class="o">=</span> <span class="o">-</span><span class="mf">89.3</span><span class="p">,</span> <span class="mf">0.4</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.4</span><span class="p">,</span>\
|
||||
<span class="n">N0_T</span> <span class="o">=</span> <span class="mf">422.31</span><span class="p">,</span> <span class="mf">0.37</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.37</span><span class="p">,</span>\
|
||||
<span class="n">N_bkg_T</span> <span class="o">=</span> <span class="mf">6.96</span><span class="p">,</span> <span class="mf">0.047</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.047</span><span class="p">,</span>\
|
||||
<span class="n">RelPh_R</span> <span class="o">=</span> <span class="o">-</span><span class="mf">178.61</span><span class="p">,</span> <span class="mf">0.4</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.4</span><span class="p">,</span>\
|
||||
<span class="n">alpha_LR</span> <span class="o">=</span> <span class="mf">0.975</span><span class="p">,</span> <span class="mf">0.0013</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.0012</span><span class="p">,</span>\
|
||||
<span class="n">N_bkg_R</span> <span class="o">=</span> <span class="mf">7.361</span><span class="p">,</span> <span class="mf">0.048</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.048</span><span class="p">,</span>\
|
||||
<span class="n">RelPh_B</span> <span class="o">=</span> <span class="mf">90.24</span><span class="p">,</span> <span class="mf">0.4</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.4</span><span class="p">,</span>\
|
||||
<span class="n">alpha_TB</span> <span class="o">=</span> <span class="mf">0.9605</span><span class="p">,</span> <span class="mf">0.0012</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.0012</span><span class="p">,</span>\
|
||||
<span class="n">N_bkg_B</span> <span class="o">=</span> <span class="mf">6.623</span><span class="p">,</span> <span class="mf">0.047</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.047</span><span class="p">,</span>\
|
||||
<span class="n">maxLH</span> <span class="o">=</span> <span class="mf">20435.6</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="n">NDF</span> <span class="o">=</span> <span class="mi">20361</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="n">maxLHred</span> <span class="o">=</span> <span class="mf">1.00366</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||
<span class="mi">11235</span><span class="p">,,,</span> <span class="n">AgPlate</span> <span class="mi">250</span><span class="n">nm</span> <span class="p">(</span><span class="n">T5034</span><span class="p">),</span> <span class="n">T</span><span class="o">=</span><span class="mf">151.72</span> <span class="n">K</span><span class="p">,</span> <span class="n">E</span><span class="o">=</span><span class="mf">13.00</span> <span class="n">keV</span><span class="p">,</span> <span class="n">B</span><span class="o">=~</span><span class="mi">50</span><span class="p">(</span><span class="n">G</span><span class="p">)</span><span class="o">/</span><span class="mf">8.65</span><span class="p">(</span><span class="n">A</span><span class="p">),</span> <span class="n">Tr</span><span class="o">/</span><span class="n">Sa</span><span class="o">=</span><span class="mf">12.00</span><span class="o">/-</span><span class="mf">1.80</span> <span class="n">kV</span><span class="p">,</span> <span class="n">SR</span><span class="o">=-</span><span class="mf">10.00</span>
|
||||
<span class="o">>></span> <span class="n">here</span> <span class="n">many</span> <span class="n">more</span> <span class="n">run</span> <span class="n">data</span> <span class="n">would</span> <span class="n">follow</span> <span class="o">...</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="dat-csv-like-file-format-for-non-mgrsr">
|
||||
<span id="dat-file-format"></span><span id="index-3"></span><h2>DAT: CSV like file format for non-μSR<a class="headerlink" href="#dat-csv-like-file-format-for-non-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||
<p>This is typically used when exporting the parameter data from <strong>msr2data</strong> to be used in <strong>mupp</strong>, gnuplot, origin, or whatever parameter plotter you might use.
|
||||
The first line defines the parameter tags separated by spaces or tabs. If errors are available there are labeled be the ending <em>Err</em>.
|
||||
This is followed by the parameter values and its errors if present. A fill example looks like this:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">dataT</span> <span class="n">dataTErr</span> <span class="n">dataB</span> <span class="n">dataE</span> <span class="n">dataTr</span> <span class="n">dataRALRAR</span> <span class="n">dataRATRAB</span> <span class="n">dataSpinRot</span> <span class="n">Asy</span> <span class="n">AsyPosErr</span> <span class="n">AsyNegErr</span> <span class="n">Lambda</span> <span class="n">LambdaPosErr</span> <span class="n">LambdaNegErr</span> <span class="n">Ph</span> <span class="n">PhPosErr</span> <span class="n">PhNegErr</span> <span class="n">Field</span> <span class="n">FieldPosErr</span> <span class="n">FieldNegErr</span> <span class="n">RelPh_L</span> <span class="n">RelPh_LPosErr</span> <span class="n">RelPh_LNegErr</span> <span class="n">N0_L</span> <span class="n">N0_LPosErr</span> <span class="n">N0_LNegErr</span> <span class="n">N_bkg_L</span> <span class="n">N_bkg_LPosErr</span> <span class="n">N_bkg_LNegErr</span> <span class="n">RelPh_T</span> <span class="n">RelPh_TPosErr</span> <span class="n">RelPh_TNegErr</span> <span class="n">N0_T</span> <span class="n">N0_TPosErr</span> <span class="n">N0_TNegErr</span> <span class="n">N_bkg_T</span> <span class="n">N_bkg_TPosErr</span> <span class="n">N_bkg_TNegErr</span> <span class="n">RelPh_R</span> <span class="n">RelPh_RPosErr</span> <span class="n">RelPh_RNegErr</span> <span class="n">alpha_LR</span> <span class="n">alpha_LRPosErr</span> <span class="n">alpha_LRNegErr</span> <span class="n">N_bkg_R</span> <span class="n">N_bkg_RPosErr</span> <span class="n">N_bkg_RNegErr</span> <span class="n">RelPh_B</span> <span class="n">RelPh_BPosErr</span> <span class="n">RelPh_BNegErr</span> <span class="n">alpha_TB</span> <span class="n">alpha_TBPosErr</span> <span class="n">alpha_TBNegErr</span> <span class="n">N_bkg_B</span> <span class="n">N_bkg_BPosErr</span> <span class="n">N_bkg_BNegErr</span> <span class="n">maxLH</span> <span class="n">NDF</span> <span class="n">maxLHred</span> <span class="n">RUN</span>
|
||||
<span class="mi">200</span> <span class="mf">0.007</span> <span class="mf">99.48</span> <span class="mf">1.11754</span> <span class="mf">10.001</span> <span class="o">-</span><span class="mf">0.008</span> <span class="o">-</span><span class="mf">0.008</span> <span class="o">-</span><span class="mi">10</span> <span class="mf">0.1587</span> <span class="mf">0.0012</span> <span class="mf">0.0012</span> <span class="mf">0.0263</span> <span class="mf">0.003</span> <span class="mf">0.003</span> <span class="mf">29.85</span> <span class="mf">0.64</span> <span class="mf">0.64</span> <span class="mf">101.179</span> <span class="mf">0.035</span> <span class="mf">0.035</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mf">219.27</span> <span class="mf">0.27</span> <span class="mf">0.27</span> <span class="mf">2.676</span> <span class="mf">0.033</span> <span class="mf">0.033</span> <span class="o">-</span><span class="mf">89.79</span> <span class="mf">0.81</span> <span class="mf">0.81</span> <span class="mf">210.42</span> <span class="mf">0.26</span> <span class="mf">0.26</span> <span class="mf">2.723</span> <span class="mf">0.032</span> <span class="mf">0.032</span> <span class="o">-</span><span class="mf">179.73</span> <span class="mf">0.81</span> <span class="mf">0.81</span> <span class="mf">0.9808</span> <span class="mf">0.0017</span> <span class="mf">0.0017</span> <span class="mf">2.993</span> <span class="mf">0.033</span> <span class="mf">0.033</span> <span class="mf">90.05</span> <span class="mf">0.82</span> <span class="mf">0.82</span> <span class="mf">0.9755</span> <span class="mf">0.0017</span> <span class="mf">0.0017</span> <span class="mf">2.501</span> <span class="mf">0.032</span> <span class="mf">0.032</span> <span class="mf">20444.8</span> <span class="mi">20361</span> <span class="mf">1.00412</span> <span class="mi">11400</span>
|
||||
<span class="mi">200</span> <span class="mf">0.009</span> <span class="mf">99.49</span> <span class="mf">2.11668</span> <span class="mf">10.001</span> <span class="o">-</span><span class="mf">0.008</span> <span class="o">-</span><span class="mf">0.008</span> <span class="o">-</span><span class="mi">10</span> <span class="mf">0.1732</span> <span class="mf">0.0012</span> <span class="mf">0.0012</span> <span class="mf">0.0096</span> <span class="mf">0.0025</span> <span class="mf">0.0026</span> <span class="mf">28.88</span> <span class="mf">0.57</span> <span class="mf">0.57</span> <span class="mf">101.231</span> <span class="mf">0.03</span> <span class="mf">0.03</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mf">219.86</span> <span class="mf">0.27</span> <span class="mf">0.27</span> <span class="mf">2.749</span> <span class="mf">0.033</span> <span class="mf">0.033</span> <span class="o">-</span><span class="mf">88.87</span> <span class="mf">0.71</span> <span class="mf">0.71</span> <span class="mf">211.47</span> <span class="mf">0.26</span> <span class="mf">0.26</span> <span class="mf">2.791</span> <span class="mf">0.032</span> <span class="mf">0.032</span> <span class="o">-</span><span class="mf">178.48</span> <span class="mf">0.72</span> <span class="mf">0.71</span> <span class="mf">0.9678</span> <span class="mf">0.0017</span> <span class="mf">0.0017</span> <span class="mf">2.969</span> <span class="mf">0.033</span> <span class="mf">0.033</span> <span class="mf">90.94</span> <span class="mf">0.73</span> <span class="mf">0.73</span> <span class="mf">0.9608</span> <span class="mf">0.0017</span> <span class="mf">0.0017</span> <span class="mf">2.653</span> <span class="mf">0.032</span> <span class="mf">0.032</span> <span class="mf">20182.5</span> <span class="mi">20361</span> <span class="mf">0.991233</span> <span class="mi">11401</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="mdu-file-format-psi-for-mgrsr">
|
||||
<span id="mdu-file-format"></span><span id="index-4"></span><h2>MDU file format (psi) for μSR<a class="headerlink" href="#mdu-file-format-psi-for-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||
<p>For details about the PSI-BIN/MDU file format from PSI see <a class="reference external" href="http://lmu.web.psi.ch/docu/manuals/bulk_manuals/software/Class_MuSR_PSI/index.html">Class_MuSR_PSI</a></p>
|
||||
</div>
|
||||
<div class="section" id="mud-file-format-triumf-for-mgrsr">
|
||||
<span id="mud-file-format"></span><span id="index-5"></span><h2>MUD file format (triumf) for μSR<a class="headerlink" href="#mud-file-format-triumf-for-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||
<p>For details about the MUD file format from triumf see <a class="reference external" href="https://cmms.triumf.ca/mud/">MUon Data access</a> .</p>
|
||||
</div>
|
||||
<div class="section" id="musrroot-file-format-psi-for-mgrsr">
|
||||
<span id="musr-root-file-format"></span><h2>MusrRoot file format (PSI) for μSR<a class="headerlink" href="#musrroot-file-format-psi-for-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||
<p>For details see <a class="reference internal" href="musr-root.html#musrroot"><span class="std std-ref">MusrRoot - an Extensible Open File Format for uSR</span></a>.</p>
|
||||
</div>
|
||||
<div class="section" id="nexus-file-format-isis-for-mgrsr">
|
||||
<span id="nexus-file-format"></span><span id="index-6"></span><h2>NeXus file format (isis) for μSR<a class="headerlink" href="#nexus-file-format-isis-for-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||
<p>For details about the NeXus file format from ISIS (UK) see <a class="reference external" href="https://doi.org/10.1016/S0921-4526(02)01613-7">The application of the NeXus data format to ISIS muon data</a> . For a detailed list of available meta information and data see <a class="reference external" href="https://www.isis.stfc.ac.uk/Pages/nexus-definition-v27924.pdf">NeXus Instrument Definitions for ISIS muon Data</a> .</p>
|
||||
</div>
|
||||
<div class="section" id="psi-bin-file-format-psi-for-mgrsr">
|
||||
<span id="psi-bin-file-format"></span><span id="index-7"></span><h2>PSI-BIN file format (psi) for μSR<a class="headerlink" href="#psi-bin-file-format-psi-for-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||
<p>For details about the PSI-BIN/MDU file format from PSI see <a class="reference external" href="http://lmu.web.psi.ch/docu/manuals/bulk_manuals/software/Class_MuSR_PSI/index.html">Class_MuSR_PSI</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="root-file-format-psi-lem-before-2012-for-mgrsr">
|
||||
<span id="root-file-format"></span><span id="index-8"></span><h2>ROOT file format (psi/lem before 2012) for μSR<a class="headerlink" href="#root-file-format-psi-lem-before-2012-for-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||
<p>For details about the API of ROOT files can be here: <a class="reference external" href="https://root.cern/manual/root_files/">ROOT files</a>.
|
||||
The structure of the ROOT files (LEM, before 2012) looks like this:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ROOT</span><span class="o">-</span><span class="n">file</span> <span class="o">--|</span>
|
||||
<span class="o">|--</span> <span class="n">histos</span> <span class="o">---|</span>
|
||||
<span class="o">|</span> <span class="o">|--</span> <span class="n">DecayAnaModule</span>
|
||||
<span class="o">|</span> <span class="o">|--</span> <span class="n">PileUpAnaModule</span>
|
||||
<span class="o">|</span> <span class="o">|--</span> <span class="n">ScalerSumRate</span>
|
||||
<span class="o">|</span> <span class="o">|--</span> <span class="n">SCAnaModule</span>
|
||||
<span class="o">|</span>
|
||||
<span class="o">|--</span> <span class="n">RunInfo</span> <span class="o">--|</span>
|
||||
<span class="o">|--</span> <span class="n">RunSummary</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">histos</span></code>, <code class="docutils literal notranslate"><span class="pre">RunInfo</span></code>, <code class="docutils literal notranslate"><span class="pre">DecayAnaModule</span></code>, <code class="docutils literal notranslate"><span class="pre">PileUpAnaModule</span></code>, <code class="docutils literal notranslate"><span class="pre">ScalerSumRate</span></code>, <code class="docutils literal notranslate"><span class="pre">SCAnaModule</span></code> are <strong>TFolder</strong> objects.</p>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">DecayAnaModule</span></code> object holds the positron spectra</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">DecayAnaModule</span> <span class="o">--|</span>
|
||||
<span class="o">|--</span> <span class="n">hDecay00</span>
|
||||
<span class="o">|--</span> <span class="n">hDecay01</span>
|
||||
<span class="o">|--</span> <span class="n">hDecay02</span>
|
||||
<span class="o">|--</span> <span class="n">hDecay03</span>
|
||||
<span class="o">|--</span> <span class="n">hDecay20</span>
|
||||
<span class="o">|--</span> <span class="n">hDecay21</span>
|
||||
<span class="o">|--</span> <span class="n">hDecay22</span>
|
||||
<span class="o">|--</span> <span class="n">hDecay23</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">hDecayXX</span></code> files or <strong>TH1F</strong> objects containing the positron spectra of the LEM detectors.</p>
|
||||
<p>The detectors (00, 01, 02, and 03) are the detectors (Left, Top, Right, Bottom). These are non-post-pileup (NPP) histograms.</p>
|
||||
<p>The detectors (20, 21, 22, and 23) are the detectors (Left, Top, Right, Bottom). These are post-pileup-corrected (PPC) histograms.</p>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">SCAnaModule</span></code> contains various <strong>TF1H</strong> objects of slow control data of the run.</p>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">RunSummary</span></code> is essentially an ascii dump, with summary information of the run.</p>
|
||||
</div>
|
||||
<div class="section" id="wkm-file-format-for-mgrsr">
|
||||
<span id="wkm-file-format"></span><span id="index-9"></span><h2>WKM file format for μSR<a class="headerlink" href="#wkm-file-format-for-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||
<p>WKM is an obsolete ascii file format, originally introduced by people from the TU Braunschweig.
|
||||
It starts with a header which shows like this:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">-</span> <span class="n">WKM</span> <span class="n">data</span> <span class="n">file</span> <span class="n">converted</span> <span class="k">with</span> <span class="n">any2many</span>
|
||||
<span class="n">NEMU_Run</span><span class="p">:</span> <span class="mi">2466</span>
|
||||
<span class="n">nemu_Run</span><span class="p">:</span> <span class="o">./</span><span class="mf">2466.</span><span class="n">wkm</span>
|
||||
<span class="n">Date</span><span class="p">:</span> <span class="mi">13</span><span class="p">:</span><span class="mi">22</span><span class="p">:</span><span class="mi">00</span> <span class="mi">2012</span><span class="o">-</span><span class="mi">06</span><span class="o">-</span><span class="mi">03</span> <span class="o">/</span> <span class="mi">14</span><span class="p">:</span><span class="mi">04</span><span class="p">:</span><span class="mi">38</span> <span class="mi">2012</span><span class="o">-</span><span class="mi">06</span><span class="o">-</span><span class="mi">03</span>
|
||||
<span class="n">Title</span><span class="p">:</span> <span class="n">LSCO</span> <span class="n">x</span><span class="o">=</span><span class="mf">0.02</span> <span class="p">(</span><span class="mi">224</span><span class="o">-</span><span class="mi">227</span><span class="p">),</span> <span class="n">T</span><span class="o">=</span><span class="mf">12.00</span> <span class="p">(</span><span class="n">K</span><span class="p">),</span> <span class="n">E</span><span class="o">=</span><span class="mf">5.57</span> <span class="n">keV</span><span class="p">,</span> <span class="n">WEW</span> <span class="n">B</span><span class="o">=~</span><span class="mi">49</span><span class="p">(</span><span class="n">G</span><span class="p">)</span><span class="o">/</span><span class="mf">8.62</span><span class="p">(</span><span class="n">A</span><span class="p">),</span> <span class="n">Tr</span><span class="o">=</span><span class="mf">15.02</span> <span class="p">(</span><span class="n">kV</span><span class="p">),</span> <span class="n">Sample</span><span class="o">=</span><span class="mf">8.70</span> <span class="p">(</span><span class="n">kV</span><span class="p">),</span> <span class="n">SpinRot</span> <span class="o">-</span><span class="mi">10</span>
|
||||
<span class="n">Field</span><span class="p">:</span> <span class="mf">49.11</span>
|
||||
<span class="n">Setup</span><span class="p">:</span> <span class="n">Sample</span><span class="p">,</span> <span class="n">WEW</span><span class="p">,</span> <span class="n">LowTemp</span><span class="o">-</span><span class="mi">2</span>
|
||||
<span class="n">Temp</span><span class="p">:</span> <span class="mf">11.999</span>
|
||||
<span class="n">TOF</span><span class="p">(</span><span class="n">M3S1</span><span class="p">):</span> <span class="n">nocut</span>
|
||||
<span class="n">Groups</span><span class="p">:</span> <span class="mi">8</span>
|
||||
<span class="n">Channels</span><span class="p">:</span> <span class="mi">66601</span>
|
||||
<span class="n">Resolution</span><span class="p">:</span> <span class="mf">0.0001953125</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The header ends with an empty line.</p>
|
||||
<p>The data are stored as following: there are always 10 bin-counts per line.
|
||||
Between detectors, there will be an empty line.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="musr-root.html" class="btn btn-neutral float-right" title="MusrRoot - an Extensible Open File Format for μSR" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="any2many.html" class="btn btn-neutral" title="any2many - a Universal μSR-file-format converter" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: true,
|
||||
SOURCELINK_SUFFIX: '.txt'
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -9,7 +9,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Index — musrfit 1.9.5 documentation</title>
|
||||
<title>Index — musrfit 1.8.2 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -29,9 +29,7 @@
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="#" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link href="_static/style.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
||||
|
||||
<script src="_static/js/modernizr.min.js"></script>
|
||||
@ -59,10 +57,6 @@
|
||||
|
||||
|
||||
|
||||
<div class="version">
|
||||
1.9
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -95,7 +89,6 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||
@ -186,7 +179,6 @@
|
||||
| <a href="#T"><strong>T</strong></a>
|
||||
| <a href="#U"><strong>U</strong></a>
|
||||
| <a href="#V"><strong>V</strong></a>
|
||||
| <a href="#W"><strong>W</strong></a>
|
||||
| <a href="#X"><strong>X</strong></a>
|
||||
|
||||
</div>
|
||||
@ -208,16 +200,14 @@
|
||||
<li><a href="user-manual.html#index-10">addRunApp</a>
|
||||
</li>
|
||||
<li><a href="user-manual.html#index-37">addt0-asymmetry</a>
|
||||
</li>
|
||||
<li><a href="user-manual.html#index-36">addt0-single-histo</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="user-manual.html#index-36">addt0-single-histo</a>
|
||||
</li>
|
||||
<li><a href="user-manual.html#index-22">alpha-beta</a>
|
||||
</li>
|
||||
<li><a href="any2many.html#index-0">any2many</a>, <a href="user-manual.html#index-8">[1]</a>
|
||||
</li>
|
||||
<li><a href="file-formats.html#index-1">ascii-file-format</a>
|
||||
</li>
|
||||
<li><a href="user-manual.html#index-71">asymmetry-fit</a>
|
||||
</li>
|
||||
@ -245,7 +235,7 @@
|
||||
</li>
|
||||
<li><a href="user-manual.html#index-74">bnmr-asymmetry-fit</a>
|
||||
</li>
|
||||
<li><a href="user-libs.html#index-17">BNMR-libs</a>
|
||||
<li><a href="user-libs.html#index-14">BNMR-libs</a>
|
||||
</li>
|
||||
<li><a href="setup-standard.html#index-2">boost-c++</a>
|
||||
</li>
|
||||
@ -269,22 +259,16 @@
|
||||
<h2 id="D">D</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="file-formats.html#index-3">dat-file-format</a>
|
||||
</li>
|
||||
<li><a href="user-manual.html#index-33">data-asymmetry</a>
|
||||
</li>
|
||||
<li><a href="user-manual.html#index-32">data-single-histo</a>
|
||||
</li>
|
||||
<li><a href="file-formats.html#index-2">db-file-format</a>
|
||||
</li>
|
||||
<li><a href="user-libs.html#index-16">DepthProf-lib</a>
|
||||
</li>
|
||||
<li><a href="setup-dks.html#index-0">dks</a>
|
||||
</li>
|
||||
<li><a href="user-manual.html#index-43">dks-command-overview</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="user-manual.html#index-43">dks-command-overview</a>
|
||||
</li>
|
||||
<li><a href="setup-dks.html#index-3">dks-install</a>
|
||||
</li>
|
||||
<li><a href="setup-dks.html#index-5">dks-opencl-macOS</a>
|
||||
@ -301,7 +285,7 @@
|
||||
<h2 id="E">E</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="user-libs.html#index-20">ExpRlx</a>
|
||||
<li><a href="user-libs.html#index-17">ExpRlx</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
@ -310,8 +294,6 @@
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="setup-standard.html#index-4">fftw</a>
|
||||
</li>
|
||||
<li><a href="file-formats.html#index-0">file-formats</a>
|
||||
</li>
|
||||
<li><a href="user-manual.html#index-39">fit</a>
|
||||
</li>
|
||||
@ -323,10 +305,10 @@
|
||||
</li>
|
||||
<li><a href="user-manual.html#index-28">forward-backward</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="user-manual.html#index-50">fourier-block-apodization</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="user-manual.html#index-49">fourier-block-dc-corrected</a>
|
||||
</li>
|
||||
<li><a href="user-manual.html#index-48">fourier-block-fourier_power</a>
|
||||
@ -347,8 +329,6 @@
|
||||
<h2 id="G">G</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="user-libs.html#index-14">gap-integral-libs</a>
|
||||
</li>
|
||||
<li><a href="setup-standard.html#index-3">gnu-gsl</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
@ -377,11 +357,11 @@
|
||||
<h2 id="I">I</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="user-libs.html#index-24">Ianiso</a>
|
||||
<li><a href="user-libs.html#index-21">Ianiso</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="user-libs.html#index-23">Iax</a>
|
||||
<li><a href="user-libs.html#index-20">Iax</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
@ -389,11 +369,11 @@
|
||||
<h2 id="L">L</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="user-libs.html#index-18">libBNMR</a>
|
||||
<li><a href="user-libs.html#index-15">libBNMR</a>
|
||||
</li>
|
||||
<li><a href="user-libs.html#index-2">libFitPofB</a>
|
||||
</li>
|
||||
<li><a href="user-libs.html#index-22">libLineProfile</a>
|
||||
<li><a href="user-libs.html#index-19">libLineProfile</a>
|
||||
</li>
|
||||
<li><a href="setup-standard.html#index-6">libxml2</a>
|
||||
</li>
|
||||
@ -401,15 +381,15 @@
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="user-libs.html#index-25">LineGauss</a>
|
||||
<li><a href="user-libs.html#index-22">LineGauss</a>
|
||||
</li>
|
||||
<li><a href="user-libs.html#index-27">LineLaplace</a>
|
||||
<li><a href="user-libs.html#index-24">LineLaplace</a>
|
||||
</li>
|
||||
<li><a href="user-libs.html#index-26">LineLorentzian</a>
|
||||
<li><a href="user-libs.html#index-23">LineLorentzian</a>
|
||||
</li>
|
||||
<li><a href="user-libs.html#index-28">LineSkewLorentzian</a>
|
||||
<li><a href="user-libs.html#index-25">LineSkewLorentzian</a>
|
||||
</li>
|
||||
<li><a href="user-libs.html#index-29">LineSkewLorentzian2</a>
|
||||
<li><a href="user-libs.html#index-26">LineSkewLorentzian2</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
@ -420,8 +400,6 @@
|
||||
<li><a href="setup-standard.html#index-21">macports</a>
|
||||
</li>
|
||||
<li><a href="user-manual.html#index-26">map</a>
|
||||
</li>
|
||||
<li><a href="file-formats.html#index-4">mdu-file-format</a>
|
||||
</li>
|
||||
<li><a href="user-manual.html#index-17">meta-information</a>
|
||||
</li>
|
||||
@ -485,12 +463,10 @@
|
||||
</li>
|
||||
<li><a href="user-manual.html#index-7">msr2msr</a>
|
||||
</li>
|
||||
<li><a href="file-formats.html#index-5">mud-file-format</a>
|
||||
<li><a href="mupp.html#index-0">mupp</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="mupp.html#index-0">mupp</a>
|
||||
</li>
|
||||
<li><a href="mupp.html#index-1">mupp-gui</a>
|
||||
</li>
|
||||
<li><a href="mupp.html#index-2">mupp-scripting</a>
|
||||
@ -570,18 +546,14 @@
|
||||
<li><a href="setup-standard.html#index-10">nexus</a>
|
||||
</li>
|
||||
<li><a href="setup-standard.html#index-25">nexus-build-homebrew</a>
|
||||
</li>
|
||||
<li><a href="setup-standard.html#index-15">nexus-build-linux</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="setup-standard.html#index-15">nexus-build-linux</a>
|
||||
</li>
|
||||
<li><a href="setup-standard.html#index-22">nexus-build-macports</a>
|
||||
</li>
|
||||
<li><a href="file-formats.html#index-6">nexus-file-format</a>
|
||||
</li>
|
||||
<li><a href="user-manual.html#index-75">non-musr-fit</a>
|
||||
</li>
|
||||
<li><a href="user-libs.html#index-15">nonlocal-libs</a>
|
||||
</li>
|
||||
<li><a href="user-manual.html#index-23">norm</a>
|
||||
</li>
|
||||
@ -601,17 +573,15 @@
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="user-manual.html#index-40">packing</a>
|
||||
</li>
|
||||
<li><a href="user-libs.html#index-33">PowderLineAsymGss</a>
|
||||
</li>
|
||||
<li><a href="user-libs.html#index-32">PowderLineAsymLor</a>
|
||||
<li><a href="user-libs.html#index-30">PowderLineAsymGss</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="user-libs.html#index-31">PowderLineAxialGss</a>
|
||||
<li><a href="user-libs.html#index-29">PowderLineAsymLor</a>
|
||||
</li>
|
||||
<li><a href="user-libs.html#index-30">PowderLineAxialLor</a>
|
||||
<li><a href="user-libs.html#index-28">PowderLineAxialGss</a>
|
||||
</li>
|
||||
<li><a href="file-formats.html#index-7">psi-bin-file-format</a>
|
||||
<li><a href="user-libs.html#index-27">PowderLineAxialLor</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
@ -630,16 +600,14 @@
|
||||
<li><a href="user-manual.html#index-79">rge-handler</a>
|
||||
</li>
|
||||
<li><a href="setup-standard.html#index-26">root-build-homebrew</a>
|
||||
</li>
|
||||
<li><a href="setup-standard.html#index-16">root-build-linux</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="setup-standard.html#index-16">root-build-linux</a>
|
||||
</li>
|
||||
<li><a href="setup-standard.html#index-23">root-build-macports</a>
|
||||
</li>
|
||||
<li><a href="setup-standard.html#index-5">root-cern</a>
|
||||
</li>
|
||||
<li><a href="file-formats.html#index-8">root-file-format</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
@ -649,7 +617,7 @@
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="setup-standard.html#index-0">setup</a>
|
||||
</li>
|
||||
<li><a href="user-libs.html#index-21">SExpRlx</a>
|
||||
<li><a href="user-libs.html#index-18">SExpRlx</a>
|
||||
</li>
|
||||
<li><a href="user-manual.html#index-69">single-histogram-fit</a>
|
||||
</li>
|
||||
@ -657,7 +625,7 @@
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="user-manual.html#index-70">single-histogram-rrf-fit</a>
|
||||
</li>
|
||||
<li><a href="user-libs.html#index-19">SLR</a>
|
||||
<li><a href="user-libs.html#index-16">SLR</a>
|
||||
</li>
|
||||
<li><a href="setup-standard.html#index-1">supported-operating-systems</a>
|
||||
</li>
|
||||
@ -724,14 +692,6 @@
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="W">W</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="file-formats.html#index-9">wkm-file-format</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="X">X</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
@ -752,8 +712,8 @@
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 24, 2024.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on Dec 12, 2022.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -775,7 +735,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.5',
|
||||
VERSION:'1.8.2',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Welcome to the musrfit documentation! — musrfit 1.9.5 documentation</title>
|
||||
<title>Welcome to the musrfit documentation! — musrfit 1.8.2 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -29,9 +29,7 @@
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="How to Cite musrfit?" href="cite.html" />
|
||||
<link href="_static/style.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<link rel="next" title="How to Cite musrfit?" href="cite.html" />
|
||||
|
||||
|
||||
<script src="_static/js/modernizr.min.js"></script>
|
||||
@ -59,10 +57,6 @@
|
||||
|
||||
|
||||
|
||||
<div class="version">
|
||||
1.9
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -95,7 +89,6 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||
@ -184,9 +177,7 @@
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="user-libs.html">Documentation of user libs (user functions)</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="user-libs.html#meissner-profiles-vortex-lattice-related-functions-bmw-libs">Meissner-Profiles / Vortex-Lattice related functions (BMW libs)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="user-libs.html#supeconducting-gap-integrals-to-calculate-vs">Supeconducting Gap-Integrals to calculate <span class="math notranslate nohighlight">\(1/\lambda^2\)</span> vs <span class="math notranslate nohighlight">\(T\)</span></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="user-libs.html#nonlocal-superconductivity-related-meissner-screening-functions-as-libs">Nonlocal superconductivity related Meissner screening functions (AS libs)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="user-libs.html#depth-resolved-information-as-libs">Depth resolved information (AS libs)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="user-libs.html#functions-to-analyze-bgr-nmr-data-bnmr-libs">Functions to analyze β-NMR data (BNMR libs)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -227,19 +218,6 @@
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#ascii-file-format-for-non-mgrsr">ASCII file format for non-μSR</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#db-file-format-for-non-mgrsr">DB file format for non-μSR</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#dat-csv-like-file-format-for-non-mgrsr">DAT: CSV like file format for non-μSR</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#mdu-file-format-psi-for-mgrsr">MDU file format (psi) for μSR</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#mud-file-format-triumf-for-mgrsr">MUD file format (triumf) for μSR</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#musrroot-file-format-psi-for-mgrsr">MusrRoot file format (PSI) for μSR</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#nexus-file-format-isis-for-mgrsr">NeXus file format (isis) for μSR</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#psi-bin-file-format-psi-for-mgrsr">PSI-BIN file format (psi) for μSR</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#root-file-format-psi-lem-before-2012-for-mgrsr">ROOT file format (psi/lem before 2012) for μSR</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#wkm-file-format-for-mgrsr">WKM file format for μSR</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="musr-root.html#some-basics-concerning-root-files">Some Basics Concerning ROOT Files</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="musr-root.html#id1">MusrRoot an Extensible Open File Format for μSR</a></li>
|
||||
@ -284,8 +262,8 @@
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 24, 2024.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on Dec 12, 2022.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -307,7 +285,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.5',
|
||||
VERSION:'1.8.2',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>msr2data - A Program for Automatically Processing Multiple musrfit msr Files — musrfit 1.9.5 documentation</title>
|
||||
<title>msr2data - A Program for Automatically Processing Multiple musrfit msr Files — musrfit 1.8.2 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -30,9 +30,7 @@
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="any2many - a Universal μSR-file-format converter" href="any2many.html" />
|
||||
<link rel="prev" title="mupp - μSR Parameter Plotter" href="mupp.html" />
|
||||
<link href="_static/style.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<link rel="prev" title="mupp - μSR Parameter Plotter" href="mupp.html" />
|
||||
|
||||
|
||||
<script src="_static/js/modernizr.min.js"></script>
|
||||
@ -60,10 +58,6 @@
|
||||
|
||||
|
||||
|
||||
<div class="version">
|
||||
1.9
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -111,7 +105,6 @@
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||
@ -517,8 +510,8 @@ fit serves as template for the second and so on. The template field stays empty
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 24, 2024.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on Dec 12, 2022.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -540,7 +533,7 @@ fit serves as template for the second and so on. The template field stays empty
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.5',
|
||||
VERSION:'1.8.2',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>mupp - μSR Parameter Plotter — musrfit 1.9.5 documentation</title>
|
||||
<title>mupp - μSR Parameter Plotter — musrfit 1.8.2 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -30,9 +30,7 @@
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files" href="msr2data.html" />
|
||||
<link rel="prev" title="musredit: the GUI Based Interface to musrfit" href="musredit.html" />
|
||||
<link href="_static/style.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<link rel="prev" title="musredit: the GUI Based Interface to musrfit" href="musredit.html" />
|
||||
|
||||
|
||||
<script src="_static/js/modernizr.min.js"></script>
|
||||
@ -60,10 +58,6 @@
|
||||
|
||||
|
||||
|
||||
<div class="version">
|
||||
1.9
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -104,7 +98,6 @@
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||
@ -407,8 +400,8 @@ SCRIPT COMMANDS:
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 24, 2024.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on Dec 12, 2022.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -430,7 +423,7 @@ SCRIPT COMMANDS:
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.5',
|
||||
VERSION:'1.8.2',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>MusrRoot - an Extensible Open File Format for μSR — musrfit 1.9.5 documentation</title>
|
||||
<title>MusrRoot - an Extensible Open File Format for μSR — musrfit 1.8.2 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -30,9 +30,7 @@
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="Acknowledgements" href="acknowledgement.html" />
|
||||
<link rel="prev" title="Short description and references to the supported file-formats" href="file-formats.html" />
|
||||
<link href="_static/style.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<link rel="prev" title="any2many - a Universal μSR-file-format converter" href="any2many.html" />
|
||||
|
||||
|
||||
<script src="_static/js/modernizr.min.js"></script>
|
||||
@ -60,10 +58,6 @@
|
||||
|
||||
|
||||
|
||||
<div class="version">
|
||||
1.9
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -96,7 +90,6 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">MusrRoot - an Extensible Open File Format for μSR</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#some-basics-concerning-root-files">Some Basics Concerning ROOT Files</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id1">MusrRoot an Extensible Open File Format for μSR</a><ul>
|
||||
@ -997,7 +990,7 @@ the entry has been added. The last token, <code class="docutils literal notransl
|
||||
<a href="acknowledgement.html" class="btn btn-neutral float-right" title="Acknowledgements" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="file-formats.html" class="btn btn-neutral" title="Short description and references to the supported file-formats" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
<a href="any2many.html" class="btn btn-neutral" title="any2many - a Universal μSR-file-format converter" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
|
||||
</div>
|
||||
|
||||
@ -1006,8 +999,8 @@ the entry has been added. The last token, <code class="docutils literal notransl
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 24, 2024.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on Dec 12, 2022.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -1029,7 +1022,7 @@ the entry has been added. The last token, <code class="docutils literal notransl
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.5',
|
||||
VERSION:'1.8.2',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>musredit: the GUI Based Interface to musrfit — musrfit 1.9.5 documentation</title>
|
||||
<title>musredit: the GUI Based Interface to musrfit — musrfit 1.8.2 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -30,9 +30,7 @@
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="mupp - μSR Parameter Plotter" href="mupp.html" />
|
||||
<link rel="prev" title="Setting up musrfit / DKS: High Speed Fitting with GPU’s" href="setup-dks.html" />
|
||||
<link href="_static/style.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<link rel="prev" title="Setting up musrfit / DKS: High Speed Fitting with GPU’s" href="setup-dks.html" />
|
||||
|
||||
|
||||
<script src="_static/js/modernizr.min.js"></script>
|
||||
@ -60,10 +58,6 @@
|
||||
|
||||
|
||||
|
||||
<div class="version">
|
||||
1.9
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -116,7 +110,6 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||
@ -633,8 +626,8 @@ the corresponding fit parameter value, except the phases where the step will be
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 24, 2024.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on Dec 12, 2022.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -656,7 +649,7 @@ the corresponding fit parameter value, except the phases where the step will be
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.5',
|
||||
VERSION:'1.8.2',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
Binary file not shown.
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Search — musrfit 1.9.5 documentation</title>
|
||||
<title>Search — musrfit 1.8.2 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -28,9 +28,7 @@
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="#" />
|
||||
<link href="_static/style.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<link rel="search" title="Search" href="#" />
|
||||
|
||||
|
||||
<script src="_static/js/modernizr.min.js"></script>
|
||||
@ -58,10 +56,6 @@
|
||||
|
||||
|
||||
|
||||
<div class="version">
|
||||
1.9
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -94,7 +88,6 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||
@ -184,8 +177,8 @@
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 24, 2024.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on Dec 12, 2022.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -207,7 +200,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.5',
|
||||
VERSION:'1.8.2',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
File diff suppressed because one or more lines are too long
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Setting up musrfit / DKS: High Speed Fitting with GPU’s — musrfit 1.9.5 documentation</title>
|
||||
<title>Setting up musrfit / DKS: High Speed Fitting with GPU’s — musrfit 1.8.2 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -30,9 +30,7 @@
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="musredit: the GUI Based Interface to musrfit" href="musredit.html" />
|
||||
<link rel="prev" title="Setting up musrfit on Different Platforms" href="setup-standard.html" />
|
||||
<link href="_static/style.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<link rel="prev" title="Setting up musrfit on Different Platforms" href="setup-standard.html" />
|
||||
|
||||
|
||||
<script src="_static/js/modernizr.min.js"></script>
|
||||
@ -60,10 +58,6 @@
|
||||
|
||||
|
||||
|
||||
<div class="version">
|
||||
1.9
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -115,7 +109,6 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||
@ -407,8 +400,8 @@ The only thing you need <code class="docutils literal notranslate"><span class="
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 24, 2024.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on Dec 12, 2022.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -430,7 +423,7 @@ The only thing you need <code class="docutils literal notranslate"><span class="
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.5',
|
||||
VERSION:'1.8.2',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Setting up musrfit on Different Platforms — musrfit 1.9.5 documentation</title>
|
||||
<title>Setting up musrfit on Different Platforms — musrfit 1.8.2 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -30,9 +30,7 @@
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="Setting up musrfit / DKS: High Speed Fitting with GPU’s" href="setup-dks.html" />
|
||||
<link rel="prev" title="Documentation of user libs (user functions)" href="user-libs.html" />
|
||||
<link href="_static/style.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<link rel="prev" title="Documentation of user libs (user functions)" href="user-libs.html" />
|
||||
|
||||
|
||||
<script src="_static/js/modernizr.min.js"></script>
|
||||
@ -60,10 +58,6 @@
|
||||
|
||||
|
||||
|
||||
<div class="version">
|
||||
1.9
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -140,7 +134,6 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||
@ -264,7 +257,7 @@ Currently the <code class="docutils literal notranslate"><span class="pre">MXML<
|
||||
<p>If <em>optionally</em> the editor and graphical user interface <code class="docutils literal notranslate"><span class="pre">musrgui</span></code> / <code class="docutils literal notranslate"><span class="pre">musredit</span></code> 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>). Currently the <strong>Qt5</strong> is still supported since some older distributions are not yet supporting Qt6. <strong>Qt6</strong> is the <em>main</em> development part. Should be available on all new major distributions.</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 <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> 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>
|
||||
@ -273,8 +266,9 @@ Currently the <code class="docutils literal notranslate"><span class="pre">MXML<
|
||||
<p>Before the installation procedure will be described, please note the following restrictions:</p>
|
||||
<dl class="docutils">
|
||||
<dt><strong>GNU/Linux</strong></dt>
|
||||
<dd>No serious problems are currently known. Tested distributions: <a class="reference external" href="https://www.redhat.com/de/technologies/linux-platforms/enterprise-linux">RHEL</a> (also <a class="reference external" href="https://almalinux.org/">Alma</a>, <a class="reference external" href="https://rockylinux.org/">Rocky</a>), <a class="reference external" href="https://getfedora.org/">Fedora</a>,
|
||||
<a class="reference external" href="https://www.debian.org/">Debian</a>, <a class="reference external" href="https://www.ubuntu.com/">Ubuntu</a>, <a class="reference external" href="https://linuxmint.com/">Mint</a>, <a class="reference external" href="https://en.opensuse.org/Main_Page">openSUSE</a>, and <a class="reference external" href="https://de.manjaro.org/">Manjaro</a>.</dd>
|
||||
<dd>No serious problems are currently known. Tested distributions: <a class="reference external" href="https://www.redhat.com/de/technologies/linux-platforms/enterprise-linux">RHEL</a>, <a class="reference external" href="https://getfedora.org/">Fedora</a>,
|
||||
<a class="reference external" href="https://www.debian.org/">Debian</a>, <a class="reference external" href="https://www.ubuntu.com/">Ubuntu</a>, <a class="reference external" href="https://linuxmint.com/">Mint</a>, <a class="reference external" href="https://en.opensuse.org/Main_Page">openSUSE</a>,
|
||||
and <cite>manjaro <https://de.manjaro.org/></cite>.</dd>
|
||||
<dt><strong>Mac OS X/macOS</strong></dt>
|
||||
<dd>No serious problems are currently known for macOS ≥ 10.6. <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> is ARM M1 ready.</dd>
|
||||
<dt><strong>MS Windows</strong></dt>
|
||||
@ -306,11 +300,11 @@ from the shell will do the trick (never type the ‘$’ it is the shell prompt
|
||||
<p>For <strong>Qt5/Qt6</strong>:</p>
|
||||
<blockquote>
|
||||
<div><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ yum install epel-release
|
||||
$ yum install git cmake boost-devel gsl-devel fftw-devel libxml2-devel qt6-qtbase-devel qt6-qtsvg-devel
|
||||
$ yum install git cmake boost-devel gsl-devel fftw-devel libxml2-devel qt5-qtbase-devel qt5-qtsvg-devel
|
||||
</pre></div>
|
||||
</div>
|
||||
</div></blockquote>
|
||||
<p>If using <code class="docutils literal notranslate"><span class="pre">Qt5</span></code>, since e.g. Qt6 is not available, replace <code class="docutils literal notranslate"><span class="pre">qt6-qtbase-devel</span> <span class="pre">qt6-qtsvg-devel</span></code> by <code class="docutils literal notranslate"><span class="pre">qt5-qtbase-devel</span> <span class="pre">qt5-qtsvg-devel</span></code></p>
|
||||
<p>If using <code class="docutils literal notranslate"><span class="pre">Qt6</span></code> replace <code class="docutils literal notranslate"><span class="pre">qt5-qtbase-devel</span> <span class="pre">qt5-qtsvg-devel</span></code> by <code class="docutils literal notranslate"><span class="pre">qt6-qtbase-devel</span> <span class="pre">qt6-qtsvg-devel</span></code></p>
|
||||
<p>When dealing with a distribution that uses the dpkg/apt package manager like <a class="reference external" href="https://www.debian.org/">Debian</a> or <a class="reference external" href="https://www.ubuntu.com/">Ubuntu</a>
|
||||
the installation would look like:</p>
|
||||
<p>For <strong>Qt4</strong> (deprecated):</p>
|
||||
@ -321,11 +315,11 @@ the installation would look like:</p>
|
||||
</div></blockquote>
|
||||
<p>For <strong>Qt5/Qt6</strong>:</p>
|
||||
<blockquote>
|
||||
<div><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ apt-get install git cmake libboost-dev libboost-filesystem-dev libboost-system-dev libgsl-dev libfftw3-dev libxml2-dev qt6-base-dev qt6-svg-dev
|
||||
<div><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ apt-get install git cmake libboost-dev libboost-filesystem-dev libboost-system-dev libgsl-dev libfftw3-dev libxml2-dev qt5-default qtbase5-dev libqt5svg5-dev
|
||||
</pre></div>
|
||||
</div>
|
||||
</div></blockquote>
|
||||
<p>If using <code class="docutils literal notranslate"><span class="pre">Qt5</span></code>, since e.g. Qt6 is not available, replace <code class="docutils literal notranslate"><span class="pre">qt6-base-dev</span> <span class="pre">qt6-svg-dev</span></code> by <code class="docutils literal notranslate"><span class="pre">qtbase5-dev</span> <span class="pre">libqt5svg5-dev</span></code></p>
|
||||
<p>If using <code class="docutils literal notranslate"><span class="pre">Qt6</span></code> replace <code class="docutils literal notranslate"><span class="pre">qt5-default</span> <span class="pre">qtbase5-dev</span> <span class="pre">libqt5svg5-dev</span></code> by <code class="docutils literal notranslate"><span class="pre">qt6-default</span> <span class="pre">qtbase6-dev</span> <span class="pre">libqt6svg6-dev</span></code></p>
|
||||
<p>Everyone should know best himself which is the way to install distribution software on the chosen distribution.</p>
|
||||
<p>In case the distribution does not include the required software it has to be compiled from the source files. This means either to download
|
||||
the source code from the corresponding website, or to clone the git repo. If you need to follow this line, please check the install details of the corresponding package.</p>
|
||||
@ -365,8 +359,8 @@ $ mkdir build
|
||||
$ <span class="nb">cd</span> build
|
||||
$ cmake -DENABLE_HDF5<span class="o">=</span><span class="m">1</span> -DENABLE_HDF4<span class="o">=</span><span class="m">1</span> -DENABLE_MXML<span class="o">=</span><span class="m">0</span> ../code
|
||||
$ cmake --build ./ --clean-first
|
||||
$ <span class="c1"># install needs either to be carried out as root or sudo depending on your linux flavour.</span>
|
||||
$ sudo cmake --install ./
|
||||
$ <span class="c1"># make install needs either to be carried out as root or sudo depending on your linux flavour.</span>
|
||||
$ sudo make install
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
@ -405,13 +399,13 @@ $ <span class="c1"># now ROOT is ready to be configured. Below you will find the
|
||||
$ <span class="c1"># since we are using cmake build now, first we will need to create the build directory.</span>
|
||||
$ mkdir root_build
|
||||
$ <span class="nb">cd</span> root_build
|
||||
$ 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> -Dxml<span class="o">=</span><span class="m">1</span> -DCMAKE_INSTALL_PREFIX<span class="o">=</span>../root_exec
|
||||
$ 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>../root_exec
|
||||
$ <span class="c1"># next will be the make called via cmake. If running on a multicore CPU you can speed up tremendously by</span>
|
||||
$ <span class="c1"># calling it with the option -j <number>, where <number> is the number of threads which you want to give,</span>
|
||||
$ <span class="c1"># e.g. cmake --build ./ --clean-first -- -j8</span>
|
||||
$ cmake --build ./ --clean-first
|
||||
$ <span class="c1"># as a last step of the ROOT build process we need to install it</span>
|
||||
$ cmake --install ./
|
||||
$ make install
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>What is still missing is that the system should be told where to find the <code class="docutils literal notranslate"><span class="pre">ROOT</span></code> installation, therefore the following is suggested:</p>
|
||||
@ -470,7 +464,7 @@ $ git pull
|
||||
$ <span class="nb">cd</span> build
|
||||
$ xargs rm < install_manifest.txt
|
||||
$ cmake --build ./ --clean-first
|
||||
$ cmake --install ./
|
||||
$ make install
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>As an alternative (if git is not available), the source code can also be downloaded from the following web-page: <a class="reference external" href="https://bitbucket.org/muonspin/musrfit/downloads">musrfit at bitbucket</a></p>
|
||||
@ -510,7 +504,7 @@ $ <span class="nb">cd</span> build
|
||||
$ cmake ../ -DCMAKE_INSTALL_PREFIX<span class="o">=</span><span class="nv">$ROOTSYS</span> -Dnexus<span class="o">=</span><span class="m">1</span>
|
||||
<span class="c1"># below it is assumed that multiple cores are present, hence the -j8 option</span>
|
||||
$ cmake --build ./ --clean-first -- -j8
|
||||
$ cmake --install ./
|
||||
$ make install
|
||||
$ /sbin/ldconfig <span class="c1"># (as superuser)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
@ -584,8 +578,8 @@ directories like <code class="docutils literal notranslate"><span class="pre">..
|
||||
<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 14 alias <strong>Sonoma</strong>: <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> is ready for <strong>Sonoma</strong> on Intel <strong>and</strong> Apple Silicon based macs, both running natively.
|
||||
The <code class="docutils literal notranslate"><span class="pre">DKS</span></code> version of <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> for macOS <strong>Sonoma</strong> is ready as well.</p>
|
||||
<p class="last">macOS 13 alias <strong>Ventura</strong>: <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> is ready for <strong>Ventura</strong> on Intel <strong>and</strong> M1 (Apple Silicon) based macs, both running natively.
|
||||
The <code class="docutils literal notranslate"><span class="pre">DKS</span></code> version of <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> for macOS <strong>Ventura</strong> is ready as well.</p>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
@ -656,10 +650,10 @@ 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 notranslate"><div class="highlight"><pre><span></span>$ sudo port -v install pkgconfig autoconf automake libtool cmake libomp fftw-3 fftw-3-single gsl boost libxml2 qt6 qt6-qtsvg
|
||||
<div class="highlight-bash notranslate"><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 <code class="docutils literal notranslate"><span class="pre">Qt6</span></code>, <code class="docutils literal notranslate"><span class="pre">musredit</span></code> will be installed. If it happens that you used <code class="docutils literal notranslate"><span class="pre">musrgui</span></code> in the past,
|
||||
<p>With <code class="docutils literal notranslate"><span class="pre">Qt5</span></code>, <code class="docutils literal notranslate"><span class="pre">musredit</span></code> will be installed. If it happens that you used <code class="docutils literal notranslate"><span class="pre">musrgui</span></code> in the past,
|
||||
please change over to <code class="docutils literal notranslate"><span class="pre">musredit</span></code> since there will be no further development for <code class="docutils literal notranslate"><span class="pre">musrgui</span></code> anymore!</p>
|
||||
<div class="section" id="index-22">
|
||||
<span id="id6"></span><h4>Installation of NeXus requirements (optional)<a class="headerlink" href="#index-22" title="Permalink to this headline">¶</a></h4>
|
||||
@ -667,7 +661,6 @@ please change over to <code class="docutils literal notranslate"><span class="pr
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ sudo port -v install hdf4 hdf5
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><em>hdf4</em> is likely not available anymore.</p>
|
||||
<p><strong>Only NeXus Version ≥ 4.4 is support!</strong></p>
|
||||
<p>To get things compiled do:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ <span class="c1"># get and install NeXus</span>
|
||||
@ -678,12 +671,9 @@ $ <span class="c1"># next we will build NeXus out-of-source</span>
|
||||
$ <span class="nb">cd</span> nexus
|
||||
$ mkdir build
|
||||
$ <span class="nb">cd</span> build
|
||||
$ <span class="c1"># in case hdf4 is present</span>
|
||||
$ cmake -DENABLE_HDF5<span class="o">=</span><span class="m">1</span> -DENABLE_HDF4<span class="o">=</span><span class="m">1</span> -DENABLE_MXML<span class="o">=</span><span class="m">0</span> ../code
|
||||
$ <span class="c1"># in case hdf4 is **not** present</span>
|
||||
$ cmake -DENABLE_HDF5<span class="o">=</span><span class="m">1</span> -DENABLE_HDF4<span class="o">=</span><span class="m">0</span> -DENABLE_MXML<span class="o">=</span><span class="m">0</span> ../code
|
||||
$ cmake --build ./
|
||||
$ sudo cmake --install ./
|
||||
$ make
|
||||
$ sudo make install
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
@ -725,13 +715,13 @@ $ <span class="c1"># now ROOT is ready to be configured. Below you will find the
|
||||
$ <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><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> -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> -Ddataframe<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
|
||||
$ 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 <number>, where <number> is the number of threads which you want to give,</span>
|
||||
$ <span class="c1"># e.g. make -j8</span>
|
||||
$ cmake --build ./ --clean-first -- -j8
|
||||
$ <span class="c1"># make will take quite a while</span>
|
||||
$ cmake --install ./
|
||||
$ make install
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>For further details see <a class="reference external" href="https://root.cern.ch/building-root">Installing ROOT from Source</a>.</p>
|
||||
@ -761,11 +751,11 @@ into the file <code class="docutils literal notranslate"><span class="pre">~/.Ma
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><strong>For Mac OS X ≥ 10.8:</strong></p>
|
||||
<p>One needs to add some system variables in <code class="docutils literal notranslate"><span class="pre">~/.zprofile</span></code>:</p>
|
||||
<p>One needs to add some system variables in <code class="docutils literal notranslate"><span class="pre">~/.profile</span></code>:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">ROOTSYS</span><span class="o">=</span><span class="nv">$HOME</span>/Applications/root/root_exec
|
||||
<span class="nb">export</span> <span class="nv">MUSRFITPATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/bin
|
||||
<span class="nb">export</span> <span class="nv">PATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/bin:<span class="nv">$QTDIR</span>/bin:<span class="nv">$PATH</span>
|
||||
<span class="nb">export</span> <span class="nv">DYLD_LIBRARY_PATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/lib:/usr/local/lib:<span class="nv">$DYLD_LIBRARY_PATH</span>
|
||||
<span class="nb">export</span> <span class="nv">DYLD_LIBRARY_PATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/lib:<span class="nv">$DYLD_LIBRARY_PATH</span>
|
||||
|
||||
launchctl setenv ROOTSYS <span class="nv">$ROOTSYS</span>
|
||||
launchctl setenv MUSRFITPATH <span class="nv">$MUSRFITPATH</span>
|
||||
@ -773,7 +763,7 @@ launchctl setenv PATH <span class="nv">$PATH</span>
|
||||
launchctl setenv DYLD_LIBRARY_PATH <span class="nv">$DYLD_LIBRARY_PATH</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>After this you will need to “execute” <code class="docutils literal notranslate"><span class="pre">.zprofile</span></code> or <code class="docutils literal notranslate"><span class="pre">.profile</span></code> before proceeding:</p>
|
||||
<p>After this you will need to “execute” <code class="docutils literal notranslate"><span class="pre">.profile</span></code> or <code class="docutils literal notranslate"><span class="pre">.zprofile</span></code> before proceeding:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">source</span> <span class="nv">$HOME</span>/.profile
|
||||
</pre></div>
|
||||
</div>
|
||||
@ -819,11 +809,10 @@ install it.</dd>
|
||||
</dl>
|
||||
<p>After installing the <code class="docutils literal notranslate"><span class="pre">Xcode</span></code> tools go to the <a class="reference external" href="https://brew.sh/">Homebrew</a> page, and follow the installation instructions there.</p>
|
||||
<p>The essential packages (called formulae) which you will need to install are</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cmake</span> <span class="n">libomp</span> <span class="n">boost</span> <span class="n">gsl</span> <span class="n">fftw</span> <span class="n">qt6</span> <span class="p">(</span><span class="n">root</span><span class="p">)</span>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cmake</span> <span class="n">boost</span> <span class="n">gsl</span> <span class="n">fftw</span> <span class="n">qt6</span> <span class="n">root</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The preferred installation of root would be from source (see below), hence it is set here in parenthesis.
|
||||
For example to install <code class="docutils literal notranslate"><span class="pre">cmake</span></code> this is done the following way:</p>
|
||||
<p>For example to install <code class="docutils literal notranslate"><span class="pre">cmake</span></code> this is done the following way:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ brew install cmake
|
||||
</pre></div>
|
||||
</div>
|
||||
@ -846,7 +835,7 @@ $ mkdir build
|
||||
$ <span class="nb">cd</span> build
|
||||
$ cmake ../code -DENABLE_HDF5<span class="o">=</span><span class="m">1</span> -DENABLE_HDF4<span class="o">=</span><span class="m">0</span> -DENABLE_MXML<span class="o">=</span><span class="m">0</span>
|
||||
$ cmake --build ./ --clean-first -- -j8
|
||||
$ sudo cmake --install ./
|
||||
$ sudo make install
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
@ -878,13 +867,13 @@ $ <span class="c1"># now ROOT is ready to be configured. Below you will find the
|
||||
$ <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><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> -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> -Ddataframe<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
|
||||
$ 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 <number>, where <number> is the number of threads which you want to give,</span>
|
||||
$ <span class="c1"># e.g. make -j8</span>
|
||||
$ cmake --build ./ --clean-first -- -j8
|
||||
$ <span class="c1"># make will take quite a while</span>
|
||||
$ cmake --install ./
|
||||
$ make install
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>For further details see <a class="reference external" href="https://root.cern.ch/building-root">Installing ROOT from Source</a>.</p>
|
||||
@ -914,12 +903,12 @@ into the file <code class="docutils literal notranslate"><span class="pre">~/.Ma
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><strong>For Mac OS X ≥ 10.8:</strong></p>
|
||||
<p>One needs to add some system variables in <code class="docutils literal notranslate"><span class="pre">~/.zprofile</span></code>:</p>
|
||||
<p>One needs to add some system variables in <code class="docutils literal notranslate"><span class="pre">~/.profile</span></code>:</p>
|
||||
<p>If <code class="docutils literal notranslate"><span class="pre">ROOT</span></code> has been installed via Homebrew:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">ROOTSYS</span><span class="o">=</span>/usr/local
|
||||
<span class="nb">export</span> <span class="nv">MUSRFITPATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/bin
|
||||
<span class="nb">export</span> <span class="nv">PATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/bin:<span class="nv">$QTDIR</span>/bin:<span class="nv">$PATH</span>
|
||||
<span class="nb">export</span> <span class="nv">DYLD_LIBRARY_PATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/lib/root:/usr/local/lib:<span class="nv">$DYLD_LIBRARY_PATH</span>
|
||||
<span class="nb">export</span> <span class="nv">DYLD_LIBRARY_PATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/lib/root:<span class="nv">$DYLD_LIBRARY_PATH</span>
|
||||
|
||||
launchctl setenv ROOTSYS <span class="nv">$ROOTSYS</span>
|
||||
launchctl setenv MUSRFITPATH <span class="nv">$MUSRFITPATH</span>
|
||||
@ -931,7 +920,7 @@ launchctl setenv DYLD_LIBRARY_PATH <span class="nv">$DYLD_LIBRARY_PATH</span>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">ROOTSYS</span><span class="o">=</span><span class="nv">$HOME</span>/Applications/root/root_exec
|
||||
<span class="nb">export</span> <span class="nv">MUSRFITPATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/bin
|
||||
<span class="nb">export</span> <span class="nv">PATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/bin:<span class="nv">$QTDIR</span>/bin:<span class="nv">$PATH</span>
|
||||
<span class="nb">export</span> <span class="nv">LD_LIBRARY_PATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/lib:/usr/local/lib:<span class="nv">$LD_LIBRARY_PATH</span>
|
||||
<span class="nb">export</span> <span class="nv">LD_LIBRARY_PATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/lib:<span class="nv">$LD_LIBRARY_PATH</span>
|
||||
|
||||
launchctl setenv ROOTSYS <span class="nv">$ROOTSYS</span>
|
||||
launchctl setenv MUSRFITPATH <span class="nv">$MUSRFITPATH</span>
|
||||
@ -997,16 +986,7 @@ If the value is set to <code class="docutils literal notranslate"><span class="p
|
||||
<dd>Will check if <code class="docutils literal notranslate"><span class="pre">OpenMP</span></code> support is possible, and if yes use it. The default is enabled</dd>
|
||||
</dl>
|
||||
<p>Normally it should not be necessary to make use of any of the options except for specifying the installation path with <code class="docutils literal notranslate"><span class="pre">-DCMAKE_INSTALL_PREFIX</span></code>.
|
||||
<code class="docutils literal notranslate"><span class="pre">musrfit</span></code> build with <code class="docutils literal notranslate"><span class="pre">cmake</span></code> takes the <code class="docutils literal notranslate"><span class="pre">out-of-source</span></code> approach.</p>
|
||||
<p>In order to have <strong>OpenMP</strong> available, which allows parallel processing of the fitter, you will need to guide <code class="docutils literal notranslate"><span class="pre">cmake</span></code> to where it can find it. For a <code class="docutils literal notranslate"><span class="pre">Homebrew</span></code> installation, this would be</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">export</span> <span class="nv">OpenMP_ROOT</span><span class="o">=</span><span class="k">$(</span>brew --prefix<span class="k">)</span>/opt/libomp
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>and for a <code class="docutils literal notranslate"><span class="pre">MacPorts</span></code> installation, something like</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">export</span> <span class="nv">OpenMP_ROOT</span><span class="o">=</span>/opt/local/include/libomp
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Therefore a typical configuration / make / install process including
|
||||
<code class="docutils literal notranslate"><span class="pre">musrfit</span></code> build with <code class="docutils literal notranslate"><span class="pre">cmake</span></code> takes the <code class="docutils literal notranslate"><span class="pre">out-of-source</span></code> approach. Therefore a typical configuration / make / install process including
|
||||
<code class="docutils literal notranslate"><span class="pre">NeXus</span></code> support would look like</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> <span class="nv">$HOME</span>/Apps/musrfit
|
||||
$ mkdir build
|
||||
@ -1014,24 +994,7 @@ $ <span class="nb">cd</span> build
|
||||
$ cmake ../ -DCMAKE_INSTALL_PREFIX<span class="o">=</span><span class="nv">$ROOTSYS</span> -Dnexus<span class="o">=</span><span class="m">1</span>
|
||||
<span class="c1"># below it is assumed that multiple cores are present, hence the -j8 option</span>
|
||||
$ cmake --build ./ --clean-first -- -j8
|
||||
$ cmake --install ./
|
||||
$ /sbin/ldconfig <span class="c1"># (as superuser)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">If you use <code class="docutils literal notranslate"><span class="pre">MacPorts</span></code> you will likely need to guide cmake where to find <code class="docutils literal notranslate"><span class="pre">qt6</span></code>.
|
||||
You will need to provide the path to the necessary <code class="docutils literal notranslate"><span class="pre">cmake</span></code> files. This is done
|
||||
from the command line via the switch <code class="docutils literal notranslate"><span class="pre">CMAKE_PREFIX_PATH</span></code>.
|
||||
The configuration, build, and install process might look like this:</p>
|
||||
</div>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> <span class="nv">$HOME</span>/Apps/musrfit
|
||||
$ mkdir build
|
||||
$ <span class="nb">cd</span> build
|
||||
$ cmake ../ -DCMAKE_INSTALL_PREFIX<span class="o">=</span><span class="nv">$ROOTSYS</span> -Dnexus<span class="o">=</span><span class="m">1</span> -DCMAKE_PREFIX_PATH<span class="o">=</span>/opt/local/libexec/qt6/lib/cmake
|
||||
<span class="c1"># below it is assumed that multiple cores are present, hence the -j8 option</span>
|
||||
$ cmake --build ./ --clean-first -- -j8
|
||||
$ cmake --install ./
|
||||
$ make install
|
||||
$ /sbin/ldconfig <span class="c1"># (as superuser)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
@ -1124,8 +1087,8 @@ $ musrview test-histo-ROOT-NPP.msr
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 24, 2024.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on Dec 12, 2022.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -1147,7 +1110,7 @@ $ musrview test-histo-ROOT-NPP.msr
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.5',
|
||||
VERSION:'1.8.2',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Tutorial for musrfit — musrfit 1.9.5 documentation</title>
|
||||
<title>Tutorial for musrfit — musrfit 1.8.2 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -30,9 +30,7 @@
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="User manual" href="user-manual.html" />
|
||||
<link rel="prev" title="How to Cite musrfit?" href="cite.html" />
|
||||
<link href="_static/style.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<link rel="prev" title="How to Cite musrfit?" href="cite.html" />
|
||||
|
||||
|
||||
<script src="_static/js/modernizr.min.js"></script>
|
||||
@ -60,10 +58,6 @@
|
||||
|
||||
|
||||
|
||||
<div class="version">
|
||||
1.9
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -108,7 +102,6 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||
@ -526,8 +519,8 @@ For a complete description please refer to the manuals of <a class="reference in
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 24, 2024.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on Dec 12, 2022.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -549,7 +542,7 @@ For a complete description please refer to the manuals of <a class="reference in
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.5',
|
||||
VERSION:'1.8.2',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Documentation of user libs (user functions) — musrfit 1.9.5 documentation</title>
|
||||
<title>Documentation of user libs (user functions) — musrfit 1.8.2 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -30,9 +30,7 @@
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="Setting up musrfit on Different Platforms" href="setup-standard.html" />
|
||||
<link rel="prev" title="User manual" href="user-manual.html" />
|
||||
<link href="_static/style.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<link rel="prev" title="User manual" href="user-manual.html" />
|
||||
|
||||
|
||||
<script src="_static/js/modernizr.min.js"></script>
|
||||
@ -60,10 +58,6 @@
|
||||
|
||||
|
||||
|
||||
<div class="version">
|
||||
1.9
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -100,9 +94,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#supeconducting-gap-integrals-to-calculate-vs">Supeconducting Gap-Integrals to calculate <span class="math notranslate nohighlight">\(1/\lambda^2\)</span> vs <span class="math notranslate nohighlight">\(T\)</span></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#nonlocal-superconductivity-related-meissner-screening-functions-as-libs">Nonlocal superconductivity related Meissner screening functions (AS libs)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#depth-resolved-information-as-libs">Depth resolved information (AS libs)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#functions-to-analyze-bgr-nmr-data-bnmr-libs">Functions to analyze β-NMR data (BNMR libs)</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#libbnmr">libBNMR</a><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#functions">Functions</a></li>
|
||||
@ -122,7 +114,6 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||
@ -506,127 +497,12 @@ The expected name of the <code class="docutils literal notranslate"><span class=
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="supeconducting-gap-integrals-to-calculate-vs">
|
||||
<span id="gap-integral-libs"></span><span id="index-14"></span><h2>Supeconducting Gap-Integrals to calculate <span class="math notranslate nohighlight">\(1/\lambda^2\)</span> vs <span class="math notranslate nohighlight">\(T\)</span><a class="headerlink" href="#supeconducting-gap-integrals-to-calculate-vs" title="Permalink to this headline">¶</a></h2>
|
||||
<p>The details about the various superconducting gap-integrals are found in the
|
||||
pdf-file <strong>GapIntegrals.pdf</strong> which can be found in the musrfit source under
|
||||
<code class="docutils literal notranslate"><span class="pre"><musrfit-dir>/src/external/libGapIntegrals/</span></code>.</p>
|
||||
</div>
|
||||
<div class="section" id="nonlocal-superconductivity-related-meissner-screening-functions-as-libs">
|
||||
<span id="nonlocal-libs"></span><span id="index-15"></span><h2>Nonlocal superconductivity related Meissner screening functions (AS libs)<a class="headerlink" href="#nonlocal-superconductivity-related-meissner-screening-functions-as-libs" title="Permalink to this headline">¶</a></h2>
|
||||
<p>This library allows to calculate the magnetic field profile <span class="math notranslate nohighlight">\(B(z)\)</span> for nonlocal superconductors.
|
||||
For details see <a class="reference external" href="http://dx.doi.org/10.1103/PhysRevLett.95.197201">A. Suter, et al., PRB 72, 024506 (2005)</a>, and references therein.</p>
|
||||
<p>The provided function calculates the muon spin polarization</p>
|
||||
<div class="math notranslate nohighlight">
|
||||
\[P(t, E) = \int n(z, E)\, \cos(\gamma_\mu B(z) t + \phi) \, dz,\]</div>
|
||||
<p>where <span class="math notranslate nohighlight">\(B(z)\)</span> is calculated in the limit of specular reflection.
|
||||
The corresponding user function is called as</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libPNL_PippardFitter</span> <span class="n">PNL_PippardFitter</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span> <span class="mi">6</span> <span class="mi">7</span> <span class="mi">8</span> <span class="mi">9</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>with the parameters</p>
|
||||
<ol class="arabic simple">
|
||||
<li>implantation energy in (keV).</li>
|
||||
<li>reduced temperature <span class="math notranslate nohighlight">\(t=T/T_c\)</span>.</li>
|
||||
<li>thickness in (nm).</li>
|
||||
<li>electron mean path, <span class="math notranslate nohighlight">\(\ell\)</span> in (nm).</li>
|
||||
<li>superconducting coherence length, <span class="math notranslate nohighlight">\(\xi\)</span> in (nm).</li>
|
||||
<li>London penetration length, <span class="math notranslate nohighlight">\(\lambda_{\rm L}\)</span> in (nm).</li>
|
||||
<li>external magnetic field strength in (G).</li>
|
||||
<li>the effective detector phase, <span class="math notranslate nohighlight">\(\varphi\)</span> in <span class="math notranslate nohighlight">\((^\circ)\)</span>.</li>
|
||||
<li>a “dead layer” thickness in (nm).</li>
|
||||
</ol>
|
||||
<p>Typically this function needs to be multiplied by a Gaussian in order to take into account: nuclear dipole broadening, partial trapped flux, etc.</p>
|
||||
<p>In order to find the muon stopping profile, <span class="math notranslate nohighlight">\(n(z,E)\)</span>, needed for the calculation, the library needs to find the corresponding trimsp
|
||||
rge-files (muon stoppping profiles). For this the library reads at start-up the following xml-file (example):</p>
|
||||
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp"><?xml version="1.0" encoding="UTF-8"?></span>
|
||||
<span class="nt"><nonlocal</span> <span class="na">xmlns=</span><span class="s">"http://nemu.web.psi.ch/musrfit/nonlocal"</span><span class="nt">></span>
|
||||
<span class="nt"><comment></span>
|
||||
nonlocal_startup.xml
|
||||
<span class="nt"></comment></span>
|
||||
<span class="nt"><nonlocal_par></span>
|
||||
<span class="nt"><fourier_points></span>262144<span class="nt"></fourier_points></span>
|
||||
<span class="nt"></nonlocal_par></span>
|
||||
<span class="nt"><trim_sp></span>
|
||||
<span class="nt"><data_path></span>./profiles/<span class="nt"></data_path></span>
|
||||
<span class="nt"><rge_fln_pre></span>Sn_E<span class="nt"></rge_fln_pre></span>
|
||||
<span class="nt"><energy_list></span>
|
||||
<span class="nt"><energy></span>1000<span class="nt"></energy></span>
|
||||
<span class="nt"><energy></span>2000<span class="nt"></energy></span>
|
||||
<span class="nt"><energy></span>4000<span class="nt"></energy></span>
|
||||
<span class="nt"><energy></span>6000<span class="nt"></energy></span>
|
||||
<span class="nt"><energy></span>8000<span class="nt"></energy></span>
|
||||
<span class="nt"><energy></span>10000<span class="nt"></energy></span>
|
||||
<span class="nt"><energy></span>12000<span class="nt"></energy></span>
|
||||
<span class="nt"><energy></span>14100<span class="nt"></energy></span>
|
||||
<span class="nt"><energy></span>18000<span class="nt"></energy></span>
|
||||
<span class="nt"><energy></span>22000<span class="nt"></energy></span>
|
||||
<span class="nt"><energy></span>25000<span class="nt"></energy></span>
|
||||
<span class="nt"><energy></span>27300<span class="nt"></energy></span>
|
||||
<span class="nt"></energy_list></span>
|
||||
<span class="nt"></trim_sp></span>
|
||||
<span class="nt"></nonlocal></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Here the number of Fourier points needed in the calculation can be defined (<code class="docutils literal notranslate"><span class="pre">fourier_points</span></code>). The <code class="docutils literal notranslate"><span class="pre">trim_sp</span></code> section
|
||||
contains all the information needed to load the proper muon stopping profiles. <code class="docutils literal notranslate"><span class="pre">data_path</span></code> is the path to the needed rge-files.
|
||||
<code class="docutils literal notranslate"><span class="pre">rge_fln_pre</span></code> is the rge-file prefix, and <code class="docutils literal notranslate"><span class="pre">energy</span></code> are all the energy tags. E.g. <code class="docutils literal notranslate"><span class="pre">./profile/Sn_E1000.rge</span></code> would be the first
|
||||
muon stopping profile for an energy of <span class="math notranslate nohighlight">\(E=1000\)</span> (eV).</p>
|
||||
<p>The name of the xml-file has to be <code class="docutils literal notranslate"><span class="pre">nonlocal_startup.xml</span></code> and needs to be placed in the directory where the analysis takes place, i.e.
|
||||
in the directory of all the msr-files.</p>
|
||||
</div>
|
||||
<div class="section" id="depth-resolved-information-as-libs">
|
||||
<span id="depthprof-lib"></span><span id="index-16"></span><h2>Depth resolved information (AS libs)<a class="headerlink" href="#depth-resolved-information-as-libs" title="Permalink to this headline">¶</a></h2>
|
||||
<p>A method to extract depth-resolved information from the implantation energy dependence of the experimental parameters in a low-energy
|
||||
muon spin spectroscopy experiment. For details see <a class="reference external" href="https://doi.org/10.1063/1.5126529">A. F. A. Simões, et al. Review of Scientific Instruments. 2020; 91(2): 023906 (7 pp.)</a>.</p>
|
||||
<p>If you have a layered material (e.g. <span class="math notranslate nohighlight">\(N\)</span> layers), properties like the asymmetry might depend on the layer in which the muons are stopped.
|
||||
For instance there might be different probabilities for muonium formation depending on the material, charge transfer layers, etc.</p>
|
||||
<p>Since the muon stopping distribution, <span class="math notranslate nohighlight">\(n(z)\)</span>, has some finite range, these properties will be smeared out. For the following we define
|
||||
the stopping probability, <span class="math notranslate nohighlight">\(p_{i}(E)\)</span> for a finite slice <span class="math notranslate nohighlight">\(i\)</span>, ranging from <span class="math notranslate nohighlight">\(z \in [a, b]\)</span> as</p>
|
||||
<div class="math notranslate nohighlight">
|
||||
\[p_{i}(E) = \int_a^b n(z,E) \, dz\]</div>
|
||||
<p>Furthermore it is assumes that there is a sharp transition between the layers of the property of interest, e.g. the diamagnetic fraction, <span class="math notranslate nohighlight">\(f_i\)</span>.
|
||||
Hence the measured property as function of energy is</p>
|
||||
<div class="math notranslate nohighlight">
|
||||
\[f(E) = \sum_{i=1}^N p_{i}(E) \cdot f_i.\]</div>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">Currently it is recommended to read in the data in ASCII or DAT format as a non-μSR fit <a class="reference internal" href="user-manual.html#non-musr-fit"><span class="std std-ref">(fit type 8)</span></a>.</p>
|
||||
</div>
|
||||
<p>The user library for the depth profile analysis looks for a <strong>3 layer material</strong>, assuming one is looking for the diamagnetic fraction, like</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">###############################################################</span>
|
||||
<span class="n">FITPARAMETER</span>
|
||||
<span class="c1"># Nr. Name Value Step Pos_Error Boundaries</span>
|
||||
<span class="mi">1</span> <span class="n">f1</span> <span class="mf">0.54540</span> <span class="mf">0.00072</span> <span class="n">none</span> <span class="mi">0</span> <span class="mi">1</span>
|
||||
<span class="mi">2</span> <span class="n">f2</span> <span class="mf">0.23957</span> <span class="mf">0.00048</span> <span class="n">none</span>
|
||||
<span class="mi">3</span> <span class="n">f3</span> <span class="mf">0.05615</span> <span class="mf">0.00047</span> <span class="n">none</span> <span class="mi">0</span> <span class="mi">1</span>
|
||||
<span class="mi">4</span> <span class="n">x1</span> <span class="mf">63.5000</span> <span class="mf">0.0014</span> <span class="n">none</span>
|
||||
<span class="mi">5</span> <span class="n">x2</span> <span class="mf">101.5001</span> <span class="mf">0.0044</span> <span class="n">none</span>
|
||||
|
||||
<span class="c1">###############################################################</span>
|
||||
<span class="n">THEORY</span>
|
||||
<span class="n">userFcn</span> <span class="n">libPDepthProfile</span> <span class="n">PDepthProfile</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Here, <span class="math notranslate nohighlight">\(f1\)</span> is the diamagnetic fraction of the first layer, etc. <span class="math notranslate nohighlight">\(x1\)</span> is the thickness of the first layer, etc.</p>
|
||||
<p>In order to find the muon stopping profile, <span class="math notranslate nohighlight">\(n(z,E)\)</span>, needed for the calculation, the library needs to find the corresponding trimsp
|
||||
rge-files (muon stoppping profiles). For this the library reads at start-up the following xml-file (example):</p>
|
||||
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp"><?xml version="1.0" encoding="UTF-8"?></span>
|
||||
<span class="nt"><depthProf</span> <span class="na">xmlns=</span><span class="s">"http://nemu.web.psi.ch/musrfit/depthProf"</span><span class="nt">></span>
|
||||
<span class="nt"><comment></span>
|
||||
TrimSp information
|
||||
<span class="nt"></comment></span>
|
||||
<span class="nt"><trim_sp></span>
|
||||
<span class="nt"><data_path></span>./TRIMSP/<span class="nt"></data_path></span>
|
||||
<span class="nt"><rge_fln_pre></span>SiO2_70nm2.0_30nm2.2_SiC_E<span class="nt"></rge_fln_pre></span>
|
||||
<span class="nt"><energy_vect</span> <span class="na">start=</span><span class="s">"1000"</span> <span class="na">stop=</span><span class="s">"22000"</span> <span class="na">step=</span><span class="s">"1000"</span><span class="nt">/></span>
|
||||
<span class="nt"></trim_sp></span>
|
||||
<span class="nt"></depthProf></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<h2>Nonlocal superconductivity related Meissner screening functions (AS libs)<a class="headerlink" href="#nonlocal-superconductivity-related-meissner-screening-functions-as-libs" title="Permalink to this headline">¶</a></h2>
|
||||
<p>To be written yet …</p>
|
||||
</div>
|
||||
<div class="section" id="functions-to-analyze-bgr-nmr-data-bnmr-libs">
|
||||
<span id="bnmr-libs"></span><span id="index-17"></span><h2>Functions to analyze β-NMR data (BNMR libs)<a class="headerlink" href="#functions-to-analyze-bgr-nmr-data-bnmr-libs" title="Permalink to this headline">¶</a></h2>
|
||||
<span id="bnmr-libs"></span><span id="index-14"></span><h2>Functions to analyze β-NMR data (BNMR libs)<a class="headerlink" href="#functions-to-analyze-bgr-nmr-data-bnmr-libs" title="Permalink to this headline">¶</a></h2>
|
||||
<p>This is a collection of <code class="docutils literal notranslate"><span class="pre">C++</span></code> classes using the <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> <a class="reference internal" href="user-manual.html#id38"><span class="std std-ref">user-functions</span></a>
|
||||
interface in order to facilitate the usage in conjunction with <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>. It consists of two libraries:</p>
|
||||
<ul class="simple">
|
||||
@ -638,11 +514,11 @@ interface in order to facilitate the usage in conjunction with <code class="docu
|
||||
<p class="last">Currently it is recommended to read in the data in ASCII format as a non-μSR fit <a class="reference internal" href="user-manual.html#non-musr-fit"><span class="std std-ref">(fit type 8)</span></a>.</p>
|
||||
</div>
|
||||
<div class="section" id="libbnmr">
|
||||
<span id="index-18"></span><h3>libBNMR<a class="headerlink" href="#libbnmr" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="index-15"></span><h3>libBNMR<a class="headerlink" href="#libbnmr" title="Permalink to this headline">¶</a></h3>
|
||||
<p>In β-NMR the SLR is usually measured by implanting a pulse of <span class="math notranslate nohighlight">\(^8\)</span>Li with a length <span class="math notranslate nohighlight">\(t_0\)</span> into the sample.
|
||||
The asymmetry is measured both during the pulse and afterwards. For a a general spin relaxation function <span class="math notranslate nohighlight">\(f(t)\)</span> the time evolution of the asymmetry is then given by [<a class="reference external" href="http://dx.doi.org/10.1103/PhysRevLett.96.147601">Z. Salman, et al., PRL 96, 147601 (2006)</a>]:</p>
|
||||
<div class="math notranslate nohighlight" id="slr">
|
||||
<span id="index-19"></span>\[\begin{split}P(t) = \left\{\begin{matrix}
|
||||
<span id="index-16"></span>\[\begin{split}P(t) = \left\{\begin{matrix}
|
||||
\frac{\int_0^t e^{-(t-t')/\tau_{\mathrm{Li}}}f(t-t')dt'}{\int_0^t e^{-t'/\tau_{\mathrm{Li}}}dt' } & t\leq t_0\\[6pt]
|
||||
\frac{\int_0^{t_0}e^{-(t_0-t')/\tau_{\mathrm{Li}}}f(t-t')dt'}{\int_0^{t_0}e^{-t'/\tau_{\mathrm{Li}}}dt'} & t> t_0,
|
||||
\end{matrix}\right.\end{split}\]</div>
|
||||
@ -650,7 +526,7 @@ The asymmetry is measured both during the pulse and afterwards. For a a general
|
||||
<div class="section" id="functions">
|
||||
<h4>Functions<a class="headerlink" href="#functions" title="Permalink to this headline">¶</a></h4>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">libBNMR</span></code> library currently contains the following functions:</p>
|
||||
<p id="index-20"><strong>Exponential relaxation</strong></p>
|
||||
<p id="index-17"><strong>Exponential relaxation</strong></p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libBNMR</span> <span class="n">ExpRlx</span> <span class="mi">1</span> <span class="mi">2</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
@ -660,7 +536,7 @@ The asymmetry is measured both during the pulse and afterwards. For a a general
|
||||
<li>relaxation rate <span class="math notranslate nohighlight">\(\lambda\)</span> (s<span class="math notranslate nohighlight">\(^{-1}\)</span>)</li>
|
||||
</ol>
|
||||
<p>This function implements <span class="math notranslate nohighlight">\(f(t)=e^{-\lambda t}\)</span>.</p>
|
||||
<p id="index-21"><strong>Stretched exponential relaxation</strong></p>
|
||||
<p id="index-18"><strong>Stretched exponential relaxation</strong></p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libBNMR</span> <span class="n">SExpRlx</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
@ -674,19 +550,19 @@ The asymmetry is measured both during the pulse and afterwards. For a a general
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="liblineprofile">
|
||||
<span id="index-22"></span><h3>libLineProfile<a class="headerlink" href="#liblineprofile" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="index-19"></span><h3>libLineProfile<a class="headerlink" href="#liblineprofile" title="Permalink to this headline">¶</a></h3>
|
||||
<p>In addition to some simple line shapes <code class="docutils literal notranslate"><span class="pre">libLineProfile</span></code> contains functions to fit chemical shift anisotropies in the powder average.
|
||||
Their functional form can be found in <a class="reference external" href="http://dx.doi.org/10.1007/978-3-642-68756-3_2">M. Mehring, Principles of High Resolution NMR in Solids (Springer 1983)</a>.</p>
|
||||
<p>For an axially symmetric interaction it is given by:</p>
|
||||
<div class="math notranslate nohighlight" id="iax">
|
||||
<span id="index-23"></span>\[\begin{split}I_{\mathrm ax}(f)=\left\{\begin{matrix} \frac{1}{2\sqrt{(f_\parallel-f_\perp)(f-f_\perp)}}& f\in(f_\perp,f_\parallel)\cup(f_\parallel,f_\perp)\\[6pt] 0 & \text{otherwise}\end{matrix} \right.\end{split}\]</div>
|
||||
<span id="index-20"></span>\[\begin{split}I_{\mathrm ax}(f)=\left\{\begin{matrix} \frac{1}{2\sqrt{(f_\parallel-f_\perp)(f-f_\perp)}}& f\in(f_\perp,f_\parallel)\cup(f_\parallel,f_\perp)\\[6pt] 0 & \text{otherwise}\end{matrix} \right.\end{split}\]</div>
|
||||
<p>where <span class="math notranslate nohighlight">\(f_\parallel\)</span> and <span class="math notranslate nohighlight">\(f_\perp\)</span> are the frequencies that would be observed if the field is oriented paralell or perpendicular to the symmetry axis, respectively.</p>
|
||||
<div class="line-block">
|
||||
<div class="line">In case of a completely anisotropic interaction, the powder average can be described by the frequencies along the three principle axis <span class="math notranslate nohighlight">\(f_1,f_2,f_3\)</span>.</div>
|
||||
<div class="line">Assume without loss of generality that <span class="math notranslate nohighlight">\(f_1<f_2<f_3\)</span>, then</div>
|
||||
</div>
|
||||
<div class="math notranslate nohighlight" id="ianiso">
|
||||
<span id="index-24"></span>\[\begin{split}I(f)&=\left\{\begin{matrix}
|
||||
<span id="index-21"></span>\[\begin{split}I(f)&=\left\{\begin{matrix}
|
||||
\frac{K(m)}{\pi\sqrt{(f-f_1)(f_3-f_2)}},& f_3\geq f>f_2 \\[9pt]
|
||||
\frac{K(m)}{\pi\sqrt{(f_3-f)(f_2-f_1)}},& f_2>f\geq f_1\\[9pt]
|
||||
0 & \text{otherwise}
|
||||
@ -702,7 +578,7 @@ K(m)&=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
|
||||
<div class="section" id="id1">
|
||||
<h4>Functions<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h4>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">libLineProfile</span></code> library currently contains the following functions:</p>
|
||||
<p id="index-25"><strong>Gaussian</strong></p>
|
||||
<p id="index-22"><strong>Gaussian</strong></p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libLineProfile</span> <span class="n">LineGauss</span> <span class="mi">1</span> <span class="mi">2</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
@ -717,7 +593,7 @@ K(m)&=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
|
||||
</div>
|
||||
<div class="math notranslate nohighlight">
|
||||
\[A(f)=e^{-\frac{4\ln 2 (f-f_0)^2}{ \sigma^2}}\]</div>
|
||||
<p id="index-26"><strong>Lorentzian</strong></p>
|
||||
<p id="index-23"><strong>Lorentzian</strong></p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libLineProfile</span> <span class="n">LineLorentzian</span> <span class="mi">1</span> <span class="mi">2</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
@ -732,7 +608,7 @@ K(m)&=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
|
||||
</div>
|
||||
<div class="math notranslate nohighlight">
|
||||
\[A(f)= \frac{w^2}{4(f-f_0)^2+w^2}\]</div>
|
||||
<p id="index-27"><strong>Laplacian</strong></p>
|
||||
<p id="index-24"><strong>Laplacian</strong></p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libLineProfile</span> <span class="n">LineLaplace</span> <span class="mi">1</span> <span class="mi">2</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
@ -747,7 +623,7 @@ K(m)&=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
|
||||
</div>
|
||||
<div class="math notranslate nohighlight">
|
||||
\[A(f)=e^{-2\ln 2 \left|\frac{f-f_0}{w}\right|}\]</div>
|
||||
<p id="index-28"><strong>Skewed Lorentzian</strong></p>
|
||||
<p id="index-25"><strong>Skewed Lorentzian</strong></p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libLineProfile</span> <span class="n">LineSkewLorentzian</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
@ -763,7 +639,7 @@ K(m)&=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
|
||||
</div>
|
||||
<div class="math notranslate nohighlight">
|
||||
\[A(f)= \frac{w w_a}{4(f-f_0)^2+w_a^2}, \quad w_a=\frac{2w}{1+e^{a(f-f_0)}}\]</div>
|
||||
<p id="index-29"><strong>Skewed Lorentzian 2</strong></p>
|
||||
<p id="index-26"><strong>Skewed Lorentzian 2</strong></p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libLineProfile</span> <span class="n">LineSkewLorentzian2</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
@ -779,7 +655,7 @@ K(m)&=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
|
||||
</div>
|
||||
<div class="math notranslate nohighlight">
|
||||
\[\begin{split}A(f)= \left\{\begin{matrix}\frac{{w_1}^2}{4{(f-f_0)}^2+{w_1}^2},&f\leq f_0\\[9pt] \frac{{w_2}^2}{4{(f-f_0)}^2+{w_2}^2},&f>f_0\end{matrix}\right.\end{split}\]</div>
|
||||
<p id="index-30"><strong>Powder average of an axially symmetric interaction convoluted with a Lorentzian</strong></p>
|
||||
<p id="index-27"><strong>Powder average of an axially symmetric interaction convoluted with a Lorentzian</strong></p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libLineProfile</span> <span class="n">PowderLineAxialLor</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
@ -796,7 +672,7 @@ K(m)&=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
|
||||
<div class="math notranslate nohighlight">
|
||||
\[A(f)= I_{\mathrm ax}(f)\circledast\left( \frac{w^2}{4f^2+w^2} \right)\]</div>
|
||||
<p>with <span class="math notranslate nohighlight">\(I_{\mathrm ax}(f)\)</span> defined <a class="reference internal" href="#iax"><span class="std std-ref">above</span></a>.</p>
|
||||
<p id="index-31"><strong>Powder average of an axially symmetric interaction convoluted with a Gaussian</strong></p>
|
||||
<p id="index-28"><strong>Powder average of an axially symmetric interaction convoluted with a Gaussian</strong></p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libLineProfile</span> <span class="n">PowderLineAxialGss</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
@ -813,7 +689,7 @@ K(m)&=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
|
||||
<div class="math notranslate nohighlight">
|
||||
\[A(f)= I_{\mathrm ax}(f)\circledast\left( e^{-\frac{4\ln 2 (f-f_0)^2}{ \sigma^2}} \right)\]</div>
|
||||
<p>with <span class="math notranslate nohighlight">\(I_{\mathrm ax}(f)\)</span> defined <a class="reference internal" href="#iax"><span class="std std-ref">above</span></a>.</p>
|
||||
<p id="index-32"><strong>Powder average of an anisotropic interaction convoluted with a Lorentzian</strong></p>
|
||||
<p id="index-29"><strong>Powder average of an anisotropic interaction convoluted with a Lorentzian</strong></p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libLineProfile</span> <span class="n">PowderLineAsymLor</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
@ -831,7 +707,7 @@ K(m)&=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
|
||||
<div class="math notranslate nohighlight">
|
||||
\[A(f)= I(f)\circledast\left( \frac{w^2}{4f^2+w^2} \right)\]</div>
|
||||
<p>with <span class="math notranslate nohighlight">\(I(f)\)</span> defined <a class="reference internal" href="#ianiso"><span class="std std-ref">above</span></a>. Note that <span class="math notranslate nohighlight">\(f_1<f_2<f_3\)</span> is not required by the code.</p>
|
||||
<p id="index-33"><strong>Powder average of an anisotropic interaction convoluted with a Gaussian</strong></p>
|
||||
<p id="index-30"><strong>Powder average of an anisotropic interaction convoluted with a Gaussian</strong></p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">userFcn</span> <span class="n">libLineProfile</span> <span class="n">PowderLineAsymGss</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
@ -874,8 +750,8 @@ K(m)&=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 24, 2024.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on Dec 12, 2022.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -897,7 +773,7 @@ K(m)&=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.5',
|
||||
VERSION:'1.8.2',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>User manual — musrfit 1.9.5 documentation</title>
|
||||
<title>User manual — musrfit 1.8.2 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -30,9 +30,7 @@
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.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" />
|
||||
<link href="_static/style.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<link rel="prev" title="Tutorial for musrfit" href="tutorial.html" />
|
||||
|
||||
|
||||
<script src="_static/js/modernizr.min.js"></script>
|
||||
@ -60,10 +58,6 @@
|
||||
|
||||
|
||||
|
||||
<div class="version">
|
||||
1.9
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -159,7 +153,6 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||
@ -257,26 +250,6 @@
|
||||
<dt><strong>-u, –use-no-of-threads <number></strong></dt>
|
||||
<dd><number>: number of threads to be used (OpenMP). Needs to be <= max. number of cores.
|
||||
If OpenMP is enable, the maximal number of cores is used, if it is not limited by this option.</dd>
|
||||
<dt><strong>-r, –reset</strong></dt>
|
||||
<dd><p class="first">reset startup <code class="docutils literal notranslate"><span class="pre">musrfit_startup.xml</span></code>, i.e. rewrite a default, and quit.
|
||||
The order of which <code class="docutils literal notranslate"><span class="pre">musrfit_startup.xml</span></code> is reset is:</p>
|
||||
<blockquote class="last">
|
||||
<div><ol class="arabic simple">
|
||||
<li>if present in the current dir.</li>
|
||||
<li>if present under <code class="docutils literal notranslate"><span class="pre">$HOME/.musrfit/</span></code></li>
|
||||
<li>if present under <code class="docutils literal notranslate"><span class="pre">$MUSRFITPATH/</span></code></li>
|
||||
<li>if present under <code class="docutils literal notranslate"><span class="pre">$ROOTSYS/</span></code></li>
|
||||
</ol>
|
||||
</div></blockquote>
|
||||
</dd>
|
||||
<dt><strong>-y, –yaml</strong></dt>
|
||||
<dd><p class="first">write fit results (<code class="docutils literal notranslate"><span class="pre">MINUIT2.OUTPUT</span></code>) into a yaml-file. Output <code class="docutils literal notranslate"><span class="pre"><msr-file>.yaml</span></code>.</p>
|
||||
<p class="last">The motivation for storing parameter information in this (hierarchical) manner is to provide easy access to details that are cumbersome
|
||||
to store/access in tabular formats (e.g., <code class="docutils literal notranslate"><span class="pre">CSV</span></code> or <code class="docutils literal notranslate"><span class="pre">TSV</span></code>). This is especially true for the parameter covariance/correlation matrices.
|
||||
The advantage is evident when processing the contents of the <code class="docutils literal notranslate"><span class="pre">.yaml</span></code> output, which can be easily accomplished using one of the
|
||||
YAML parsers implemented in your favourite programming language (see, e.g., <a class="reference external" href="https://yaml.org/">https://yaml.org/</a> for a list of options). As an example,
|
||||
this can be achieved in <code class="docutils literal notranslate"><span class="pre">Python</span></code> using the <code class="docutils literal notranslate"><span class="pre">PyYAML</span></code>.</p>
|
||||
</dd>
|
||||
<dt><strong>–dump <type></strong></dt>
|
||||
<dd>is writing a data file with the fit data and the theory; <type> can be ascii (data in columns) or root (data in ROOT histograms).</dd>
|
||||
<dt><strong>–timeout <timeout_tag></strong></dt>
|
||||
@ -2893,8 +2866,8 @@ The syntax here is attribute driven</li>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 24, 2024.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on Dec 12, 2022.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -2916,7 +2889,7 @@ The syntax here is attribute driven</li>
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.5',
|
||||
VERSION:'1.8.2',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -2943,4 +2916,4 @@ The syntax here is attribute driven</li>
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
@ -38,7 +38,7 @@ PROJECT_NAME = "mupp"
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = 1.1.0
|
||||
PROJECT_NUMBER = 1.0.0
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
|
@ -12,7 +12,8 @@
|
||||
|
||||
\mainpage musrfit - a framework to analyse muSR data.
|
||||
|
||||
<p>This pages here are meant to explain the software structure of the musrfit framework.
|
||||
<p>This pages here are meant to explain the software structure of the musrfit framework. Only the core-classes
|
||||
are described, *i.e.* not the Qt GUI related stuff.
|
||||
|
||||
<p>People merely interested in the handling of the programs should check this link:
|
||||
\htmlonly
|
||||
@ -63,9 +64,13 @@ under Linux, Mac OS X, and (with some more work) under Windows. The musrfit fram
|
||||
|
||||
\section roadmap Road map and missing features
|
||||
|
||||
<p>Support for NeXus files is fully available from early 2012 on.
|
||||
|
||||
<p>The following features should eventually be implemented, but are still missing:
|
||||
- non-muSR: The plan is to add an option to fit/plot \f$f(x_1,\ldots,x_n)\f$ versus \f$g(x_1,\ldots,x_n)\f$, where \f$x_i\f$ is a given data set element.
|
||||
- as soon as ROOT will properly support MS Windows platforms, some better support for MS Windows will be added. Currently only the cygwin version will be supported.
|
||||
- add an interface to maxent
|
||||
- we will provide rpm's for various linux flavors.
|
||||
|
||||
\section shortComings Short comings of the current musrfit design
|
||||
|
||||
|
@ -38,7 +38,7 @@ PROJECT_NAME = musrfit
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = 1.9.2
|
||||
PROJECT_NUMBER = 1.6.0
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
|
@ -22,6 +22,38 @@ if (nexus)
|
||||
endif (nexus)
|
||||
set(MUSRFIT_LIBS ${MUSRFIT_LIBS} PMusr)
|
||||
|
||||
#--- start create git-revision.h ----------------------------------------------
|
||||
if (IS_GIT_REPO)
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/cmake/configure_musrfit_version_file.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/configure_musrfit_version_file.cmake
|
||||
@ONLY
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/git-revision.h
|
||||
COMMAND ${CMAKE_COMMAND} -P
|
||||
${CMAKE_CURRENT_BINARY_DIR}/configure_musrfit_version_file.cmake
|
||||
DEPENDS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/configure_musrfit_version_file.cmake
|
||||
${CMAKE_SOURCE_DIR}/cmake/git-revision.h.in
|
||||
COMMENT "Configuring git-revision.h"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
configure_musrfit_version ALL
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/git-revision.h
|
||||
)
|
||||
set(HAVE_GIT_REV_H "-DHAVE_GIT_REV_H")
|
||||
set(GIT_REV_H "git-revision.h")
|
||||
else (IS_GIT_REPO)
|
||||
set(HAVE_GIT_REV_H "")
|
||||
set(GIT_REV_H "")
|
||||
endif (IS_GIT_REPO)
|
||||
|
||||
#--- end create git-revision.h ------------------------------------------------
|
||||
|
||||
#--- add all executables ------------------------------------------------------
|
||||
add_executable(addRun ${GIT_REV_H} addRun.cpp)
|
||||
target_compile_options(addRun BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV_H}")
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -37,7 +37,6 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
@ -536,22 +535,40 @@ int main(int argc, char *argv[])
|
||||
|
||||
// read startup file
|
||||
char startup_path_name[128];
|
||||
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||
std::unique_ptr<PStartupHandler> startupHandler = std::make_unique<PStartupHandler>();
|
||||
TSAXParser *saxParser = new TSAXParser();
|
||||
PStartupHandler *startupHandler = new PStartupHandler();
|
||||
if (!startupHandler->StartupFileFound()) {
|
||||
std::cerr << std::endl << ">> addRun **WARNING** couldn't find " << startupHandler->GetStartupFilePath().Data();
|
||||
std::cerr << std::endl;
|
||||
// clean up
|
||||
if (saxParser) {
|
||||
delete saxParser;
|
||||
saxParser = nullptr;
|
||||
}
|
||||
if (startupHandler) {
|
||||
delete startupHandler;
|
||||
startupHandler = nullptr;
|
||||
}
|
||||
} else {
|
||||
strcpy(startup_path_name, startupHandler->GetStartupFilePath().Data());
|
||||
saxParser->ConnectToHandler("PStartupHandler", startupHandler.get());
|
||||
saxParser->ConnectToHandler("PStartupHandler", startupHandler);
|
||||
//status = saxParser->ParseFile(startup_path_name);
|
||||
// parsing the file as above seems to lead to problems in certain environments;
|
||||
// use the parseXmlFile function instead (see PStartupHandler.cpp for the definition)
|
||||
status = parseXmlFile(saxParser.get(), startup_path_name);
|
||||
status = parseXmlFile(saxParser, startup_path_name);
|
||||
// check for parse errors
|
||||
if (status) { // error
|
||||
std::cerr << std::endl << ">> addRun **WARNING** Reading/parsing musrfit_startup.xml failed.";
|
||||
std::cerr << std::endl;
|
||||
// clean up
|
||||
if (saxParser) {
|
||||
delete saxParser;
|
||||
saxParser = nullptr;
|
||||
}
|
||||
if (startupHandler) {
|
||||
delete startupHandler;
|
||||
startupHandler = nullptr;
|
||||
}
|
||||
} else {
|
||||
startupHandler->CheckLists();
|
||||
}
|
||||
@ -622,12 +639,19 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
// load the files
|
||||
std::vector< std::unique_ptr<PRunDataHandler> > runDataHandler;
|
||||
std::vector<PRunDataHandler*> runDataHandler;
|
||||
runDataHandler.resize(addRunInfo.size());
|
||||
Bool_t isGood{true};
|
||||
for (UInt_t i=0; i<runDataHandler.size(); i++) {
|
||||
if (startupHandler != nullptr) {
|
||||
runDataHandler[i] = std::make_unique<PRunDataHandler>(addRunInfo[i].fPathFileName, addRunInfo[i].fFileFormat, startupHandler->GetDataPathList());
|
||||
runDataHandler[i] = new PRunDataHandler(addRunInfo[i].fPathFileName, addRunInfo[i].fFileFormat, startupHandler->GetDataPathList());
|
||||
if (runDataHandler[i] == nullptr) {
|
||||
isGood = false;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** couldn't invoke PRunDataHandler (i=" << i << ")." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
break;
|
||||
}
|
||||
runDataHandler[i]->ReadData();
|
||||
if (!runDataHandler[i]->IsAllDataAvailable()) {
|
||||
isGood = false;
|
||||
@ -637,7 +661,14 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
runDataHandler[i] = std::make_unique<PRunDataHandler>(addRunInfo[i].fPathFileName, addRunInfo[i].fFileFormat);
|
||||
runDataHandler[i] = new PRunDataHandler(addRunInfo[i].fPathFileName, addRunInfo[i].fFileFormat);
|
||||
if (runDataHandler[i] == nullptr) {
|
||||
isGood = false;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** couldn't invoke PRunDataHandler (i=" << i << ")." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
break;
|
||||
}
|
||||
runDataHandler[i]->ReadData();
|
||||
if (!runDataHandler[i]->IsAllDataAvailable()) {
|
||||
isGood = false;
|
||||
@ -652,8 +683,8 @@ int main(int argc, char *argv[])
|
||||
// make sure that the number of provided t0's are matching the number of histos from the run-file
|
||||
|
||||
// 1st make sure all the runs have the same number run data (==1 here)
|
||||
std::unique_ptr<PAny2ManyInfo> info;
|
||||
std::unique_ptr<PRunDataHandler> dataOut;
|
||||
PAny2ManyInfo *info{nullptr};
|
||||
PRunDataHandler *dataOut{nullptr};
|
||||
if (isGood) {
|
||||
for (UInt_t i=1; i<runDataHandler.size(); i++) {
|
||||
if (runDataHandler[0]->GetNoOfRunData() != runDataHandler[i]->GetNoOfRunData()) {
|
||||
@ -664,7 +695,13 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
}
|
||||
}
|
||||
info = std::make_unique<PAny2ManyInfo>();
|
||||
info = new PAny2ManyInfo();
|
||||
if (info == nullptr) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** couldn't invoke PAny2ManyInfo." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
isGood = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (isGood) {
|
||||
@ -672,7 +709,13 @@ int main(int argc, char *argv[])
|
||||
info->outFormat = format;
|
||||
info->year = year;
|
||||
info->outFileName = flnOut;
|
||||
dataOut = std::make_unique<PRunDataHandler>(info.get());
|
||||
dataOut = new PRunDataHandler(info);
|
||||
if (dataOut == nullptr) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** couldn't invoke PRunDataHandler for the output file." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
isGood = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (isGood) {
|
||||
@ -769,12 +812,8 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
// feed all the necessary information for the data file
|
||||
PRawRunData *rawRunData = nullptr;
|
||||
PRawRunData *rawRunData = new PRawRunData();
|
||||
rawRunData = runDataHandler[0]->GetRunData(); // copy all
|
||||
if (rawRunData == nullptr) {
|
||||
std::cerr << ">> addRun: **ERROR** couldn't obtain PRawRunData object." << std::endl;
|
||||
return PMUSR_MSR_ALLOCATION_ERROR;
|
||||
}
|
||||
rawRunData->SetGenerator("addRun");
|
||||
// overwrite the t0 values with the new ones
|
||||
for (UInt_t i=0; i<rawRunData->GetNoOfHistos(); i++) {
|
||||
@ -792,5 +831,21 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
// clean up
|
||||
if (startupHandler) {
|
||||
delete startupHandler;
|
||||
}
|
||||
if (info) {
|
||||
delete info;
|
||||
}
|
||||
if (dataOut) {
|
||||
delete dataOut;
|
||||
}
|
||||
for (int i=0; i<runDataHandler.size(); i++) {
|
||||
if (runDataHandler[i])
|
||||
delete runDataHandler[i];
|
||||
}
|
||||
runDataHandler.clear();
|
||||
|
||||
return PMUSR_SUCCESS;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -37,7 +37,6 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
|
||||
#include <TString.h>
|
||||
#include <TSAXParser.h>
|
||||
@ -494,31 +493,49 @@ int main(int argc, char *argv[])
|
||||
|
||||
// read startup file
|
||||
char startup_path_name[128];
|
||||
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||
std::unique_ptr<PStartupHandler> startupHandler = std::make_unique<PStartupHandler>();
|
||||
TSAXParser *saxParser = new TSAXParser();
|
||||
PStartupHandler *startupHandler = new PStartupHandler();
|
||||
if (!startupHandler->StartupFileFound()) {
|
||||
std::cerr << std::endl << ">> any2many **WARNING** couldn't find " << startupHandler->GetStartupFilePath().Data();
|
||||
std::cerr << std::endl;
|
||||
// clean up
|
||||
if (saxParser) {
|
||||
delete saxParser;
|
||||
saxParser = nullptr;
|
||||
}
|
||||
if (startupHandler) {
|
||||
delete startupHandler;
|
||||
startupHandler = nullptr;
|
||||
}
|
||||
} else {
|
||||
strcpy(startup_path_name, startupHandler->GetStartupFilePath().Data());
|
||||
saxParser->ConnectToHandler("PStartupHandler", startupHandler.get());
|
||||
saxParser->ConnectToHandler("PStartupHandler", startupHandler);
|
||||
//status = saxParser->ParseFile(startup_path_name);
|
||||
// parsing the file as above seems to lead to problems in certain environments;
|
||||
// use the parseXmlFile function instead (see PStartupHandler.cpp for the definition)
|
||||
status = parseXmlFile(saxParser.get(), startup_path_name);
|
||||
status = parseXmlFile(saxParser, startup_path_name);
|
||||
// check for parse errors
|
||||
if (status) { // error
|
||||
std::cerr << std::endl << ">> any2many **WARNING** Reading/parsing musrfit_startup.xml failed.";
|
||||
std::cerr << std::endl;
|
||||
// clean up
|
||||
if (saxParser) {
|
||||
delete saxParser;
|
||||
saxParser = nullptr;
|
||||
}
|
||||
if (startupHandler) {
|
||||
delete startupHandler;
|
||||
startupHandler = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// read all the necessary runs (raw data)
|
||||
std::unique_ptr<PRunDataHandler> dataHandler;
|
||||
PRunDataHandler *dataHandler;
|
||||
if (startupHandler)
|
||||
dataHandler = std::make_unique<PRunDataHandler>(&info, startupHandler->GetDataPathList());
|
||||
dataHandler = new PRunDataHandler(&info, startupHandler->GetDataPathList());
|
||||
else
|
||||
dataHandler = std::make_unique<PRunDataHandler>(&info);
|
||||
dataHandler = new PRunDataHandler(&info);
|
||||
|
||||
// read and convert all data
|
||||
dataHandler->ConvertData();
|
||||
@ -529,6 +546,21 @@ int main(int argc, char *argv[])
|
||||
std::cerr << std::endl << ">> any2many **ERROR** Couldn't read all data files, will quit ..." << std::endl;
|
||||
}
|
||||
|
||||
// clean up
|
||||
info.runList.clear();
|
||||
if (saxParser) {
|
||||
delete saxParser;
|
||||
saxParser = nullptr;
|
||||
}
|
||||
if (startupHandler) {
|
||||
delete startupHandler;
|
||||
startupHandler = nullptr;
|
||||
}
|
||||
if (dataHandler) {
|
||||
delete dataHandler;
|
||||
dataHandler = nullptr;
|
||||
}
|
||||
|
||||
return PMUSR_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,6 @@ set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
|
||||
# Hence, target_include_directories cannot be used here because, targets are
|
||||
# setup only afterwards.
|
||||
include_directories(${MUSRFIT_INC})
|
||||
include_directories(${FFTW3_INCLUDE})
|
||||
|
||||
root_generate_dictionary(
|
||||
PFourierCanvasDict
|
||||
@ -73,7 +72,7 @@ set(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
set(exec_prefix "\$\{prefix\}")
|
||||
set(libdir "\$\{exec_prefix\}/lib")
|
||||
set(includedir "\$\{prefix\}/include")
|
||||
set(MUSR_VERSION "1.5.0")
|
||||
set(MUSR_VERSION "1.3.0")
|
||||
set(MUSR_LIBRARY_NAME "PMusr")
|
||||
configure_file("PMusr.pc.in" "PMusr.pc" @ONLY)
|
||||
set(USERFCN_LIBRARY_NAME "PUserFcnBase")
|
||||
@ -170,6 +169,11 @@ 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})
|
||||
endif (OpenMP_FOUND)
|
||||
|
||||
#--- add library dependencies -------------------------------------------------
|
||||
set(DependOnLibs ${ROOT_LIBARIES})
|
||||
#set(DependOnLibs ${DependOnLibs} ${FFTW3_LIBRARY})
|
||||
@ -184,7 +188,11 @@ if (nexus)
|
||||
set(DependOnLibs ${DependOnLibs} PNeXus)
|
||||
endif (nexus)
|
||||
if (OpenMP_FOUND)
|
||||
set(DependOnLibs ${DependOnLibs} OpenMP::OpenMP_CXX)
|
||||
if (OpenMP_CXX_LIBRARIES)
|
||||
set(DependOnLibs ${DependOnLibs} ${OpenMP_CXX_LIBRARIES})
|
||||
else (OpenMP_CXX_LIBRARIES)
|
||||
set(DependOnLibs ${DependOnLibs} ${OpenMP_CXX_FLAGS}) # for older cmake OpenMP_CXX_LIBRARIES is not defined
|
||||
endif (OpenMP_CXX_LIBRARIES)
|
||||
endif (OpenMP_FOUND)
|
||||
|
||||
target_link_libraries(PUserFcnBase ${ROOT_LIBRARIES})
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -54,10 +54,8 @@ PFindRun::PFindRun(const PStringVector path, const PRunNameTemplateList runNameT
|
||||
* @param run
|
||||
*/
|
||||
PFindRun::PFindRun(const PStringVector path, const PRunNameTemplateList runNameTemplateList,
|
||||
const TString &instrument, const UInt_t year, const UInt_t run,
|
||||
const TString file_format) :
|
||||
fPath(path), fRunNameTemplateList(runNameTemplateList), fInstrument(instrument),
|
||||
fYear(year), fRun(run), fFileFormat(file_format)
|
||||
const TString &instrument, const UInt_t year, const UInt_t run) :
|
||||
fPath(path), fRunNameTemplateList(runNameTemplateList), fInstrument(instrument), fYear(year), fRun(run)
|
||||
{
|
||||
// nothing to be done here
|
||||
}
|
||||
@ -132,23 +130,6 @@ TString PFindRun::CreatePathName(const TString path, const TString runNameTempla
|
||||
*/
|
||||
Bool_t PFindRun::FoundPathName()
|
||||
{
|
||||
// if file format is given, get proper extension
|
||||
TString ext("");
|
||||
if (fFileFormat.Length() != 0) {
|
||||
if (!fFileFormat.CompareTo("MusrRoot") || !fFileFormat.CompareTo("ROOT"))
|
||||
ext = ".root";
|
||||
else if (!fFileFormat.CompareTo("NeXus"))
|
||||
ext = ".nxs";
|
||||
else if (!fFileFormat.CompareTo("PSI-BIN"))
|
||||
ext = ".bin";
|
||||
else if (!fFileFormat.CompareTo("PSI-MDU"))
|
||||
ext = ".mdu";
|
||||
else if (!fFileFormat.CompareTo("MUD"))
|
||||
ext = ".mud";
|
||||
else if (!fFileFormat.CompareTo("WKM"))
|
||||
ext = ".wkm";
|
||||
}
|
||||
|
||||
// find instrument name in path list
|
||||
TString pathName{""};
|
||||
for (Int_t i=0; i<fPath.size(); i++) {
|
||||
@ -156,10 +137,6 @@ Bool_t PFindRun::FoundPathName()
|
||||
for (Int_t j=0; j<fRunNameTemplateList.size(); j++) {
|
||||
if (fRunNameTemplateList[j].instrument == fInstrument) {
|
||||
pathName = CreatePathName(fPath[i], fRunNameTemplateList[j].runNameTemplate);
|
||||
if (fFileFormat.Length() != 0) {
|
||||
if (!pathName.Contains(ext, TString::kIgnoreCase))
|
||||
continue;
|
||||
}
|
||||
if (boost::filesystem::exists(pathName.Data())) {
|
||||
fPathName = pathName;
|
||||
return true;
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -39,9 +39,8 @@
|
||||
#include <iomanip>
|
||||
#include <fstream>
|
||||
#include <limits>
|
||||
#include <cmath>
|
||||
|
||||
#include <boost/variant/variant.hpp>
|
||||
#include <cmath>
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
@ -55,7 +54,6 @@
|
||||
#include "Minuit2/MnPrint.h"
|
||||
#include "Minuit2/MnScan.h"
|
||||
#include "Minuit2/MnSimplex.h"
|
||||
#include "Minuit2/MnStrategy.h"
|
||||
#include "Minuit2/MnUserParameterState.h"
|
||||
#include "Minuit2/MinosError.h"
|
||||
|
||||
@ -266,8 +264,8 @@ UInt_t PSectorChisq::GetNDF(UInt_t idx)
|
||||
* \param runListCollection pointer of the run list collection (pre-processed historgrams)
|
||||
* \param chisq_only flag: true=calculate chisq only (no fitting)
|
||||
*/
|
||||
PFitter::PFitter(PMsrHandler *runInfo, PRunListCollection *runListCollection, Bool_t chisq_only, Bool_t yaml_out) :
|
||||
fChisqOnly(chisq_only), fYamlOut(yaml_out), fRunInfo(runInfo), fRunListCollection(runListCollection)
|
||||
PFitter::PFitter(PMsrHandler *runInfo, PRunListCollection *runListCollection, Bool_t chisq_only) :
|
||||
fChisqOnly(chisq_only), fRunInfo(runInfo), fRunListCollection(runListCollection)
|
||||
{
|
||||
// initialize variables
|
||||
fIsScanOnly = true;
|
||||
@ -282,6 +280,9 @@ PFitter::PFitter(PMsrHandler *runInfo, PRunListCollection *runListCollection, Bo
|
||||
fCmdLines = *runInfo->GetMsrCommands();
|
||||
|
||||
// init class variables
|
||||
fFitterFcn = nullptr;
|
||||
fFcnMin = nullptr;
|
||||
|
||||
fScanAll = true;
|
||||
fScanParameter[0] = 0;
|
||||
fScanParameter[1] = 0;
|
||||
@ -316,7 +317,11 @@ PFitter::PFitter(PMsrHandler *runInfo, PRunListCollection *runListCollection, Bo
|
||||
GetPhaseParams();
|
||||
|
||||
// create fit function object
|
||||
fFitterFcn = std::make_unique<PFitterFcn>(runListCollection, fUseChi2);
|
||||
fFitterFcn = new PFitterFcn(runListCollection, fUseChi2);
|
||||
if (!fFitterFcn) {
|
||||
fIsValid = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@ -332,6 +337,16 @@ PFitter::~PFitter()
|
||||
fScanData.clear();
|
||||
|
||||
fElapsedTime.clear();
|
||||
|
||||
if (fFcnMin) {
|
||||
delete fFcnMin;
|
||||
fFcnMin = nullptr;
|
||||
}
|
||||
|
||||
if (fFitterFcn) {
|
||||
delete fFitterFcn;
|
||||
fFitterFcn = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@ -1764,7 +1779,7 @@ Bool_t PFitter::ExecuteMigrad()
|
||||
|
||||
// create migrad object
|
||||
// strategy is by default = 'default'
|
||||
ROOT::Minuit2::MnMigrad migrad((*fFitterFcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
|
||||
ROOT::Minuit2::MnMigrad migrad((*fFitterFcn), fMnUserParams, fStrategy);
|
||||
|
||||
// minimize
|
||||
// maxfcn is MINUIT2 Default maxfcn
|
||||
@ -1787,7 +1802,11 @@ Bool_t PFitter::ExecuteMigrad()
|
||||
}
|
||||
|
||||
// keep FunctionMinimum object
|
||||
fFcnMin.reset(new ROOT::Minuit2::FunctionMinimum(min));
|
||||
if (fFcnMin) { // fFcnMin exist hence clean up first
|
||||
delete fFcnMin;
|
||||
fFcnMin = nullptr;
|
||||
}
|
||||
fFcnMin = new ROOT::Minuit2::FunctionMinimum(min);
|
||||
|
||||
// keep user parameters
|
||||
if (fFcnMin)
|
||||
@ -1840,7 +1859,7 @@ Bool_t PFitter::ExecuteMinimize()
|
||||
|
||||
// create minimizer object
|
||||
// strategy is by default = 'default'
|
||||
ROOT::Minuit2::MnMinimize minimize((*fFitterFcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
|
||||
ROOT::Minuit2::MnMinimize minimize((*fFitterFcn), fMnUserParams, fStrategy);
|
||||
|
||||
// minimize
|
||||
// maxfcn is MINUIT2 Default maxfcn
|
||||
@ -1864,7 +1883,11 @@ Bool_t PFitter::ExecuteMinimize()
|
||||
}
|
||||
|
||||
// keep FunctionMinimum object
|
||||
fFcnMin.reset(new ROOT::Minuit2::FunctionMinimum(min));
|
||||
if (fFcnMin) { // fFcnMin exist hence clean up first
|
||||
delete fFcnMin;
|
||||
fFcnMin = nullptr;
|
||||
}
|
||||
fFcnMin = new ROOT::Minuit2::FunctionMinimum(min);
|
||||
|
||||
// keep user parameters
|
||||
if (fFcnMin)
|
||||
@ -2412,8 +2435,8 @@ Bool_t PFitter::ExecuteSave(Bool_t firstSave)
|
||||
title += fRunInfo->GetFileName();
|
||||
title += " - ";
|
||||
title += dt.AsSQLString();
|
||||
std::unique_ptr<TCanvas> ccorr = std::make_unique<TCanvas>("ccorr", "title", 500, 500);
|
||||
std::unique_ptr<TH2D> hcorr = std::make_unique<TH2D>("hcorr", title, cov.Nrow(), 0.0, cov.Nrow(), cov.Nrow(), 0.0, cov.Nrow());
|
||||
TCanvas *ccorr = new TCanvas("ccorr", "title", 500, 500);
|
||||
TH2D *hcorr = new TH2D("hcorr", title, cov.Nrow(), 0.0, cov.Nrow(), cov.Nrow(), 0.0, cov.Nrow());
|
||||
Double_t dval;
|
||||
for (UInt_t i=0; i<cov.Nrow(); i++) {
|
||||
// parameter number
|
||||
@ -2475,121 +2498,14 @@ Bool_t PFitter::ExecuteSave(Bool_t firstSave)
|
||||
ccorr->Write("ccorr", TObject::kOverwrite, sizeof(ccorr));
|
||||
hcorr->Write("hcorr", TObject::kOverwrite, sizeof(hcorr));
|
||||
ff.Close();
|
||||
|
||||
if (fYamlOut) {
|
||||
// write the fit results to an easy-to-read/parse yaml file
|
||||
// note: the block names follow those used by Python library iminuit
|
||||
// https://github.com/scikit-hep/iminuit
|
||||
|
||||
// dynamically name the yaml output file
|
||||
// https://stackoverflow.com/a/25389052
|
||||
std::string yaml_filename(fRunInfo->GetFileName().Data());
|
||||
const std::string msr_ext(".msr");
|
||||
yaml_filename.replace(yaml_filename.find(msr_ext), msr_ext.length(),
|
||||
".yaml");
|
||||
|
||||
// define yaml's 2-space indentation
|
||||
const std::string yaml_indent(" ");
|
||||
|
||||
// open the yaml file for writing
|
||||
std::ofstream yaml_file(yaml_filename);
|
||||
|
||||
// number formatting of the output
|
||||
yaml_file << std::scientific << std::setprecision(16);
|
||||
|
||||
// write the parameter values
|
||||
yaml_file << "values:\n";
|
||||
for (unsigned int i = 0; i < fParams.size(); ++i) {
|
||||
yaml_file << yaml_indent << fParams[i].fName.Data() << ": "
|
||||
<< fParams[i].fValue << "\n";
|
||||
}
|
||||
|
||||
// write the parabolic errors
|
||||
yaml_file << "errors:\n";
|
||||
for (unsigned int i = 0; i < fParams.size(); ++i) {
|
||||
yaml_file << yaml_indent << fParams[i].fName.Data() << ": "
|
||||
<< fMnUserParams.Error(i) << "\n";
|
||||
}
|
||||
|
||||
// write the minos errors
|
||||
yaml_file << "mnerrors:\n";
|
||||
for (unsigned int i = 0; i < fParams.size(); ++i) {
|
||||
// use boost's implementation of a variant, which can be streamed by
|
||||
// default - see: https://stackoverflow.com/q/47168477
|
||||
boost::variant<double, std::string> positive_error, negative_error;
|
||||
if (fParams[i].fPosErrorPresent) {
|
||||
positive_error = fParams[i].fPosError;
|
||||
negative_error = fParams[i].fStep;
|
||||
} else {
|
||||
positive_error = "null";
|
||||
negative_error = "null";
|
||||
}
|
||||
|
||||
yaml_file << yaml_indent << fParams[i].fName.Data() << ":\n";
|
||||
yaml_file << yaml_indent << yaml_indent
|
||||
<< "positive: " << positive_error << "\n";
|
||||
yaml_file << yaml_indent << yaml_indent
|
||||
<< "negative: " << negative_error << "\n";
|
||||
}
|
||||
|
||||
// write the parameter limits
|
||||
yaml_file << "limits:\n";
|
||||
for (unsigned int i = 0; i < fParams.size(); ++i) {
|
||||
// use boost's implementation of a variant, which can be streamed by
|
||||
// default - see: https://stackoverflow.com/q/47168477
|
||||
boost::variant<double, std::string> upper_limit, lower_limit;
|
||||
if (fParams[i].fLowerBoundaryPresent) {
|
||||
lower_limit = fParams[i].fLowerBoundary;
|
||||
} else {
|
||||
lower_limit = "null";
|
||||
}
|
||||
if (fParams[i].fUpperBoundaryPresent) {
|
||||
upper_limit = fParams[i].fUpperBoundary;
|
||||
} else {
|
||||
upper_limit = "null";
|
||||
}
|
||||
|
||||
yaml_file << yaml_indent << fParams[i].fName.Data() << ":\n";
|
||||
yaml_file << yaml_indent << yaml_indent << "lower: " << lower_limit
|
||||
<< "\n";
|
||||
yaml_file << yaml_indent << yaml_indent << "upper: " << upper_limit
|
||||
<< "\n";
|
||||
}
|
||||
|
||||
// write if the parameter is fixed
|
||||
yaml_file << "fixed:\n";
|
||||
for (unsigned int i = 0; i < fParams.size(); ++i) {
|
||||
std::string is_fixed = fParams[i].fStep == 0.0 ? "true" : "false";
|
||||
yaml_file << yaml_indent << fParams[i].fName.Data() << ": " << is_fixed
|
||||
<< "\n";
|
||||
}
|
||||
|
||||
// write the covariance matrix (omitting fixed parameters)
|
||||
yaml_file << "covariance:\n";
|
||||
for (unsigned int i = 0; i < cov.Nrow(); ++i) {
|
||||
yaml_file << yaml_indent << mnState.Name(parNo[i]) << ":\n";
|
||||
for (unsigned int j = 0; j < cov.Nrow(); ++j) {
|
||||
yaml_file << yaml_indent << yaml_indent << mnState.Name(parNo[j])
|
||||
<< ": " << cov(i, j) << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
// write the correlation matrix (omitting fixed parameters)
|
||||
yaml_file << "correlation:\n";
|
||||
for (unsigned int i = 0; i < cov.Nrow(); ++i) {
|
||||
yaml_file << yaml_indent << mnState.Name(parNo[i]) << ":\n";
|
||||
for (unsigned int j = 0; j < cov.Nrow(); ++j) {
|
||||
double correlation =
|
||||
i == j ? 1.0
|
||||
: cov(i, j) / (fMnUserParams.Error(parNo[i]) *
|
||||
fMnUserParams.Error(parNo[j]));
|
||||
yaml_file << yaml_indent << yaml_indent << mnState.Name(parNo[j])
|
||||
<< ": " << correlation << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
// close the yaml file
|
||||
yaml_file.close();
|
||||
// clean up
|
||||
if (ccorr) {
|
||||
delete ccorr;
|
||||
ccorr = nullptr;
|
||||
}
|
||||
if (hcorr) {
|
||||
delete hcorr;
|
||||
hcorr = nullptr;
|
||||
}
|
||||
}
|
||||
parNo.clear(); // clean up
|
||||
@ -2614,7 +2530,7 @@ Bool_t PFitter::ExecuteSave(Bool_t firstSave)
|
||||
fitStartTime = run->at(0).GetFitRange(0);
|
||||
fitEndTime = run->at(0).GetFitRange(1);
|
||||
}
|
||||
fout.setf(std::ios::fixed, std::ios::floatfield);
|
||||
fout.setf(std::ios::floatfield);
|
||||
fout << std::endl << " Time Range: " << fitStartTime << ", " << fitEndTime << std::endl;
|
||||
if (fUseChi2) {
|
||||
fout.setf(std::ios::fixed, std::ios::floatfield);
|
||||
@ -2657,7 +2573,7 @@ Bool_t PFitter::ExecuteSimplex()
|
||||
|
||||
// create minimizer object
|
||||
// strategy is by default = 'default'
|
||||
ROOT::Minuit2::MnSimplex simplex((*fFitterFcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
|
||||
ROOT::Minuit2::MnSimplex simplex((*fFitterFcn), fMnUserParams, fStrategy);
|
||||
|
||||
// minimize
|
||||
// maxfcn is 10*MINUIT2 Default maxfcn
|
||||
@ -2680,7 +2596,11 @@ Bool_t PFitter::ExecuteSimplex()
|
||||
}
|
||||
|
||||
// keep FunctionMinimum object
|
||||
fFcnMin.reset(new ROOT::Minuit2::FunctionMinimum(min));
|
||||
if (fFcnMin) { // fFcnMin exist hence clean up first
|
||||
delete fFcnMin;
|
||||
fFcnMin = nullptr;
|
||||
}
|
||||
fFcnMin = new ROOT::Minuit2::FunctionMinimum(min);
|
||||
|
||||
// keep user parameters
|
||||
if (fFcnMin)
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -55,6 +55,7 @@ ClassImpQ(PFourierCanvas)
|
||||
PFourierCanvas::PFourierCanvas()
|
||||
{
|
||||
fTimeout = 0;
|
||||
fTimeoutTimer = nullptr;
|
||||
|
||||
fBatchMode = false;
|
||||
fValid = false;
|
||||
@ -68,10 +69,18 @@ PFourierCanvas::PFourierCanvas()
|
||||
fXaxisTitle = TString("");
|
||||
|
||||
fCurrentFourierPhase = 0.0;
|
||||
fCurrentFourierPhaseText = nullptr;
|
||||
|
||||
fStyle = nullptr;
|
||||
fImp = nullptr;
|
||||
fBar = nullptr;
|
||||
fPopupMain = nullptr;
|
||||
fPopupFourier = nullptr;
|
||||
|
||||
fMainCanvas = nullptr;
|
||||
fTitlePad = nullptr;
|
||||
fFourierPad = nullptr;
|
||||
fInfoPad = nullptr;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@ -103,9 +112,12 @@ PFourierCanvas::PFourierCanvas(std::vector<PFourier*> &fourier, PIntVector dataS
|
||||
fInitialXRange[1] = fourierXrange[1];
|
||||
|
||||
fTimeout = 0;
|
||||
fTimeoutTimer = nullptr;
|
||||
|
||||
fValid = false;
|
||||
|
||||
fCurrentFourierPhaseText = nullptr;
|
||||
|
||||
// generate fMarkerList and fColorList, since they are not provided
|
||||
TRandom rand;
|
||||
Int_t style, color;
|
||||
@ -156,9 +168,12 @@ PFourierCanvas::PFourierCanvas(std::vector<PFourier*> &fourier, PIntVector dataS
|
||||
fInitialXRange[1] = fourierXrange[1];
|
||||
|
||||
fTimeout = 0;
|
||||
fTimeoutTimer = nullptr;
|
||||
|
||||
fValid = false;
|
||||
|
||||
fCurrentFourierPhaseText = nullptr;
|
||||
|
||||
// generate fMarkerList and fColorList, since they are not provided
|
||||
TRandom rand;
|
||||
Int_t style, color;
|
||||
@ -181,6 +196,70 @@ PFourierCanvas::PFourierCanvas(std::vector<PFourier*> &fourier, PIntVector dataS
|
||||
gStyle->SetHistMinimumZero(kTRUE); // needed to enforce proper bar option handling
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Destructor
|
||||
*/
|
||||
PFourierCanvas::~PFourierCanvas()
|
||||
{
|
||||
if (fTimeoutTimer)
|
||||
delete fTimeoutTimer;
|
||||
|
||||
if (fCurrentFourierPhaseText)
|
||||
delete fCurrentFourierPhaseText;
|
||||
|
||||
/*
|
||||
if (fStyle) {
|
||||
delete fStyle;
|
||||
fStyle = 0;
|
||||
}
|
||||
*/
|
||||
if (fTitlePad) {
|
||||
fTitlePad->Clear();
|
||||
delete fTitlePad;
|
||||
fTitlePad = nullptr;
|
||||
}
|
||||
|
||||
if (fFourierHistos.size() > 0) {
|
||||
for (UInt_t i=0; i<fFourierHistos.size(); i++) {
|
||||
delete fFourierHistos[i].dataFourierRe;
|
||||
delete fFourierHistos[i].dataFourierIm;
|
||||
delete fFourierHistos[i].dataFourierPwr;
|
||||
delete fFourierHistos[i].dataFourierPhase;
|
||||
delete fFourierHistos[i].dataFourierPhaseOptReal;
|
||||
}
|
||||
fFourierHistos.clear();
|
||||
}
|
||||
|
||||
CleanupAverage();
|
||||
|
||||
/*
|
||||
if (fFourierPad) {
|
||||
fFourierPad->Clear();
|
||||
delete fFourierPad;
|
||||
fFourierPad = 0;
|
||||
}
|
||||
*/
|
||||
if (fInfoPad) {
|
||||
fInfoPad->Clear();
|
||||
delete fInfoPad;
|
||||
fInfoPad = nullptr;
|
||||
}
|
||||
|
||||
if (fLegAvgPerDataSet) {
|
||||
fLegAvgPerDataSet->Clear();
|
||||
delete fLegAvgPerDataSet;
|
||||
fLegAvgPerDataSet = nullptr;
|
||||
}
|
||||
|
||||
/*
|
||||
if (fMainCanvas) {
|
||||
delete fMainCanvas;
|
||||
fMainCanvas = nullptr;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Done (SIGNAL)
|
||||
//--------------------------------------------------------------------------
|
||||
@ -484,7 +563,11 @@ void PFourierCanvas::SetTimeout(Int_t timeout)
|
||||
if (fTimeout <= 0)
|
||||
return;
|
||||
|
||||
fTimeoutTimer.reset(new TTimer());
|
||||
if (fTimeoutTimer) {
|
||||
delete fTimeoutTimer;
|
||||
fTimeoutTimer = nullptr;
|
||||
}
|
||||
fTimeoutTimer = new TTimer();
|
||||
|
||||
fTimeoutTimer->Connect("Timeout()", "PFourierCanvas", this, "Done()");
|
||||
|
||||
@ -748,7 +831,7 @@ void PFourierCanvas::CreateXaxisTitle()
|
||||
void PFourierCanvas::CreateStyle()
|
||||
{
|
||||
TString musrFTStyle("musrFTStyle");
|
||||
fStyle = std::make_unique<TStyle>(musrFTStyle, musrFTStyle);
|
||||
fStyle = new TStyle(musrFTStyle, musrFTStyle);
|
||||
fStyle->SetOptStat(0); // no statistics options
|
||||
fStyle->SetOptTitle(0); // no title
|
||||
fStyle->cd();
|
||||
@ -907,10 +990,21 @@ void PFourierCanvas::InitFourierCanvas(const Char_t* title, Int_t wtopx, Int_t w
|
||||
fImp = nullptr;
|
||||
fBar = nullptr;
|
||||
fPopupMain = nullptr;
|
||||
fPopupFourier = nullptr;
|
||||
|
||||
fMainCanvas = nullptr;
|
||||
fTitlePad = nullptr;
|
||||
fFourierPad = nullptr;
|
||||
fInfoPad = nullptr;
|
||||
|
||||
// invoke canvas
|
||||
TString canvasName = TString("fMainCanvas");
|
||||
fMainCanvas = std::make_unique<TCanvas>(canvasName.Data(), title, wtopx, wtopy, ww, wh);
|
||||
fMainCanvas = new TCanvas(canvasName.Data(), title, wtopx, wtopy, ww, wh);
|
||||
if (fMainCanvas == nullptr) {
|
||||
std::cerr << std::endl << "PFourierCanvas::PFourierCanvas: **PANIC ERROR**: Couldn't invoke " << canvasName.Data();
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
// add canvas menu if not in batch mode
|
||||
if (!fBatchMode) {
|
||||
@ -918,9 +1012,9 @@ void PFourierCanvas::InitFourierCanvas(const Char_t* title, Int_t wtopx, Int_t w
|
||||
fBar = fImp->GetMenuBar();
|
||||
fPopupMain = fBar->AddPopup("MusrFT");
|
||||
|
||||
fPopupFourier = std::make_unique<TGPopupMenu>();
|
||||
fPopupFourier = new TGPopupMenu();
|
||||
|
||||
fPopupMain->AddPopup("&Fourier", fPopupFourier.get());
|
||||
fPopupMain->AddPopup("&Fourier", fPopupFourier);
|
||||
fPopupFourier->AddEntry("Show Real", P_MENU_ID_FOURIER+P_MENU_ID_FOURIER_REAL);
|
||||
fPopupFourier->AddEntry("Show Imag", P_MENU_ID_FOURIER+P_MENU_ID_FOURIER_IMAG);
|
||||
fPopupFourier->AddEntry("Show Real+Imag", P_MENU_ID_FOURIER+P_MENU_ID_FOURIER_REAL_AND_IMAG);
|
||||
@ -973,25 +1067,39 @@ void PFourierCanvas::InitFourierCanvas(const Char_t* title, Int_t wtopx, Int_t w
|
||||
|
||||
// divide the canvas into sub pads
|
||||
// title pad
|
||||
fTitlePad = std::make_unique<TPaveText>(0.0, YTITLE, 1.0, 1.0, "NDC");
|
||||
|
||||
fTitlePad = new TPaveText(0.0, YTITLE, 1.0, 1.0, "NDC");
|
||||
if (fTitlePad == nullptr) {
|
||||
std::cerr << std::endl << "PFourierCanvas::PFourierCanvas: **PANIC ERROR**: Couldn't invoke fTitlePad";
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
fTitlePad->SetFillColor(TColor::GetColor(255,255,255));
|
||||
fTitlePad->SetTextAlign(12); // middle, left
|
||||
fTitlePad->AddText(title);
|
||||
fTitlePad->Draw();
|
||||
|
||||
// fourier pad
|
||||
fFourierPad = std::make_unique<TPad>("fFourierPad", "fFourierPad", 0.0, YINFO, 1.0, YTITLE);
|
||||
|
||||
fFourierPad = new TPad("fFourierPad", "fFourierPad", 0.0, YINFO, 1.0, YTITLE);
|
||||
if (fFourierPad == nullptr) {
|
||||
std::cerr << std::endl << "PFourierCanvas::PFourierCanvas: **PANIC ERROR**: Couldn't invoke fFourierPad";
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
fFourierPad->SetFillColor(TColor::GetColor(255,255,255));
|
||||
fFourierPad->Draw();
|
||||
|
||||
// info pad
|
||||
fInfoPad = std::make_unique<TLegend>(0.0, 0.0, 1.0, YINFO, "NDC");
|
||||
|
||||
fInfoPad = new TLegend(0.0, 0.0, 1.0, YINFO, "NDC");
|
||||
if (fInfoPad == nullptr) {
|
||||
std::cerr << std::endl << "PFourierCanvas::PFourierCanvas: **PANIC ERROR**: Couldn't invoke fInfoPad";
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
fInfoPad->SetFillColor(TColor::GetColor(255,255,255));
|
||||
fInfoPad->SetTextAlign(12); // middle, left
|
||||
|
||||
fLegAvgPerDataSet = nullptr;
|
||||
|
||||
fValid = true;
|
||||
|
||||
if ((fFourier.size() != fDataSetTag.size()) && fAveragedViewPerDataSet) {
|
||||
@ -1521,6 +1629,12 @@ void PFourierCanvas::PlotFourier()
|
||||
*/
|
||||
void PFourierCanvas::PlotFourierPhaseValue()
|
||||
{
|
||||
// check if phase TLatex object is present
|
||||
if (fCurrentFourierPhaseText) {
|
||||
delete fCurrentFourierPhaseText;
|
||||
fCurrentFourierPhaseText = nullptr;
|
||||
}
|
||||
|
||||
Double_t x, y;
|
||||
TString str;
|
||||
|
||||
@ -1529,7 +1643,7 @@ void PFourierCanvas::PlotFourierPhaseValue()
|
||||
str += fCurrentFourierPhase;
|
||||
x = 0.7;
|
||||
y = 0.85;
|
||||
fCurrentFourierPhaseText.reset(new TLatex());
|
||||
fCurrentFourierPhaseText = new TLatex();
|
||||
fCurrentFourierPhaseText->SetNDC(kTRUE);
|
||||
fCurrentFourierPhaseText->SetText(x, y, str.Data());
|
||||
fCurrentFourierPhaseText->SetTextFont(62);
|
||||
@ -1561,8 +1675,10 @@ void PFourierCanvas::PlotAverage()
|
||||
xmax = fInitialXRange[1];
|
||||
Double_t ymin=0.0, ymax=0.0;
|
||||
|
||||
if (fLegAvgPerDataSet.get()) {
|
||||
if (fLegAvgPerDataSet) {
|
||||
fLegAvgPerDataSet->Clear();
|
||||
delete fLegAvgPerDataSet;
|
||||
fLegAvgPerDataSet = nullptr;
|
||||
}
|
||||
|
||||
switch (fCurrentPlotView) {
|
||||
@ -1683,7 +1799,7 @@ void PFourierCanvas::PlotAverage()
|
||||
}
|
||||
|
||||
if (fAveragedViewPerDataSet) { // plot all the rest
|
||||
fLegAvgPerDataSet = std::make_unique<TLegend>(0.55, 0.4, 0.85, 0.6);
|
||||
fLegAvgPerDataSet = new TLegend(0.55, 0.4, 0.85, 0.6);
|
||||
TString str = GetDataSetName(fFourierAverage[0].dataFourierPwr->GetTitle());
|
||||
TString label = TString::Format("<%s>", str.Data());
|
||||
fLegAvgPerDataSet->AddEntry(fFourierAverage[0].dataFourierPwr, label.Data());
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -188,28 +188,13 @@ void PFunction::FillFuncEvalTree(iter_t const& i, PFuncTreeNode &node)
|
||||
node.fID = PFunctionGrammar::constGammaMuID; // keep the ID
|
||||
node.fDvalue = GAMMA_BAR_MUON; // keep the value
|
||||
} else if (i->value.id() == PFunctionGrammar::constFieldID) { // handle constant field from meta data
|
||||
str = std::string(i->value.begin(), i->value.end()); // get string
|
||||
boost::algorithm::trim(str);
|
||||
if (strstr(str.c_str(), "-"))
|
||||
node.fSign = true;
|
||||
node.fID = PFunctionGrammar::constFieldID; // keep the ID
|
||||
} else if (i->value.id() == PFunctionGrammar::constEnergyID) { // handle constant energy from meta data
|
||||
str = std::string(i->value.begin(), i->value.end()); // get string
|
||||
boost::algorithm::trim(str);
|
||||
if (strstr(str.c_str(), "-"))
|
||||
node.fSign = true;
|
||||
node.fID = PFunctionGrammar::constEnergyID; // keep the ID
|
||||
} else if (i->value.id() == PFunctionGrammar::constTempID) { // handle constant temperature from meta data
|
||||
str = std::string(i->value.begin(), i->value.end()); // get string
|
||||
boost::algorithm::trim(str);
|
||||
std::string pstr;
|
||||
if (strstr(str.c_str(), "-")) {
|
||||
node.fSign = true;
|
||||
pstr = "-T%d";
|
||||
} else {
|
||||
pstr = "T%d";
|
||||
}
|
||||
status = sscanf(str.c_str(), pstr.c_str(), &ivalue); // convert string to temperature index
|
||||
status = sscanf(str.c_str(), "T%d", &ivalue); // convert string to temperature index
|
||||
node.fID = PFunctionGrammar::constTempID; // keep the ID
|
||||
node.fIvalue = ivalue; // Temp idx
|
||||
} else if (i->value.id() == PFunctionGrammar::parameterID) { // handle parameter number
|
||||
@ -447,30 +432,21 @@ Double_t PFunction::EvalNode(PFuncTreeNode &node)
|
||||
} else if (node.fID == PFunctionGrammar::constGammaMuID) {
|
||||
return node.fDvalue;
|
||||
} else if (node.fID == PFunctionGrammar::constFieldID) {
|
||||
Double_t dval = fMetaData.fField;
|
||||
if (node.fSign)
|
||||
dval *= -1.0;
|
||||
return dval;
|
||||
return fMetaData.fField;
|
||||
} else if (node.fID == PFunctionGrammar::constEnergyID) {
|
||||
if (fMetaData.fEnergy == PMUSR_UNDEFINED) {
|
||||
std::cerr << std::endl << "**PANIC ERROR**: PFunction::EvalNode: energy meta data not available." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
exit(0);
|
||||
}
|
||||
Double_t dval = fMetaData.fEnergy;
|
||||
if (node.fSign)
|
||||
dval *= -1.0;
|
||||
return dval;
|
||||
return fMetaData.fEnergy;
|
||||
} else if (node.fID == PFunctionGrammar::constTempID) {
|
||||
if (node.fIvalue >= fMetaData.fTemp.size()) {
|
||||
std::cerr << std::endl << "**PANIC ERROR**: PFunction::EvalNode: Temp idx=" << node.fIvalue << " requested which is >= #Temp(s)=" << fMetaData.fTemp.size() << " available." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
exit(0);
|
||||
}
|
||||
Double_t dval = fMetaData.fTemp[node.fIvalue];
|
||||
if (node.fSign)
|
||||
dval *= -1.0;
|
||||
return dval;
|
||||
return fMetaData.fTemp[node.fIvalue];
|
||||
} else if (node.fID == PFunctionGrammar::parameterID) {
|
||||
Double_t dval;
|
||||
if (node.fSign)
|
||||
@ -618,7 +594,7 @@ void PFunction::EvalTreeForString(tree_parse_info<> info)
|
||||
*
|
||||
* \param i iterator of the AST tree
|
||||
*/
|
||||
void PFunction::EvalTreeForStringExpression(iter_t const& i, bool funcFlag)
|
||||
void PFunction::EvalTreeForStringExpression(iter_t const& i)
|
||||
{
|
||||
static Int_t termOp = 0;
|
||||
|
||||
@ -633,10 +609,10 @@ void PFunction::EvalTreeForStringExpression(iter_t const& i, bool funcFlag)
|
||||
fFuncString += "Pi";
|
||||
} else if (i->value.id() == PFunctionGrammar::constGammaMuID) {
|
||||
fFuncString += "gamma_mu";
|
||||
} else if (i->value.id() == PFunctionGrammar::constFieldID) {
|
||||
fFuncString += boost::algorithm::trim_copy(std::string(i->value.begin(), i->value.end())).c_str();
|
||||
} else if (i->value.id() == PFunctionGrammar::constFieldID) {
|
||||
fFuncString += "B";
|
||||
} else if (i->value.id() == PFunctionGrammar::constEnergyID) {
|
||||
fFuncString += boost::algorithm::trim_copy(std::string(i->value.begin(), i->value.end())).c_str();
|
||||
fFuncString += "EN";
|
||||
} else if (i->value.id() == PFunctionGrammar::constTempID) {
|
||||
assert(i->children.size() == 0);
|
||||
fFuncString += boost::algorithm::trim_copy(std::string(i->value.begin(), i->value.end())).c_str();
|
||||
@ -651,20 +627,20 @@ void PFunction::EvalTreeForStringExpression(iter_t const& i, bool funcFlag)
|
||||
assert(i->children.size() == 0);
|
||||
fFuncString += boost::algorithm::trim_copy(std::string(i->value.begin(), i->value.end())).c_str();
|
||||
} else if (i->value.id() == PFunctionGrammar::functionID) {
|
||||
assert(i->children.size() == 3);
|
||||
assert(i->children.size() == 3);
|
||||
fFuncString += std::string(i->value.begin(), i->value.end()).c_str(); // keep function name
|
||||
fFuncString += "(";
|
||||
// '(', expression, ')'
|
||||
EvalTreeForStringExpression(i->children.begin()+1, true); // the real stuff
|
||||
EvalTreeForStringExpression(i->children.begin()+1); // the real stuff
|
||||
fFuncString += ")";
|
||||
} else if (i->value.id() == PFunctionGrammar::powerID) {
|
||||
assert(i->children.size() == 5);
|
||||
fFuncString += std::string(i->value.begin(), i->value.end()).c_str(); // keep function name
|
||||
fFuncString += "(";
|
||||
// '(', expression, ',' expression, ')'
|
||||
EvalTreeForStringExpression(i->children.begin()+1, true); // base expression
|
||||
fFuncString += ", ";
|
||||
EvalTreeForStringExpression(i->children.begin()+3, true); // exponent expression
|
||||
EvalTreeForStringExpression(i->children.begin()+1); // base expression
|
||||
fFuncString += ",";
|
||||
EvalTreeForStringExpression(i->children.begin()+3); // exponent expression
|
||||
fFuncString += ")";
|
||||
} else if (i->value.id() == PFunctionGrammar::factorID) {
|
||||
EvalTreeForStringExpression(i->children.begin());
|
||||
@ -679,21 +655,13 @@ void PFunction::EvalTreeForStringExpression(iter_t const& i, bool funcFlag)
|
||||
assert(i->children.size() == 2);
|
||||
EvalTreeForStringExpression(i->children.begin());
|
||||
fFuncString += " / ";
|
||||
if (((i->children.begin()+1)->children.size()>1) &&
|
||||
((i->children.begin()+1)->value.id() != PFunctionGrammar::functionID) &&
|
||||
(i->children.begin()+1)->value.id() != PFunctionGrammar::powerID) // check if denominator is non-trivial and not a function
|
||||
fFuncString += "(";
|
||||
EvalTreeForStringExpression(i->children.begin()+1, true);
|
||||
if (((i->children.begin()+1)->children.size()>1) &&
|
||||
((i->children.begin()+1)->value.id() != PFunctionGrammar::functionID) &&
|
||||
(i->children.begin()+1)->value.id() != PFunctionGrammar::powerID) // check if denominator is non-trivial and not a function
|
||||
fFuncString += ")";
|
||||
EvalTreeForStringExpression(i->children.begin()+1);
|
||||
} else {
|
||||
assert(0);
|
||||
}
|
||||
termOp--;
|
||||
} else if (i->value.id() == PFunctionGrammar::expressionID) {
|
||||
if ((termOp > 0) && !funcFlag)
|
||||
if (termOp > 0)
|
||||
fFuncString += "(";
|
||||
if (*i->value.begin() == '+') {
|
||||
assert(i->children.size() == 2);
|
||||
@ -708,7 +676,7 @@ void PFunction::EvalTreeForStringExpression(iter_t const& i, bool funcFlag)
|
||||
} else {
|
||||
assert(0);
|
||||
}
|
||||
if ((termOp > 0) && !funcFlag)
|
||||
if (termOp > 0)
|
||||
fFuncString += ")";
|
||||
} else if (i->value.id() == PFunctionGrammar::assignmentID) {
|
||||
assert(i->children.size() == 3);
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009-2025 by Bastian M. Wojek / Andreas Suter *
|
||||
* Copyright (C) 2009-2023 by Bastian M. Wojek / Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -38,7 +38,6 @@
|
||||
#include <iomanip>
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
|
||||
#include <boost/algorithm/string/trim.hpp> // for stripping leading whitespace in std::string
|
||||
#include <boost/algorithm/string/case_conv.hpp> // for to_lower() in std::string
|
||||
@ -59,6 +58,7 @@ PMsr2Data::PMsr2Data(const std::string &ext) : fFileExtension(ext), fRunListFile
|
||||
{
|
||||
fRunVector.clear();
|
||||
fRunVectorIter = fRunVector.end();
|
||||
fRunListFileStream = nullptr;
|
||||
fSaxParser = nullptr;
|
||||
fStartupHandler = nullptr;
|
||||
fDataHandler = nullptr;
|
||||
@ -74,6 +74,28 @@ PMsr2Data::~PMsr2Data()
|
||||
fRunVector.clear();
|
||||
fRunVectorIter = fRunVector.end();
|
||||
fIndVar.clear();
|
||||
|
||||
if (fRunListFileStream) {
|
||||
fRunListFileStream->close();
|
||||
delete fRunListFileStream;
|
||||
fRunListFileStream = nullptr;
|
||||
}
|
||||
if (fSaxParser) {
|
||||
delete fSaxParser;
|
||||
fSaxParser = nullptr;
|
||||
}
|
||||
if (fStartupHandler) {
|
||||
delete fStartupHandler;
|
||||
fStartupHandler = nullptr;
|
||||
}
|
||||
if (fDataHandler) {
|
||||
delete fDataHandler;
|
||||
fDataHandler = nullptr;
|
||||
}
|
||||
if (fMsrHandler) {
|
||||
delete fMsrHandler;
|
||||
fMsrHandler = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------
|
||||
@ -96,17 +118,19 @@ int PMsr2Data::DetermineRunNumberDigits(unsigned int runNo, bool normalMode) con
|
||||
{
|
||||
std::ostringstream strInfile;
|
||||
strInfile << runNo << fFileExtension << ".msr";
|
||||
std::unique_ptr<std::ifstream> in = std::make_unique<std::ifstream>(strInfile.str().c_str());
|
||||
std::ifstream *in = new std::ifstream(strInfile.str().c_str());
|
||||
if (!in->is_open()) {
|
||||
delete in;
|
||||
if (!normalMode && (runNo == *fRunVectorIter)) {
|
||||
std::string fileNameCopy(strInfile.str());
|
||||
strInfile.clear();
|
||||
strInfile.str("");
|
||||
strInfile << runNo << "+global" << fFileExtension << ".msr";
|
||||
in.reset(new std::ifstream(strInfile.str().c_str()));
|
||||
in = new std::ifstream(strInfile.str().c_str());
|
||||
if (!in->is_open()) {
|
||||
std::cerr << std::endl << ">> msr2data: **ERROR** Neither the file " << fileNameCopy << " nor the file " << strInfile.str() << " can be opened! Please check!";
|
||||
std::cerr << std::endl;
|
||||
delete in;
|
||||
return -1;
|
||||
}
|
||||
} else if (runNo == *fRunVectorIter) { // the first run of the runlist was given - if it did not exist, try the rest of the runlist
|
||||
@ -140,32 +164,33 @@ int PMsr2Data::DetermineRunNumberDigits(unsigned int runNo, bool normalMode) con
|
||||
strLine.str(line);
|
||||
strLine >> firstOnLine;
|
||||
if (!to_lower_copy(firstOnLine).compare("run")) {
|
||||
// for path-names with spaces
|
||||
std::string::size_type loc{0};
|
||||
while (!strLine.eof()) {
|
||||
firstOnLine.clear();
|
||||
strLine >> firstOnLine;
|
||||
loc = firstOnLine.rfind(tempRunNumber.str());
|
||||
if ( loc != std::string::npos ) {
|
||||
while ( loc > 0 ) {
|
||||
if (isdigit(firstOnLine.at(--loc))) {
|
||||
++fRunNumberDigits;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
firstOnLine.clear();
|
||||
strLine >> firstOnLine;
|
||||
std::string::size_type loc = firstOnLine.rfind(tempRunNumber.str());
|
||||
if ( loc != std::string::npos ) {
|
||||
while ( loc > 0 ) {
|
||||
if (isdigit(firstOnLine.at(--loc))) {
|
||||
++fRunNumberDigits;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
in->close();
|
||||
fRunVectorIter = fRunVector.begin(); // set back the runlist-iterator which might have changed during the search for the correct file
|
||||
return 0;
|
||||
}
|
||||
in->close();
|
||||
delete in;
|
||||
in = nullptr;
|
||||
fRunVectorIter = fRunVector.begin(); // set back the runlist-iterator which might have changed during the search for the correct file
|
||||
return 0;
|
||||
} else {
|
||||
std::cerr << std::endl << ">> msr2data: **ERROR** The first processed run file number does not match the \"file index\"!";
|
||||
std::cerr << std::endl << ">> msr2data: **ERROR** The number of digits to be used for formatting the run numbers cannot be determined!";
|
||||
std::cerr << std::endl << ">> msr2data: **ERROR** Please check the first msr-file that should be processed;";
|
||||
std::cerr << std::endl << ">> msr2data: **ERROR** this is either some template or the first existing file from the run list.";
|
||||
std::cerr << std::endl;
|
||||
in->close();
|
||||
delete in;
|
||||
in = nullptr;
|
||||
return -2;
|
||||
}
|
||||
std::cerr << std::endl << ">> msr2data: **ERROR** The first processed run file number does not match the \"file index\"!";
|
||||
std::cerr << std::endl << ">> msr2data: **ERROR** The number of digits to be used for formatting the run numbers cannot be determined!";
|
||||
std::cerr << std::endl << ">> msr2data: **ERROR** Please check the first msr-file that should be processed;";
|
||||
std::cerr << std::endl << ">> msr2data: **ERROR** this is either some template or the first existing file from the run list.";
|
||||
std::cerr << std::endl;
|
||||
in->close();
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
std::cerr << std::endl << ">> msr2data: **ERROR** Please check the first msr-file that should be processed;";
|
||||
@ -173,7 +198,8 @@ int PMsr2Data::DetermineRunNumberDigits(unsigned int runNo, bool normalMode) con
|
||||
std::cerr << std::endl << ">> msr2data: **ERROR** Obviously it contains no RUN block...";
|
||||
std::cerr << std::endl;
|
||||
in->close();
|
||||
|
||||
delete in;
|
||||
in = nullptr;
|
||||
return -3;
|
||||
}
|
||||
|
||||
@ -187,12 +213,11 @@ int PMsr2Data::DetermineRunNumberDigits(unsigned int runNo, bool normalMode) con
|
||||
*/
|
||||
int PMsr2Data::CheckRunNumbersInRange() const
|
||||
{
|
||||
// since 2023, we encounter in LEM run numbers > 9999, hence this check has been loosened
|
||||
// by replacing static_cast<int>(fRunNumberDigits)) by static_cast<int>(fRunNumberDigits+1)).
|
||||
double max(pow(static_cast<double>(10), static_cast<int>(fRunNumberDigits+1)) - 1.0);
|
||||
double max(pow(static_cast<double>(10), static_cast<int>(fRunNumberDigits)) - 1.0);
|
||||
unsigned int max_UInt;
|
||||
max > static_cast<double>(std::numeric_limits<unsigned int>::max()) ? max_UInt = std::numeric_limits<unsigned int>::max()
|
||||
: max_UInt = static_cast<unsigned int>(max);
|
||||
|
||||
for (std::vector<unsigned int>::const_iterator iter(fRunVector.begin()); iter != fRunVector.end(); ++iter) {
|
||||
if (*iter > max_UInt) {
|
||||
return -1;
|
||||
@ -361,8 +386,7 @@ int PMsr2Data::SetRunNumbers(const std::string &runListFile)
|
||||
in.close();
|
||||
fRunVectorIter = fRunVector.begin();
|
||||
fRunListFile = true;
|
||||
fRunListFileStream = std::make_unique<std::ifstream>(runListFile.c_str());
|
||||
|
||||
fRunListFileStream = new std::ifstream(runListFile.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -377,17 +401,26 @@ int PMsr2Data::SetRunNumbers(const std::string &runListFile)
|
||||
int PMsr2Data::ParseXmlStartupFile()
|
||||
{
|
||||
int status;
|
||||
fSaxParser = std::make_unique<TSAXParser>();
|
||||
fStartupHandler = std::make_unique<PStartupHandler>();
|
||||
fSaxParser = new TSAXParser();
|
||||
fStartupHandler = new PStartupHandler();
|
||||
std::string startup_path_name(fStartupHandler->GetStartupFilePath().Data());
|
||||
fSaxParser->ConnectToHandler("PStartupHandler", fStartupHandler.get());
|
||||
fSaxParser->ConnectToHandler("PStartupHandler", fStartupHandler);
|
||||
//status = fSaxParser->ParseFile(startup_path_name.c_str());
|
||||
// parsing the file as above seems to lead to problems in certain environments;
|
||||
// use the parseXmlFile function instead (see PStartupHandler.cpp for the definition)
|
||||
status = parseXmlFile(fSaxParser.get(), startup_path_name.c_str());
|
||||
status = parseXmlFile(fSaxParser, startup_path_name.c_str());
|
||||
// check for parse errors
|
||||
if (status) { // error
|
||||
std::cerr << std::endl << ">> msr2data: **WARNING** Reading/parsing musrfit_startup.xml failed." << std::endl;
|
||||
// clean up
|
||||
if (fSaxParser) {
|
||||
delete fSaxParser;
|
||||
fSaxParser = nullptr;
|
||||
}
|
||||
if (fStartupHandler) {
|
||||
delete fStartupHandler;
|
||||
fStartupHandler = nullptr;
|
||||
}
|
||||
}
|
||||
return status;
|
||||
}
|
||||
@ -405,7 +438,7 @@ int PMsr2Data::ParseXmlStartupFile()
|
||||
int PMsr2Data::ReadMsrFile(const std::string &infile) const
|
||||
{
|
||||
int status;
|
||||
fMsrHandler = std::make_unique<PMsrHandler>(infile.c_str());
|
||||
fMsrHandler = new PMsrHandler(infile.c_str());
|
||||
status = fMsrHandler->ReadMsrFile();
|
||||
if (status != PMUSR_SUCCESS) {
|
||||
switch (status) {
|
||||
@ -453,7 +486,6 @@ PMsrHandler* PMsr2Data::GetSingleRunMsrFile() const
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return singleRunMsrFile;
|
||||
}
|
||||
|
||||
@ -468,18 +500,19 @@ PMsrHandler* PMsr2Data::GetSingleRunMsrFile() const
|
||||
int PMsr2Data::ReadRunDataFile()
|
||||
{
|
||||
if (fStartupHandler)
|
||||
fDataHandler = std::make_unique<PRunDataHandler>(fMsrHandler.get(), fStartupHandler->GetDataPathList());
|
||||
fDataHandler = new PRunDataHandler(fMsrHandler, fStartupHandler->GetDataPathList());
|
||||
else
|
||||
fDataHandler = std::make_unique<PRunDataHandler>(fMsrHandler.get());
|
||||
fDataHandler = new PRunDataHandler(fMsrHandler);
|
||||
|
||||
fDataHandler->ReadData();
|
||||
|
||||
bool success = fDataHandler->IsAllDataAvailable();
|
||||
if (!success) {
|
||||
std::cerr << std::endl << ">> msr2data: **WARNING** Could not read all data files, will continue without the data file information..." << std::endl;
|
||||
delete fDataHandler;
|
||||
fDataHandler = nullptr;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -561,23 +594,11 @@ bool PMsr2Data::PrepareNewInputFile(unsigned int tempRun, bool calledFromGlobalM
|
||||
strLine.str(line);
|
||||
strLine >> firstOnLine;
|
||||
if (!to_lower_copy(firstOnLine).compare("run")) {
|
||||
// needed for path-fln with spaces
|
||||
std::string::size_type loc;
|
||||
std::string sstr{""};
|
||||
firstOnLine.clear();
|
||||
while (!strLine.eof()) {
|
||||
strLine >> sstr;
|
||||
if (firstOnLine.empty())
|
||||
firstOnLine = sstr;
|
||||
else
|
||||
firstOnLine += " " + sstr;
|
||||
loc = firstOnLine.rfind(tempRunNumber.str());
|
||||
if ( loc != std::string::npos ) {
|
||||
firstOnLine.replace(loc, fRunNumberDigits, newRunNumber.str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (strLine.eof()) {
|
||||
strLine >> firstOnLine;
|
||||
std::string::size_type loc = firstOnLine.rfind(tempRunNumber.str());
|
||||
if ( loc != std::string::npos ) {
|
||||
firstOnLine.replace(loc, fRunNumberDigits, newRunNumber.str());
|
||||
} else {
|
||||
std::cerr << std::endl << ">> msr2data: **WARNING** The template run file number does not match the \"file index\"";
|
||||
std::cerr << std::endl << ">> msr2data: **WARNING** Unexpected things will happen... (for sure)";
|
||||
std::cerr << std::endl;
|
||||
@ -709,16 +730,9 @@ bool PMsr2Data::PrepareGlobalInputFile(unsigned int tempRun, const std::string &
|
||||
msrParamList->at(i).fIsGlobal = true;
|
||||
++fNumGlobalParam;
|
||||
}
|
||||
// std::cout << "debug> " << msrParamList->at(i).fNo << ": " << msrParamList->at(i).fName.Data() << " is global: " << msrParamList->at(i).fIsGlobal << std::endl;
|
||||
}
|
||||
|
||||
// there should be at least one run specific parameter, otherwise the GLOBAL option doesn't make sense
|
||||
if (fNumSpecParam == 0) {
|
||||
std::cout << ">> msr2data: **ERROR** found NO run specific parameter, hence the GLOBAL option doesn't make sense." << std::endl;
|
||||
std::cout << ">> msr2data: Could it be, that your run specific labling is < 4 digits? Please check your msr-Input-File." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// check if parameters have been sorted correctly from the beginning
|
||||
bool wasSorted(true);
|
||||
for (unsigned int i(0); i < fNumGlobalParam; ++i) {
|
||||
@ -1324,11 +1338,8 @@ bool PMsr2Data::PrepareGlobalInputFile(unsigned int tempRun, const std::string &
|
||||
|
||||
if (newRunNumber.str().compare(tempRunNumber.str())) { // first run number does not match the template run number
|
||||
// in global+ mode, read in the single run msr-file of the corresponding run
|
||||
if (globalPlus) {
|
||||
if (globalPlus)
|
||||
singleRunMsrFile = GetSingleRunMsrFile();
|
||||
if (singleRunMsrFile == nullptr)
|
||||
return false;
|
||||
}
|
||||
|
||||
// substitute the template run-numbers in the parameter names
|
||||
for (unsigned int l(fNumGlobalParam); l < msrParamList->size(); ++l) {
|
||||
@ -1405,11 +1416,8 @@ bool PMsr2Data::PrepareGlobalInputFile(unsigned int tempRun, const std::string &
|
||||
newRunNumber << *fRunVectorIter;
|
||||
|
||||
// in global+ mode, read in the single run msr-file
|
||||
if (globalPlus) {
|
||||
if (globalPlus)
|
||||
singleRunMsrFile = GetSingleRunMsrFile();
|
||||
if (singleRunMsrFile == nullptr)
|
||||
return false;
|
||||
}
|
||||
|
||||
// add parameters for each run
|
||||
for (unsigned int l(0); l < fNumSpecParam; ++l) {
|
||||
@ -1815,9 +1823,6 @@ int PMsr2Data::WriteOutput(const std::string &outfile, const std::vector<unsigne
|
||||
rawRunData = fDataHandler->GetRunData((*msrRunList)[0].GetRunName()->Data());
|
||||
}
|
||||
|
||||
if (rawRunData == nullptr)
|
||||
return -1;
|
||||
|
||||
switch (rawRunData->GetNoOfTemperatures()) {
|
||||
case 1:
|
||||
dataParamNames.push_back("dataT");
|
||||
@ -1939,6 +1944,14 @@ int PMsr2Data::WriteOutput(const std::string &outfile, const std::vector<unsigne
|
||||
std::cerr << std::endl;
|
||||
fRunVectorIter++;
|
||||
|
||||
delete fMsrHandler;
|
||||
fMsrHandler = nullptr;
|
||||
|
||||
if (fDataHandler) {
|
||||
delete fDataHandler;
|
||||
fDataHandler = nullptr;
|
||||
}
|
||||
|
||||
// clean up some vectors
|
||||
dataParamNames.clear();
|
||||
dataParamLabels.clear();
|
||||
@ -2440,7 +2453,13 @@ int PMsr2Data::WriteOutput(const std::string &outfile, const std::vector<unsigne
|
||||
outFile.close();
|
||||
|
||||
if (!global || (fRunVectorIter == fRunVector.end())) {
|
||||
fDataHandler.reset();
|
||||
delete fMsrHandler;
|
||||
fMsrHandler = nullptr;
|
||||
|
||||
if (fDataHandler) {
|
||||
delete fDataHandler;
|
||||
fDataHandler = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
msrParamList = nullptr;
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -66,6 +66,8 @@ PMsrHandler::PMsrHandler(const Char_t *fileName, PStartupOptions *startupOptions
|
||||
fStatistic.fMinExpectedPerHisto.clear();
|
||||
fStatistic.fNdfPerHisto.clear();
|
||||
|
||||
fFuncHandler = nullptr;
|
||||
|
||||
// check if the file name given is a path-file-name, and if yes, split it into path and file name.
|
||||
if (fFileName.Contains("/")) {
|
||||
Int_t idx = -1;
|
||||
@ -97,6 +99,11 @@ PMsrHandler::~PMsrHandler()
|
||||
fStatistic.fMinExpectedPerHisto.clear();
|
||||
fStatistic.fNdfPerHisto.clear();
|
||||
fParamInUse.clear();
|
||||
|
||||
if (fFuncHandler) {
|
||||
delete fFuncHandler;
|
||||
fFuncHandler = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@ -2690,6 +2697,10 @@ Int_t PMsrHandler::ParameterInUse(UInt_t paramNo)
|
||||
*/
|
||||
Bool_t PMsrHandler::HandleFitParameterEntry(PMsrLines &lines)
|
||||
{
|
||||
// If msr-file is used for musrFT only, nothing needs to be done here.
|
||||
if (fFourierOnly)
|
||||
return true;
|
||||
|
||||
PMsrParamStructure param;
|
||||
Bool_t error = false;
|
||||
|
||||
@ -2934,7 +2945,11 @@ Bool_t PMsrHandler::HandleFunctionsEntry(PMsrLines &lines)
|
||||
fFunctions = lines;
|
||||
|
||||
// create function handler
|
||||
fFuncHandler = std::make_unique<PFunctionHandler>(fFunctions);
|
||||
fFuncHandler = new PFunctionHandler(fFunctions);
|
||||
if (fFuncHandler == nullptr) {
|
||||
std::cerr << std::endl << ">> PMsrHandler::HandleFunctionsEntry: **ERROR** Couldn't invoke PFunctionHandler." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// do the parsing
|
||||
if (!fFuncHandler->DoParse()) {
|
||||
@ -3245,9 +3260,6 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
||||
// remove potential comment at the end of lines
|
||||
str = iter->fLine;
|
||||
Ssiz_t idx = str.Index("#");
|
||||
if (idx != -1)
|
||||
str.Remove(idx);
|
||||
idx = str.Index("(");
|
||||
if (idx != -1)
|
||||
str.Remove(idx);
|
||||
|
||||
@ -3277,29 +3289,23 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
||||
}
|
||||
|
||||
// get run name, beamline, institute, and file-format
|
||||
// the path/filename could potentially contain spaces! Hence the run name needs to be reconstructed from the parsing
|
||||
if (tokens->GetEntries() < 5) {
|
||||
error = true;
|
||||
} else {
|
||||
// run name
|
||||
str = TString("");
|
||||
for (Int_t i=1; i<tokens->GetEntries()-3; i++) {
|
||||
ostr = dynamic_cast<TObjString*>(tokens->At(i));
|
||||
str += ostr->GetString();
|
||||
if (i<tokens->GetEntries()-4)
|
||||
str += TString(" ");
|
||||
}
|
||||
ostr = dynamic_cast<TObjString*>(tokens->At(1));
|
||||
str = ostr->GetString();
|
||||
param.SetRunName(str);
|
||||
// beamline
|
||||
ostr = dynamic_cast<TObjString*>(tokens->At(tokens->GetEntries()-3));
|
||||
ostr = dynamic_cast<TObjString*>(tokens->At(2));
|
||||
str = ostr->GetString();
|
||||
param.SetBeamline(str);
|
||||
// institute
|
||||
ostr = dynamic_cast<TObjString*>(tokens->At(tokens->GetEntries()-2));
|
||||
ostr = dynamic_cast<TObjString*>(tokens->At(3));
|
||||
str = ostr->GetString();
|
||||
param.SetInstitute(str);
|
||||
// data file format
|
||||
ostr = dynamic_cast<TObjString*>(tokens->At(tokens->GetEntries()-1));
|
||||
ostr = dynamic_cast<TObjString*>(tokens->At(4));
|
||||
str = ostr->GetString();
|
||||
param.SetFileFormat(str);
|
||||
}
|
||||
@ -3543,7 +3549,7 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
||||
} else {
|
||||
PUIntVector group;
|
||||
str = iter->fLine;
|
||||
std::unique_ptr<PStringNumberList> rl = std::make_unique<PStringNumberList>(str.Data());
|
||||
PStringNumberList *rl = new PStringNumberList(str.Data());
|
||||
std::string errorMsg("");
|
||||
if (rl->Parse(errorMsg, true)) {
|
||||
group = rl->GetList();
|
||||
@ -3553,6 +3559,7 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
||||
} else {
|
||||
error = true;
|
||||
}
|
||||
delete rl;
|
||||
group.clear();
|
||||
}
|
||||
}
|
||||
@ -3567,7 +3574,7 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
||||
} else {
|
||||
PUIntVector group;
|
||||
str = iter->fLine;
|
||||
std::unique_ptr<PStringNumberList> rl = std::make_unique<PStringNumberList>(str.Data());
|
||||
PStringNumberList *rl = new PStringNumberList(str.Data());
|
||||
std::string errorMsg("");
|
||||
if (rl->Parse(errorMsg, true)) {
|
||||
group = rl->GetList();
|
||||
@ -3577,6 +3584,7 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
||||
} else {
|
||||
error = true;
|
||||
}
|
||||
delete rl;
|
||||
group.clear();
|
||||
}
|
||||
}
|
||||
@ -4630,7 +4638,7 @@ Bool_t PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
||||
param.fLifeTimeCorrection = true;
|
||||
} else if (line.Contains("runs", TString::kIgnoreCase)) { // handle plot runs
|
||||
TComplex run;
|
||||
std::unique_ptr<PStringNumberList> rl;
|
||||
PStringNumberList *rl;
|
||||
std::string errorMsg;
|
||||
PUIntVector runList;
|
||||
switch (param.fPlotType) {
|
||||
@ -4644,7 +4652,7 @@ Bool_t PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
||||
case MSR_PLOT_ASYM_RRF:
|
||||
case MSR_PLOT_NON_MUSR:
|
||||
case MSR_PLOT_MU_MINUS:
|
||||
rl = std::make_unique<PStringNumberList>(line.Data());
|
||||
rl = new PStringNumberList(line.Data());
|
||||
if (!rl->Parse(errorMsg, true)) {
|
||||
std::cerr << std::endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
|
||||
std::cerr << std::endl << ">> Error Message: " << errorMsg;
|
||||
@ -4658,6 +4666,7 @@ Bool_t PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
||||
}
|
||||
// clean up
|
||||
runList.clear();
|
||||
delete rl;
|
||||
break;
|
||||
default:
|
||||
error = true;
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -260,7 +260,6 @@ PRawRunDataSet::PRawRunDataSet()
|
||||
*/
|
||||
void PRawRunDataSet::Clear()
|
||||
{
|
||||
fTitle = TString("n/a");
|
||||
fName = TString("n/a");
|
||||
fHistoNo = -1;
|
||||
fTimeZeroBin = 0.0;
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -119,6 +119,7 @@ ClassImpQ(PMusrCanvas)
|
||||
PMusrCanvas::PMusrCanvas()
|
||||
{
|
||||
fTimeout = 0;
|
||||
fTimeoutTimer = nullptr;
|
||||
|
||||
fScaleN0AndBkg = true;
|
||||
fValid = false;
|
||||
@ -133,6 +134,16 @@ PMusrCanvas::PMusrCanvas()
|
||||
fImp = nullptr;
|
||||
fBar = nullptr;
|
||||
fPopupMain = nullptr;
|
||||
fPopupFourier = nullptr;
|
||||
|
||||
fStyle = nullptr;
|
||||
fMainCanvas = nullptr;
|
||||
fTitlePad = nullptr;
|
||||
fDataTheoryPad = nullptr;
|
||||
fParameterPad = nullptr;
|
||||
fTheoryPad = nullptr;
|
||||
fInfoPad = nullptr;
|
||||
fMultiGraphLegend = nullptr;
|
||||
|
||||
fHistoFrame = nullptr;
|
||||
|
||||
@ -142,6 +153,11 @@ PMusrCanvas::PMusrCanvas()
|
||||
InitFourier();
|
||||
InitAverage();
|
||||
|
||||
fCurrentFourierPhaseText = nullptr;
|
||||
|
||||
fRRFText = nullptr;
|
||||
fRRFLatexText = nullptr;
|
||||
|
||||
fXRangePresent = false;
|
||||
fYRangePresent = false;
|
||||
fXmin = 0.0;
|
||||
@ -177,6 +193,7 @@ PMusrCanvas::PMusrCanvas(const Int_t number, const Char_t* title,
|
||||
fBatchMode(batch), fPlotNumber(number)
|
||||
{
|
||||
fTimeout = 0;
|
||||
fTimeoutTimer = nullptr;
|
||||
fAveragedView = false;
|
||||
|
||||
fMultiGraphData = nullptr;
|
||||
@ -189,6 +206,11 @@ PMusrCanvas::PMusrCanvas(const Int_t number, const Char_t* title,
|
||||
CreateStyle();
|
||||
InitMusrCanvas(title, wtopx, wtopy, ww, wh);
|
||||
|
||||
fCurrentFourierPhaseText = nullptr;
|
||||
|
||||
fRRFText = nullptr;
|
||||
fRRFLatexText = nullptr;
|
||||
|
||||
fXRangePresent = false;
|
||||
fYRangePresent = false;
|
||||
fXmin = 0.0;
|
||||
@ -230,6 +252,7 @@ PMusrCanvas::PMusrCanvas(const Int_t number, const Char_t* title,
|
||||
fMarkerList(markerList), fColorList(colorList)
|
||||
{
|
||||
fTimeout = 0;
|
||||
fTimeoutTimer = nullptr;
|
||||
|
||||
fMultiGraphData = nullptr;
|
||||
fMultiGraphDiff = nullptr;
|
||||
@ -240,6 +263,11 @@ PMusrCanvas::PMusrCanvas(const Int_t number, const Char_t* title,
|
||||
CreateStyle();
|
||||
InitMusrCanvas(title, wtopx, wtopy, ww, wh);
|
||||
|
||||
fCurrentFourierPhaseText = nullptr;
|
||||
|
||||
fRRFText = nullptr;
|
||||
fRRFLatexText = nullptr;
|
||||
|
||||
fXRangePresent = false;
|
||||
fYRangePresent = false;
|
||||
fXmin = 0.0;
|
||||
@ -259,6 +287,31 @@ PMusrCanvas::PMusrCanvas(const Int_t number, const Char_t* title,
|
||||
PMusrCanvas::~PMusrCanvas()
|
||||
{
|
||||
// cleanup
|
||||
if (fTimeoutTimer) {
|
||||
delete fTimeoutTimer;
|
||||
fTimeoutTimer = nullptr;
|
||||
}
|
||||
if (fCurrentFourierPhaseText) {
|
||||
delete fCurrentFourierPhaseText;
|
||||
fCurrentFourierPhaseText = nullptr;
|
||||
}
|
||||
if (fRRFLatexText) {
|
||||
delete fRRFLatexText;
|
||||
fRRFLatexText = nullptr;
|
||||
}
|
||||
if (fRRFText) {
|
||||
delete fRRFText;
|
||||
fRRFText = nullptr;
|
||||
}
|
||||
if (fStyle) {
|
||||
delete fStyle;
|
||||
fStyle = nullptr;
|
||||
}
|
||||
if (fTitlePad) {
|
||||
fTitlePad->Clear();
|
||||
delete fTitlePad;
|
||||
fTitlePad = nullptr;
|
||||
}
|
||||
if (fData.size() > 0) {
|
||||
for (UInt_t i=0; i<fData.size(); i++)
|
||||
CleanupDataSet(fData[i]);
|
||||
@ -269,6 +322,11 @@ PMusrCanvas::~PMusrCanvas()
|
||||
CleanupDataSet(fNonMusrData[i]);
|
||||
fNonMusrData.clear();
|
||||
}
|
||||
if (fMultiGraphLegend) {
|
||||
fMultiGraphLegend->Clear();
|
||||
delete fMultiGraphLegend;
|
||||
fMultiGraphLegend = nullptr;
|
||||
}
|
||||
if (fMultiGraphData) {
|
||||
delete fMultiGraphData;
|
||||
fMultiGraphData = nullptr;
|
||||
@ -277,6 +335,29 @@ PMusrCanvas::~PMusrCanvas()
|
||||
delete fMultiGraphDiff;
|
||||
fMultiGraphDiff = nullptr;
|
||||
}
|
||||
if (fDataTheoryPad) {
|
||||
delete fDataTheoryPad;
|
||||
fDataTheoryPad = nullptr;
|
||||
}
|
||||
if (fParameterPad) {
|
||||
fParameterPad->Clear();
|
||||
delete fParameterPad;
|
||||
fParameterPad = nullptr;
|
||||
}
|
||||
if (fTheoryPad) {
|
||||
fTheoryPad->Clear();
|
||||
delete fTheoryPad;
|
||||
fTheoryPad = nullptr;
|
||||
}
|
||||
if (fInfoPad) {
|
||||
fInfoPad->Clear();
|
||||
delete fInfoPad;
|
||||
fInfoPad = nullptr;
|
||||
}
|
||||
if (fMainCanvas) {
|
||||
delete fMainCanvas;
|
||||
fMainCanvas = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@ -328,7 +409,7 @@ void PMusrCanvas::SetMsrHandler(PMsrHandler *msrHandler)
|
||||
(fMsrHandler->GetMsrPlotList()->at(0).fRRFFreq != 0.0)) ||
|
||||
(fMsrHandler->GetMsrGlobal()->GetRRFPacking() > 0 &&
|
||||
fMsrHandler->GetMsrGlobal()->GetRRFUnit().CompareTo("??"))) {
|
||||
fRRFLatexText = std::make_unique<TLatex>();
|
||||
fRRFLatexText = new TLatex();
|
||||
fRRFLatexText->SetNDC(kTRUE);
|
||||
fRRFLatexText->SetTextFont(62);
|
||||
fRRFLatexText->SetTextSize(0.03);
|
||||
@ -336,7 +417,7 @@ void PMusrCanvas::SetMsrHandler(PMsrHandler *msrHandler)
|
||||
Int_t rrfUnitTag = -1;
|
||||
Double_t rrfFreq = 0.0;
|
||||
if (fMsrHandler->GetMsrPlotList()->at(0).fRRFPacking > 0) { // RRF single histo PLOT
|
||||
fRRFText = std::make_unique<TString>("RRF: ");
|
||||
fRRFText = new TString("RRF: ");
|
||||
rrfUnitTag = fMsrHandler->GetMsrPlotList()->at(0).fRRFUnit;
|
||||
rrfFreq = fMsrHandler->GetMsrPlotList()->at(0).fRRFFreq;
|
||||
TString rrfFreqStr("");
|
||||
@ -365,7 +446,7 @@ void PMusrCanvas::SetMsrHandler(PMsrHandler *msrHandler)
|
||||
*fRRFText += TString(", RRF packing = ");
|
||||
*fRRFText += fMsrHandler->GetMsrPlotList()->at(0).fRRFPacking;
|
||||
} else { // RRF single histo FIT
|
||||
fRRFText = std::make_unique<TString>("RRF: ");
|
||||
fRRFText = new TString("RRF: ");
|
||||
rrfUnitTag = fMsrHandler->GetMsrGlobal()->GetRRFUnitTag();
|
||||
rrfFreq = fMsrHandler->GetMsrGlobal()->GetRRFFreq(fMsrHandler->GetMsrGlobal()->GetRRFUnit().Data());
|
||||
TString rrfFreqStr("");
|
||||
@ -412,7 +493,11 @@ void PMusrCanvas::SetTimeout(Int_t timeout)
|
||||
if (fTimeout <= 0)
|
||||
return;
|
||||
|
||||
fTimeoutTimer.reset(new TTimer());
|
||||
if (fTimeoutTimer) {
|
||||
delete fTimeoutTimer;
|
||||
fTimeoutTimer = nullptr;
|
||||
}
|
||||
fTimeoutTimer = new TTimer();
|
||||
|
||||
fTimeoutTimer->Connect("Timeout()", "PMusrCanvas", this, "Done()");
|
||||
|
||||
@ -935,18 +1020,10 @@ void PMusrCanvas::Done(Int_t status)
|
||||
void PMusrCanvas::HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected)
|
||||
{
|
||||
if (event != kKeyPress)
|
||||
return;
|
||||
|
||||
// this is a workaround which should prevent that the key event is executed if
|
||||
// a text/latex is written into the canvas.
|
||||
if (selected) {
|
||||
if (!strcmp(selected->GetTitle(), "dataTheoryPad"))
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
if (fBatchMode) {
|
||||
if (fStartWithAvg) { // this is needed to get the averaging in the batch mode
|
||||
fAveragedView = fStartWithAvg;
|
||||
HandleAverage();
|
||||
PlotAverage(true);
|
||||
}
|
||||
@ -1465,7 +1542,7 @@ void PMusrCanvas::LastCanvasClosed()
|
||||
void PMusrCanvas::WindowClosed()
|
||||
{
|
||||
// std::cerr << ">> fMainCanvas->GetName()=" << fMainCanvas->GetName() << std::endl;
|
||||
gROOT->GetListOfCanvases()->Remove(fMainCanvas.get());
|
||||
gROOT->GetListOfCanvases()->Remove(fMainCanvas);
|
||||
LastCanvasClosed();
|
||||
}
|
||||
|
||||
@ -1936,8 +2013,9 @@ void PMusrCanvas::ExportData(const Char_t *fileName)
|
||||
case PV_DATA:
|
||||
if (fAveragedView) {
|
||||
fout << "% from averaged view" << std::endl;
|
||||
fout << "x, diff, errDiff" << std::endl;
|
||||
fout << "% x, diff, errDiff" << std::endl;
|
||||
} else {
|
||||
fout << "% ";
|
||||
for (UInt_t i=0; i<dumpVector.size()-1; i++) {
|
||||
fout << "x" << i << " , diff" << i << ", errDiff" << i << ", ";
|
||||
}
|
||||
@ -1947,8 +2025,9 @@ void PMusrCanvas::ExportData(const Char_t *fileName)
|
||||
case PV_FOURIER_REAL:
|
||||
if (fAveragedView) {
|
||||
fout << "% from averaged view" << std::endl;
|
||||
fout << "x, F_diffRe" << std::endl;
|
||||
fout << "% x, F_diffRe" << std::endl;
|
||||
} else {
|
||||
fout << "% ";
|
||||
for (UInt_t i=0; i<dumpVector.size()-1; i++) {
|
||||
fout << "freq" << i << ", F_diffRe" << i << ", ";
|
||||
}
|
||||
@ -1958,8 +2037,9 @@ void PMusrCanvas::ExportData(const Char_t *fileName)
|
||||
case PV_FOURIER_IMAG:
|
||||
if (fAveragedView) {
|
||||
fout << "% from averaged view" << std::endl;
|
||||
fout << "x, F_diffIm" << std::endl;
|
||||
fout << "% x, F_diffIm" << std::endl;
|
||||
} else {
|
||||
fout << "% ";
|
||||
for (UInt_t i=0; i<dumpVector.size()-1; i++) {
|
||||
fout << "freq" << i << ", F_diffIm" << i << ", ";
|
||||
}
|
||||
@ -1969,8 +2049,9 @@ void PMusrCanvas::ExportData(const Char_t *fileName)
|
||||
case PV_FOURIER_REAL_AND_IMAG:
|
||||
if (fAveragedView) {
|
||||
fout << "% from averaged view" << std::endl;
|
||||
fout << "x, F_diffRe, F_diffIm" << std::endl;
|
||||
fout << "% x, F_diffRe, F_diffIm" << std::endl;
|
||||
} else {
|
||||
fout << "% ";
|
||||
for (UInt_t i=0; i<dumpVector.size()/2; i++) {
|
||||
fout << "freq" << i << ", F_diffRe" << i << ", ";
|
||||
}
|
||||
@ -1983,8 +2064,9 @@ void PMusrCanvas::ExportData(const Char_t *fileName)
|
||||
case PV_FOURIER_PWR:
|
||||
if (fAveragedView) {
|
||||
fout << "% from averaged view" << std::endl;
|
||||
fout << "x, F_diffPwr" << std::endl;
|
||||
fout << "% x, F_diffPwr" << std::endl;
|
||||
} else {
|
||||
fout << "% ";
|
||||
for (UInt_t i=0; i<dumpVector.size()-1; i++) {
|
||||
fout << "freq" << i << ", F_diffPwr" << i << ", ";
|
||||
}
|
||||
@ -1994,8 +2076,9 @@ void PMusrCanvas::ExportData(const Char_t *fileName)
|
||||
case PV_FOURIER_PHASE:
|
||||
if (fAveragedView) {
|
||||
fout << "% from averaged view" << std::endl;
|
||||
fout << "x, F_diffPhase" << std::endl;
|
||||
fout << "% x, F_diffPhase" << std::endl;
|
||||
} else {
|
||||
fout << "% ";
|
||||
for (UInt_t i=0; i<dumpVector.size()-1; i++) {
|
||||
fout << "freq" << i << ", F_diffPhase" << i << ", ";
|
||||
}
|
||||
@ -2044,22 +2127,24 @@ void PMusrCanvas::ExportData(const Char_t *fileName)
|
||||
fout << "% from averaged view" << std::endl;
|
||||
fout << "% xData, data, errData, xTheory, theory" << std::endl;
|
||||
} else {
|
||||
fout << "% ";
|
||||
for (UInt_t i=0; i<dumpVector.size(); i++) {
|
||||
if (i % 2 == 0)
|
||||
fout << "xData" << i/2 << ", data" << i/2 << ", errData" << i/2 << ", ";
|
||||
fout << "xData" << i/2 << " , data" << i/2 << ", errData" << i/2 << ", ";
|
||||
else
|
||||
if (i == dumpVector.size()-1)
|
||||
fout << "xTheory" << (i-1)/2 << ", theory" << (i-1)/2 << std::endl;
|
||||
fout << "xTheory" << (i-1)/2 << " , theory" << (i-1)/2 << std::endl;
|
||||
else
|
||||
fout << "xTheory" << (i-1)/2 << ", theory" << (i-1)/2 << ", ";
|
||||
fout << "xTheory" << (i-1)/2 << " , theory" << (i-1)/2 << ", ";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case PV_FOURIER_REAL:
|
||||
if (fAveragedView) {
|
||||
fout << "% from averaged view" << std::endl;
|
||||
fout << "freq, F_Re, freqTheo, F_theoRe" << std::endl;
|
||||
fout << "% freq, F_Re, freqTheo, F_theoRe" << std::endl;
|
||||
} else {
|
||||
fout << "% ";
|
||||
for (UInt_t i=0; i<dumpVector.size(); i++) {
|
||||
if (i % 2 == 0)
|
||||
fout << "freq" << i/2 << ", F_Re" << i/2 << ", ";
|
||||
@ -2074,7 +2159,7 @@ void PMusrCanvas::ExportData(const Char_t *fileName)
|
||||
case PV_FOURIER_IMAG:
|
||||
if (fAveragedView) {
|
||||
fout << "% from averaged view" << std::endl;
|
||||
fout << "freq, F_Im, freqTheo, F_theoIm" << std::endl;
|
||||
fout << "% freq, F_Im, freqTheo, F_theoIm" << std::endl;
|
||||
} else {
|
||||
fout << "% ";
|
||||
for (UInt_t i=0; i<dumpVector.size(); i++) {
|
||||
@ -2091,8 +2176,9 @@ void PMusrCanvas::ExportData(const Char_t *fileName)
|
||||
case PV_FOURIER_REAL_AND_IMAG:
|
||||
if (fAveragedView) {
|
||||
fout << "% from averaged view" << std::endl;
|
||||
fout << "freq, F_Re, freqTheo, F_theoRe, freq, F_Im, freqTheo, F_theoIm" << std::endl;
|
||||
fout << "% freq, F_Re, freqTheo, F_theoRe, freq, F_Im, freqTheo, F_theoIm" << std::endl;
|
||||
} else {
|
||||
fout << "% ";
|
||||
for (UInt_t i=0; i<dumpVector.size(); i++) {
|
||||
if (i % 4 == 0)
|
||||
fout << "freq" << i/4 << ", F_Re" << i/4 << ", ";
|
||||
@ -2111,8 +2197,9 @@ void PMusrCanvas::ExportData(const Char_t *fileName)
|
||||
case PV_FOURIER_PWR:
|
||||
if (fAveragedView) {
|
||||
fout << "% from averaged view" << std::endl;
|
||||
fout << "freq, F_Pwr, freqTheo, F_theoPwr" << std::endl;
|
||||
fout << "% freq, F_Pwr, freqTheo, F_theoPwr" << std::endl;
|
||||
} else {
|
||||
fout << "% ";
|
||||
for (UInt_t i=0; i<dumpVector.size(); i++) {
|
||||
if (i % 2 == 0)
|
||||
fout << "freq" << i/2 << ", F_Pwr" << i/2 << ", ";
|
||||
@ -2127,8 +2214,9 @@ void PMusrCanvas::ExportData(const Char_t *fileName)
|
||||
case PV_FOURIER_PHASE:
|
||||
if (fAveragedView) {
|
||||
fout << "% from averaged view" << std::endl;
|
||||
fout << "freq, F_Phase, freqTheo, F_theoPhase" << std::endl;
|
||||
fout << "% freq, F_Phase, freqTheo, F_theoPhase" << std::endl;
|
||||
} else {
|
||||
fout << "% ";
|
||||
for (UInt_t i=0; i<dumpVector.size(); i++) {
|
||||
if (i % 2 == 0)
|
||||
fout << "freq" << i/2 << ", F_Phase" << i/2 << ", ";
|
||||
@ -2235,7 +2323,7 @@ void PMusrCanvas::CreateStyle()
|
||||
{
|
||||
TString musrStyle("musrStyle");
|
||||
musrStyle += fPlotNumber;
|
||||
fStyle = std::make_unique<TStyle>(musrStyle, musrStyle);
|
||||
fStyle = new TStyle(musrStyle, musrStyle);
|
||||
fStyle->SetOptStat(0); // no statistics options
|
||||
fStyle->SetOptTitle(0); // no title
|
||||
fStyle->cd();
|
||||
@ -2319,11 +2407,25 @@ void PMusrCanvas::InitMusrCanvas(const Char_t* title, Int_t wtopx, Int_t wtopy,
|
||||
fImp = nullptr;
|
||||
fBar = nullptr;
|
||||
fPopupMain = nullptr;
|
||||
fPopupFourier = nullptr;
|
||||
|
||||
fMainCanvas = nullptr;
|
||||
fTitlePad = nullptr;
|
||||
fDataTheoryPad = nullptr;
|
||||
fParameterPad = nullptr;
|
||||
fTheoryPad = nullptr;
|
||||
fInfoPad = nullptr;
|
||||
fMultiGraphLegend = nullptr;
|
||||
|
||||
// invoke canvas
|
||||
TString canvasName = TString("fMainCanvas");
|
||||
canvasName += fPlotNumber;
|
||||
fMainCanvas = std::make_unique<TCanvas>(canvasName.Data(), title, wtopx, wtopy, ww, wh);
|
||||
fMainCanvas = new TCanvas(canvasName.Data(), title, wtopx, wtopy, ww, wh);
|
||||
if (fMainCanvas == nullptr) {
|
||||
std::cerr << std::endl << ">> PMusrCanvas::PMusrCanvas(): **PANIC ERROR** Couldn't invoke " << canvasName.Data();
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
fMainCanvas->Connect("Closed()", "PMusrCanvas", this, "LastCanvasClosed()");
|
||||
|
||||
@ -2334,11 +2436,11 @@ void PMusrCanvas::InitMusrCanvas(const Char_t* title, Int_t wtopx, Int_t wtopy,
|
||||
fBar = fImp->GetMenuBar();
|
||||
fPopupMain = fBar->AddPopup("&Musrfit");
|
||||
|
||||
fPopupFourier = std::make_unique<TGPopupMenu>();
|
||||
fPopupFourier = new TGPopupMenu();
|
||||
fPopupMain->AddEntry("&Data", P_MENU_ID_DATA+P_MENU_PLOT_OFFSET*fPlotNumber);
|
||||
fPopupMain->AddSeparator();
|
||||
|
||||
fPopupMain->AddPopup("&Fourier", fPopupFourier.get());
|
||||
fPopupMain->AddPopup("&Fourier", fPopupFourier);
|
||||
fPopupFourier->AddEntry("Show Real", P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_REAL);
|
||||
fPopupFourier->AddEntry("Show Imag", P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_IMAG);
|
||||
fPopupFourier->AddEntry("Show Real+Imag", P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_REAL_AND_IMAG);
|
||||
@ -2368,32 +2470,57 @@ void PMusrCanvas::InitMusrCanvas(const Char_t* title, Int_t wtopx, Int_t wtopy,
|
||||
|
||||
// divide the canvas into 4 pads
|
||||
// title pad
|
||||
fTitlePad = std::make_unique<TPaveText>(0.0, YTITLE, 1.0, 1.0, "NDC");
|
||||
fTitlePad = new TPaveText(0.0, YTITLE, 1.0, 1.0, "NDC");
|
||||
if (fTitlePad == nullptr) {
|
||||
std::cerr << std::endl << ">> PMusrCanvas::PMusrCanvas(): **PANIC ERROR** Couldn't invoke fTitlePad";
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
fTitlePad->SetFillColor(TColor::GetColor(255,255,255));
|
||||
fTitlePad->SetTextAlign(12); // middle, left
|
||||
fTitlePad->AddText(title);
|
||||
fTitlePad->Draw();
|
||||
|
||||
// data/theory pad
|
||||
fDataTheoryPad = std::make_unique<TPad>("dataTheoryPad", "dataTheoryPad", 0.0, YINFO, XTHEO, YTITLE);
|
||||
fDataTheoryPad = new TPad("dataTheoryPad", "dataTheoryPad", 0.0, YINFO, XTHEO, YTITLE);
|
||||
if (fDataTheoryPad == nullptr) {
|
||||
std::cerr << std::endl << ">> PMusrCanvas::PMusrCanvas(): **PANIC ERROR** Couldn't invoke fDataTheoryPad";
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
fDataTheoryPad->SetFillColor(TColor::GetColor(255,255,255));
|
||||
fDataTheoryPad->Draw();
|
||||
|
||||
// parameter pad
|
||||
fParameterPad = std::make_unique<TPaveText>(XTHEO, 0.5, 1.0, YTITLE, "NDC");
|
||||
fParameterPad = new TPaveText(XTHEO, 0.5, 1.0, YTITLE, "NDC");
|
||||
if (fParameterPad == nullptr) {
|
||||
std::cerr << std::endl << ">> PMusrCanvas::PMusrCanvas(): **PANIC ERROR** Couldn't invoke fParameterPad";
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
fParameterPad->SetFillColor(TColor::GetColor(255,255,255));
|
||||
fParameterPad->SetTextAlign(13); // top, left
|
||||
fParameterPad->SetTextFont(102); // courier bold, scalable so that greek parameters will be plotted properly
|
||||
|
||||
// theory pad
|
||||
fTheoryPad = std::make_unique<TPaveText>(XTHEO, 0.1, 1.0, 0.5, "NDC");
|
||||
fTheoryPad = new TPaveText(XTHEO, 0.1, 1.0, 0.5, "NDC");
|
||||
if (fTheoryPad == nullptr) {
|
||||
std::cerr << std::endl << ">> PMusrCanvas::PMusrCanvas(): **PANIC ERROR** Couldn't invoke fTheoryPad";
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
fTheoryPad->SetFillColor(TColor::GetColor(255,255,255));
|
||||
fTheoryPad->SetTextAlign(13); // top, left
|
||||
fTheoryPad->SetTextFont(102); // courier bold, scalable so that greek parameters will be plotted properly
|
||||
|
||||
|
||||
// info pad
|
||||
fInfoPad = std::make_unique<TLegend>(0.0, 0.0, 1.0, YINFO, "NDC");
|
||||
fInfoPad = new TLegend(0.0, 0.0, 1.0, YINFO, "NDC");
|
||||
if (fInfoPad == nullptr) {
|
||||
std::cerr << std::endl << ">> PMusrCanvas::PMusrCanvas(): **PANIC ERROR** Couldn't invoke fInfoPad";
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
fInfoPad->SetFillColor(TColor::GetColor(255,255,255));
|
||||
fInfoPad->SetTextAlign(12); // middle, left
|
||||
|
||||
@ -4786,7 +4913,11 @@ void PMusrCanvas::PlotData(Bool_t unzoom)
|
||||
// set y-axis label
|
||||
fMultiGraphData->GetYaxis()->SetTitle(yAxisTitle.Data());
|
||||
} else { // more than one data set present, hence add a legend
|
||||
fMultiGraphLegend.reset(new TLegend(0.8, 0.8, 1.0, 1.0));
|
||||
if (fMultiGraphLegend) {
|
||||
delete fMultiGraphLegend;
|
||||
}
|
||||
fMultiGraphLegend = new TLegend(0.8, 0.8, 1.0, 1.0);
|
||||
assert(fMultiGraphLegend != nullptr);
|
||||
PStringVector legendLabel;
|
||||
for (UInt_t i=0; i<plotInfo.fRuns.size(); i++) {
|
||||
runNo = (UInt_t)plotInfo.fRuns[i]-1;
|
||||
@ -5979,6 +6110,12 @@ void PMusrCanvas::PlotFourierDifference(Bool_t unzoom)
|
||||
*/
|
||||
void PMusrCanvas::PlotFourierPhaseValue(Bool_t unzoom)
|
||||
{
|
||||
// check if phase TLatex object is present
|
||||
if (fCurrentFourierPhaseText) {
|
||||
delete fCurrentFourierPhaseText;
|
||||
fCurrentFourierPhaseText = nullptr;
|
||||
}
|
||||
|
||||
double x, y;
|
||||
TString str;
|
||||
|
||||
@ -5990,7 +6127,7 @@ void PMusrCanvas::PlotFourierPhaseValue(Bool_t unzoom)
|
||||
}
|
||||
x = 0.7;
|
||||
y = 0.85;
|
||||
fCurrentFourierPhaseText.reset(new TLatex());
|
||||
fCurrentFourierPhaseText = new TLatex();
|
||||
fCurrentFourierPhaseText->SetNDC(kTRUE);
|
||||
fCurrentFourierPhaseText->SetText(x, y, str.Data());
|
||||
fCurrentFourierPhaseText->SetTextFont(62);
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -245,11 +245,20 @@ ClassImpQ(PMusrT0)
|
||||
PMusrT0::PMusrT0()
|
||||
{
|
||||
fTimeout = 0;
|
||||
fTimeoutTimer = nullptr;
|
||||
|
||||
fValid = false;
|
||||
|
||||
fStatus = 0; // default is quit locally
|
||||
|
||||
fMainCanvas = nullptr;
|
||||
|
||||
fHisto = nullptr;
|
||||
fData = nullptr;
|
||||
fBkg = nullptr;
|
||||
|
||||
fToDoInfo = nullptr;
|
||||
|
||||
fDataAndBkgEnabled = false;
|
||||
fT0Enabled = false;
|
||||
fShowT0DataChannel = false;
|
||||
@ -258,6 +267,13 @@ PMusrT0::PMusrT0()
|
||||
fDataRange[1] = 0;
|
||||
fBkgRange[0] = 0;
|
||||
fBkgRange[1] = 0;
|
||||
|
||||
fT0Line = nullptr;
|
||||
fT0DataLine = nullptr;
|
||||
fFirstBkgLine = nullptr;
|
||||
fLastBkgLine = nullptr;
|
||||
fFirstDataLine = nullptr;
|
||||
fLastDataLine = nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@ -271,11 +287,20 @@ PMusrT0::PMusrT0()
|
||||
PMusrT0::PMusrT0(PMusrT0Data &data) : fMusrT0Data(data)
|
||||
{
|
||||
fTimeout = 0;
|
||||
fTimeoutTimer = nullptr;
|
||||
|
||||
fValid = true;
|
||||
|
||||
fStatus = 0; // default is quit locally
|
||||
|
||||
fMainCanvas = nullptr;
|
||||
|
||||
fHisto = nullptr;
|
||||
fData = nullptr;
|
||||
fBkg = nullptr;
|
||||
|
||||
fToDoInfo = nullptr;
|
||||
|
||||
fDataAndBkgEnabled = false;
|
||||
fT0Enabled = false;
|
||||
fShowT0DataChannel = false;
|
||||
@ -285,6 +310,13 @@ PMusrT0::PMusrT0(PMusrT0Data &data) : fMusrT0Data(data)
|
||||
fBkgRange[0] = 0;
|
||||
fBkgRange[1] = 0;
|
||||
|
||||
fT0Line = nullptr;
|
||||
fT0DataLine = nullptr;
|
||||
fFirstBkgLine = nullptr;
|
||||
fLastBkgLine = nullptr;
|
||||
fFirstDataLine = nullptr;
|
||||
fLastDataLine = nullptr;
|
||||
|
||||
// feed necessary objects
|
||||
TString str;
|
||||
|
||||
@ -315,7 +347,7 @@ PMusrT0::PMusrT0(PMusrT0Data &data) : fMusrT0Data(data)
|
||||
Int_t noOfBins = rawRunData->GetDataBin(histoNo)->size();
|
||||
Double_t start = -0.5;
|
||||
Double_t end = noOfBins - 0.5; // -0.5 is correct since the data start at 0.0
|
||||
fHisto = std::make_unique<TH1F>("fHisto", str.Data(), noOfBins, start, end);
|
||||
fHisto = new TH1F("fHisto", str.Data(), noOfBins, start, end);
|
||||
fHisto->SetMarkerStyle(21);
|
||||
fHisto->SetMarkerSize(0.5);
|
||||
fHisto->SetMarkerColor(TColor::GetColor(0,0,0)); // black
|
||||
@ -350,7 +382,7 @@ PMusrT0::PMusrT0(PMusrT0Data &data) : fMusrT0Data(data)
|
||||
Int_t noOfBins = rawRunData->GetDataBin(histoNo)->size();
|
||||
Double_t start = -0.5;
|
||||
Double_t end = noOfBins - 0.5; // -0.5 is correct since the data start at 0.0
|
||||
fHisto = std::make_unique<TH1F>("fHisto", str.Data(), noOfBins, start, end);
|
||||
fHisto = new TH1F("fHisto", str.Data(), noOfBins, start, end);
|
||||
fHisto->SetMarkerStyle(21);
|
||||
fHisto->SetMarkerSize(0.5);
|
||||
fHisto->SetMarkerColor(TColor::GetColor(0,0,0)); // black
|
||||
@ -485,7 +517,7 @@ PMusrT0::PMusrT0(PMusrT0Data &data) : fMusrT0Data(data)
|
||||
}
|
||||
|
||||
// generate canvas etc
|
||||
fMainCanvas = std::make_unique<TCanvas>("fMainCanvas", str);
|
||||
fMainCanvas = new TCanvas("fMainCanvas", str);
|
||||
fMainCanvas->SetFillColor(TColor::GetColor(255,255,255));
|
||||
|
||||
|
||||
@ -513,7 +545,7 @@ PMusrT0::PMusrT0(PMusrT0Data &data) : fMusrT0Data(data)
|
||||
|
||||
if (fMusrT0Data.GetCmdTag() == PMUSRT0_GET_T0) {
|
||||
str = "please set t0 bin only.";
|
||||
fToDoInfo = std::make_unique<TLatex>();
|
||||
fToDoInfo = new TLatex();
|
||||
fToDoInfo->SetTextFont(51);
|
||||
fToDoInfo->SetTextSize(0.030);
|
||||
fToDoInfo->SetLineWidth(2);
|
||||
@ -522,7 +554,7 @@ PMusrT0::PMusrT0(PMusrT0Data &data) : fMusrT0Data(data)
|
||||
}
|
||||
if (fMusrT0Data.GetCmdTag() == PMUSRT0_GET_DATA_AND_BKG_RANGE) {
|
||||
str = "please set data and bkg range.";
|
||||
fToDoInfo = std::make_unique<TLatex>();
|
||||
fToDoInfo = new TLatex();
|
||||
fToDoInfo->SetTextFont(51);
|
||||
fToDoInfo->SetTextSize(0.030);
|
||||
fToDoInfo->SetLineWidth(2);
|
||||
@ -531,6 +563,64 @@ PMusrT0::PMusrT0(PMusrT0Data &data) : fMusrT0Data(data)
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Destructor
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Destructor.
|
||||
*/
|
||||
PMusrT0::~PMusrT0()
|
||||
{
|
||||
if (fTimeoutTimer) {
|
||||
delete fTimeoutTimer;
|
||||
fTimeoutTimer = nullptr;
|
||||
}
|
||||
if (fHisto) {
|
||||
delete fHisto;
|
||||
fHisto = nullptr;
|
||||
}
|
||||
if (fData) {
|
||||
delete fData;
|
||||
fData = nullptr;
|
||||
}
|
||||
if (fBkg) {
|
||||
delete fBkg;
|
||||
fBkg = nullptr;
|
||||
}
|
||||
if (fToDoInfo) {
|
||||
delete fToDoInfo;
|
||||
fToDoInfo = nullptr;
|
||||
}
|
||||
if (fT0Line) {
|
||||
delete fT0Line;
|
||||
fT0Line = nullptr;
|
||||
}
|
||||
if (fT0DataLine) {
|
||||
delete fT0DataLine;
|
||||
fT0DataLine = nullptr;
|
||||
}
|
||||
if (fFirstBkgLine) {
|
||||
delete fFirstBkgLine;
|
||||
fFirstBkgLine = nullptr;
|
||||
}
|
||||
if (fLastBkgLine) {
|
||||
delete fLastBkgLine;
|
||||
fLastBkgLine = nullptr;
|
||||
}
|
||||
if (fFirstDataLine) {
|
||||
delete fFirstDataLine;
|
||||
fFirstDataLine = nullptr;
|
||||
}
|
||||
if (fLastDataLine) {
|
||||
delete fLastDataLine;
|
||||
fLastDataLine = nullptr;
|
||||
}
|
||||
if (fMainCanvas && (fStatus != 2)) {
|
||||
delete fMainCanvas;
|
||||
fMainCanvas = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Done (SIGNAL)
|
||||
//--------------------------------------------------------------------------
|
||||
@ -634,7 +724,11 @@ void PMusrT0::SetTimeout(Int_t timeout)
|
||||
if (fTimeout <= 0)
|
||||
return;
|
||||
|
||||
fTimeoutTimer.reset(new TTimer());
|
||||
if (fTimeoutTimer) {
|
||||
delete fTimeoutTimer;
|
||||
fTimeoutTimer = nullptr;
|
||||
}
|
||||
fTimeoutTimer = new TTimer();
|
||||
|
||||
fTimeoutTimer->Connect("Timeout()", "PMusrT0", this, "Quit()");
|
||||
|
||||
@ -688,7 +782,7 @@ void PMusrT0::InitT0()
|
||||
}
|
||||
Double_t max = fHisto->GetMaximum();
|
||||
|
||||
fT0Line = std::make_unique<TLine>((Double_t)t0Bin, 0.0, (Double_t)t0Bin, max);
|
||||
fT0Line = new TLine((Double_t)t0Bin, 0.0, (Double_t)t0Bin, max);
|
||||
fT0Line->SetLineStyle(1); // solid
|
||||
fT0Line->SetLineColor(TColor::GetColor(0,255,0)); // green
|
||||
fT0Line->SetLineWidth(2);
|
||||
@ -721,7 +815,7 @@ void PMusrT0::InitDataAndBkg()
|
||||
Int_t noOfBins = fDataRange[1]-fDataRange[0]+1;
|
||||
Double_t start = fDataRange[0] - 0.5;
|
||||
Double_t end = fDataRange[1] + 0.5;
|
||||
fData = std::make_unique<TH1F>("fData", "fData", noOfBins, start, end);
|
||||
fData = new TH1F("fData", "fData", noOfBins, start, end);
|
||||
fData->SetMarkerStyle(21);
|
||||
fData->SetMarkerSize(0.5);
|
||||
fData->SetMarkerColor(TColor::GetColor(0,0,255)); // blue
|
||||
@ -749,7 +843,7 @@ void PMusrT0::InitDataAndBkg()
|
||||
noOfBins = fBkgRange[1]-fBkgRange[0]+1;
|
||||
start = fBkgRange[0] - 0.5;
|
||||
end = fBkgRange[1] + 0.5;
|
||||
fBkg = std::make_unique<TH1F>("fBkg", "fBkg", noOfBins, start, end);
|
||||
fBkg = new TH1F("fBkg", "fBkg", noOfBins, start, end);
|
||||
fBkg->SetMarkerStyle(21);
|
||||
fBkg->SetMarkerSize(0.5);
|
||||
fBkg->SetMarkerColor(TColor::GetColor(255,0,0)); // red
|
||||
@ -763,26 +857,26 @@ void PMusrT0::InitDataAndBkg()
|
||||
Double_t max = fHisto->GetMaximum();
|
||||
|
||||
// data lines
|
||||
fFirstDataLine = std::make_unique<TLine>(static_cast<Double_t>(fDataRange[0]), 0.0, static_cast<Double_t>(fDataRange[0]), max);
|
||||
fFirstDataLine = new TLine(static_cast<Double_t>(fDataRange[0]), 0.0, static_cast<Double_t>(fDataRange[0]), max);
|
||||
fFirstDataLine->SetLineStyle(3); // doted
|
||||
fFirstDataLine->SetLineColor(TColor::GetColor(0,0,255)); // blue
|
||||
fFirstDataLine->SetLineWidth(2);
|
||||
fFirstDataLine->Draw();
|
||||
|
||||
fLastDataLine = std::make_unique<TLine>(static_cast<Double_t>(fDataRange[1]), 0.0, static_cast<Double_t>(fDataRange[1]), max);
|
||||
fLastDataLine = new TLine(static_cast<Double_t>(fDataRange[1]), 0.0, static_cast<Double_t>(fDataRange[1]), max);
|
||||
fLastDataLine->SetLineStyle(3); // doted
|
||||
fLastDataLine->SetLineColor(TColor::GetColor(0,0,255)); // blue
|
||||
fLastDataLine->SetLineWidth(2);
|
||||
fLastDataLine->Draw();
|
||||
|
||||
// bkg lines
|
||||
fFirstBkgLine = std::make_unique<TLine>(static_cast<Double_t>(fBkgRange[0]), 0.0, static_cast<Double_t>(fBkgRange[0]), max);
|
||||
fFirstBkgLine = new TLine(static_cast<Double_t>(fBkgRange[0]), 0.0, static_cast<Double_t>(fBkgRange[0]), max);
|
||||
fFirstBkgLine->SetLineStyle(6); // _..._...
|
||||
fFirstBkgLine->SetLineColor(TColor::GetColor(255,0,0)); // red
|
||||
fFirstBkgLine->SetLineWidth(2);
|
||||
fFirstBkgLine->Draw();
|
||||
|
||||
fLastBkgLine = std::make_unique<TLine>(static_cast<Double_t>(fBkgRange[1]), 0.0, static_cast<Double_t>(fBkgRange[1]), max);
|
||||
fLastBkgLine = new TLine(static_cast<Double_t>(fBkgRange[1]), 0.0, static_cast<Double_t>(fBkgRange[1]), max);
|
||||
fLastBkgLine->SetLineStyle(6); // _..._...
|
||||
fLastBkgLine->SetLineColor(TColor::GetColor(255,0,0)); // red
|
||||
fLastBkgLine->SetLineWidth(2);
|
||||
@ -804,7 +898,7 @@ void PMusrT0::ShowDataFileT0Channel()
|
||||
Double_t max = fHisto->GetMaximum();
|
||||
|
||||
if (!fT0DataLine) {
|
||||
fT0DataLine = std::make_unique<TLine>(static_cast<Double_t>(t0Bin), 0.0, static_cast<Double_t>(t0Bin), max);
|
||||
fT0DataLine = new TLine(static_cast<Double_t>(t0Bin), 0.0, static_cast<Double_t>(t0Bin), max);
|
||||
fT0DataLine->SetLineStyle(1); // solid
|
||||
fT0DataLine->SetLineColor(kOrange-3);
|
||||
fT0DataLine->SetLineWidth(2);
|
||||
@ -823,7 +917,8 @@ void PMusrT0::ShowDataFileT0Channel()
|
||||
void PMusrT0::HideDataFileT0Channel()
|
||||
{
|
||||
if (fT0DataLine) {
|
||||
fT0DataLine.reset();
|
||||
delete fT0DataLine;
|
||||
fT0DataLine = nullptr;
|
||||
}
|
||||
fMainCanvas->Update();
|
||||
}
|
||||
@ -941,11 +1036,15 @@ void PMusrT0::SetDataFirstChannel()
|
||||
fFirstDataLine->SetX1(x);
|
||||
fFirstDataLine->SetX2(x);
|
||||
|
||||
// recreate data histo
|
||||
delete fData;
|
||||
fData = nullptr;
|
||||
|
||||
// refill data histo
|
||||
Int_t noOfBins = fDataRange[1]-fDataRange[0]+1;
|
||||
Double_t start = fDataRange[0] - 0.5;
|
||||
Double_t end = fDataRange[1] + 0.5;
|
||||
fData.reset(new TH1F("fData", "fData", noOfBins, start, end));
|
||||
fData = new TH1F("fData", "fData", noOfBins, start, end);
|
||||
fData->SetMarkerStyle(21);
|
||||
fData->SetMarkerSize(0.5);
|
||||
fData->SetMarkerColor(TColor::GetColor(0,0,255)); // blue
|
||||
@ -987,11 +1086,15 @@ void PMusrT0::SetDataLastChannel()
|
||||
fLastDataLine->SetX1(x);
|
||||
fLastDataLine->SetX2(x);
|
||||
|
||||
// recreate data histo
|
||||
delete fData;
|
||||
fData = nullptr;
|
||||
|
||||
// refill data histo
|
||||
Int_t noOfBins = fDataRange[1]-fDataRange[0]+1;
|
||||
Double_t start = fDataRange[0] - 0.5;
|
||||
Double_t end = fDataRange[1] + 0.5;
|
||||
fData.reset(new TH1F("fData", "fData", noOfBins, start, end));
|
||||
fData = new TH1F("fData", "fData", noOfBins, start, end);
|
||||
fData->SetMarkerStyle(21);
|
||||
fData->SetMarkerSize(0.5);
|
||||
fData->SetMarkerColor(TColor::GetColor(0,0,255)); // blue
|
||||
@ -1033,11 +1136,15 @@ void PMusrT0::SetBkgFirstChannel()
|
||||
fFirstBkgLine->SetX1(x);
|
||||
fFirstBkgLine->SetX2(x);
|
||||
|
||||
// recreate data histo
|
||||
delete fBkg;
|
||||
fBkg = nullptr;
|
||||
|
||||
// refill data histo
|
||||
Int_t noOfBins = fBkgRange[1]-fBkgRange[0]+1;
|
||||
Double_t start = fBkgRange[0] - 0.5;
|
||||
Double_t end = fBkgRange[1] + 0.5;
|
||||
fBkg.reset(new TH1F("fBkg", "fBkg", noOfBins, start, end));
|
||||
fBkg = new TH1F("fBkg", "fBkg", noOfBins, start, end);
|
||||
fBkg->SetMarkerStyle(21);
|
||||
fBkg->SetMarkerSize(0.5);
|
||||
fBkg->SetMarkerColor(TColor::GetColor(255,0,0)); // red
|
||||
@ -1079,11 +1186,15 @@ void PMusrT0::SetBkgLastChannel()
|
||||
fLastBkgLine->SetX1(x);
|
||||
fLastBkgLine->SetX2(x);
|
||||
|
||||
// recreate data histo
|
||||
delete fBkg;
|
||||
fBkg = nullptr;
|
||||
|
||||
// refill data histo
|
||||
Int_t noOfBins = fBkgRange[1]-fBkgRange[0]+1;
|
||||
Double_t start = fBkgRange[0] - 0.5;
|
||||
Double_t end = fBkgRange[1] + 0.5;
|
||||
fBkg.reset(new TH1F("fBkg", "fBkg", noOfBins, start, end));
|
||||
fBkg = new TH1F("fBkg", "fBkg", noOfBins, start, end);
|
||||
fBkg->SetMarkerStyle(21);
|
||||
fBkg->SetMarkerSize(0.5);
|
||||
fBkg->SetMarkerColor(TColor::GetColor(255,0,0)); // red
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -31,7 +31,6 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
@ -346,7 +345,7 @@ PRgeHandler::PRgeHandler(const std::string fln)
|
||||
}
|
||||
|
||||
// create the rge xml handler
|
||||
std::unique_ptr<PXmlRgeHandler> xmlRge = std::make_unique<PXmlRgeHandler>();
|
||||
PXmlRgeHandler *xmlRge = new PXmlRgeHandler();
|
||||
if (xmlRge == nullptr) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** couldn't invoke PXmlRgeHandler." << std::endl;
|
||||
@ -356,7 +355,7 @@ PRgeHandler::PRgeHandler(const std::string fln)
|
||||
}
|
||||
|
||||
// create the SAX parser
|
||||
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||
TSAXParser *saxParser = new TSAXParser();
|
||||
if (saxParser == nullptr) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** couldn't invoke TSAXParser." << std::endl;
|
||||
@ -367,7 +366,7 @@ PRgeHandler::PRgeHandler(const std::string fln)
|
||||
saxParser->SetStopOnError();
|
||||
|
||||
// connect SAX parser and rge handler
|
||||
saxParser->ConnectToHandler("PXmlRgeHandler", xmlRge.get());
|
||||
saxParser->ConnectToHandler("PXmlRgeHandler", xmlRge);
|
||||
int status = saxParser->ParseFile(fln.c_str());
|
||||
if (status != 0) {
|
||||
std::cerr << std::endl;
|
||||
@ -434,6 +433,9 @@ PRgeHandler::PRgeHandler(const std::string fln)
|
||||
fData.push_back(dataSet);
|
||||
}
|
||||
}
|
||||
|
||||
delete saxParser;
|
||||
delete xmlRge;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -9,7 +9,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2018-2025 by Zaher Salman *
|
||||
* Copyright (C) 2018-2023 by Zaher Salman *
|
||||
* zaher.salman@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -99,7 +99,7 @@ PRunBase::PRunBase(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo,
|
||||
fFuncValues.push_back(0.0);
|
||||
|
||||
// generate theory
|
||||
fTheory = std::make_unique<PTheory>(fMsrInfo, runNo);
|
||||
fTheory = new PTheory(fMsrInfo, runNo);
|
||||
if (fTheory == nullptr) {
|
||||
std::cerr << std::endl << "**SEVERE ERROR** PRunBase::PRunBase: Couldn't create an instance of PTheory :-(, will quit" << std::endl;
|
||||
exit(0);
|
||||
@ -181,7 +181,10 @@ void PRunBase::SetFitRange(PDoublePairVector fitRange)
|
||||
*/
|
||||
void PRunBase::CleanUp()
|
||||
{
|
||||
fTheory.reset();
|
||||
if (fTheory) {
|
||||
delete fTheory;
|
||||
fTheory = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -41,7 +41,6 @@
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <memory>
|
||||
|
||||
#include <TROOT.h>
|
||||
#include <TSystem.h>
|
||||
@ -1714,7 +1713,7 @@ Bool_t PRunDataHandler::ReadRootFile()
|
||||
}
|
||||
} else { // MusrRoot file
|
||||
// invoke the MusrRoot header object
|
||||
std::unique_ptr<TMusrRunHeader> header = std::make_unique<TMusrRunHeader>(true); // read quiet
|
||||
TMusrRunHeader *header = new TMusrRunHeader(true); // read quite
|
||||
if (header == nullptr) {
|
||||
std::cerr << std::endl << ">> PRunDataHandler::ReadRootFile: **ERROR** Couldn't invoke MusrRoot RunHeader in file:" << fRunPathName;
|
||||
std::cerr << std::endl;
|
||||
@ -1891,10 +1890,6 @@ Bool_t PRunDataHandler::ReadRootFile()
|
||||
}
|
||||
}
|
||||
|
||||
header->Get("RunInfo/Sample Orientation", str, ok);
|
||||
if (ok)
|
||||
runData.SetOrientation(str);
|
||||
|
||||
// check further for LEM specific stuff in RunInfo
|
||||
|
||||
header->Get("RunInfo/Moderator HV", prop, ok);
|
||||
@ -2055,15 +2050,11 @@ Bool_t PRunDataHandler::ReadRootFile()
|
||||
}
|
||||
|
||||
dataSet.Clear();
|
||||
dataSet.SetTitle(histo->GetTitle());
|
||||
dataSet.SetName(histo->GetTitle());
|
||||
dataSet.SetHistoNo(redGreenOffsets[i]+j+1);
|
||||
|
||||
// get detector info
|
||||
path.Form("DetectorInfo/Detector%03d/", redGreenOffsets[i]+j+1);
|
||||
pathName = path + "Name";
|
||||
header->Get(pathName, str, ok);
|
||||
if (ok)
|
||||
dataSet.SetName(str);
|
||||
pathName = path + "Time Zero Bin";
|
||||
header->Get(pathName, dval, ok);
|
||||
if (ok)
|
||||
@ -2089,6 +2080,12 @@ Bool_t PRunDataHandler::ReadRootFile()
|
||||
histoData.clear();
|
||||
}
|
||||
}
|
||||
|
||||
// clean up
|
||||
if (header) {
|
||||
delete header;
|
||||
header=nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
f.Close();
|
||||
@ -2125,7 +2122,7 @@ Bool_t PRunDataHandler::ReadNexusFile()
|
||||
Double_t dval;
|
||||
bool ok;
|
||||
|
||||
std::unique_ptr<PNeXus> nxs_file = std::make_unique<PNeXus>(fRunPathName.Data());
|
||||
PNeXus *nxs_file = new PNeXus(fRunPathName.Data());
|
||||
if (!nxs_file->IsValid()) {
|
||||
std::cerr << std::endl << ">> PRunDataHandler::ReadNexusFile(): Not a valid NeXus file.";
|
||||
std::cerr << std::endl << ">> Error Message: " << nxs_file->GetErrorMsg().data() << std::endl;
|
||||
@ -2457,6 +2454,12 @@ Bool_t PRunDataHandler::ReadNexusFile()
|
||||
} else {
|
||||
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): IDF version " << nxs_file->GetIdfVersion() << ", not implemented." << std::endl;
|
||||
}
|
||||
|
||||
// clean up
|
||||
if (nxs_file) {
|
||||
delete nxs_file;
|
||||
nxs_file = nullptr;
|
||||
}
|
||||
#else
|
||||
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): Sorry, not enabled at configuration level, i.e. --enable-NeXus when executing configure" << std::endl << std::endl;
|
||||
#endif
|
||||
@ -3705,8 +3708,6 @@ Bool_t PRunDataHandler::ReadAsciiFile()
|
||||
{
|
||||
Bool_t success = true;
|
||||
|
||||
std::cout << "as35> in ReadAsciiFile() ..." << std::endl;
|
||||
|
||||
// open file
|
||||
std::ifstream f;
|
||||
|
||||
@ -3858,14 +3859,7 @@ std::cout << "as35> in ReadAsciiFile() ..." << std::endl;
|
||||
break;
|
||||
}
|
||||
ey = ostr->GetString().Atof();
|
||||
if (ey == 0) {
|
||||
std::cerr << std::endl << ">> PRunDataHandler::ReadAsciiFile **WARNING** line no " << lineNo << ": error y = 0 which doesn't make sense. Will set it to 1.0. Please check!!";
|
||||
std::cerr << std::endl;
|
||||
ey = 1.0;
|
||||
}
|
||||
} else {
|
||||
std::cerr << std::endl << ">> PRunDataHandler::ReadAsciiFile **WARNING** line no " << lineNo << ": error y = 0 which doesn't make sense. Will set it to 1.0. Please check!!";
|
||||
std::cerr << std::endl;
|
||||
ey = 1.0;
|
||||
}
|
||||
|
||||
@ -4374,7 +4368,7 @@ Bool_t PRunDataHandler::ReadDatFile()
|
||||
// open file
|
||||
std::ifstream f;
|
||||
|
||||
// open dat-file
|
||||
// open db-file
|
||||
f.open(fRunPathName.Data(), std::ifstream::in);
|
||||
if (!f.is_open()) {
|
||||
std::cerr << std::endl << ">> PRunDataHandler::ReadDatFile **ERROR** Couldn't open data file (" << fRunPathName.Data() << ") for reading, sorry ...";
|
||||
@ -4473,12 +4467,6 @@ Bool_t PRunDataHandler::ReadDatFile()
|
||||
idx++;
|
||||
} else { // error value
|
||||
if (isData[i-1] == 1) { // Err or PosErr hence keep it
|
||||
if (dval == 0.0) {
|
||||
std::cout << std::endl << ">> PRunDataHandler::ReadDatFile **WARNING** found Err value = 0. Doesn't make sense! Will set it to 1. Please check!";
|
||||
std::cerr << std::endl << ">> in line: " << lineNo;
|
||||
std::cerr << std::endl;
|
||||
dval = 1.0;
|
||||
}
|
||||
runData.fDataNonMusr.AppendSubErrData(idx-1, dval);
|
||||
}
|
||||
}
|
||||
@ -4493,11 +4481,11 @@ Bool_t PRunDataHandler::ReadDatFile()
|
||||
|
||||
f.close();
|
||||
|
||||
// got through all the data sets and if there is NO error vector set it to '1.0'
|
||||
// got through all the data sets and if there is NO error vector set it to '0.0'
|
||||
for (UInt_t i=0; i<noOfDataSets; i++) {
|
||||
if (runData.fDataNonMusr.GetErrData()->at(i).size() == 0) {
|
||||
for (UInt_t j=0; j<runData.fDataNonMusr.GetData()->at(i).size(); j++) {
|
||||
runData.fDataNonMusr.AppendSubErrData(i, 1.0);
|
||||
runData.fDataNonMusr.AppendSubErrData(i, 0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4543,7 +4531,7 @@ Bool_t PRunDataHandler::WriteMusrRootFile(TString fln)
|
||||
|
||||
runHeader = gROOT->GetRootFolder()->AddFolder("RunHeader", "MusrRoot Run Header Info");
|
||||
gROOT->GetListOfBrowsables()->Add(runHeader, "RunHeader");
|
||||
std::unique_ptr<TMusrRunHeader> header = std::make_unique<TMusrRunHeader>(true);
|
||||
TMusrRunHeader *header = new TMusrRunHeader(true);
|
||||
gROOT->GetListOfBrowsables()->Add(runHeader, "RunHeader");
|
||||
|
||||
// feed header info
|
||||
@ -4659,13 +4647,9 @@ Bool_t PRunDataHandler::WriteMusrRootFile(TString fln)
|
||||
str.Form("hDecay%03d", dataSet->GetHistoNo());
|
||||
length = dataSet->GetData()->size();
|
||||
histo = new TH1F(str.Data(), str.Data(), length+1, -0.5, static_cast<Double_t>(length)+0.5);
|
||||
Int_t sum=0, entries=0;
|
||||
for (UInt_t j=0; j<length; j++) {
|
||||
entries = dataSet->GetData()->at(j);
|
||||
histo->SetBinContent(j+1, entries);
|
||||
sum += entries;
|
||||
histo->SetBinContent(j+1, dataSet->GetData()->at(j));
|
||||
}
|
||||
histo->SetEntries(sum);
|
||||
histos.push_back(histo);
|
||||
}
|
||||
} else { // rebin > 1
|
||||
@ -4682,18 +4666,14 @@ Bool_t PRunDataHandler::WriteMusrRootFile(TString fln)
|
||||
length = dataSet->GetData()->size();
|
||||
histo = new TH1F(str.Data(), str.Data(), static_cast<Int_t>(length/fAny2ManyInfo->rebin)+1, -0.5, static_cast<Double_t>(static_cast<Int_t>(length/fAny2ManyInfo->rebin))+0.5);
|
||||
dataCount = 0;
|
||||
Int_t sum=0, entries=0;
|
||||
for (UInt_t j=0; j<length; j++) {
|
||||
if ((j > 0) && (j % fAny2ManyInfo->rebin == 0)) {
|
||||
dataCount++;
|
||||
histo->SetBinContent(dataCount, dataRebin);
|
||||
dataRebin = 0;
|
||||
}
|
||||
entries = dataSet->GetData()->at(j);
|
||||
sum += entries;
|
||||
dataRebin += static_cast<UInt_t>(entries);
|
||||
dataRebin += static_cast<UInt_t>(dataSet->GetData()->at(j));
|
||||
}
|
||||
histo->SetEntries(sum);
|
||||
histos.push_back(histo);
|
||||
}
|
||||
}
|
||||
@ -4703,7 +4683,7 @@ Bool_t PRunDataHandler::WriteMusrRootFile(TString fln)
|
||||
decayAnaModule->Add(histos[i]);
|
||||
|
||||
// write file
|
||||
std::unique_ptr<TFile> fout = std::make_unique<TFile>(fln, "RECREATE", fln);
|
||||
TFile *fout = new TFile(fln, "RECREATE", fln);
|
||||
if (fout == nullptr) {
|
||||
std::cerr << std::endl << "PRunDataHandler::WriteMusrRootFile(): **ERROR** Couldn't create ROOT file '" << fln << "'" << std::endl;
|
||||
return false;
|
||||
@ -4715,12 +4695,6 @@ Bool_t PRunDataHandler::WriteMusrRootFile(TString fln)
|
||||
histosFolder->Write();
|
||||
fout->Close();
|
||||
|
||||
// cleanup
|
||||
for (UInt_t i=0; i<histos.size(); i++) {
|
||||
if (histos[i])
|
||||
delete histos[i];
|
||||
}
|
||||
|
||||
// check if root file shall be streamed to stdout
|
||||
if (fAny2ManyInfo->useStandardOutput && (fAny2ManyInfo->compressionTag == 0)) {
|
||||
// stream file to stdout
|
||||
@ -4800,7 +4774,7 @@ Bool_t PRunDataHandler::WriteRootFile(TString fln)
|
||||
|
||||
runInfo = gROOT->GetRootFolder()->AddFolder("RunInfo", "LEM RunInfo");
|
||||
gROOT->GetListOfBrowsables()->Add(runInfo, "RunInfo");
|
||||
std::unique_ptr<TLemRunHeader> header = std::make_unique<TLemRunHeader>();
|
||||
TLemRunHeader *header = new TLemRunHeader();
|
||||
gROOT->GetListOfBrowsables()->Add(runInfo, "RunInfo");
|
||||
|
||||
// feed header info
|
||||
@ -4839,7 +4813,7 @@ Bool_t PRunDataHandler::WriteRootFile(TString fln)
|
||||
tt0[i] = dataSet->GetTimeZeroBin()/fAny2ManyInfo->rebin;
|
||||
}
|
||||
header->SetTimeZero(tt0);
|
||||
runInfo->Add(header.get()); // add header to RunInfo folder
|
||||
runInfo->Add(header); // add header to RunInfo folder
|
||||
|
||||
// feed histos
|
||||
std::vector<TH1F*> histos;
|
||||
@ -4893,7 +4867,7 @@ Bool_t PRunDataHandler::WriteRootFile(TString fln)
|
||||
decayAnaModule->Add(histos[i]);
|
||||
|
||||
// write file
|
||||
std::unique_ptr<TFile> fout = std::make_unique<TFile>(fln, "RECREATE", fln);
|
||||
TFile *fout = new TFile(fln, "RECREATE", fln);
|
||||
if (fout == nullptr) {
|
||||
std::cerr << std::endl << "PRunDataHandler::WriteRootFile(): **ERROR** Couldn't create ROOT file '" << fln << "'" << std::endl;
|
||||
return false;
|
||||
@ -4909,7 +4883,9 @@ Bool_t PRunDataHandler::WriteRootFile(TString fln)
|
||||
delete histos[i];
|
||||
}
|
||||
histos.clear();
|
||||
delete fout;
|
||||
delete [] tt0;
|
||||
delete header;
|
||||
|
||||
// check if root file shall be streamed to stdout
|
||||
if (fAny2ManyInfo->useStandardOutput && (fAny2ManyInfo->compressionTag == 0)) {
|
||||
@ -4980,7 +4956,7 @@ Bool_t PRunDataHandler::WriteNexusFile(TString fln)
|
||||
std::cout << std::endl << ">> PRunDataHandler::WriteNexusFile(): writing a NeXus data file (" << fln.Data() << ") ... " << std::endl;
|
||||
|
||||
// create NeXus object
|
||||
std::unique_ptr<PNeXus> nxs = std::make_unique<PNeXus>();
|
||||
PNeXus *nxs = new PNeXus();
|
||||
if (nxs == nullptr) {
|
||||
std::cerr << std::endl << ">> PRunDataHandler::WriteNexusFile(): **ERROR** couldn't invoke the NeXus object." << std::endl;
|
||||
return false;
|
||||
@ -5260,6 +5236,11 @@ Bool_t PRunDataHandler::WriteNexusFile(TString fln)
|
||||
if (fgb) delete [] fgb;
|
||||
if (lgb) delete [] lgb;
|
||||
} else {
|
||||
// clean up
|
||||
if (nxs != 0) {
|
||||
delete nxs;
|
||||
nxs = nullptr;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -5275,11 +5256,20 @@ Bool_t PRunDataHandler::WriteNexusFile(TString fln)
|
||||
else {
|
||||
std::cerr << std::endl << ">> PRunDataHandler::WriteNexusFile(): **ERROR** undefined output NeXus format " << fAny2ManyInfo->outFormat.Data() << " found.";
|
||||
std::cerr << std::endl << ">> Allowed are: hdf4, hdf5, xml" << std::endl;
|
||||
if (nxs != 0) {
|
||||
delete nxs;
|
||||
nxs = nullptr;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// write file
|
||||
nxs->WriteFile(fln, fileType, fAny2ManyInfo->idf);
|
||||
|
||||
if (nxs != 0) {
|
||||
delete nxs;
|
||||
nxs = nullptr;
|
||||
}
|
||||
#else
|
||||
std::cout << std::endl << ">> PRunDataHandler::WriteNexusFile(): Sorry, not enabled at configuration level, i.e. --enable-NeXus when executing configure" << std::endl << std::endl;
|
||||
#endif
|
||||
@ -5586,30 +5576,6 @@ Bool_t PRunDataHandler::WritePsiBinFile(TString fln)
|
||||
Int_t ival = 0;
|
||||
PRawRunDataSet *dataSet;
|
||||
UInt_t size = fData[0].GetNoOfHistos();
|
||||
// collect histo names in order to see if they are still unique after cropping to 4 char.
|
||||
PStringVector hName, hNCrop;
|
||||
TString sCrop;
|
||||
for (UInt_t i=0; i<size; i++) {
|
||||
dataSet = fData[0].GetDataSet(i, false); // i.e. the false means, that i is the index and NOT the histo number
|
||||
// detector name
|
||||
str = dataSet->GetName();
|
||||
hName.push_back(str);
|
||||
sCrop = str;
|
||||
sCrop.Remove(4);
|
||||
hNCrop.push_back(sCrop);
|
||||
}
|
||||
// check cropped for uniqueness
|
||||
ival = 1;
|
||||
for (UInt_t i=0; i<size; i++) {
|
||||
for (UInt_t j=i+1; j<size; j++) {
|
||||
if (hNCrop[i] == hNCrop[j]) {
|
||||
std::string nn = std::to_string(ival);
|
||||
hNCrop[j][3] = nn[0];
|
||||
ival++;
|
||||
}
|
||||
}
|
||||
}
|
||||
// handle rest of the detectors
|
||||
for (UInt_t i=0; i<size; i++) {
|
||||
dataSet = fData[0].GetDataSet(i, false); // i.e. the false means, that i is the index and NOT the histo number
|
||||
if (dataSet == nullptr) { // something is really wrong
|
||||
@ -5619,7 +5585,10 @@ Bool_t PRunDataHandler::WritePsiBinFile(TString fln)
|
||||
}
|
||||
|
||||
// detector name
|
||||
psibin.PutNameHisto(hNCrop[i].Data(), i);
|
||||
str = dataSet->GetName();
|
||||
if (!str.CompareTo("n/a"))
|
||||
str.Form("Detector%3d", i+1);
|
||||
psibin.PutNameHisto(str.Data(), i);
|
||||
// time zero bin
|
||||
ival = static_cast<Int_t>(dataSet->GetTimeZeroBin()/fAny2ManyInfo->rebin);
|
||||
psibin.PutT0Int(i, ival);
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -38,7 +38,6 @@
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
|
||||
#include <TString.h>
|
||||
#include <TObjArray.h>
|
||||
@ -1069,13 +1068,13 @@ Double_t PRunSingleHistoRRF::GetMainFrequency(PDoubleVector &data)
|
||||
// create histo
|
||||
Double_t startTime = (fGoodBins[0]-fT0s[0]) * fTimeResolution;
|
||||
Int_t noOfBins = fGoodBins[1]-fGoodBins[0]+1;
|
||||
std::unique_ptr<TH1F> histo = std::make_unique<TH1F>("data", "data", noOfBins, startTime-fTimeResolution/2.0, startTime+fTimeResolution/2.0+noOfBins*fTimeResolution);
|
||||
TH1F *histo = new TH1F("data", "data", noOfBins, startTime-fTimeResolution/2.0, startTime+fTimeResolution/2.0+noOfBins*fTimeResolution);
|
||||
for (Int_t i=fGoodBins[0]; i<=fGoodBins[1]; i++) {
|
||||
histo->SetBinContent(i-fGoodBins[0]+1, data[i]);
|
||||
}
|
||||
|
||||
// Fourier transform
|
||||
std::unique_ptr<PFourier> ft = std::make_unique<PFourier>(histo.get(), FOURIER_UNIT_FREQ);
|
||||
PFourier *ft = new PFourier(histo, FOURIER_UNIT_FREQ);
|
||||
ft->Transform(F_APODIZATION_STRONG);
|
||||
|
||||
// find frequency maximum
|
||||
@ -1100,6 +1099,10 @@ Double_t PRunSingleHistoRRF::GetMainFrequency(PDoubleVector &data)
|
||||
// clean up
|
||||
if (power)
|
||||
delete power;
|
||||
if (ft)
|
||||
delete ft;
|
||||
if (histo)
|
||||
delete histo;
|
||||
|
||||
return freqMax;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -91,7 +91,7 @@ int parseXmlFile(TSAXParser *saxParser, const char *startup_path_name)
|
||||
/**
|
||||
* <p>Constructor. Check if the musrfit_startup.xml file is found in some standard search paths
|
||||
*/
|
||||
PStartupHandler::PStartupHandler(bool reset_startup_file)
|
||||
PStartupHandler::PStartupHandler()
|
||||
{
|
||||
fStartupFileFound = false;
|
||||
fStartupFilePath = "";
|
||||
@ -145,17 +145,6 @@ PStartupHandler::PStartupHandler(bool reset_startup_file)
|
||||
}
|
||||
}
|
||||
|
||||
// musrfit_startup.xml found. Check if it should be rewritten
|
||||
if (fStartupFileFound && reset_startup_file) {
|
||||
std::cout << std::endl;
|
||||
std::cout << ">> Will only reset the file: '" << fStartupFilePath.Data() << "'."<< std::endl;
|
||||
std::cout << std::endl;
|
||||
if (!WriteDefaultStartupFile(reset_startup_file)) {
|
||||
std::cerr << std::endl << "**ERROR** couldn't re-write " << fStartupFilePath.Data() << "." << std::endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// if musrfit_startup.xml is still not found, will create a default one
|
||||
if (!fStartupFileFound) {
|
||||
std::cout << std::endl << "**INFO** no musrfit_startup.xml file found, will write a default one." << std::endl;
|
||||
@ -617,38 +606,34 @@ Bool_t PStartupHandler::StartupFileExists(Char_t *fln)
|
||||
//--------------------------------------------------------------------------
|
||||
// WriteDefaultStartupFile
|
||||
//--------------------------------------------------------------------------
|
||||
Bool_t PStartupHandler::WriteDefaultStartupFile(bool reset_startup_file)
|
||||
Bool_t PStartupHandler::WriteDefaultStartupFile()
|
||||
{
|
||||
// get home
|
||||
Char_t startup_path_name[256];
|
||||
if (reset_startup_file) { // reset the found
|
||||
snprintf(startup_path_name, sizeof(startup_path_name), "%s", fStartupFilePath.Data());
|
||||
} else { // no musrfit_startup.xml found, hence write default under $HOME/.musrfit
|
||||
// get home
|
||||
Char_t *home = nullptr;
|
||||
home = getenv("HOME");
|
||||
if (home == nullptr) {
|
||||
std::cerr << std::endl << "**ERROR** couldn't obtain $HOME." << std::endl;
|
||||
Char_t *home = nullptr;
|
||||
home = getenv("HOME");
|
||||
if (home == nullptr) {
|
||||
std::cerr << std::endl << "**ERROR** couldn't obtain $HOME." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// first check that $HOME/.musrfit exists and if NOT create it
|
||||
struct stat info;
|
||||
|
||||
snprintf(startup_path_name, sizeof(startup_path_name), "%s/.musrfit", home);
|
||||
if (!stat(startup_path_name, &info)) {
|
||||
if (!(info.st_mode & S_IFDIR))
|
||||
return false;
|
||||
} else {
|
||||
if (mkdir(startup_path_name, 0777)) {
|
||||
std::cerr << std::endl << "**ERROR** couldn't create '" << startup_path_name << "'" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// first check that $HOME/.musrfit exists and if NOT create it
|
||||
struct stat info;
|
||||
|
||||
snprintf(startup_path_name, sizeof(startup_path_name), "%s/.musrfit", home);
|
||||
if (!stat(startup_path_name, &info)) {
|
||||
if (!(info.st_mode & S_IFDIR))
|
||||
return false;
|
||||
} else {
|
||||
if (mkdir(startup_path_name, 0777)) {
|
||||
std::cerr << std::endl << "**ERROR** couldn't create '" << startup_path_name << "'" << std::endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// set path-name for musrfit_startup.xml
|
||||
snprintf(startup_path_name, sizeof(startup_path_name), "%s/.musrfit/musrfit_startup.xml", home);
|
||||
}
|
||||
|
||||
// set path-name for musrfit_startup.xml
|
||||
snprintf(startup_path_name, sizeof(startup_path_name), "%s/.musrfit/musrfit_startup.xml", home);
|
||||
|
||||
std::ofstream fout(startup_path_name, std::ofstream::out);
|
||||
if (!fout.is_open()) {
|
||||
std::cerr << std::endl << "**ERROR** couldn't open '" << startup_path_name << "' for writing." << std::endl;
|
||||
@ -661,39 +646,27 @@ Bool_t PStartupHandler::WriteDefaultStartupFile(bool reset_startup_file)
|
||||
fout << " <comment>" << std::endl;
|
||||
fout << " Defines default settings for the musrfit package" << std::endl;
|
||||
fout << " </comment>" << std::endl;
|
||||
fout << " <data_path>/psi.ch/group/lmu/public/data/lem/his</data_path>" << std::endl;
|
||||
fout << " <data_path>/afs/psi.ch/project/nemu/data/his</data_path>" << std::endl;
|
||||
fout << " <data_path>/afs/psi.ch/project/nemu/data/wkm</data_path>" << std::endl;
|
||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/misc</data_path>" << std::endl;
|
||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/gps</data_path>" << std::endl;
|
||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/dolly</data_path>" << std::endl;
|
||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/gpd</data_path>" << std::endl;
|
||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/ltf</data_path>" << std::endl;
|
||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/alc/td</data_path>" << std::endl;
|
||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/alc</data_path>" << std::endl;
|
||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/hifi</data_path>" << std::endl;
|
||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/lem</data_path>" << std::endl;
|
||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/flame</data_path>" << std::endl;
|
||||
fout << " <!-- MISC/PSI 1985 - 1990 -->" << std::endl;
|
||||
fout << " <run_name_template inst=\"misc\">d%yyyy%/deltat_misc_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <!-- ALC TD/PSI -->" << std::endl;
|
||||
fout << " <run_name_template inst=\"alc\">d%yyyy%/deltat_zh_chem_%rrrr%.bin</run_name_template>" << std:: endl;
|
||||
fout << " <run_name_template inst=\"alc\">d%yyyy%/deltat_tdc_alc_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"alc\">d%yyyy%/tdc/deltat_tdc_alc_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <!-- Dolly/PSI -->" << std::endl;
|
||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/tdc/root/deltat_tdc_dolly_%yyyy%_%rrrr%.root</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/pie1/deltat_flc_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/pie3/deltat_flc_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/deltat_flc_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/deltat_pta_dolly_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/pta/deltat_pta_dolly_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/pta/deltat_pta_dolly_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/tdc/deltat_tdc_dolly_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/tdc/mdu/deltat_tdc_dolly_%rrrr%.mdu</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/tdc/root/deltat_tdc_dolly_%rrrr%.root</run_name_template>" << std::endl;
|
||||
fout << " <!-- Flame/PSI -->" << std::endl;
|
||||
fout << " <run_name_template inst=\"flame\">d%yyyy%/tdc/root/deltat_tdc_flame_%yyyy%_%rrrr%.root</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"flame\">d%yyyy%/tdc/deltat_tdc_flame_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"flame\">d%yyyy%/tdc/mdu/deltat_tdc_flame_%yyyy%_%rrrr%.mdu</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"flame\">d%yyyy%/tdc/root/deltat_tdc_flame_%yyyy%_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <!-- GPD/PSI -->" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/tdc/root/deltat_tdc_gpd_%yyyy%_%rrrr%.root</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_mue1_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_fq_si_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_strobo_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
@ -704,11 +677,9 @@ Bool_t PStartupHandler::WriteDefaultStartupFile(bool reset_startup_file)
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_janis_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_janis_gpd_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_pta_gpd_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/pta/deltat_pta_gpd_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/tdc/deltat_tdc_gpd_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/tdc/mdu/deltat_tdc_gpd_%rrrr%.mdu</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/tdc/root/deltat_tdc_gpd_%rrrr%.root</run_name_template>" << std::endl;
|
||||
fout << " <!-- GPS/PSI -->" << std::endl;
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/tdc/root/deltat_tdc_gps_%yyyy%_%rrrr%.root</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_ccr_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_he3_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_stutt_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
@ -719,23 +690,19 @@ Bool_t PStartupHandler::WriteDefaultStartupFile(bool reset_startup_file)
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_oven2_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_pta_gps_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/tdc/deltat_tdc_gps_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/tdc/mdu/deltat_tdc_gps_%yyyy%_%rrrr%.mdu</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/tdc/root/deltat_tdc_gps_%yyyy%_%rrrr%.root</run_name_template>" << std::endl;
|
||||
fout << " <!-- HAL-9500/PSI == HIFI/PSI -->" << std::endl;
|
||||
fout << " <run_name_template inst=\"hifi\">d%yyyy%/tdc/root/deltat_tdc_hifi_%yyyy%_%rrrr%.root</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"hifi\">d%yyyy%/tdc/deltat_hifi_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"hifi\">d%yyyy%/tdc/tdc_hifi_%yyyy%_%rrrrr%.mdu</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"hifi\">d%yyyy%/tdc/root/deltat_tdc_hifi_%yyyy%_%rrrr%.mdu</run_name_template>" << std::endl;
|
||||
fout << " <!-- LTF/PSI -->" << std::endl;
|
||||
fout << " <run_name_template inst=\"ltf\">d%yyyy%/deltat_ltf_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"ltf\">d%yyyy%/deltat_ltf2_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"ltf\">d%yyyy%/deltat_pta_ltf_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"ltf\">d%yyyy%/pta/deltat_pta_ltf_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"ltf\">d%yyyy%/tdc/deltat_tdc_ltf_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <!-- LEM/PSI -->" << std::endl;
|
||||
fout << " <run_name_template inst=\"lem\">%yyyy%/lem%yy%_his_%rrrr%.root</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"lem\">d%yyyy%/tdc/lem%yy%_his_%rrrr%.root</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"lem\">%yyyy%/lem%yy%_his_%rrrrr%.root</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"lem\">d%yyyy%/tdc/lem%yy%_his_%rrrrr%.root</run_name_template>" << std::endl;
|
||||
fout << " <fourier_settings>" << std::endl;
|
||||
fout << " <units>Gauss</units>" << std::endl;
|
||||
fout << " <fourier_power>0</fourier_power>" << std::endl;
|
||||
@ -766,7 +733,7 @@ Bool_t PStartupHandler::WriteDefaultStartupFile(bool reset_startup_file)
|
||||
fout << " <!-- Color as RGB coded string -->" << std::endl;
|
||||
fout << " <color>0,0,0</color> <!-- kBlack -->" << std::endl;
|
||||
fout << " <color>255,0,0</color> <!-- kRed -->" << std::endl;
|
||||
fout << " <color>0,153,0</color> <!-- kGreen+2 -->" << std::endl;
|
||||
fout << " <color>0,255,0</color> <!-- kGreen -->" << std::endl;
|
||||
fout << " <color>0,0,255</color> <!-- kBlue -->" << std::endl;
|
||||
fout << " <color>255,0,255</color> <!-- kMagenta -->" << std::endl;
|
||||
fout << " <color>0,255,255</color> <!-- kCyan -->" << std::endl;
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -29,7 +29,6 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
|
||||
#include <TObject.h>
|
||||
#include <TString.h>
|
||||
@ -426,15 +425,6 @@ Double_t PTheory::Func(Double_t t, const PDoubleVector& paramValues, const PDoub
|
||||
case THEORY_DYNAMIC_LORENTZ_KT_LF:
|
||||
return DynamicLorentzKTLF(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
|
||||
fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_DYNAMIC_GAULOR_FAST_KT_ZF:
|
||||
return DynamicGauLorKTZFFast(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
|
||||
fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_DYNAMIC_GAULOR_FAST_KT_LF:
|
||||
return DynamicGauLorKTLFFast(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
|
||||
fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_DYNAMIC_GAULOR_KT_LF:
|
||||
return DynamicGauLorKTLF(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
|
||||
fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_COMBI_LGKT:
|
||||
return CombiLGKT(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
|
||||
fAdd->Func(t, paramValues, funcValues);
|
||||
@ -472,19 +462,16 @@ Double_t PTheory::Func(Double_t t, const PDoubleVector& paramValues, const PDoub
|
||||
return SkewedGauss(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
|
||||
fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_STATIC_ZF_NK:
|
||||
return StaticNKZF(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
|
||||
return StaticNKZF (t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
|
||||
fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_STATIC_TF_NK:
|
||||
return StaticNKTF(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
|
||||
return StaticNKTF (t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
|
||||
fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_DYNAMIC_ZF_NK:
|
||||
return DynamicNKZF(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
|
||||
return DynamicNKZF (t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
|
||||
fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_DYNAMIC_TF_NK:
|
||||
return DynamicNKTF(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
|
||||
fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_F_MU_F:
|
||||
return FmuF(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
|
||||
return DynamicNKTF (t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
|
||||
fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_POLYNOM:
|
||||
return Polynom(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
|
||||
@ -524,12 +511,6 @@ Double_t PTheory::Func(Double_t t, const PDoubleVector& paramValues, const PDoub
|
||||
return StaticLorentzKTLF(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues);
|
||||
case THEORY_DYNAMIC_LORENTZ_KT_LF:
|
||||
return DynamicLorentzKTLF(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues);
|
||||
case THEORY_DYNAMIC_GAULOR_FAST_KT_ZF:
|
||||
return DynamicGauLorKTZFFast(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues);
|
||||
case THEORY_DYNAMIC_GAULOR_FAST_KT_LF:
|
||||
return DynamicGauLorKTLFFast(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues);
|
||||
case THEORY_DYNAMIC_GAULOR_KT_LF:
|
||||
return DynamicGauLorKTLF(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues);
|
||||
case THEORY_COMBI_LGKT:
|
||||
return CombiLGKT(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues);
|
||||
case THEORY_STR_KT:
|
||||
@ -564,8 +545,6 @@ Double_t PTheory::Func(Double_t t, const PDoubleVector& paramValues, const PDoub
|
||||
return DynamicNKTF (t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues);
|
||||
case THEORY_MU_MINUS_EXP:
|
||||
return MuMinusExpTF(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues);
|
||||
case THEORY_F_MU_F:
|
||||
return FmuF(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues);
|
||||
case THEORY_POLYNOM:
|
||||
return Polynom(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues);
|
||||
case THEORY_USER_FCN:
|
||||
@ -601,12 +580,6 @@ Double_t PTheory::Func(Double_t t, const PDoubleVector& paramValues, const PDoub
|
||||
return StaticLorentzKTLF(t, paramValues, funcValues) + fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_DYNAMIC_LORENTZ_KT_LF:
|
||||
return DynamicLorentzKTLF(t, paramValues, funcValues) + fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_DYNAMIC_GAULOR_FAST_KT_ZF:
|
||||
return DynamicGauLorKTZFFast(t, paramValues, funcValues) + fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_DYNAMIC_GAULOR_FAST_KT_LF:
|
||||
return DynamicGauLorKTLFFast(t, paramValues, funcValues) + fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_DYNAMIC_GAULOR_KT_LF:
|
||||
return DynamicGauLorKTLF(t, paramValues, funcValues) + fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_COMBI_LGKT:
|
||||
return CombiLGKT(t, paramValues, funcValues) + fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_STR_KT:
|
||||
@ -641,8 +614,6 @@ Double_t PTheory::Func(Double_t t, const PDoubleVector& paramValues, const PDoub
|
||||
return DynamicNKTF (t, paramValues, funcValues) + fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_MU_MINUS_EXP:
|
||||
return MuMinusExpTF(t, paramValues, funcValues) + fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_F_MU_F:
|
||||
return FmuF(t, paramValues, funcValues) + fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_POLYNOM:
|
||||
return Polynom(t, paramValues, funcValues) + fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_USER_FCN:
|
||||
@ -676,12 +647,6 @@ Double_t PTheory::Func(Double_t t, const PDoubleVector& paramValues, const PDoub
|
||||
return StaticLorentzKTLF(t, paramValues, funcValues);
|
||||
case THEORY_DYNAMIC_LORENTZ_KT_LF:
|
||||
return DynamicLorentzKTLF(t, paramValues, funcValues);
|
||||
case THEORY_DYNAMIC_GAULOR_FAST_KT_ZF:
|
||||
return DynamicGauLorKTZFFast(t, paramValues, funcValues);
|
||||
case THEORY_DYNAMIC_GAULOR_FAST_KT_LF:
|
||||
return DynamicGauLorKTLFFast(t, paramValues, funcValues);
|
||||
case THEORY_DYNAMIC_GAULOR_KT_LF:
|
||||
return DynamicGauLorKTLF(t, paramValues, funcValues);
|
||||
case THEORY_COMBI_LGKT:
|
||||
return CombiLGKT(t, paramValues, funcValues);
|
||||
case THEORY_STR_KT:
|
||||
@ -716,8 +681,6 @@ Double_t PTheory::Func(Double_t t, const PDoubleVector& paramValues, const PDoub
|
||||
return DynamicNKTF(t, paramValues, funcValues);
|
||||
case THEORY_MU_MINUS_EXP:
|
||||
return MuMinusExpTF(t, paramValues, funcValues);
|
||||
case THEORY_F_MU_F:
|
||||
return FmuF(t, paramValues, funcValues);
|
||||
case THEORY_POLYNOM:
|
||||
return Polynom(t, paramValues, funcValues);
|
||||
case THEORY_USER_FCN:
|
||||
@ -1670,220 +1633,6 @@ Double_t PTheory::DynamicLorentzKTLF(Double_t t, const PDoubleVector& paramValue
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Local Gaussian, global Lorentzian approximation in the limit
|
||||
* \f[ \nu_c \gg \gamma_\mu \Delta_{\rm L} \f] in ZF.
|
||||
* For details see "Muon Spin Rotation, Relaxation, and Resonance",
|
||||
* A. Yaouanc and P. Dalmas Sec. 6.4, Eq.(6.89).
|
||||
*
|
||||
* @param t time in \f$(\mu\mathrm{s})\f$, or x-axis value for non-muSR fit
|
||||
* @param paramValues parameter values
|
||||
* @param funcValues vector with the functions (i.e. functions of the parameters)
|
||||
*
|
||||
* @return Polarization value of this function
|
||||
*/
|
||||
Double_t PTheory::DynamicGauLorKTZFFast(Double_t t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const
|
||||
{
|
||||
// expected parameters: damping hopping [tshift]
|
||||
|
||||
Double_t val[3];
|
||||
|
||||
assert(fParamNo.size() <= 3);
|
||||
|
||||
// check if FUNCTIONS are used
|
||||
for (UInt_t i=0; i<fParamNo.size(); i++) {
|
||||
if (fParamNo[i] < MSR_PARAM_FUN_OFFSET) { // parameter or resolved map
|
||||
val[i] = paramValues[fParamNo[i]];
|
||||
} else { // function
|
||||
val[i] = funcValues[fParamNo[i]-MSR_PARAM_FUN_OFFSET];
|
||||
}
|
||||
}
|
||||
|
||||
Double_t tt;
|
||||
if (fParamNo.size() == 2) // no tshift
|
||||
tt = t;
|
||||
else // tshift present
|
||||
tt = t-val[2];
|
||||
|
||||
Double_t nut = val[1]*tt;
|
||||
return exp(-sqrt(4.0*pow(val[0]/val[1], 2.0)*(exp(-nut)-1.0+nut)));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Local Gaussian, global Lorentzian approximation in the limit
|
||||
* \f[ \nu_c \gg \gamma_\mu \Delta_{\rm L} \f] in LF.
|
||||
* For details see "Muon Spin Rotation, Relaxation, and Resonance",
|
||||
* A. Yaouanc and P. Dalmas Sec. 6.4, Eq.(6.93).
|
||||
*
|
||||
* @param t time in \f$(\mu\mathrm{s})\f$, or x-axis value for non-muSR fit
|
||||
* @param paramValues parameter values
|
||||
* @param funcValues vector with the functions (i.e. functions of the parameters)
|
||||
*
|
||||
* @return Polarization value of this function
|
||||
*/
|
||||
Double_t PTheory::DynamicGauLorKTLFFast(Double_t t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const
|
||||
{
|
||||
// expected parameters: frequency damping hopping [tshift]
|
||||
|
||||
Double_t val[4];
|
||||
|
||||
assert(fParamNo.size() <= 4);
|
||||
|
||||
// check if FUNCTIONS are used
|
||||
for (UInt_t i=0; i<fParamNo.size(); i++) {
|
||||
if (fParamNo[i] < MSR_PARAM_FUN_OFFSET) { // parameter or resolved map
|
||||
val[i] = paramValues[fParamNo[i]];
|
||||
} else { // function
|
||||
val[i] = funcValues[fParamNo[i]-MSR_PARAM_FUN_OFFSET];
|
||||
}
|
||||
}
|
||||
|
||||
Double_t tt;
|
||||
if (fParamNo.size() == 3) // no tshift
|
||||
tt = t;
|
||||
else // tshift present
|
||||
tt = t-val[3];
|
||||
|
||||
Double_t w0 = TMath::TwoPi()*val[0];
|
||||
Double_t w0_2 = w0*w0;
|
||||
Double_t nu_2 = val[2]*val[2];
|
||||
Double_t nu_t = val[2]*tt;
|
||||
Double_t w0_t = w0*tt;
|
||||
Double_t Gamma_t = ((w0_2+nu_2)*nu_t+(w0_2-nu_2)*(1.0-exp(-nu_t)*cos(w0_t))-2.0*val[2]*w0*exp(-nu_t)*sin(w0_t))/pow(w0_2+nu_2,2.0);
|
||||
if (Gamma_t < 0.0)
|
||||
Gamma_t = 0.0;
|
||||
|
||||
return exp(-sqrt(4.0*val[1]*val[1]*Gamma_t));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Local Gaussian, global Lorentzian in LF.
|
||||
* For details see "Muon Spin Rotation, Relaxation, and Resonance",
|
||||
* A. Yaouanc and P. Dalmas Sec. 6.4, Eq.(6.86).
|
||||
*
|
||||
* @param t time in \f$(\mu\mathrm{s})\f$, or x-axis value for non-muSR fit
|
||||
* @param paramValues parameter values
|
||||
* @param funcValues vector with the functions (i.e. functions of the parameters)
|
||||
*
|
||||
* @return Polarization value of this function
|
||||
*/
|
||||
Double_t PTheory::DynamicGauLorKTLF(Double_t t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const
|
||||
{
|
||||
// expected parameters: frequency damping hopping [tshift]
|
||||
|
||||
Double_t val[4];
|
||||
|
||||
assert(fParamNo.size() <= 4);
|
||||
|
||||
// check if FUNCTIONS are used
|
||||
for (UInt_t i=0; i<fParamNo.size(); i++) {
|
||||
if (fParamNo[i] < MSR_PARAM_FUN_OFFSET) { // parameter or resolved map
|
||||
val[i] = paramValues[fParamNo[i]];
|
||||
} else { // function
|
||||
val[i] = funcValues[fParamNo[i]-MSR_PARAM_FUN_OFFSET];
|
||||
}
|
||||
}
|
||||
|
||||
Double_t tt;
|
||||
if (fParamNo.size() == 3) // no tshift
|
||||
tt = t;
|
||||
else // tshift present
|
||||
tt = t-val[3];
|
||||
|
||||
// check if the parameter values have changed, and if yes recalculate DynamicGaussKTLF
|
||||
Bool_t newParam = false;
|
||||
for (UInt_t i=0; i<3; i++) {
|
||||
if (val[i] != fPrevParam[i]) {
|
||||
newParam = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (newParam) { // new parameters found, hence calculate DynamicGauLorKTLF
|
||||
// keep parameters
|
||||
for (UInt_t i=0; i<3; i++)
|
||||
fPrevParam[i] = val[i];
|
||||
|
||||
// reset GL LF polarzation vector
|
||||
fDyn_GL_LFFuncValue.clear();
|
||||
fDyn_GL_LFFuncValue.resize(20000); // Tmax=20us, dt=1ns
|
||||
|
||||
PDoubleVector rr={0.2, 0.4, 0.6, 0.8, 1.0, 1.25, 1.5, 1.75, 2.0, 2.5, 3.0, 4.0, 5.0, 7.5, 10.0,
|
||||
12.8125, 15.625, 18.4375, 21.25, 26.875, 32.5, 43.75, 55.0, 77.5, 100.0};
|
||||
Double_t par[3] = {val[0], val[1], val[2]};
|
||||
Double_t sqrtTwoInv = 1.0/sqrt(2.0);
|
||||
Bool_t isOneVec{false};
|
||||
Bool_t useKeren{false};
|
||||
Double_t scale, up{0.0}, low{-1.0};
|
||||
|
||||
for (UInt_t i=0; i<rr.size(); i++) {
|
||||
useKeren = false;
|
||||
isOneVec = false;
|
||||
|
||||
// Delta_G = rr * Delta_L
|
||||
par[1] = rr[i] * val[1];
|
||||
|
||||
// check if all parameters == 0
|
||||
if ((par[0] == 0.0) && (par[1] == 0.0) && (par[2] == 0.0)) {
|
||||
isOneVec = true;
|
||||
}
|
||||
|
||||
// make sure that damping and hopping are positive definite
|
||||
if (par[1] < 0.0)
|
||||
par[1] = -par[1];
|
||||
if (par[2] < 0.0)
|
||||
par[2] = -par[2];
|
||||
|
||||
// check that Delta != 0, if not (i.e. stupid parameter) return 1, which is the correct limit
|
||||
if (fabs(par[1]) < 1.0e-6) {
|
||||
isOneVec = true;
|
||||
}
|
||||
|
||||
// check if Keren approximation can be used
|
||||
if (par[2]/par[1] > 5.0) // nu/Delta > 5.0
|
||||
useKeren = true;
|
||||
|
||||
if (!useKeren && !isOneVec) {
|
||||
CalculateDynKTLF(par, 0); // 0 means Gauss
|
||||
}
|
||||
|
||||
// calculate polarization vector for the given parameters
|
||||
up = -std::erf(sqrtTwoInv/rr[i]);
|
||||
scale = up - low;
|
||||
low = up;
|
||||
|
||||
const Double_t dt=0.001;
|
||||
for (UInt_t i=0; i<20000; i++) {
|
||||
if (isOneVec) {
|
||||
fDyn_GL_LFFuncValue[i] += scale;
|
||||
} else if (useKeren && !isOneVec) {// see PRB50, 10039 (1994)
|
||||
Double_t wL = TWO_PI * par[0];
|
||||
Double_t wL2 = wL*wL;
|
||||
Double_t nu2 = par[2]*par[2];
|
||||
Double_t Gamma_t = 2.0*par[1]*par[1]/((wL2+nu2)*(wL2+nu2))*
|
||||
((wL2+nu2)*val[2]*i*dt
|
||||
+ (wL2-nu2)*(1.0 - TMath::Exp(-val[2]*i*dt)*TMath::Cos(wL*i*dt))
|
||||
- 2.0*val[2]*wL*TMath::Exp(-val[2]*i*dt)*TMath::Sin(wL*i*dt));
|
||||
fDyn_GL_LFFuncValue[i] += scale*TMath::Exp(-Gamma_t);
|
||||
} else if (!useKeren && !isOneVec) {
|
||||
fDyn_GL_LFFuncValue[i] += scale*GetDynKTLFValue(i*dt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// get the proper value from the look-up table
|
||||
Double_t result{1.0};
|
||||
if (tt>=0)
|
||||
result=GetDyn_GL_KTLFValue(tt);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p> theory function: dynamic Lorentzain Kubo-Toyabe in longitudinal applied field
|
||||
@ -2712,49 +2461,6 @@ Double_t PTheory::DynamicNKTF(Double_t t, const PDoubleVector& paramValues, cons
|
||||
return result;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>F-\f$\mu\f-F polaritation function.
|
||||
* For details see e.g. "Muon Spectroscopy - An Introduction", S. Blundell, etal.
|
||||
*
|
||||
* @param t time in \f$(\mu\mathrm{s})\f$, or x-axis value for non-muSR fit
|
||||
* @param paramValues parameter values
|
||||
* @param funcValues vector with the functions (i.e. functions of the parameters)
|
||||
|
||||
* @return Polarization value of this function
|
||||
*/
|
||||
Double_t PTheory::FmuF(Double_t t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const
|
||||
{
|
||||
// expected paramters: w_d [0], [tshift [1]]
|
||||
|
||||
Double_t val[2];
|
||||
|
||||
assert(fParamNo.size() <= 2);
|
||||
|
||||
if (t < 0.0)
|
||||
return 1.0;
|
||||
|
||||
// check if FUNCTIONS are used
|
||||
for (UInt_t i=0; i<fParamNo.size(); i++) {
|
||||
if (fParamNo[i] < MSR_PARAM_FUN_OFFSET) { // parameter or resolved map
|
||||
val[i] = paramValues[fParamNo[i]];
|
||||
} else { // function
|
||||
val[i] = funcValues[fParamNo[i]-MSR_PARAM_FUN_OFFSET];
|
||||
}
|
||||
}
|
||||
|
||||
Double_t tt;
|
||||
if (fParamNo.size() == 1) // no tshift
|
||||
tt = t;
|
||||
else // tshift present
|
||||
tt = t-val[1];
|
||||
|
||||
const Double_t sqrt3 = sqrt(3.0);
|
||||
const Double_t wd_t = val[0]*tt;
|
||||
|
||||
return (3.0+cos(sqrt3*wd_t)+(1.0-1.0/sqrt3)*cos(((3.0-sqrt3)/2.0)*wd_t)+(1.0+1.0/sqrt3)*cos(((3.0 + sqrt3)/2.0)*wd_t))/6.0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p> theory function: polynom
|
||||
@ -3137,44 +2843,19 @@ void PTheory::CalculateDynKTLF(const Double_t *val, Int_t tag) const
|
||||
Double_t PTheory::GetDynKTLFValue(const Double_t t) const
|
||||
{
|
||||
if (t < 0.0)
|
||||
return 1.0;
|
||||
return 0.0;
|
||||
|
||||
UInt_t idx = static_cast<UInt_t>(t/fDynLFdt);
|
||||
|
||||
if (idx + 2 > fDynLFFuncValue.size())
|
||||
return fDynLFFuncValue.back();
|
||||
|
||||
// linearly interpolate between the two relevant function bins
|
||||
// linearly interpolate between the two relvant function bins
|
||||
Double_t df = (fDynLFFuncValue[idx+1]-fDynLFFuncValue[idx])*(t/fDynLFdt-static_cast<Double_t>(idx));
|
||||
|
||||
return fDynLFFuncValue[idx]+df;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Gets value of the dynamic local Gauss / global Lorentzian Kubo-Toyabe LF function.
|
||||
*
|
||||
* <b>return:</b> function value
|
||||
*
|
||||
* \param t time in (usec)
|
||||
*/
|
||||
Double_t PTheory::GetDyn_GL_KTLFValue(const Double_t t) const
|
||||
{
|
||||
if (t < 0.0)
|
||||
return 1.0;
|
||||
|
||||
const Double_t dt=0.001; // 1ns
|
||||
UInt_t idx = static_cast<UInt_t>(t/dt);
|
||||
|
||||
if (idx + 2 > fDyn_GL_LFFuncValue.size())
|
||||
return fDyn_GL_LFFuncValue.back();
|
||||
|
||||
// linearly interpolate between the two relevant function bins
|
||||
Double_t df = (fDyn_GL_LFFuncValue[idx+1]-fDyn_GL_LFFuncValue[idx])*(t/dt-static_cast<Double_t>(idx));
|
||||
|
||||
return fDyn_GL_LFFuncValue[idx]+df;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p> theory function: MuMinusExpTF
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -43,7 +43,6 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
@ -53,8 +52,6 @@
|
||||
#include <TFile.h>
|
||||
#include <TFolder.h>
|
||||
#include <TString.h>
|
||||
#include <TFolder.h>
|
||||
#include <TH1F.h>
|
||||
|
||||
#ifdef HAVE_GIT_REV_H
|
||||
#include "git-revision.h"
|
||||
@ -81,8 +78,7 @@
|
||||
void dump_header_syntax()
|
||||
{
|
||||
std::cout << std::endl << "usage: dump_header [-rn <runNo> | -fn <fileName>] [-ff, --fileFormat <fileFormat>]";
|
||||
std::cout << std::endl << " [-y, --year <year>] [-s, --summary] [-i, --instrument <inst>]";
|
||||
std::cout << std::endl << " [-c, --counts] | ";
|
||||
std::cout << std::endl << " [-y, --year <year>] [-s, --summary] [--psi-bulk <opt>] |";
|
||||
std::cout << std::endl << " --help | --version";
|
||||
std::cout << std::endl;
|
||||
std::cout << std::endl << " Dumps the header information of a given muSR data file onto the standard output.";
|
||||
@ -100,8 +96,7 @@ void dump_header_syntax()
|
||||
std::cout << std::endl << " -s, --summary : this option is used for LE-uSR data sets only. It will, additionally";
|
||||
std::cout << std::endl << " to the header information, print the summary file content.";
|
||||
std::cout << std::endl << " -i, --instrument <inst> : where <inst> is the requested instrument:";
|
||||
std::cout << std::endl << " lem (default) | gps | ltf | dolly | gpd | hifi | flame.";
|
||||
std::cout << std::endl << " -c, --counts : will show detector counts as well.";
|
||||
std::cout << std::endl << " lem (default) | gps | ltf | dolly | gpd | hifi.";
|
||||
std::cout << std::endl << " -h, --help : will show this help";
|
||||
std::cout << std::endl << " -v, --version : will show the current version.";
|
||||
std::cout << std::endl << std::endl;
|
||||
@ -113,11 +108,10 @@ void dump_header_syntax()
|
||||
*
|
||||
* @param fileName file name of the ROOT file
|
||||
* @param summary bool, if true dump the summary
|
||||
* @param counts bool, if true dump detector counts
|
||||
*
|
||||
* @return 0 on success, otherwise 1.
|
||||
*/
|
||||
int dump_header_root(const std::string fileName, const bool summary, const bool counts)
|
||||
int dump_header_root(const std::string fileName, const bool summary)
|
||||
{
|
||||
TFile f(fileName.c_str());
|
||||
if (f.IsZombie()) {
|
||||
@ -128,8 +122,6 @@ int dump_header_root(const std::string fileName, const bool summary, const bool
|
||||
}
|
||||
|
||||
UInt_t fileType = DH_MUSR_ROOT;
|
||||
UInt_t noOfHistos{0};
|
||||
PIntVector redGreenOffset;
|
||||
|
||||
TFolder *folder;
|
||||
f.GetObject("RunInfo", folder); // try first LEM-ROOT style file (used until 2011).
|
||||
@ -146,16 +138,12 @@ int dump_header_root(const std::string fileName, const bool summary, const bool
|
||||
fileType = DH_LEM_ROOT;
|
||||
}
|
||||
|
||||
std::unique_ptr<TMusrRunHeader> header;
|
||||
bool ok;
|
||||
Int_t ival;
|
||||
|
||||
if (fileType == DH_LEM_ROOT) { // ROOT (LEM)
|
||||
// read header and check if some missing run info need to be fed
|
||||
TLemRunHeader* runHeader = dynamic_cast<TLemRunHeader*>(folder->FindObjectAny("TLemRunHeader"));
|
||||
TLemRunHeader *runHeader = dynamic_cast<TLemRunHeader*>(folder->FindObjectAny("TLemRunHeader"));
|
||||
|
||||
// check if run header is valid
|
||||
if (runHeader == nullptr) {
|
||||
if (!runHeader) {
|
||||
std::cerr << std::endl << "**ERROR** Couldn't obtain run header info from ROOT file " << fileName << std::endl;
|
||||
f.Close();
|
||||
return 1;
|
||||
@ -198,9 +186,17 @@ int dump_header_root(const std::string fileName, const bool summary, const bool
|
||||
std::cout << std::endl << "First Good Bin : " << timeZero[0];
|
||||
std::cout << std::endl << "Last Good Bin : " << runHeader->GetNChannels()-1;
|
||||
std::cout << std::endl << "-------------------" << std::endl << std::endl;
|
||||
|
||||
delete runHeader;
|
||||
} else { // MusrRoot
|
||||
// invoke the MusrRoot header object
|
||||
header = std::make_unique<TMusrRunHeader>(fileName.c_str(), true); // read quite
|
||||
TMusrRunHeader *header = new TMusrRunHeader(fileName.c_str(), true); // read quite
|
||||
if (header == 0) {
|
||||
std::cerr << std::endl << "**ERROR** Couldn't invoke MusrRoot RunHeader in file:" << fileName;
|
||||
std::cerr << std::endl;
|
||||
f.Close();
|
||||
return 1;
|
||||
}
|
||||
|
||||
// try to populate the MusrRoot header object
|
||||
if (!header->ExtractAll(folder)) {
|
||||
@ -212,15 +208,7 @@ int dump_header_root(const std::string fileName, const bool summary, const bool
|
||||
|
||||
header->DumpHeader();
|
||||
|
||||
if (counts) {
|
||||
PIntVector ivec;
|
||||
header->Get("RunInfo/No of Histos", ival, ok);
|
||||
if (ok)
|
||||
noOfHistos = ival;
|
||||
header->Get("RunInfo/RedGreen Offsets", ivec, ok);
|
||||
if (ok)
|
||||
redGreenOffset = ivec;
|
||||
}
|
||||
delete header;
|
||||
}
|
||||
|
||||
// summary as well?
|
||||
@ -241,59 +229,6 @@ int dump_header_root(const std::string fileName, const bool summary, const bool
|
||||
tstr = static_cast<TObjString*>(runSum->At(i));
|
||||
str = tstr->String();
|
||||
std::cout << str;
|
||||
if (!str.Contains("\r") && !str.Contains("\n"))
|
||||
std::cout << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
// detector counts as well?
|
||||
if (counts && (fileType == DH_MUSR_ROOT)) {
|
||||
// dump the detector counts
|
||||
std::cout << "Detector counts (all, between fgb and lgb)" << std::endl;
|
||||
f.GetObject("histos", folder);
|
||||
if ((folder != nullptr) && (header != nullptr)) {
|
||||
char detectorLabel[64];
|
||||
TH1F *histo{nullptr};
|
||||
UInt_t total{0}, total_good{0}, ta, tg;
|
||||
Int_t fgb, lgb;
|
||||
for (UInt_t i=0; i<redGreenOffset.size(); i++) {
|
||||
std::cout << " Group " << i+1 << " (Offset=" << redGreenOffset[i] << ") : " << std::endl;
|
||||
total = 0;
|
||||
total_good = 0;
|
||||
for (UInt_t j=0; j<noOfHistos; j++) {
|
||||
// get fgb, lgb
|
||||
fgb = -1;
|
||||
snprintf(detectorLabel, sizeof(detectorLabel), "DetectorInfo/Detector%03d/First Good Bin", redGreenOffset[i]+j+1);
|
||||
header->Get(detectorLabel, ival, ok);
|
||||
if (ok) {
|
||||
fgb = ival;
|
||||
}
|
||||
lgb = -1;
|
||||
snprintf(detectorLabel, sizeof(detectorLabel), "DetectorInfo/Detector%03d/Last Good Bin", redGreenOffset[i]+j+1);
|
||||
header->Get(detectorLabel, ival, ok);
|
||||
if (ok) {
|
||||
lgb = ival;
|
||||
}
|
||||
// get histo info
|
||||
snprintf(detectorLabel, sizeof(detectorLabel), "hDecay%03d", redGreenOffset[i]+j+1);
|
||||
histo = (TH1F*) folder->FindObjectAny(detectorLabel);
|
||||
if (histo != nullptr) {
|
||||
ta = histo->Integral(0, histo->GetNbinsX()+1);
|
||||
tg = histo->Integral(fgb, lgb);
|
||||
std::cout << " " << histo->GetTitle() << ":\t " << ta << ", " << tg << std::endl;
|
||||
total += ta;
|
||||
total_good += tg;
|
||||
}
|
||||
}
|
||||
if (i % 2 == 0)
|
||||
std::cout << " total counts of group " << i+1 << ":\t\t\t " << total << ", " << total_good << std::endl;
|
||||
else
|
||||
std::cout << " total counts of group " << i+1 << ":\t\t\t\t\t " << total << ", " << total_good << std::endl;
|
||||
}
|
||||
} else {
|
||||
std::cout << "Sorry, no histos folder found" << std::endl;
|
||||
f.Close();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -307,23 +242,32 @@ int dump_header_root(const std::string fileName, const bool summary, const bool
|
||||
* <p>dumps the header information of a NeXus file.
|
||||
*
|
||||
* @param fileName file name of the NeXus file.
|
||||
* @param counts bool, if true dump detector counts
|
||||
*
|
||||
* @return 0 on success, 1 otherwise
|
||||
*/
|
||||
int dump_header_nexus(const std::string fileName, const bool counts) {
|
||||
int dump_header_nexus(const std::string fileName) {
|
||||
|
||||
#ifdef PNEXUS_ENABLED
|
||||
std::unique_ptr<PNeXus> nxs_file = std::make_unique<PNeXus>(fileName.c_str());
|
||||
PNeXus *nxs_file = new PNeXus(fileName.c_str());
|
||||
|
||||
if (nxs_file == nullptr) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** couldn't invoke NeXus file object." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (nxs_file->IsValid(false)) {
|
||||
nxs_file->Dump(counts);
|
||||
nxs_file->Dump();
|
||||
} else {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found invalid NeXus file." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (nxs_file)
|
||||
delete nxs_file;
|
||||
#else
|
||||
std::cout << std::endl << "NeXus not enabled, hence the header information cannot be dumped." << std::endl << std::endl;
|
||||
#endif
|
||||
@ -400,11 +344,10 @@ std::vector<std::string> dump_header_instrument_info(std::string fileName)
|
||||
*
|
||||
* @param fileName file name of the PSI-BIN
|
||||
* @param fileFormat either PSI-BIN or PSI-MDU
|
||||
* @param counts bool, if true dump detector counts
|
||||
*
|
||||
* @return 0 on success, 1 otherwise
|
||||
*/
|
||||
int dump_header_psi_bin(const std::string fileName, const std::string fileFormat, const bool counts)
|
||||
int dump_header_psi_bin(const std::string fileName, const std::string fileFormat)
|
||||
{
|
||||
MuSR_td_PSI_bin psiBin;
|
||||
int status;
|
||||
@ -496,8 +439,7 @@ int dump_header_psi_bin(const std::string fileName, const std::string fileFormat
|
||||
std::cout << std::endl << "Time Zero Bin : " << psiBin.GetT0Int(i);
|
||||
std::cout << std::endl << "First Good Bin : " << psiBin.GetFirstGoodInt(i);
|
||||
std::cout << std::endl << "Last Good Bin : " << psiBin.GetLastGoodInt(i);
|
||||
if (counts)
|
||||
std::cout << std::endl << "No of Events : " << psiBin.GetEventsHistoLong(i);
|
||||
std::cout << std::endl << "No of Events : " << psiBin.GetEventsHistoLong(i);
|
||||
}
|
||||
std::cout << std::endl << "-------------------" << std::endl << std::endl;
|
||||
|
||||
@ -508,11 +450,10 @@ int dump_header_psi_bin(const std::string fileName, const std::string fileFormat
|
||||
/**
|
||||
* <p>dump the header information of a MUD file.
|
||||
* @param fileName file name of the MUD file
|
||||
* @param counts bool, if true dump detector counts
|
||||
*
|
||||
* @return 0 on success, 1 otherwise
|
||||
*/
|
||||
int dump_header_mud(const std::string fileName, const bool counts)
|
||||
int dump_header_mud(const std::string fileName)
|
||||
{
|
||||
int fh;
|
||||
UINT32 type, val;
|
||||
@ -677,12 +618,6 @@ int dump_header_mud(const std::string fileName, const bool counts)
|
||||
std::cout << std::endl << "Last Good Bin : " << val;
|
||||
else
|
||||
std::cout << std::endl << "Last Good Bin : ???";
|
||||
if (counts) {
|
||||
success = MUD_getHistNumEvents( fh, i+1, &val );
|
||||
if (success) {
|
||||
std::cout << std::endl << "#Events : " << val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << std::endl << "-------------------" << std::endl << std::endl;
|
||||
@ -788,7 +723,6 @@ int main(int argc, char *argv[])
|
||||
std::string year("");
|
||||
std::string instrument("lem");
|
||||
bool summary(false);
|
||||
bool counts(false);
|
||||
|
||||
for (int i=1; i<argc; i++) {
|
||||
if (!strcmp(argv[i], "--help") || !strcmp(argv[i], "-h")) {
|
||||
@ -878,8 +812,6 @@ int main(int argc, char *argv[])
|
||||
i++;
|
||||
} else if (!strcmp(argv[i], "-s") || !strcmp(argv[i], "--summary")) {
|
||||
summary = true;
|
||||
} else if (!strcmp(argv[i], "-c") || !strcmp(argv[i], "--counts")) {
|
||||
counts = true;
|
||||
} else if (!strcmp(argv[i], "-i") || !strcmp(argv[i], "--instrument")) {
|
||||
if (i+1 >= argc) {
|
||||
std::cerr << std::endl << "**ERROR** found option --instrument without <instrument> input!" << std::endl;
|
||||
@ -887,8 +819,7 @@ int main(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
if (strcmp(argv[i+1], "lem") && strcmp(argv[i+1], "gps") && strcmp(argv[i+1], "ltf") &&
|
||||
strcmp(argv[i+1], "dolly") && strcmp(argv[i+1], "gpd") && strcmp(argv[i+1], "hifi") &&
|
||||
strcmp(argv[i+1], "flame")) {
|
||||
strcmp(argv[i+1], "dolly") && strcmp(argv[i+1], "gpd") && strcmp(argv[i+1], "hifi")) {
|
||||
std::cerr << std::endl << "**ERROR** found --instrument with unkown instrument name: '" << argv[i+1] << "'!" << std::endl;
|
||||
dump_header_syntax();
|
||||
return 1;
|
||||
@ -917,22 +848,40 @@ int main(int argc, char *argv[])
|
||||
// invoke the startup handler in order to get the default search paths to the data files
|
||||
// read startup file
|
||||
char startup_path_name[128];
|
||||
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||
std::unique_ptr<PStartupHandler> startupHandler = std::make_unique<PStartupHandler>();
|
||||
TSAXParser *saxParser = new TSAXParser();
|
||||
PStartupHandler *startupHandler = new PStartupHandler();
|
||||
if (!startupHandler->StartupFileFound()) {
|
||||
std::cerr << std::endl << ">> musrfit **WARNING** couldn't find " << startupHandler->GetStartupFilePath().Data();
|
||||
std::cerr << std::endl;
|
||||
// clean up
|
||||
if (saxParser) {
|
||||
delete saxParser;
|
||||
saxParser = nullptr;
|
||||
}
|
||||
if (startupHandler) {
|
||||
delete startupHandler;
|
||||
startupHandler = nullptr;
|
||||
}
|
||||
} else {
|
||||
strcpy(startup_path_name, startupHandler->GetStartupFilePath().Data());
|
||||
saxParser->ConnectToHandler("PStartupHandler", startupHandler.get());
|
||||
saxParser->ConnectToHandler("PStartupHandler", startupHandler);
|
||||
//status = saxParser->ParseFile(startup_path_name);
|
||||
// parsing the file as above seems to lead to problems in certain environments;
|
||||
// use the parseXmlFile function instead (see PStartupHandler.cpp for the definition)
|
||||
int status = parseXmlFile(saxParser.get(), startup_path_name);
|
||||
int status = parseXmlFile(saxParser, startup_path_name);
|
||||
// check for parse errors
|
||||
if (status) { // error
|
||||
std::cerr << std::endl << ">> musrfit **WARNING** Reading/parsing musrfit_startup.xml failed.";
|
||||
std::cerr << std::endl;
|
||||
// clean up
|
||||
if (saxParser) {
|
||||
delete saxParser;
|
||||
saxParser = nullptr;
|
||||
}
|
||||
if (startupHandler) {
|
||||
delete startupHandler;
|
||||
startupHandler = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -941,8 +890,7 @@ int main(int argc, char *argv[])
|
||||
if (fileName == "") { // only look for runs if the file name is not explicitly given
|
||||
int yy = static_cast<int>(strtod(year.c_str(), static_cast<char**>(nullptr)));
|
||||
int run = static_cast<int>(strtod(runNo.c_str(), static_cast<char**>(nullptr)));
|
||||
PFindRun findRun(startupHandler->GetDataPathList(), startupHandler->GetRunNameTemplateList(),
|
||||
instrument, yy, run, fileFormat);
|
||||
PFindRun findRun(startupHandler->GetDataPathList(), startupHandler->GetRunNameTemplateList(), instrument, yy, run);
|
||||
if (findRun.FoundPathName()) {
|
||||
pathFln = findRun.GetPathName().Data();
|
||||
} else {
|
||||
@ -981,20 +929,30 @@ int main(int argc, char *argv[])
|
||||
boost::to_lower(fileFormat);
|
||||
|
||||
if (boost::iequals(fileFormat, "MusrRoot") || boost::iequals(fileFormat, "ROOT")) {
|
||||
dump_header_root(pathFln, summary, counts);
|
||||
dump_header_root(pathFln, summary);
|
||||
} else if (boost::iequals(fileFormat, "NeXus")) {
|
||||
#ifdef PNEXUS_ENABLED
|
||||
dump_header_nexus(pathFln, counts);
|
||||
dump_header_nexus(pathFln);
|
||||
#else
|
||||
std::cout << std::endl << "Sorry, NeXus is not enabled, hence I cannot help you." << std::endl;
|
||||
#endif
|
||||
} else if (boost::iequals(fileFormat, "PSI-BIN") || boost::iequals(fileFormat, "PSI-MDU")) {
|
||||
dump_header_psi_bin(pathFln, fileFormat, counts);
|
||||
dump_header_psi_bin(pathFln, fileFormat);
|
||||
} else if (boost::iequals(fileFormat, "MUD")) {
|
||||
dump_header_mud(pathFln, counts);
|
||||
dump_header_mud(pathFln);
|
||||
} else if (boost::iequals(fileFormat, "WKM")) {
|
||||
dump_header_wkm(pathFln);
|
||||
}
|
||||
|
||||
// cleanup
|
||||
if (saxParser) {
|
||||
delete saxParser;
|
||||
saxParser = nullptr;
|
||||
}
|
||||
if (startupHandler) {
|
||||
delete startupHandler;
|
||||
startupHandler = nullptr;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
17
src/external/BMWtools/BMWIntegrator.h
vendored
17
src/external/BMWtools/BMWIntegrator.h
vendored
@ -35,7 +35,6 @@
|
||||
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
@ -89,8 +88,10 @@ inline double T2Integrator::IntegrateFunc(double x1, double x2, const std::vecto
|
||||
ptrPair.first = (this);
|
||||
ptrPair.second = ∥
|
||||
|
||||
std::unique_ptr<ROOT::Math::GSLIntegrator> integrator = std::make_unique<ROOT::Math::GSLIntegrator>(ROOT::Math::Integration::kADAPTIVE,ROOT::Math::Integration::kGAUSS31);
|
||||
ROOT::Math::GSLIntegrator *integrator = new ROOT::Math::GSLIntegrator(ROOT::Math::Integration::kADAPTIVE,ROOT::Math::Integration::kGAUSS31);
|
||||
double value(integrator->Integral(&T2Integrator::FuncAtXgsl, static_cast<void*>(&ptrPair), x1, x2));
|
||||
delete integrator;
|
||||
integrator = nullptr;
|
||||
|
||||
return value;
|
||||
}
|
||||
@ -114,7 +115,7 @@ class TIntegrator {
|
||||
|
||||
private:
|
||||
static double FuncAtXgsl(double, void *);
|
||||
std::unique_ptr<ROOT::Math::GSLIntegrator> fIntegrator; ///< pointer to the GSL integrator
|
||||
ROOT::Math::GSLIntegrator *fIntegrator; ///< pointer to the GSL integrator
|
||||
mutable double (*fFunc)(double, void *); ///< pointer to the integrand function
|
||||
};
|
||||
|
||||
@ -124,7 +125,7 @@ class TIntegrator {
|
||||
* Allocation of memory for an integration using the adaptive 31 point Gauss-Kronrod rule
|
||||
*/
|
||||
inline TIntegrator::TIntegrator() : fFunc(0) {
|
||||
fIntegrator = std::make_unique<ROOT::Math::GSLIntegrator>(ROOT::Math::Integration::kADAPTIVE,ROOT::Math::Integration::kGAUSS31);
|
||||
fIntegrator = new ROOT::Math::GSLIntegrator(ROOT::Math::Integration::kADAPTIVE,ROOT::Math::Integration::kGAUSS31);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -134,6 +135,8 @@ inline TIntegrator::TIntegrator() : fFunc(0) {
|
||||
*/
|
||||
inline TIntegrator::~TIntegrator(){
|
||||
fPar.clear();
|
||||
delete fIntegrator;
|
||||
fIntegrator=nullptr;
|
||||
fFunc=0;
|
||||
}
|
||||
|
||||
@ -187,7 +190,7 @@ class TMCIntegrator {
|
||||
|
||||
private:
|
||||
static double FuncAtXgsl(double *, size_t, void *);
|
||||
std::unique_ptr<ROOT::Math::GSLMCIntegrator> fMCIntegrator; ///< pointer to the GSL integrator
|
||||
ROOT::Math::GSLMCIntegrator *fMCIntegrator; ///< pointer to the GSL integrator
|
||||
mutable double (*fFunc)(double *, size_t, void *); ///< pointer to the integrand function
|
||||
};
|
||||
|
||||
@ -197,7 +200,7 @@ class TMCIntegrator {
|
||||
* Allocation of memory for an integration using the MISER algorithm of Press and Farrar
|
||||
*/
|
||||
inline TMCIntegrator::TMCIntegrator() : fFunc(0) {
|
||||
fMCIntegrator = std::make_unique<ROOT::Math::GSLMCIntegrator>(ROOT::Math::MCIntegration::kMISER, 1.E-6, 1.E-4, 500000);
|
||||
fMCIntegrator = new ROOT::Math::GSLMCIntegrator(ROOT::Math::MCIntegration::kMISER, 1.E-6, 1.E-4, 500000);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -207,6 +210,8 @@ inline TMCIntegrator::TMCIntegrator() : fFunc(0) {
|
||||
*/
|
||||
inline TMCIntegrator::~TMCIntegrator(){
|
||||
fPar.clear();
|
||||
delete fMCIntegrator;
|
||||
fMCIntegrator=nullptr;
|
||||
fFunc=0;
|
||||
}
|
||||
|
||||
|
2
src/external/BMWtools/BMWStartupHandler.cpp
vendored
2
src/external/BMWtools/BMWStartupHandler.cpp
vendored
@ -11,7 +11,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter, Bastian M. Wojek *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter, Bastian M. Wojek *
|
||||
* *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
2
src/external/BMWtools/BMWStartupHandler.h
vendored
2
src/external/BMWtools/BMWStartupHandler.h
vendored
@ -11,7 +11,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter, Bastian M. Wojek *
|
||||
* Copyright (C) 2007-2023 by Andreas Suter, Bastian M. Wojek *
|
||||
* *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
190
src/external/BMWtools/TTrimSPDataHandler.cpp
vendored
190
src/external/BMWtools/TTrimSPDataHandler.cpp
vendored
@ -33,33 +33,37 @@
|
||||
#include <cmath>
|
||||
#include <cassert>
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
|
||||
using namespace std;
|
||||
|
||||
//--------------------
|
||||
// Constructor of the TrimSPData class -- reading all available trim.SP-rge-files with a given name into std::vectors
|
||||
//--------------------
|
||||
|
||||
TTrimSPData::TTrimSPData(const std::string &path, std::map<double, std::string> &energies, bool debug, unsigned int highRes) {
|
||||
TTrimSPData::TTrimSPData(const string &path, map<double, string> &energies, bool debug, unsigned int highRes) {
|
||||
|
||||
// sort the energies in ascending order - this might be useful for later applications (energy-interpolations etc.)
|
||||
// after the change from the vector to the map this is not necessary any more - since maps are always ordered!
|
||||
// sort(energies.begin(), energies.end());
|
||||
|
||||
double zz(0.0), nzz(0.0);
|
||||
std::vector<double> vzz, vnzz;
|
||||
std::string word, energyStr;
|
||||
vector<double> vzz, vnzz;
|
||||
string word, energyStr;
|
||||
bool goodFile(false);
|
||||
|
||||
for ( std::map<double, std::string>::const_iterator iter(energies.begin()); iter != energies.end(); ++iter ) {
|
||||
for ( map<double, string>::const_iterator iter(energies.begin()); iter != energies.end(); ++iter ) {
|
||||
|
||||
energyStr = path + iter->second + ".rge";
|
||||
|
||||
std::unique_ptr<std::ifstream> rgeFile = std::make_unique<std::ifstream>(energyStr.c_str());
|
||||
if (rgeFile == nullptr) {
|
||||
std::cerr << "TTrimSPData::TTrimSPData: file " << energyStr << " not found! Try next energy..." << std::endl;
|
||||
ifstream *rgeFile = new ifstream(energyStr.c_str());
|
||||
if(! *rgeFile) {
|
||||
cerr << "TTrimSPData::TTrimSPData: file " << energyStr << " not found! Try next energy..." << endl;
|
||||
delete rgeFile;
|
||||
rgeFile = 0;
|
||||
} else {
|
||||
while (*rgeFile >> word) {
|
||||
if (word == "PARTICLES") {
|
||||
|
||||
while(*rgeFile >> word) {
|
||||
if(word == "PARTICLES") {
|
||||
goodFile = true;
|
||||
break;
|
||||
}
|
||||
@ -69,7 +73,7 @@ TTrimSPData::TTrimSPData(const std::string &path, std::map<double, std::string>
|
||||
|
||||
fEnergy.push_back(iter->first);
|
||||
|
||||
while (!rgeFile->eof()) {
|
||||
while(!rgeFile->eof()) {
|
||||
*rgeFile >> zz >> nzz;
|
||||
vzz.push_back(zz);
|
||||
vnzz.push_back(nzz);
|
||||
@ -88,6 +92,8 @@ TTrimSPData::TTrimSPData(const std::string &path, std::map<double, std::string>
|
||||
|
||||
|
||||
rgeFile->close();
|
||||
delete rgeFile;
|
||||
rgeFile = 0;
|
||||
|
||||
vzz.clear();
|
||||
vnzz.clear();
|
||||
@ -100,14 +106,14 @@ TTrimSPData::TTrimSPData(const std::string &path, std::map<double, std::string>
|
||||
}
|
||||
|
||||
} else {
|
||||
std::cerr << "TTrimSPData::TTrimSPData: " << energyStr << " does not seem to be a valid unmodified TRIM.SP output file!" << std::endl;
|
||||
cerr << "TTrimSPData::TTrimSPData: " << energyStr << " does not seem to be a valid unmodified TRIM.SP output file!" << endl;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (debug)
|
||||
std::cout << "TTrimSPData::TTrimSPData: Read in " << fDataNZ.size() << " implantation profiles in total." << std::endl;
|
||||
cout << "TTrimSPData::TTrimSPData: Read in " << fDataNZ.size() << " implantation profiles in total." << endl;
|
||||
|
||||
fOrigDataNZ = fDataNZ;
|
||||
|
||||
@ -120,8 +126,8 @@ TTrimSPData::TTrimSPData(const std::string &path, std::map<double, std::string>
|
||||
// If it is not found the energy iterator will point to the end() of the energy vector.
|
||||
|
||||
void TTrimSPData::FindEnergy(double e) const {
|
||||
for (fEnergyIter = fEnergy.begin(); fEnergyIter != fEnergy.end(); ++fEnergyIter) {
|
||||
if (fabs(*fEnergyIter - e) < 0.05)
|
||||
for(fEnergyIter = fEnergy.begin(); fEnergyIter != fEnergy.end(); ++fEnergyIter) {
|
||||
if(fabs(*fEnergyIter - e) < 0.05)
|
||||
return;
|
||||
}
|
||||
return;
|
||||
@ -131,11 +137,11 @@ void TTrimSPData::UseHighResolution(double e) {
|
||||
|
||||
FindEnergy(e);
|
||||
|
||||
if (fEnergyIter != fEnergy.end()) {
|
||||
if(fEnergyIter != fEnergy.end()) {
|
||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||
std::vector<double> vecZ;
|
||||
std::vector<double> vecNZ;
|
||||
for (double zz(1.); zz<2100.; zz+=1.) {
|
||||
vector<double> vecZ;
|
||||
vector<double> vecNZ;
|
||||
for(double zz(1.); zz<2100.; zz+=1.) {
|
||||
vecZ.push_back(zz);
|
||||
vecNZ.push_back(GetNofZ(zz/10.0, e));
|
||||
}
|
||||
@ -147,7 +153,7 @@ void TTrimSPData::UseHighResolution(double e) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::cout << "TTrimSPData::DataZ: No implantation profile available for the specified energy... Nothing happens." << std::endl;
|
||||
cout << "TTrimSPData::DataZ: No implantation profile available for the specified energy... Nothing happens." << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -155,16 +161,16 @@ void TTrimSPData::UseHighResolution(double e) {
|
||||
// Method returning z-vector calculated by trim.SP for given energy[keV]
|
||||
//---------------------
|
||||
|
||||
std::vector<double> TTrimSPData::DataZ(double e) const {
|
||||
vector<double> TTrimSPData::DataZ(double e) const {
|
||||
|
||||
FindEnergy(e);
|
||||
|
||||
if (fEnergyIter != fEnergy.end()) {
|
||||
if(fEnergyIter != fEnergy.end()) {
|
||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||
return fDataZ[i];
|
||||
}
|
||||
// default
|
||||
std::cout << "TTrimSPData::DataZ: No implantation profile available for the specified energy... You get back the first one." << std::endl;
|
||||
cout << "TTrimSPData::DataZ: No implantation profile available for the specified energy... You get back the first one." << endl;
|
||||
return fDataZ[0];
|
||||
}
|
||||
|
||||
@ -173,50 +179,50 @@ std::vector<double> TTrimSPData::DataZ(double e) const {
|
||||
// potentially altered by the WeightLayers- or the Normalize-method for given energy[keV]
|
||||
//---------------------
|
||||
|
||||
std::vector<double> TTrimSPData::DataNZ(double e) const {
|
||||
vector<double> TTrimSPData::DataNZ(double e) const {
|
||||
|
||||
FindEnergy(e);
|
||||
|
||||
if (fEnergyIter != fEnergy.end()) {
|
||||
if(fEnergyIter != fEnergy.end()) {
|
||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||
return fDataNZ[i];
|
||||
}
|
||||
// default
|
||||
std::cout << "TTrimSPData::DataNZ: No implantation profile available for the specified energy... You get back the first one." << std::endl;
|
||||
|
||||
cout << "TTrimSPData::DataNZ: No implantation profile available for the specified energy... You get back the first one." << endl;
|
||||
return fDataNZ[0];
|
||||
|
||||
}
|
||||
|
||||
//---------------------
|
||||
// Method returning original n(z)-vector calculated by trim.SP for given energy[keV]
|
||||
//---------------------
|
||||
|
||||
std::vector<double> TTrimSPData::OrigDataNZ(double e) const {
|
||||
vector<double> TTrimSPData::OrigDataNZ(double e) const {
|
||||
|
||||
FindEnergy(e);
|
||||
|
||||
if (fEnergyIter != fEnergy.end()) {
|
||||
if(fEnergyIter != fEnergy.end()) {
|
||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||
return fOrigDataNZ[i];
|
||||
}
|
||||
// default
|
||||
std::cout << "TTrimSPData::OrigDataNZ: No implantation profile available for the specified energy... You get back the first one." << std::endl;
|
||||
|
||||
cout << "TTrimSPData::OrigDataNZ: No implantation profile available for the specified energy... You get back the first one." << endl;
|
||||
return fOrigDataNZ[0];
|
||||
|
||||
}
|
||||
|
||||
double TTrimSPData::DataDZ(double e) const {
|
||||
|
||||
FindEnergy(e);
|
||||
|
||||
if (fEnergyIter != fEnergy.end()) {
|
||||
if(fEnergyIter != fEnergy.end()) {
|
||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||
return fDZ[i];
|
||||
}
|
||||
// default
|
||||
std::cout << "TTrimSPData::DataDZ: No implantation profile available for the specified energy... The resolution will be zero!" << std::endl;
|
||||
|
||||
cout << "TTrimSPData::DataDZ: No implantation profile available for the specified energy... The resolution will be zero!" << endl;
|
||||
return 0.0;
|
||||
|
||||
}
|
||||
|
||||
//---------------------
|
||||
@ -224,10 +230,10 @@ double TTrimSPData::DataDZ(double e) const {
|
||||
// Parameters: Energy[keV], LayerNumber[1], Interfaces[nm]
|
||||
//---------------------
|
||||
|
||||
double TTrimSPData::LayerFraction(double e, unsigned int layno, const std::vector<double>& interface) const {
|
||||
double TTrimSPData::LayerFraction(double e, unsigned int layno, const vector<double>& interface) const {
|
||||
|
||||
if (layno < 1 && layno > (interface.size()+1)) {
|
||||
std::cout << "TTrimSPData::LayerFraction: No such layer available according to your specified interfaces... Returning 0.0!" << std::endl;
|
||||
if(layno < 1 && layno > (interface.size()+1)) {
|
||||
cout << "TTrimSPData::LayerFraction: No such layer available according to your specified interfaces... Returning 0.0!" << endl;
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
@ -238,21 +244,21 @@ double TTrimSPData::LayerFraction(double e, unsigned int layno, const std::vecto
|
||||
// Because we do not know if the implantation profile is normalized or not, do not care about this and calculate the fraction from the beginning
|
||||
// Total "number of muons"
|
||||
double totalNumber(0.0);
|
||||
for (unsigned int j(0); j<fDataZ[i].size(); j++)
|
||||
for(unsigned int j(0); j<fDataZ[i].size(); j++)
|
||||
totalNumber += fDataNZ[i][j];
|
||||
// "number of muons" in layer layno
|
||||
double layerNumber(0.0);
|
||||
if (!(layno-1)){
|
||||
for (unsigned int j(0); j<fDataZ[i].size(); j++)
|
||||
if (fDataZ[i][j] < interface[0]*10.0)
|
||||
if(!(layno-1)){
|
||||
for(unsigned int j(0); j<fDataZ[i].size(); j++)
|
||||
if(fDataZ[i][j] < interface[0]*10.0)
|
||||
layerNumber += fDataNZ[i][j];
|
||||
} else if (!(layno-interface.size()-1)) {
|
||||
for (unsigned int j(0); j<fDataZ[i].size(); j++)
|
||||
if (fDataZ[i][j] >= *(interface.end()-1)*10.0)
|
||||
} else if(!(layno-interface.size()-1)){
|
||||
for(unsigned int j(0); j<fDataZ[i].size(); j++)
|
||||
if(fDataZ[i][j] >= *(interface.end()-1)*10.0)
|
||||
layerNumber += fDataNZ[i][j];
|
||||
} else {
|
||||
for (unsigned int j(0); j<fDataZ[i].size(); j++)
|
||||
if (fDataZ[i][j] >= interface[layno-2]*10.0 && fDataZ[i][j] < interface[layno-1]*10.0)
|
||||
for(unsigned int j(0); j<fDataZ[i].size(); j++)
|
||||
if(fDataZ[i][j] >= interface[layno-2]*10.0 && fDataZ[i][j] < interface[layno-1]*10.0)
|
||||
layerNumber += fDataNZ[i][j];
|
||||
}
|
||||
// fraction of muons in layer layno
|
||||
@ -261,9 +267,9 @@ double TTrimSPData::LayerFraction(double e, unsigned int layno, const std::vecto
|
||||
}
|
||||
|
||||
// default
|
||||
std::cout << "TTrimSPData::LayerFraction: No implantation profile available for the specified energy " << e << " keV... Returning 0.0" << std::endl;
|
||||
|
||||
cout << "TTrimSPData::LayerFraction: No implantation profile available for the specified energy " << e << " keV... Returning 0.0" << endl;
|
||||
return 0.0;
|
||||
|
||||
}
|
||||
|
||||
//---------------------
|
||||
@ -274,30 +280,30 @@ double TTrimSPData::LayerFraction(double e, unsigned int layno, const std::vecto
|
||||
// the first and last layers get the full n(z), where only one third of the muons in the second layer will be taken into account
|
||||
//---------------------
|
||||
|
||||
void TTrimSPData::WeightLayers(double e, const std::vector<double>& interface, const std::vector<double>& weight) const {
|
||||
void TTrimSPData::WeightLayers(double e, const vector<double>& interface, const vector<double>& weight) const {
|
||||
|
||||
if (weight.size()-interface.size()-1) {
|
||||
std::cout << "TTrimSPData::WeightLayers: For the weighting the number of interfaces has to be one less than the number of weights!" << std::endl;
|
||||
std::cout << "TTrimSPData::WeightLayers: No weighting of the implantation profile will be done unless you take care of that!" << std::endl;
|
||||
if(weight.size()-interface.size()-1) {
|
||||
cout << "TTrimSPData::WeightLayers: For the weighting the number of interfaces has to be one less than the number of weights!" << endl;
|
||||
cout << "TTrimSPData::WeightLayers: No weighting of the implantation profile will be done unless you take care of that!" << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
for (unsigned int i(0); i<interface.size(); i++) {
|
||||
for(unsigned int i(0); i<interface.size(); i++) {
|
||||
if (interface[i]<0.0) {
|
||||
std::cout << "TTrimSPData::WeightLayers: One of your layer interfaces has a negative coordinate! - No weighting will be done!" << std::endl;
|
||||
cout << "TTrimSPData::WeightLayers: One of your layer interfaces has a negative coordinate! - No weighting will be done!" << endl;
|
||||
return;
|
||||
}
|
||||
else if (i>1) {
|
||||
if (interface[i]<interface[i-1]) {
|
||||
std::cout << "TTrimSPData::WeightLayers: The specified interfaces appear to be not in ascending order! - No weighting will be done!" << std::endl;
|
||||
cout << "TTrimSPData::WeightLayers: The specified interfaces appear to be not in ascending order! - No weighting will be done!" << endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (unsigned int i(0); i<weight.size(); i++) {
|
||||
for(unsigned int i(0); i<weight.size(); i++) {
|
||||
if (weight[i]>1.0 || weight[i]<0.0) {
|
||||
std::cout << "TTrimSPData::WeightLayers: At least one of the specified weights is out of range - no weighting will be done!" << std::endl;
|
||||
cout << "TTrimSPData::WeightLayers: At least one of the specified weights is out of range - no weighting will be done!" << endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -305,11 +311,11 @@ void TTrimSPData::WeightLayers(double e, const std::vector<double>& interface, c
|
||||
FindEnergy(e);
|
||||
|
||||
// If all weights are equal to one, use the original n(z) vector
|
||||
for (unsigned int i(0); i<weight.size(); i++) {
|
||||
if (weight[i]-1.0)
|
||||
for(unsigned int i(0); i<weight.size(); i++) {
|
||||
if(weight[i]-1.0)
|
||||
break;
|
||||
if (i == weight.size() - 1) {
|
||||
if (fEnergyIter != fEnergy.end()) {
|
||||
if(i == weight.size() - 1) {
|
||||
if(fEnergyIter != fEnergy.end()) {
|
||||
unsigned int j(fEnergyIter - fEnergy.begin());
|
||||
fDataNZ[j] = fOrigDataNZ[j];
|
||||
fIsNormalized[j] = false;
|
||||
@ -318,12 +324,12 @@ void TTrimSPData::WeightLayers(double e, const std::vector<double>& interface, c
|
||||
}
|
||||
}
|
||||
|
||||
if (fEnergyIter != fEnergy.end()) {
|
||||
if(fEnergyIter != fEnergy.end()) {
|
||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||
unsigned int k(0);
|
||||
for (unsigned int j(0); j<fDataZ[i].size(); j++) {
|
||||
if (k<interface.size()) {
|
||||
if (fDataZ[i][j] < interface[k]*10.0)
|
||||
for(unsigned int j(0); j<fDataZ[i].size(); j++) {
|
||||
if(k<interface.size()) {
|
||||
if(fDataZ[i][j] < interface[k]*10.0)
|
||||
fDataNZ[i][j] = fOrigDataNZ[i][j]*weight[k];
|
||||
else {
|
||||
k++;
|
||||
@ -333,11 +339,11 @@ void TTrimSPData::WeightLayers(double e, const std::vector<double>& interface, c
|
||||
else
|
||||
fDataNZ[i][j] = fOrigDataNZ[i][j]*weight[k];
|
||||
}
|
||||
fIsNormalized[i] = false;
|
||||
return;
|
||||
fIsNormalized[i] = false;
|
||||
return;
|
||||
}
|
||||
|
||||
std::cout << "TTrimSPData::WeightLayers: No implantation profile available for the specified energy... No weighting done." << std::endl;
|
||||
cout << "TTrimSPData::WeightLayers: No implantation profile available for the specified energy... No weighting done." << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -347,20 +353,20 @@ void TTrimSPData::WeightLayers(double e, const std::vector<double>& interface, c
|
||||
|
||||
double TTrimSPData::GetNofZ(double zz, double e) const {
|
||||
|
||||
std::vector<double> z, nz;
|
||||
vector<double> z, nz;
|
||||
|
||||
FindEnergy(e);
|
||||
|
||||
if (fEnergyIter != fEnergy.end()) {
|
||||
if(fEnergyIter != fEnergy.end()) {
|
||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||
z = fDataZ[i];
|
||||
nz = fDataNZ[i];
|
||||
} else {
|
||||
std::cout << "TTrimSPData::GetNofZ: No implantation profile available for the specified energy " << e << " keV... Quitting!" << std::endl;
|
||||
cout << "TTrimSPData::GetNofZ: No implantation profile available for the specified energy " << e << " keV... Quitting!" << endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if (zz < 0)
|
||||
if(zz < 0)
|
||||
return 0.0;
|
||||
|
||||
bool found = false;
|
||||
@ -389,7 +395,7 @@ void TTrimSPData::Normalize(double e) const {
|
||||
|
||||
FindEnergy(e);
|
||||
|
||||
if (fEnergyIter != fEnergy.end()) {
|
||||
if(fEnergyIter != fEnergy.end()) {
|
||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||
double nZsum = 0.0;
|
||||
for (unsigned int j(0); j<fDataZ[i].size(); j++)
|
||||
@ -402,9 +408,9 @@ void TTrimSPData::Normalize(double e) const {
|
||||
return;
|
||||
}
|
||||
// default
|
||||
std::cout << "TTrimSPData::Normalize: No implantation profile available for the specified energy... No normalization done." << std::endl;
|
||||
|
||||
cout << "TTrimSPData::Normalize: No implantation profile available for the specified energy... No normalization done." << endl;
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
//---------------------
|
||||
@ -414,12 +420,12 @@ void TTrimSPData::Normalize(double e) const {
|
||||
bool TTrimSPData::IsNormalized(double e) const {
|
||||
FindEnergy(e);
|
||||
|
||||
if (fEnergyIter != fEnergy.end()) {
|
||||
if(fEnergyIter != fEnergy.end()) {
|
||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||
return fIsNormalized[i];
|
||||
}
|
||||
|
||||
std::cout << "TTrimSPData::IsNormalized: No implantation profile available for the specified energy... Returning false! Check your code!" << std::endl;
|
||||
cout << "TTrimSPData::IsNormalized: No implantation profile available for the specified energy... Returning false! Check your code!" << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -430,19 +436,19 @@ bool TTrimSPData::IsNormalized(double e) const {
|
||||
double TTrimSPData::MeanRange(double e) const {
|
||||
FindEnergy(e);
|
||||
|
||||
if (fEnergyIter != fEnergy.end()) {
|
||||
if(fEnergyIter != fEnergy.end()) {
|
||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||
if (!fIsNormalized[i])
|
||||
Normalize(e);
|
||||
double mean(0.0);
|
||||
for (unsigned int j(0); j<fDataNZ[i].size(); j++){
|
||||
for(unsigned int j(0); j<fDataNZ[i].size(); j++){
|
||||
mean += fDataNZ[i][j]*fDataZ[i][j];
|
||||
}
|
||||
mean *= fDZ[i]/10.0;
|
||||
return mean;
|
||||
}
|
||||
|
||||
std::cout << "TTrimSPData::MeanRange: No implantation profile available for the specified energy... Returning -1! Check your code!" << std::endl;
|
||||
cout << "TTrimSPData::MeanRange: No implantation profile available for the specified energy... Returning -1! Check your code!" << endl;
|
||||
return -1.;
|
||||
}
|
||||
|
||||
@ -454,21 +460,21 @@ double TTrimSPData::PeakRange(double e) const {
|
||||
|
||||
FindEnergy(e);
|
||||
|
||||
if (fEnergyIter != fEnergy.end()) {
|
||||
if(fEnergyIter != fEnergy.end()) {
|
||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||
|
||||
std::vector<double>::const_iterator nziter;
|
||||
vector<double>::const_iterator nziter;
|
||||
nziter = max_element(fDataNZ[i].begin(),fDataNZ[i].end());
|
||||
|
||||
if (nziter != fDataNZ[i].end()){
|
||||
if(nziter != fDataNZ[i].end()){
|
||||
unsigned int j(nziter - fDataNZ[i].begin());
|
||||
return fDataZ[i][j]/10.0;
|
||||
}
|
||||
std::cout << "TTrimSPData::PeakRange: No maximum found in the implantation profile... Returning -1! Please check the profile!" << std::endl;
|
||||
cout << "TTrimSPData::PeakRange: No maximum found in the implantation profile... Returning -1! Please check the profile!" << endl;
|
||||
return -1.;
|
||||
}
|
||||
|
||||
std::cout << "TTrimSPData::PeakRange: No implantation profile available for the specified energy... Returning -1! Check your code!" << std::endl;
|
||||
cout << "TTrimSPData::PeakRange: No implantation profile available for the specified energy... Returning -1! Check your code!" << endl;
|
||||
return -1.;
|
||||
}
|
||||
|
||||
@ -478,26 +484,26 @@ double TTrimSPData::PeakRange(double e) const {
|
||||
//---------------------
|
||||
|
||||
void TTrimSPData::ConvolveGss(double w, double e) const {
|
||||
if (!w)
|
||||
if(!w)
|
||||
return;
|
||||
|
||||
std::vector<double> z, nz, gss;
|
||||
vector<double> z, nz, gss;
|
||||
double nn;
|
||||
|
||||
FindEnergy(e);
|
||||
|
||||
if (fEnergyIter != fEnergy.end()) {
|
||||
if(fEnergyIter != fEnergy.end()) {
|
||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||
z = fDataZ[i];
|
||||
nz = fDataNZ[i];
|
||||
|
||||
for (unsigned int k(0); k<z.size(); k++) {
|
||||
for(unsigned int k(0); k<z.size(); k++) {
|
||||
gss.push_back(exp(-z[k]*z[k]/200.0/w/w));
|
||||
}
|
||||
|
||||
for (unsigned int k(0); k<nz.size(); k++) {
|
||||
for(unsigned int k(0); k<nz.size(); k++) {
|
||||
nn = 0.0;
|
||||
for (unsigned int j(0); j<nz.size(); j++) {
|
||||
for(unsigned int j(0); j<nz.size(); j++) {
|
||||
nn += nz[j]*gss[abs(int(k)-int(j))];
|
||||
}
|
||||
fDataNZ[i][k] = nn;
|
||||
@ -508,6 +514,6 @@ void TTrimSPData::ConvolveGss(double w, double e) const {
|
||||
return;
|
||||
}
|
||||
|
||||
std::cout << "TTrimSPData::ConvolveGss: No implantation profile available for the specified energy... No convolution done!" << std::endl;
|
||||
cout << "TTrimSPData::ConvolveGss: No implantation profile available for the specified energy... No convolution done!" << endl;
|
||||
return;
|
||||
}
|
||||
|
29
src/external/BMWtools/TTrimSPDataHandler.h
vendored
29
src/external/BMWtools/TTrimSPDataHandler.h
vendored
@ -32,6 +32,7 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <map>
|
||||
using namespace std;
|
||||
|
||||
/**
|
||||
* <p>Class used to handle a set of low energy muon implantation profiles
|
||||
@ -40,7 +41,7 @@ class TTrimSPData {
|
||||
|
||||
public:
|
||||
|
||||
TTrimSPData(const std::string&, std::map<double, std::string>&, bool debug = false, unsigned int highRes = 0);
|
||||
TTrimSPData(const string&, map<double, string>&, bool debug = false, unsigned int highRes = 0);
|
||||
|
||||
~TTrimSPData() {
|
||||
fDataZ.clear();
|
||||
@ -51,15 +52,15 @@ public:
|
||||
fIsNormalized.clear();
|
||||
}
|
||||
|
||||
std::vector<double> Energy() const {return fEnergy;}
|
||||
std::vector<double> DataZ(double) const;
|
||||
std::vector<double> DataNZ(double) const;
|
||||
std::vector<double> OrigDataNZ(double) const;
|
||||
vector<double> Energy() const {return fEnergy;}
|
||||
vector<double> DataZ(double) const;
|
||||
vector<double> DataNZ(double) const;
|
||||
vector<double> OrigDataNZ(double) const;
|
||||
double DataDZ(double) const;
|
||||
void UseHighResolution(double);
|
||||
void SetOriginal() {fOrigDataNZ = fDataNZ;}
|
||||
void WeightLayers(double, const std::vector<double>&, const std::vector<double>&) const;
|
||||
double LayerFraction(double, unsigned int, const std::vector<double>&) const;
|
||||
void WeightLayers(double, const vector<double>&, const vector<double>&) const;
|
||||
double LayerFraction(double, unsigned int, const vector<double>&) const;
|
||||
double GetNofZ(double, double) const;
|
||||
void Normalize(double) const;
|
||||
bool IsNormalized(double) const;
|
||||
@ -70,13 +71,13 @@ public:
|
||||
private:
|
||||
void FindEnergy(double) const;
|
||||
|
||||
std::vector<double> fEnergy; ///< vector holding all available muon energies
|
||||
std::vector<double> fDZ; ///< vector holding the spatial resolution of the TRIM.SP output for all energies
|
||||
std::vector< std::vector<double> > fDataZ; ///< discrete points in real space for which n(z) has been calculated for all energies
|
||||
mutable std::vector< std::vector<double> > fDataNZ; ///< n(z) for all energies
|
||||
std::vector< std::vector<double> > fOrigDataNZ; ///< original (unmodified) implantation profiles for all energies as read in from rge-files
|
||||
mutable std::vector<bool> fIsNormalized; ///< tag indicating if the implantation profiles are normalized (for each energy separately)
|
||||
mutable std::vector<double>::const_iterator fEnergyIter; ///< iterator traversing the vector of available energies
|
||||
vector<double> fEnergy; ///< vector holding all available muon energies
|
||||
vector<double> fDZ; ///< vector holding the spatial resolution of the TRIM.SP output for all energies
|
||||
vector< vector<double> > fDataZ; ///< discrete points in real space for which n(z) has been calculated for all energies
|
||||
mutable vector< vector<double> > fDataNZ; ///< n(z) for all energies
|
||||
vector< vector<double> > fOrigDataNZ; ///< original (unmodified) implantation profiles for all energies as read in from rge-files
|
||||
mutable vector<bool> fIsNormalized; ///< tag indicating if the implantation profiles are normalized (for each energy separately)
|
||||
mutable vector<double>::const_iterator fEnergyIter; ///< iterator traversing the vector of available energies
|
||||
};
|
||||
|
||||
#endif // _TTrimSPDataHandler_H_
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2013-2025 by Andreas Suter *
|
||||
* Copyright (C) 2013-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2013-2025 by Andreas Suter *
|
||||
* Copyright (C) 2013-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
5
src/external/DepthProfile/src/CMakeLists.txt
vendored
5
src/external/DepthProfile/src/CMakeLists.txt
vendored
@ -6,7 +6,6 @@ set(DEPTH_PROFILE_INC ${CMAKE_CURRENT_SOURCE_DIR}/../inc)
|
||||
# ROOT requires that the dictonary header files are found at configuration time.
|
||||
# Hence, target_include_directories cannot be used here because, targets are
|
||||
# setup only afterwards.
|
||||
include_directories(${FFTW3_INCLUDE})
|
||||
include_directories(${MUSRFIT_INC})
|
||||
include_directories(${DEPTH_PROFILE_INC})
|
||||
|
||||
@ -14,7 +13,7 @@ root_generate_dictionary(
|
||||
PDepthProfileDict
|
||||
PDepthProfile.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE}
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${DEPTH_PROFILE_INC}
|
||||
-inlineInputHeader
|
||||
@ -46,7 +45,7 @@ set_target_properties(PDepthProfile
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PDepthProfile BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../inc>
|
||||
)
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009-2025 by Andreas Suter *
|
||||
* Copyright (C) 2009-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<depthProf xmlns="http://nemu.web.psi.ch/musrfit/depthProf">
|
||||
<nonlocal xmlns="http://nemu.web.psi.ch/musrfit/nonlocal">
|
||||
<comment>
|
||||
TrimSp information
|
||||
</comment>
|
||||
@ -31,7 +31,5 @@
|
||||
<energy>21000</energy>
|
||||
<energy>22000</energy>
|
||||
</energy_list>
|
||||
<!-- <energy_vect start="1000" stop="22000" step="1000"/>
|
||||
-->
|
||||
</trim_sp>
|
||||
</depthProf>
|
||||
</nonlocal>
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2013-2025 by Andreas Suter *
|
||||
* Copyright (C) 2013-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2013-2025 by Andreas Suter *
|
||||
* Copyright (C) 2013-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009-2025 by Andreas Suter *
|
||||
* Copyright (C) 2009-2023 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
52
src/external/LF_GL/CMakeLists.txt
vendored
52
src/external/LF_GL/CMakeLists.txt
vendored
@ -1,52 +0,0 @@
|
||||
# - LF GL ---------------------------------------------------------------------
|
||||
|
||||
cmake_minimum_required(VERSION 3.17)
|
||||
|
||||
project(lf_gl VERSION 1.0 LANGUAGES C CXX)
|
||||
|
||||
#--- set a default build type if none was specified ---------------------------
|
||||
set(default_build_type "Release")
|
||||
|
||||
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
|
||||
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
|
||||
STRING "Choose the type of build." FORCE)
|
||||
# Set the possible values of build type for cmake-gui
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
|
||||
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||
endif ()
|
||||
|
||||
#--- write summary of the installation
|
||||
cmake_host_system_information(RESULT PROCESSOR QUERY PROCESSOR_DESCRIPTION)
|
||||
|
||||
message("")
|
||||
message("|-----------------------------------------------------------------------|")
|
||||
message("| |")
|
||||
message("| Summary |")
|
||||
message("| |")
|
||||
message("|-----------------------------------------------------------------------|")
|
||||
message("")
|
||||
message(" System: ${CMAKE_HOST_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR} - ${CMAKE_HOST_SYSTEM_VERSION}")
|
||||
message(" Processor: ${PROCESSOR} (${CMAKE_SYSTEM_PROCESSOR})")
|
||||
message(" ----------")
|
||||
message("")
|
||||
message(" lf_gl Version: ${lf_gl_VERSION}")
|
||||
message(" --------------")
|
||||
message("")
|
||||
message(" Build Type: ${CMAKE_BUILD_TYPE}")
|
||||
message("")
|
||||
message("-------------------------------------------------------------------------")
|
||||
message("")
|
||||
|
||||
add_executable(lf_gl
|
||||
main.cpp
|
||||
PGKT_LF.cpp
|
||||
PLGKT_LF.cpp
|
||||
)
|
||||
set_property(TARGET lf_gl PROPERTY CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
target_include_directories(lf_gl
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
|
||||
)
|
||||
target_link_libraries(lf_gl -lm)
|
264
src/external/LF_GL/PGKT_LF.cpp
vendored
264
src/external/LF_GL/PGKT_LF.cpp
vendored
@ -1,264 +0,0 @@
|
||||
/***************************************************************************
|
||||
|
||||
PGKT_LF.cpp
|
||||
|
||||
Author: Andreas Suter
|
||||
e-mail: andreas.suter@psi.ch
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
#include <numbers>
|
||||
|
||||
#include "PGKT_LF.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>CTOR
|
||||
*
|
||||
* @param param param[0]=field (G), param[1]=width (1/us), param[2]=hopp (1/us)
|
||||
* @param tmax maxium of time to be used in (us).
|
||||
*/
|
||||
PGKT_LF::PGKT_LF(std::vector<double> ¶m, const double tmax) : fParam(param), fTmax(tmax)
|
||||
{
|
||||
fParam[0] *= fGammaMu;
|
||||
|
||||
if (DynamicGaussKTLF() == 0)
|
||||
fValid = true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate GKT LF polarization values.
|
||||
*
|
||||
* @return 0 on success, >0 otherwise
|
||||
*/
|
||||
int PGKT_LF::DynamicGaussKTLF()
|
||||
{
|
||||
bool useKeren{false};
|
||||
|
||||
// check if there is an empty time vector, if yes create one, otherwise use the given one
|
||||
if (fTime.size() == 0) {
|
||||
double t = 0.0;
|
||||
do {
|
||||
t += 1.0e-4; // 100ps steps
|
||||
fTime.push_back(t);
|
||||
} while (t < fTmax);
|
||||
}
|
||||
fPol.resize(fTime.size());
|
||||
|
||||
if (fParam[2]/fParam[1] > 5.0) // hopp/width = nu/Delta > 5.0
|
||||
useKeren=true;
|
||||
|
||||
unsigned int i{0};
|
||||
if (useKeren) {
|
||||
double wL = fParam[0];
|
||||
double wL2 = wL*wL;
|
||||
double nu2 = fParam[2]*fParam[2];
|
||||
double Gamma_t{0.0};
|
||||
for (auto t : fTime) {
|
||||
Gamma_t = 2.0*fParam[1]*fParam[1]/((wL2+nu2)*(wL2+nu2))* ((wL2+nu2)*fParam[2]*t
|
||||
+ (wL2-nu2)*(1.0 - exp(-fParam[2]*t)*cos(wL*t))
|
||||
- 2.0*fParam[2]*wL*exp(-fParam[2]*t)*sin(wL*t));
|
||||
fPol[i++] = exp(-Gamma_t);
|
||||
}
|
||||
} else {
|
||||
CalculateDynKTLF();
|
||||
for (auto t : fTime) {
|
||||
fPol[i++] = GetDynKTLFValue(t);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate GKT LF polarization values, where the Keren approximation fails.
|
||||
*/
|
||||
void PGKT_LF::CalculateDynKTLF()
|
||||
{
|
||||
double tmax = 20.0; // 20 us
|
||||
if (tmax < fTmax)
|
||||
tmax = fTmax;
|
||||
unsigned int N = static_cast<unsigned int>(16.0*tmax*fParam[0]);
|
||||
|
||||
// check if width is very high
|
||||
if (fParam[1] > 0.1) {
|
||||
double tmin = 20.0;
|
||||
tmin = fabs(sqrt(3.0)/fParam[1]);
|
||||
|
||||
unsigned int Nrate = static_cast<unsigned int>(25.0 * tmax / tmin);
|
||||
if (Nrate > N) {
|
||||
N = Nrate;
|
||||
}
|
||||
}
|
||||
|
||||
if (N < 300) // if too few points, i.e. hopp very small, take 300 points
|
||||
N = 300;
|
||||
|
||||
if (N>1e6) // make sure that N is not too large to prevent memory overflow
|
||||
N = 1e6;
|
||||
|
||||
fDynLFFuncValue.resize(N);
|
||||
|
||||
CalculateGaussLFIntegral();
|
||||
|
||||
// calculate the P^(0)(t) exp(-nu t) vector
|
||||
std::vector<double> p0exp(N);
|
||||
double t = 0.0;
|
||||
double dt = tmax/N;
|
||||
double nu = fParam[0] / (2.0*std::numbers::pi_v<double>);
|
||||
fDynLFdt = dt; // keep it since it is needed in GetDynKTLFValue()
|
||||
for (unsigned int i=0; i<N; i++) {
|
||||
if (nu < 0.02) { // if smaller 20kHz ~ 0.27G use zero field formula
|
||||
double sigma_t_2 = t*t*fParam[1]*fParam[1];
|
||||
p0exp[i] = 0.333333333333333 * (1.0 + 2.0*(1.0 - sigma_t_2)*exp(-0.5*sigma_t_2));
|
||||
} else if (fParam[1]/nu > 79.5775) { // check if Delta/w0 > 500.0, in which case the ZF formula is used
|
||||
double sigma_t_2 = t*t*fParam[1]*fParam[1];
|
||||
p0exp[i] = 0.333333333333333 * (1.0 + 2.0*(1.0 - sigma_t_2)*exp(-0.5*sigma_t_2));
|
||||
} else {
|
||||
double width = fParam[1];
|
||||
double w0 = fParam[0];
|
||||
p0exp[i] = 1.0 - 2.0*pow(width/w0,2.0)*(1.0 - exp(-0.5*pow(width*t, 2.0))*cos(w0*t)) + GetLFIntegralValue(t);
|
||||
}
|
||||
p0exp[i] *= exp(-fParam[2]*t);
|
||||
t += dt;
|
||||
}
|
||||
|
||||
// solve the volterra equation (trapezoid integration)
|
||||
fDynLFFuncValue[0]=p0exp[0];
|
||||
|
||||
double sum;
|
||||
double a;
|
||||
double preFactor = dt*fParam[2];
|
||||
for (unsigned int i=1; i<N; i++) {
|
||||
sum = p0exp[i];
|
||||
sum += 0.5*preFactor*p0exp[i]*fDynLFFuncValue[0];
|
||||
for (unsigned int j=1; j<i; j++) {
|
||||
sum += preFactor*p0exp[i-j]*fDynLFFuncValue[j];
|
||||
}
|
||||
a = 1.0-0.5*preFactor*p0exp[0];
|
||||
|
||||
fDynLFFuncValue[i]=sum/a;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate static LF integral.
|
||||
*/
|
||||
void PGKT_LF::CalculateGaussLFIntegral()
|
||||
{
|
||||
// fParam[0] = omega (field), fParam[1] = width
|
||||
double nu = fParam[0] / (2.0*std::numbers::pi_v<double>);
|
||||
|
||||
if (fParam[0] == 0.0) // field == 0
|
||||
return;
|
||||
|
||||
double dt=0.001; // all times in usec
|
||||
double t, ft;
|
||||
double w0 = fParam[0];
|
||||
double width = fParam[1];
|
||||
double preFactor = 2.0*pow(width, 4.0) / pow(w0, 3.0);
|
||||
|
||||
// check if the time resolution needs to be increased
|
||||
const unsigned int samplingPerPeriod = 20;
|
||||
const unsigned int samplingOnExp = 3000;
|
||||
if ((width <= w0) && (1.0/nu < 20.0)) { // makes sure that the frequency sampling is fine enough
|
||||
if (1.0/nu/samplingPerPeriod < 0.001) {
|
||||
dt = 1.0/nu/samplingPerPeriod;
|
||||
}
|
||||
} else if ((width > w0) && (width <= 10.0)) {
|
||||
if (width/w0 > 10.0) {
|
||||
dt = 0.00005;
|
||||
}
|
||||
} else if ((width > w0) && (width > 10.0)) { // makes sure there is a fine enough sampling for large Delta's
|
||||
if (1.0/width/samplingOnExp < 0.001) {
|
||||
dt = 1.0/width/samplingOnExp;
|
||||
}
|
||||
}
|
||||
|
||||
fSamplingTime = dt;
|
||||
|
||||
fLFIntegral.clear();
|
||||
|
||||
// calculate integral
|
||||
t = 0.0;
|
||||
fLFIntegral.push_back(0.0); // start value of the integral
|
||||
|
||||
ft = 0.0;
|
||||
double step = 0.0, lastft = 1.0, diff = 0.0;
|
||||
do {
|
||||
t += dt;
|
||||
step = 0.5*dt*preFactor*(exp(-0.5*pow(width * (t-dt), 2.0))*sin(w0*(t-dt))+
|
||||
exp(-0.5*pow(width * t, 2.0))*sin(w0*t));
|
||||
ft += step;
|
||||
diff = fabs(fabs(lastft)-fabs(ft));
|
||||
lastft = ft;
|
||||
fLFIntegral.push_back(ft);
|
||||
} while ((t <= 20.0) && (diff > 1.0e-10));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Gets value of the non-analytic static LF integral.
|
||||
*
|
||||
* @param t time in (usec)
|
||||
*
|
||||
* @return interpolated LF integral value
|
||||
*/
|
||||
double PGKT_LF::GetLFIntegralValue(const double t) const
|
||||
{
|
||||
unsigned int idx = static_cast<unsigned int>(t/fSamplingTime);
|
||||
|
||||
if (idx + 2 > fLFIntegral.size())
|
||||
return fLFIntegral.back();
|
||||
|
||||
// linearly interpolate between the two relevant function bins
|
||||
double df = (fLFIntegral[idx+1]-fLFIntegral[idx])*(t/fSamplingTime-static_cast<double>(idx));
|
||||
|
||||
return fLFIntegral[idx]+df;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p><p>Gets value of the dynamic Kubo-Toyabe LF function.
|
||||
*
|
||||
* @param t time (usec)
|
||||
*
|
||||
* @return interpolated LF value.
|
||||
*/
|
||||
double PGKT_LF::GetDynKTLFValue(const double t) const
|
||||
{
|
||||
unsigned int idx = static_cast<unsigned int>(t/fDynLFdt);
|
||||
|
||||
if (idx + 2 > fDynLFFuncValue.size())
|
||||
return fDynLFFuncValue.back();
|
||||
|
||||
// linearly interpolate between the two relvant function bins
|
||||
double df = (fDynLFFuncValue[idx+1]-fDynLFFuncValue[idx])*(t/fDynLFdt-static_cast<double>(idx));
|
||||
|
||||
return fDynLFFuncValue[idx]+df;
|
||||
}
|
65
src/external/LF_GL/PGKT_LF.h
vendored
65
src/external/LF_GL/PGKT_LF.h
vendored
@ -1,65 +0,0 @@
|
||||
/***************************************************************************
|
||||
|
||||
PGKT_LF.h
|
||||
|
||||
Author: Andreas Suter
|
||||
e-mail: andreas.suter@psi.ch
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 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 _PGKT_LF_
|
||||
#define _PGKT_LF_
|
||||
|
||||
#include <vector>
|
||||
|
||||
class PGKT_LF
|
||||
{
|
||||
public:
|
||||
PGKT_LF(std::vector<double> ¶m, const double tmax);
|
||||
|
||||
int DynamicGaussKTLF();
|
||||
bool IsValid() { return fValid; }
|
||||
|
||||
std::vector<double> GetTime() { return fTime; }
|
||||
std::vector<double> GetPol() { return fPol; }
|
||||
|
||||
private:
|
||||
const double fGammaMu=8.5161545577e-2;
|
||||
std::vector<double> fDynLFFuncValue;
|
||||
std::vector<double> fLFIntegral;
|
||||
double fSamplingTime{0.0001};
|
||||
double fDynLFdt{0.0001};
|
||||
|
||||
bool fValid{false};
|
||||
double fTmax{10.0};
|
||||
std::vector<double> fParam;
|
||||
std::vector<double> fTime;
|
||||
std::vector<double> fPol;
|
||||
|
||||
void CalculateDynKTLF();
|
||||
void CalculateGaussLFIntegral();
|
||||
double GetLFIntegralValue(const double t) const;
|
||||
double GetDynKTLFValue(const double t) const;
|
||||
};
|
||||
|
||||
#endif // _PGKT_LF_
|
116
src/external/LF_GL/PLGKT_LF.cpp
vendored
116
src/external/LF_GL/PLGKT_LF.cpp
vendored
@ -1,116 +0,0 @@
|
||||
/***************************************************************************
|
||||
|
||||
PLGKT_LF.cpp
|
||||
|
||||
Author: Andreas Suter
|
||||
e-mail: andreas.suter@psi.ch
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
#include <numbers>
|
||||
#include <chrono>
|
||||
|
||||
#include "PLGKT_LF.h"
|
||||
#include "PGKT_LF.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>CTOR
|
||||
*
|
||||
* @param param [0] field (G), [1] width (1/us), [2] hopp (1/us)
|
||||
* @param tmax maximal time to be used, default = 10 us
|
||||
*/
|
||||
PLGKT_LF::PLGKT_LF(std::vector<double> ¶m, const double tmax) : fParam(param), fTmax(tmax)
|
||||
{
|
||||
if (DynamicLGKTLF() == 0)
|
||||
fValid = true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>The weight density \f$\rho_{\Delta_{\rm L}}(\Delta_{\rm G}) dG_{\rm G} =
|
||||
* \sqrt{\frac{2}{\pi}} \frac{1}{r^2} \exp\left(-\frac{1}{2 r^2}\right) dr\f$, with
|
||||
* \f$r = \frac{\Delta_{\rm G}}{\Delta_{\rm L}}\f$
|
||||
* (see A. Yaouanc and P. Dalmas de Reotier, ``Muon Spin Rotation, Relaxation, and Resonance'', p.129)
|
||||
*
|
||||
* <p>Integration method is described in the docu directory.
|
||||
*
|
||||
* @return 0 on success, >0 otherwise
|
||||
*/
|
||||
int PLGKT_LF::DynamicLGKTLF()
|
||||
{
|
||||
std::vector<double> rr={0.2, 0.4, 0.6, 0.8, 1.0, 1.25, 1.5, 1.75, 2.0, 2.5, 3.0, 4.0, 5.0, 7.5, 10.0, 12.8125, 15.625, 18.4375, 21.25, 26.875, 32.5, 43.75, 55.0, 77.5, 100.0};
|
||||
|
||||
std::vector<double> pp={fParam[0], 0.0, fParam[2]};
|
||||
std::vector<double> pol;
|
||||
double scale, up{0.0}, low{-1.0};
|
||||
fTime.clear();
|
||||
fPol.clear();
|
||||
|
||||
if ((fParam[0] < 0.5) && (fParam[2] == 0.0)) { // very close to ZF -> use ZF
|
||||
// generate time vector
|
||||
double t = 0.0;
|
||||
do {
|
||||
t += 1.0e-4; // 100ps steps
|
||||
fTime.push_back(t);
|
||||
} while (t < fTmax);
|
||||
|
||||
// generate polarization vector
|
||||
for (auto tt : fTime) {
|
||||
fPol.push_back(0.333333333333 + 0.666666666667 * (1.0 - fParam[1]*tt) * exp(-fParam[1]*tt));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto t_start = std::chrono::high_resolution_clock::now();
|
||||
double sqrtTwoInv = 1.0/sqrt(2.0);
|
||||
for (unsigned int i=0; i<rr.size(); i++) {
|
||||
pp[1] = rr[i] * fParam[1];
|
||||
PGKT_LF gkt_lf(pp, fTmax);
|
||||
if (!gkt_lf.IsValid()) {
|
||||
std::cout << "**ERROR** in Gaussian LF calculation" << std::endl;
|
||||
return 2;
|
||||
}
|
||||
if (fTime.size()==0) {
|
||||
fTime = gkt_lf.GetTime();
|
||||
fPol.resize(fTime.size());
|
||||
}
|
||||
up = -std::erf(sqrtTwoInv/rr[i]);
|
||||
scale = up - low;
|
||||
low = up;
|
||||
|
||||
pol.clear();
|
||||
pol = gkt_lf.GetPol();
|
||||
for (unsigned int j=0; j<fPol.size(); j++)
|
||||
fPol[j] += scale*pol[j];
|
||||
}
|
||||
|
||||
auto t_end = std::chrono::high_resolution_clock::now();
|
||||
std::cout << ">> time used: " << std::chrono::duration<double, std::milli>(t_end-t_start).count() << " ms." << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
53
src/external/LF_GL/PLGKT_LF.h
vendored
53
src/external/LF_GL/PLGKT_LF.h
vendored
@ -1,53 +0,0 @@
|
||||
/***************************************************************************
|
||||
|
||||
PLGKT_LF.h
|
||||
|
||||
Author: Andreas Suter
|
||||
e-mail: andreas.suter@psi.ch
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2025 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 _PLGKT_LF_
|
||||
#define _PLGKT_LF_
|
||||
|
||||
#include <vector>
|
||||
|
||||
class PLGKT_LF {
|
||||
public:
|
||||
PLGKT_LF(std::vector<double> ¶m, const double tmax);
|
||||
|
||||
int DynamicLGKTLF();
|
||||
bool IsValid() { return fValid; }
|
||||
|
||||
std::vector<double> GetTime() { return fTime; }
|
||||
std::vector<double> GetPol() { return fPol; }
|
||||
|
||||
private:
|
||||
bool fValid{false};
|
||||
double fTmax{10.0};
|
||||
std::vector<double> fParam;
|
||||
std::vector<double> fTime;
|
||||
std::vector<double> fPol;
|
||||
};
|
||||
|
||||
#endif // _PLGKT_LF_
|
62
src/external/LF_GL/docu/dynamicGL_LF.bib
vendored
62
src/external/LF_GL/docu/dynamicGL_LF.bib
vendored
@ -1,62 +0,0 @@
|
||||
@Article{ Hayano79,
|
||||
title = "Zero- and low-field spin relaxation studied by positive muons",
|
||||
author = "R. S. Hayano and Y. J. Uemura and J. Imazato and N. Nishida and T. Yamazaki and R. Kubo",
|
||||
journal = "Phys. Rev. B",
|
||||
volume = "20",
|
||||
year = "1979",
|
||||
pages = "850"
|
||||
}
|
||||
|
||||
@Article{ Uemura85,
|
||||
title = "Muon-spin relaxation in \emph{AuFe} and \emph{CuMn} spin glasses",
|
||||
author = "Y. J. Uemura and T. Yamazaki and D. R. Harshman and M. Senba and E. J. Ansaldo",
|
||||
journal = "Phys. Rev. B",
|
||||
volume = "31",
|
||||
year = "1985",
|
||||
pages = "546"
|
||||
}
|
||||
|
||||
@Article{ DalmasDeReotier92,
|
||||
title = "Quantum calculation of the muon depolarization function: effect of spin dynamics in nuclear dipole systems",
|
||||
author = "P. {Dalams de R\'{e}otier} and A. Yaouanc",
|
||||
journal = "J. Phys.: Condens. Matter",
|
||||
volume = "4",
|
||||
year = "1992",
|
||||
pages = "4533"
|
||||
}
|
||||
|
||||
@Article{ Keren94,
|
||||
title = "Generalization of the Abragam relaxation function to a longitudinal field",
|
||||
author = "A. Keren",
|
||||
journal = "Phys. Rev. B",
|
||||
volume = "50",
|
||||
year = "1994",
|
||||
pages = "10039"
|
||||
}
|
||||
|
||||
@Article{ Larkin00,
|
||||
title = "Exponential field distribution in $\mathrm{Sr(Cu_{1-x}Zn_x)_2O_3}$",
|
||||
author = "M. I. Larkin and Y. Fudamoto and I. M. Gat and A. Kinkhabwala and K. M. Kojima and G. M. Luke and J. Merrin and B. Nachumi and Y. J. Uemura and M. Azuma and T. Saito and M. Takano",
|
||||
journal = "Physica B",
|
||||
volume = "289-290",
|
||||
year = "00",
|
||||
pages = "153"
|
||||
}
|
||||
|
||||
@Article{ McMullen78,
|
||||
title = "Positive-muon spin depolarization in solids",
|
||||
author = "T. McMullen and E. Zaremba",
|
||||
journal = "Phys. Rev. B",
|
||||
volume = "18",
|
||||
year = "1978",
|
||||
pages = "3026"
|
||||
}
|
||||
|
||||
@Book { Yaouanc11,
|
||||
title = "Muon Spin Rotation, Relaxation, and Resonance",
|
||||
author = "A. Yaouanc and P. Dalmas de R\'{e}otier",
|
||||
year = 2011,
|
||||
publisher = "Oxford University Press",
|
||||
address = "Oxford"
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user