Compare commits
75 Commits
Author | SHA1 | Date | |
---|---|---|---|
ecec59c8a3 | |||
66af890157 | |||
eb98c9727c | |||
079baa3edf | |||
7df47a05f3 | |||
15c5b02c8b | |||
37f099542a | |||
c2fb166d3b | |||
e8806c3e72 | |||
91a45cad90 | |||
d1f025a8c2 | |||
e525abe614 | |||
005b33c379 | |||
3bcc382679 | |||
249d6ff97c | |||
69ab03d5ae | |||
819d209863 | |||
bcc1597e30 | |||
9fa90c24fb | |||
236a702d36 | |||
09f9782a31 | |||
f99f71a8db | |||
6e60013037 | |||
e38fa47961 | |||
764cdf4e51 | |||
e5ff0fa743 | |||
e26fa4eea2 | |||
5648757389 | |||
![]() |
c3b4c7c3b1 | ||
e233c860d1 | |||
c230bfb1bc | |||
5119b1cd13 | |||
d937324885 | |||
f7e5c53879 | |||
3796925e93 | |||
d5343a0073 | |||
bb99482461 | |||
f0869935d1 | |||
0f95551200 | |||
b8ce741534 | |||
4b6654ca2a | |||
38d4ec1806 | |||
4231d26604 | |||
a28650f017 | |||
9a23c4f241 | |||
5f7f79e46d | |||
4a20d805dd | |||
10cfe3f863 | |||
0828d1b8d4 | |||
75785d2c0e | |||
e4b84b12df | |||
124a31386c | |||
ebdb0feb7f | |||
![]() |
e67d92fc05 | ||
![]() |
ead1674b13 | ||
fd22884ce8 | |||
20dd08fbef | |||
3e66760c26 | |||
d6bcdf52b8 | |||
30bd2b2876 | |||
9f8f89db6d | |||
458913ca31 | |||
5c3accc6ed | |||
6f8b0a2341 | |||
4febdb42b4 | |||
ae95a5dc1c | |||
c3f531e0d5 | |||
0b61130e28 | |||
d1cd63dcb0 | |||
7838901fbe | |||
00b012d0dd | |||
![]() |
d2984d8923 | ||
![]() |
58889614e5 | ||
c9fc373862 | |||
ebefcf7af9 |
@ -1,7 +1,7 @@
|
||||
# - musrfit
|
||||
cmake_minimum_required(VERSION 3.17)
|
||||
|
||||
project(musrfit VERSION 1.9.5 LANGUAGES C CXX)
|
||||
project(musrfit VERSION 1.9.8 LANGUAGES C CXX)
|
||||
|
||||
#--- musrfit specific options -------------------------------------------------
|
||||
option(nexus "build optional NeXus support. Needed for ISIS" OFF)
|
||||
@ -200,8 +200,10 @@ endif (qt_based_tools)
|
||||
|
||||
#--- if NeXus check also for HDF4, HDF5, and MXML -----------------------------
|
||||
if (nexus)
|
||||
find_package(HDF5 COMPONENTS CXX REQUIRED )
|
||||
find_package(HDF4 REQUIRED)
|
||||
find_package(HDF5 COMPONENTS CXX REQUIRED)
|
||||
if (HAVE_HDF4)
|
||||
find_package(HDF4 REQUIRED)
|
||||
endif (HAVE_HDF4)
|
||||
find_package(NEXUS REQUIRED)
|
||||
add_definitions(-DPNEXUS_ENABLED)
|
||||
endif (nexus)
|
||||
@ -222,6 +224,19 @@ 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)
|
||||
@ -286,7 +301,11 @@ endif (OpenMP_FOUND)
|
||||
|
||||
if (nexus)
|
||||
message("")
|
||||
message(" HDF4 found in ${HDF4_INCLUDE_DIRS}")
|
||||
if (HAVE_HDF4)
|
||||
message(" HDF4 found in ${HDF4_INCLUDE_DIRS}")
|
||||
else (HAVE_HDF4)
|
||||
message(" HDF4 not present.")
|
||||
endif (HAVE_HDF4)
|
||||
message(" HDF5 found in ${HDF5_INCLUDE_DIRS}, Version: ${HDF5_VERSION}")
|
||||
message(" NeXus found in ${NEXUS_INCLUDE_DIR}, Version: ${NEXUS_VERSION_STRING}")
|
||||
endif (nexus)
|
||||
|
26
ChangeLog
26
ChangeLog
@ -12,6 +12,32 @@ or
|
||||
|
||||
https://bitbucket.org/muonspin/musrfit/commits/all
|
||||
|
||||
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
|
||||
=============================
|
||||
|
||||
|
@ -1,30 +0,0 @@
|
||||
# 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/examples/.DS_Store
vendored
BIN
doc/examples/.DS_Store
vendored
Binary file not shown.
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2021 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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: 81576a0588e1a44f70c715e85985d5a5
|
||||
config: 1c72e3ac8764a6fbfdf66c0cdf797d3d
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
|
@ -1,6 +1,6 @@
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
||||
VERSION: '1.9.4',
|
||||
VERSION: '1.9.5',
|
||||
LANGUAGE: 'None',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Acknowledgements — musrfit 1.9.4 documentation</title>
|
||||
<title>Acknowledgements — musrfit 1.9.5 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -201,7 +201,7 @@ 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 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -223,7 +223,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.4',
|
||||
VERSION:'1.9.5',
|
||||
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.4 documentation</title>
|
||||
<title>any2many - a Universal μSR-file-format converter — musrfit 1.9.5 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -191,7 +191,7 @@ 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 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -213,7 +213,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.4',
|
||||
VERSION:'1.9.5',
|
||||
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.4 documentation</title>
|
||||
<title>Bugtracking — musrfit 1.9.5 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -189,7 +189,7 @@ or send an e-mail to A. Suter at PSI.</p>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -211,7 +211,7 @@ or send an e-mail to A. Suter at PSI.</p>
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
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.4 documentation</title>
|
||||
<title>How to Cite musrfit? — musrfit 1.9.5 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -203,7 +203,7 @@
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -225,7 +225,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Short description and references to the supported file-formats — musrfit 1.9.4 documentation</title>
|
||||
<title>Short description and references to the supported file-formats — musrfit 1.9.5 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -503,7 +503,7 @@ Between detectors, there will be an empty line.</p>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -525,7 +525,7 @@ Between detectors, there will be an empty line.</p>
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Index — musrfit 1.9.4 documentation</title>
|
||||
<title>Index — musrfit 1.9.5 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -753,7 +753,7 @@
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -775,7 +775,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
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.4 documentation</title>
|
||||
<title>Welcome to the musrfit documentation! — musrfit 1.9.5 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -285,7 +285,7 @@
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -307,7 +307,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
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.4 documentation</title>
|
||||
<title>msr2data - A Program for Automatically Processing Multiple musrfit msr Files — musrfit 1.9.5 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -518,7 +518,7 @@ 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 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -540,7 +540,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.4',
|
||||
VERSION:'1.9.5',
|
||||
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.4 documentation</title>
|
||||
<title>mupp - μSR Parameter Plotter — musrfit 1.9.5 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -408,7 +408,7 @@ SCRIPT COMMANDS:
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -430,7 +430,7 @@ SCRIPT COMMANDS:
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
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.4 documentation</title>
|
||||
<title>MusrRoot - an Extensible Open File Format for μSR — musrfit 1.9.5 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -1007,7 +1007,7 @@ 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 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -1029,7 +1029,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.4',
|
||||
VERSION:'1.9.5',
|
||||
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.4 documentation</title>
|
||||
<title>musredit: the GUI Based Interface to musrfit — musrfit 1.9.5 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -634,7 +634,7 @@ 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 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -656,7 +656,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.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Search — musrfit 1.9.4 documentation</title>
|
||||
<title>Search — musrfit 1.9.5 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -185,7 +185,7 @@
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -207,7 +207,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
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.4 documentation</title>
|
||||
<title>Setting up musrfit / DKS: High Speed Fitting with GPU’s — musrfit 1.9.5 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -408,7 +408,7 @@ The only thing you need <code class="docutils literal notranslate"><span class="
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -430,7 +430,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.4',
|
||||
VERSION:'1.9.5',
|
||||
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.4 documentation</title>
|
||||
<title>Setting up musrfit on Different Platforms — musrfit 1.9.5 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -1125,7 +1125,7 @@ $ musrview test-histo-ROOT-NPP.msr
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -1147,7 +1147,7 @@ $ musrview test-histo-ROOT-NPP.msr
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
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.4 documentation</title>
|
||||
<title>Tutorial for musrfit — musrfit 1.9.5 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -527,7 +527,7 @@ 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 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -549,7 +549,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.4',
|
||||
VERSION:'1.9.5',
|
||||
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.4 documentation</title>
|
||||
<title>Documentation of user libs (user functions) — musrfit 1.9.5 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -875,7 +875,7 @@ 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 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -897,7 +897,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.4',
|
||||
VERSION:'1.9.5',
|
||||
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.4 documentation</title>
|
||||
<title>User manual — musrfit 1.9.5 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -257,6 +257,26 @@
|
||||
<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>
|
||||
@ -2874,7 +2894,7 @@ The syntax here is attribute driven</li>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -2896,7 +2916,7 @@ The syntax here is attribute driven</li>
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -22,38 +22,6 @@ 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -55,6 +55,7 @@
|
||||
#include "Minuit2/MnPrint.h"
|
||||
#include "Minuit2/MnScan.h"
|
||||
#include "Minuit2/MnSimplex.h"
|
||||
#include "Minuit2/MnStrategy.h"
|
||||
#include "Minuit2/MnUserParameterState.h"
|
||||
#include "Minuit2/MinosError.h"
|
||||
|
||||
@ -1763,7 +1764,7 @@ Bool_t PFitter::ExecuteMigrad()
|
||||
|
||||
// create migrad object
|
||||
// strategy is by default = 'default'
|
||||
ROOT::Minuit2::MnMigrad migrad((*fFitterFcn), fMnUserParams, fStrategy);
|
||||
ROOT::Minuit2::MnMigrad migrad((*fFitterFcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
|
||||
|
||||
// minimize
|
||||
// maxfcn is MINUIT2 Default maxfcn
|
||||
@ -1839,7 +1840,7 @@ Bool_t PFitter::ExecuteMinimize()
|
||||
|
||||
// create minimizer object
|
||||
// strategy is by default = 'default'
|
||||
ROOT::Minuit2::MnMinimize minimize((*fFitterFcn), fMnUserParams, fStrategy);
|
||||
ROOT::Minuit2::MnMinimize minimize((*fFitterFcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
|
||||
|
||||
// minimize
|
||||
// maxfcn is MINUIT2 Default maxfcn
|
||||
@ -2656,7 +2657,7 @@ Bool_t PFitter::ExecuteSimplex()
|
||||
|
||||
// create minimizer object
|
||||
// strategy is by default = 'default'
|
||||
ROOT::Minuit2::MnSimplex simplex((*fFitterFcn), fMnUserParams, fStrategy);
|
||||
ROOT::Minuit2::MnSimplex simplex((*fFitterFcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
|
||||
|
||||
// minimize
|
||||
// maxfcn is 10*MINUIT2 Default maxfcn
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -188,13 +188,28 @@ 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);
|
||||
status = sscanf(str.c_str(), "T%d", &ivalue); // convert string to temperature index
|
||||
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
|
||||
node.fID = PFunctionGrammar::constTempID; // keep the ID
|
||||
node.fIvalue = ivalue; // Temp idx
|
||||
} else if (i->value.id() == PFunctionGrammar::parameterID) { // handle parameter number
|
||||
@ -432,21 +447,30 @@ Double_t PFunction::EvalNode(PFuncTreeNode &node)
|
||||
} else if (node.fID == PFunctionGrammar::constGammaMuID) {
|
||||
return node.fDvalue;
|
||||
} else if (node.fID == PFunctionGrammar::constFieldID) {
|
||||
return fMetaData.fField;
|
||||
Double_t dval = fMetaData.fField;
|
||||
if (node.fSign)
|
||||
dval *= -1.0;
|
||||
return dval;
|
||||
} 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);
|
||||
}
|
||||
return fMetaData.fEnergy;
|
||||
Double_t dval = fMetaData.fEnergy;
|
||||
if (node.fSign)
|
||||
dval *= -1.0;
|
||||
return dval;
|
||||
} 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);
|
||||
}
|
||||
return fMetaData.fTemp[node.fIvalue];
|
||||
Double_t dval = fMetaData.fTemp[node.fIvalue];
|
||||
if (node.fSign)
|
||||
dval *= -1.0;
|
||||
return dval;
|
||||
} else if (node.fID == PFunctionGrammar::parameterID) {
|
||||
Double_t dval;
|
||||
if (node.fSign)
|
||||
@ -609,10 +633,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 += "B";
|
||||
} 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::constEnergyID) {
|
||||
fFuncString += "EN";
|
||||
fFuncString += boost::algorithm::trim_copy(std::string(i->value.begin(), i->value.end())).c_str();
|
||||
} 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();
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Bastian M. Wojek / Andreas Suter *
|
||||
* Copyright (C) 2009-2025 by Bastian M. Wojek / Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -140,29 +140,32 @@ int PMsr2Data::DetermineRunNumberDigits(unsigned int runNo, bool normalMode) con
|
||||
strLine.str(line);
|
||||
strLine >> firstOnLine;
|
||||
if (!to_lower_copy(firstOnLine).compare("run")) {
|
||||
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;
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
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();
|
||||
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();
|
||||
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;";
|
||||
@ -558,11 +561,23 @@ bool PMsr2Data::PrepareNewInputFile(unsigned int tempRun, bool calledFromGlobalM
|
||||
strLine.str(line);
|
||||
strLine >> firstOnLine;
|
||||
if (!to_lower_copy(firstOnLine).compare("run")) {
|
||||
strLine >> firstOnLine;
|
||||
std::string::size_type loc = firstOnLine.rfind(tempRunNumber.str());
|
||||
if ( loc != std::string::npos ) {
|
||||
firstOnLine.replace(loc, fRunNumberDigits, newRunNumber.str());
|
||||
} else {
|
||||
// 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()) {
|
||||
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;
|
||||
@ -694,9 +709,16 @@ 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) {
|
||||
@ -1793,6 +1815,9 @@ 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");
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -3245,6 +3245,9 @@ 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);
|
||||
|
||||
@ -3274,23 +3277,29 @@ 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
|
||||
ostr = dynamic_cast<TObjString*>(tokens->At(1));
|
||||
str = ostr->GetString();
|
||||
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(" ");
|
||||
}
|
||||
param.SetRunName(str);
|
||||
// beamline
|
||||
ostr = dynamic_cast<TObjString*>(tokens->At(2));
|
||||
ostr = dynamic_cast<TObjString*>(tokens->At(tokens->GetEntries()-3));
|
||||
str = ostr->GetString();
|
||||
param.SetBeamline(str);
|
||||
// institute
|
||||
ostr = dynamic_cast<TObjString*>(tokens->At(3));
|
||||
ostr = dynamic_cast<TObjString*>(tokens->At(tokens->GetEntries()-2));
|
||||
str = ostr->GetString();
|
||||
param.SetInstitute(str);
|
||||
// data file format
|
||||
ostr = dynamic_cast<TObjString*>(tokens->At(4));
|
||||
ostr = dynamic_cast<TObjString*>(tokens->At(tokens->GetEntries()-1));
|
||||
str = ostr->GetString();
|
||||
param.SetFileFormat(str);
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -260,6 +260,7 @@ 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -935,10 +935,18 @@ void PMusrCanvas::Done(Int_t status)
|
||||
void PMusrCanvas::HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected)
|
||||
{
|
||||
if (event != kKeyPress)
|
||||
return;
|
||||
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;
|
||||
}
|
||||
|
||||
if (fBatchMode) {
|
||||
if (fStartWithAvg) { // this is needed to get the averaging in the batch mode
|
||||
fAveragedView = fStartWithAvg;
|
||||
HandleAverage();
|
||||
PlotAverage(true);
|
||||
}
|
||||
@ -1928,9 +1936,8 @@ 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 << ", ";
|
||||
}
|
||||
@ -1940,9 +1947,8 @@ 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 << ", ";
|
||||
}
|
||||
@ -1952,9 +1958,8 @@ 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 << ", ";
|
||||
}
|
||||
@ -1964,9 +1969,8 @@ 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 << ", ";
|
||||
}
|
||||
@ -1979,9 +1983,8 @@ 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 << ", ";
|
||||
}
|
||||
@ -1991,9 +1994,8 @@ 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 << ", ";
|
||||
}
|
||||
@ -2042,24 +2044,22 @@ 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 +2074,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,9 +2091,8 @@ 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 << ", ";
|
||||
@ -2112,9 +2111,8 @@ 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 << ", ";
|
||||
@ -2129,9 +2127,8 @@ 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 << ", ";
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Zaher Salman *
|
||||
* Copyright (C) 2018-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -1891,6 +1891,10 @@ 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);
|
||||
@ -2051,11 +2055,15 @@ Bool_t PRunDataHandler::ReadRootFile()
|
||||
}
|
||||
|
||||
dataSet.Clear();
|
||||
dataSet.SetName(histo->GetTitle());
|
||||
dataSet.SetTitle(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)
|
||||
@ -3697,6 +3705,8 @@ Bool_t PRunDataHandler::ReadAsciiFile()
|
||||
{
|
||||
Bool_t success = true;
|
||||
|
||||
std::cout << "as35> in ReadAsciiFile() ..." << std::endl;
|
||||
|
||||
// open file
|
||||
std::ifstream f;
|
||||
|
||||
@ -3848,7 +3858,14 @@ Bool_t PRunDataHandler::ReadAsciiFile()
|
||||
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;
|
||||
}
|
||||
|
||||
@ -4357,7 +4374,7 @@ Bool_t PRunDataHandler::ReadDatFile()
|
||||
// open file
|
||||
std::ifstream f;
|
||||
|
||||
// open db-file
|
||||
// open dat-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 ...";
|
||||
@ -4456,6 +4473,12 @@ 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);
|
||||
}
|
||||
}
|
||||
@ -4470,11 +4493,11 @@ Bool_t PRunDataHandler::ReadDatFile()
|
||||
|
||||
f.close();
|
||||
|
||||
// got through all the data sets and if there is NO error vector set it to '0.0'
|
||||
// got through all the data sets and if there is NO error vector set it to '1.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, 0.0);
|
||||
runData.fDataNonMusr.AppendSubErrData(i, 1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5563,6 +5586,30 @@ 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
|
||||
@ -5572,10 +5619,7 @@ Bool_t PRunDataHandler::WritePsiBinFile(TString fln)
|
||||
}
|
||||
|
||||
// detector name
|
||||
str = dataSet->GetName();
|
||||
if (!str.CompareTo("n/a"))
|
||||
str.Form("Detector%3d", i+1);
|
||||
psibin.PutNameHisto(str.Data(), i);
|
||||
psibin.PutNameHisto(hNCrop[i].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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -661,6 +661,7 @@ 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;
|
||||
@ -765,7 +766,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,255,0</color> <!-- kGreen -->" << std::endl;
|
||||
fout << " <color>0,153,0</color> <!-- kGreen+2 -->" << 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -29,6 +29,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
|
||||
#include <TObject.h>
|
||||
#include <TString.h>
|
||||
@ -425,6 +426,15 @@ 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);
|
||||
@ -462,16 +472,19 @@ 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) +
|
||||
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) +
|
||||
fAdd->Func(t, paramValues, funcValues);
|
||||
case THEORY_POLYNOM:
|
||||
return Polynom(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
|
||||
@ -511,6 +524,12 @@ 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:
|
||||
@ -545,6 +564,8 @@ 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:
|
||||
@ -580,6 +601,12 @@ 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:
|
||||
@ -614,6 +641,8 @@ 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:
|
||||
@ -647,6 +676,12 @@ 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:
|
||||
@ -681,6 +716,8 @@ 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:
|
||||
@ -1633,6 +1670,220 @@ 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
|
||||
@ -2461,6 +2712,49 @@ 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
|
||||
@ -2843,19 +3137,44 @@ 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 0.0;
|
||||
return 1.0;
|
||||
|
||||
UInt_t idx = static_cast<UInt_t>(t/fDynLFdt);
|
||||
|
||||
if (idx + 2 > fDynLFFuncValue.size())
|
||||
return fDynLFFuncValue.back();
|
||||
|
||||
// linearly interpolate between the two relvant function bins
|
||||
// linearly interpolate between the two relevant 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
2
src/external/BMWtools/BMWStartupHandler.cpp
vendored
2
src/external/BMWtools/BMWStartupHandler.cpp
vendored
@ -11,7 +11,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2024 by Andreas Suter, Bastian M. Wojek *
|
||||
* Copyright (C) 2007-2025 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-2024 by Andreas Suter, Bastian M. Wojek *
|
||||
* Copyright (C) 2007-2025 by Andreas Suter, Bastian M. Wojek *
|
||||
* *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2013-2024 by Andreas Suter *
|
||||
* Copyright (C) 2013-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2013-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2009-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2013-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2013-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2009-2025 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
Normal file
52
src/external/LF_GL/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
# - 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
Normal file
264
src/external/LF_GL/PGKT_LF.cpp
vendored
Normal file
@ -0,0 +1,264 @@
|
||||
/***************************************************************************
|
||||
|
||||
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
Normal file
65
src/external/LF_GL/PGKT_LF.h
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
/***************************************************************************
|
||||
|
||||
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
Normal file
116
src/external/LF_GL/PLGKT_LF.cpp
vendored
Normal file
@ -0,0 +1,116 @@
|
||||
/***************************************************************************
|
||||
|
||||
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
Normal file
53
src/external/LF_GL/PLGKT_LF.h
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
/***************************************************************************
|
||||
|
||||
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
Normal file
62
src/external/LF_GL/docu/dynamicGL_LF.bib
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
@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"
|
||||
}
|
||||
|
BIN
src/external/LF_GL/docu/dynamicGL_LF.pdf
vendored
Normal file
BIN
src/external/LF_GL/docu/dynamicGL_LF.pdf
vendored
Normal file
Binary file not shown.
135
src/external/LF_GL/docu/dynamicGL_LF.tex
vendored
Normal file
135
src/external/LF_GL/docu/dynamicGL_LF.tex
vendored
Normal file
@ -0,0 +1,135 @@
|
||||
\documentclass[twoside]{article}
|
||||
|
||||
\usepackage[english]{babel}
|
||||
\usepackage{a4}
|
||||
\usepackage{amssymb}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{array}
|
||||
\usepackage{float}
|
||||
\usepackage{hyperref}
|
||||
\usepackage{xspace}
|
||||
\usepackage{rotating}
|
||||
\usepackage{dcolumn}
|
||||
|
||||
\setlength{\topmargin}{10mm}
|
||||
\setlength{\topmargin}{-13mm}
|
||||
% \setlength{\oddsidemargin}{0.5cm}
|
||||
% \setlength{\evensidemargin}{0cm}
|
||||
\setlength{\oddsidemargin}{1cm}
|
||||
\setlength{\evensidemargin}{1cm}
|
||||
\setlength{\textwidth}{14.5cm}
|
||||
\setlength{\textheight}{23.8cm}
|
||||
|
||||
\pagestyle{fancyplain}
|
||||
\addtolength{\headwidth}{0.6cm}
|
||||
\fancyhead{}%
|
||||
\fancyhead[RE,LO]{\bf Static and Dynamic LF Functions}%
|
||||
\fancyhead[LE,RO]{\thepage}
|
||||
\cfoot{--- Andreas Suter -- \today ---}
|
||||
\rfoot{\includegraphics[width=2cm]{psi_01_sp.pdf}}
|
||||
|
||||
\DeclareMathAlphabet{\bi}{OML}{cmm}{b}{it}
|
||||
|
||||
\newcommand{\mean}[1]{\langle #1 \rangle}
|
||||
\newcommand{\lem}{LE-$\mu$SR\xspace}
|
||||
\newcommand{\musr}{$\mu$SR\xspace}
|
||||
\newcommand{\etal}{\emph{et al.\xspace}}
|
||||
|
||||
\newcolumntype{d}[1]{D{.}{.}{#1}}
|
||||
|
||||
\DeclareMathOperator\erf{erf}
|
||||
|
||||
\begin{document}
|
||||
% Header info --------------------------------------------------
|
||||
\thispagestyle{empty}
|
||||
\noindent
|
||||
\begin{tabular}{@{\hspace{-0.7cm}}l@{\hspace{6cm}}r}
|
||||
\noindent\includegraphics[width=3.4cm]{psi_01_sp.pdf} &
|
||||
{\Huge\sf Memorandum}
|
||||
\end{tabular}
|
||||
%
|
||||
\vskip 1cm
|
||||
%
|
||||
\begin{tabular}{@{\hspace{-0.5cm}}ll@{\hspace{4cm}}ll}
|
||||
Datum: & \today & & \\[3ex]
|
||||
Von: & Andreas Suter & An: & \\
|
||||
Telefon: & +41\, (0)56\, 310\, 4238 & & \\
|
||||
Raum: & WLGA / 119 & cc: & \\
|
||||
e-mail: & \verb?andreas.suter@psi.ch? & & \\
|
||||
\end{tabular}
|
||||
%
|
||||
\vskip 0.3cm
|
||||
\noindent\hrulefill
|
||||
\vskip 1cm
|
||||
%
|
||||
|
||||
\section*{Dynamic Gaussian-Lorentzian LF}
|
||||
|
||||
For details about the Gaussian-, and Lorentzian dynamics in LF see \cite{Hayano79,Uemura85,DalmasDeReotier92,Keren94,Yaouanc11}.
|
||||
|
||||
Here, the focus is only on the strong collision model, where the local dynamics is given by a Gaussian distribution. The system, however, is dilute so that the overall distribution is Lorentzian. This has been discussed the first time in the context of spin-glasses \cite{Uemura85}, where a Laplace approach has been followed. This approach is unfavorable numerically.
|
||||
Here I follow the approach given in \cite{Yaouanc11}, Chapter 6.4.
|
||||
|
||||
The measured macroscopic longitudinal polarization function is given as
|
||||
|
||||
\begin{equation}\label{eq:P_ZL}
|
||||
P_Z^{\rm L}(t, \Delta_{\rm L, ZF}, B, \nu) = \int_0^\infty P_Z^{\rm G}(t, \underbrace{r \cdot \Delta_{\rm L, ZF} }_{\Delta_{\rm G, ZF}}, B, \nu) \cdot \underbrace{\sqrt{\frac{2}{\pi}} \, \frac{1}{r^2}\, \exp\left(-\frac{1}{2 r^2}\right)}_{=: f(r)}\, dr,
|
||||
\end{equation}
|
||||
|
||||
\noindent where $P_Z^{\rm G}(t, \Delta_{\rm G, ZF}, B, \nu)$ is the ``local'' Gaussian dynamic LF function, $B$ the applied LF-field, $\nu$ the hopping frequency, and
|
||||
$$
|
||||
r = \frac{\Delta_{\rm G, ZF}}{\Delta_{\rm L, ZF}}.
|
||||
$$
|
||||
|
||||
\noindent The function $P_Z^{\rm L}(t, \Delta_{\rm L, ZF}, B=0, \nu=0)$ can exactly be calculated and the resulting ZF function is
|
||||
|
||||
\begin{equation}
|
||||
P_Z^{\rm L}(t, \Delta_{\rm L, ZF}, B=0, \nu=0) = \frac{1}{3} + \frac{2}{3} \left( 1 - \gamma_\mu \Delta_{\rm L, ZF}\cdot t \right) \cdot \exp(-\gamma_\mu \Delta_{\rm L, ZF}\cdot t ),
|
||||
\end{equation}
|
||||
whereas $P_Z^{\rm G}(t, \Delta_{\rm L, ZF}, B=0, \nu=0)$ is
|
||||
\begin{equation}
|
||||
P_Z^{\rm G}(t, \Delta_{\rm G, ZF}, B=0, \nu=0) = \frac{1}{3} + \frac{2}{3} \left( 1 - \left[\gamma_\mu \Delta_{\rm G, ZF}\cdot t\right]^2 \right) \cdot \exp(-1/2\, (\gamma_\mu \Delta_{\rm G, ZF}\cdot t)^2 ).
|
||||
\end{equation}
|
||||
|
||||
\noindent In its general form $P_Z^{\rm G}(t, \Delta_{\rm G, ZF}, B, \nu)$ cannot be calculated analytically. The numerical evaluation used in \texttt{musrfit} is following the time domain approach as given in \cite{DalmasDeReotier92}
|
||||
|
||||
\noindent Eq.(\ref{eq:P_ZL}) can be written as a generalized Riemann sum as
|
||||
\begin{equation}\label{eq:P_ZL_Riemann}
|
||||
P_Z^{\rm L}(t, \Delta_{\rm L, ZF}, B, \nu) \simeq \sum_k P_Z^{\rm G}(t, r_k \cdot \Delta_{\rm L, ZF}, B, \nu) \cdot
|
||||
\sqrt{\frac{2}{\pi}} \, \frac{1}{r_k^2}\, \exp\left(-\frac{1}{2 r_k^2}\right)\, \Delta r_k,
|
||||
\end{equation}
|
||||
where $\Delta r_k$ are \emph{non}-equidistant sampling intervals. $r_k$ are values somewhere within a sampling interval $\Delta r_k$.
|
||||
|
||||
\noindent To understand the following it is useful to have a look at $f(r)$ (see Eq.(\ref{eq:P_ZL}) and Fig.(\ref{fig:f_r})).
|
||||
\newpage
|
||||
\begin{figure}[h]
|
||||
\centering
|
||||
\includegraphics[width=0.7\textwidth]{f_r.pdf}
|
||||
\caption{}\label{fig:f_r}
|
||||
\end{figure}
|
||||
|
||||
\noindent This shows, that it will be important to have narrow enough $r$-intervals in the region from $0.2$ and $5.0$. The chosen sampling is given by the $r$-points
|
||||
\begin{eqnarray*}
|
||||
\vec{r} &=& (0.0, 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).
|
||||
\end{eqnarray*}
|
||||
The intervals are given by
|
||||
$$
|
||||
\Delta r_k = \vec{r}(k+1) - \vec{r}(k).
|
||||
$$
|
||||
|
||||
\noindent The calculation of $P_Z^{\rm G}(t, r \cdot \Delta_{\rm L, ZF}, B, \nu)$ is quite costly, and hence the following approach has been chosen. Within an $\Delta r_k$-Interval we approximate Eq.(\ref{eq:P_ZL_Riemann}) by
|
||||
|
||||
\begin{eqnarray}\label{eq:P_ZL_num}
|
||||
P_Z^{\rm L}(t, \Delta_{\rm L, ZF}, B, \nu) &\simeq& \sum_k P_Z^{\rm G}(t, r_k \cdot \Delta_{\rm L, ZF}, B, \nu) \cdot
|
||||
\sqrt{\frac{2}{\pi}} \, \int_{\vec{r}(k)}^{\vec{r}(k+1)} \frac{1}{r^2}\, \exp\left(-\frac{1}{2 r^2}\right)\, dr \nonumber \\
|
||||
&=& \sum_k P_Z^{\rm G}(t, r_k \cdot \Delta_{\rm L, ZF}, B, \nu) \cdot \left[ \erf\left(\frac{1}{\sqrt{2}\, \vec{r}(k)}\right) - \erf\left(\frac{1}{\sqrt{2}\, \vec{r}(k+1)}\right) \right],
|
||||
\end{eqnarray}
|
||||
where $\erf(\cdot)$ is the Gaussian error function.
|
||||
|
||||
\bibliographystyle{unsrt}
|
||||
\bibliography{dynamicGL_LF.bib}
|
||||
|
||||
\end{document}
|
19
src/external/LF_GL/docu/f_r.C
vendored
Normal file
19
src/external/LF_GL/docu/f_r.C
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
void f_r()
|
||||
{
|
||||
TCanvas *c1 = new TCanvas("c1", "c1", 800, 600);
|
||||
TF1 *fr = new TF1("fr", "TMath::Sqrt(2.0/TMath::Pi())*1.0/TMath::Power(x, 2.0)*TMath::Exp(-0.5/TMath::Power(x, 2.0))", 0.0, 10);
|
||||
fr->SetNpx(1500);
|
||||
fr->GetXaxis()->SetTitle("#it{r}");
|
||||
fr->GetXaxis()->SetTitleSize(0.05);
|
||||
fr->GetXaxis()->SetTitleOffset(0.8);
|
||||
fr->GetXaxis()->CenterTitle(kTRUE);
|
||||
fr->GetYaxis()->SetTitle("#it{f(r)}");
|
||||
fr->GetYaxis()->SetTitleSize(0.05);
|
||||
fr->GetYaxis()->SetTitleOffset(0.8);
|
||||
fr->GetYaxis()->CenterTitle(kTRUE);
|
||||
fr->SetTitle("");
|
||||
fr->SetLineColor(4);
|
||||
fr->Draw();
|
||||
|
||||
c1->SetGrid();
|
||||
}
|
BIN
src/external/LF_GL/docu/f_r.pdf
vendored
Normal file
BIN
src/external/LF_GL/docu/f_r.pdf
vendored
Normal file
Binary file not shown.
BIN
src/external/LF_GL/docu/psi_01_sp.pdf
vendored
Normal file
BIN
src/external/LF_GL/docu/psi_01_sp.pdf
vendored
Normal file
Binary file not shown.
298
src/external/LF_GL/main.cpp
vendored
Normal file
298
src/external/LF_GL/main.cpp
vendored
Normal file
@ -0,0 +1,298 @@
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
#include <numbers>
|
||||
|
||||
#include "PGKT_LF.h"
|
||||
#include "PLGKT_LF.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void lf_gl_syntax()
|
||||
{
|
||||
std::cout << std::endl;
|
||||
std::cout << "usage lg_gl [[-p field width hopp | -a width hopp] [-t tmax] -g [1|0] -o flnOut] | [-h]" << std::endl;
|
||||
std::cout << " -p: field in (G)" << std::endl;
|
||||
std::cout << " width in (1/us)" << std::endl;
|
||||
std::cout << " hopp in (1/us)" << std::endl;
|
||||
std::cout << " -a: width in (1/us)" << std::endl;
|
||||
std::cout << " hopp in (1/us)" << std::endl;
|
||||
std::cout << " -t: tmax in (us). Default: tmax=10 (us)." << std::endl;
|
||||
std::cout << " -g: 1=Gaussian LF data, 0=Gaussian averaged -> Lorentz LF data" << std::endl;
|
||||
std::cout << " -o: flnOut = output file name." << std::endl;
|
||||
std::cout << " -h: this help" << std::endl;
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>ZF Approximation for dynamic (LF geometry).
|
||||
* Gaussian approximation: Abragam function, A. Yaouanc and P. Dalmas, p. 123, Eq. (6.62)
|
||||
* Lorentzian approximation: A. Yaouanc and P. Dalmas, p. 130, Eq. (6.89)
|
||||
*
|
||||
* @param gaussian if true, Gaussian approximation, otherwise Lorentzian
|
||||
* @param param [0]: field = 0, [1]: width (1/us), [2]: hopp (1/us)
|
||||
* @param tmax calculate upto tmax
|
||||
* @param tt time vector
|
||||
* @param pol polarization vector
|
||||
*/
|
||||
void lf_zf_approx(const bool gaussian, const std::vector<double> ¶m,
|
||||
const double tmax, std::vector<double> &tt, std::vector<double> &pol)
|
||||
{
|
||||
tt.clear();
|
||||
pol.clear();
|
||||
double t=0, dval;
|
||||
do {
|
||||
tt.push_back(t);
|
||||
t += 0.001;
|
||||
if (gaussian) {
|
||||
dval = exp(-2.0*pow(param[1]/param[2], 2.0)*(exp(-param[2]*t)-1.0+param[2]*t));
|
||||
} else {
|
||||
dval = exp(-sqrt(4.0*pow(param[1]/param[2], 2.0)*(exp(-param[2]*t)-1.0+param[2]*t)));
|
||||
}
|
||||
pol.push_back(dval);
|
||||
} while (t <= tmax);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>write the polarization data to an ascii output file.
|
||||
*
|
||||
* @param fln filename
|
||||
* @param zf_approx true for ZF approximation functions, otherwise full integration
|
||||
* @param gaussian_only true for Gaussian, otherwise Gaussian/Lorentzian
|
||||
* @param param [0] field (G), [1] width (1/us), [2] hopp (1/us)
|
||||
* @param tt time vector
|
||||
* @param pol polarization vector
|
||||
*
|
||||
* @return 0 on success, > 0 otherwise
|
||||
*/
|
||||
int lf_gl_write(const std::string fln, const bool zf_approx,
|
||||
const bool gaussian_only,
|
||||
const std::vector<double> ¶m,
|
||||
const std::vector<double> &tt, const std::vector<double> &pol)
|
||||
{
|
||||
std::ofstream fout(fln, std::ofstream::out);
|
||||
|
||||
if (zf_approx)
|
||||
fout << "# ZF Approximation." << std::endl;
|
||||
if (gaussian_only)
|
||||
fout << "# Gaussian only" << std::endl;
|
||||
else
|
||||
fout << "# Gaussian/Lorentzian" << std::endl;
|
||||
fout << "# field=" << param[0] << " (G), width=" << param[1] << " (1/us), hopp=" << param[2] << " (1/us)" << std::endl;
|
||||
fout << "# t (us), pol" << std::endl;
|
||||
for (unsigned int i=0; i<tt.size(); i++) {
|
||||
fout << tt[i] << ", " << pol[i] << std::endl;
|
||||
}
|
||||
|
||||
fout.close();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
std::vector<double> param{0.0, 0.0, 0.0};
|
||||
double tmax{10.0};
|
||||
bool gaussian_only = false;
|
||||
bool zf_approx = false;
|
||||
std::string flnOut="";
|
||||
|
||||
if (argc < 8) {
|
||||
lf_gl_syntax();
|
||||
return 0;
|
||||
}
|
||||
double dval;
|
||||
std::size_t pos{0};
|
||||
for (int i=1; i<argc; i++) {
|
||||
if (!strcmp(argv[i], "-p")) {
|
||||
if (i+3 >= argc) {
|
||||
std::cout << std::endl;
|
||||
std::cout << "**ERROR** in handling parameters '-p'. Not enough input present." << std::endl;
|
||||
lf_gl_syntax();
|
||||
return 1;
|
||||
}
|
||||
try {
|
||||
dval = std::stod(argv[i+1], &pos);
|
||||
} catch (...) {
|
||||
std::cout << std::endl;
|
||||
std::cout << "**ERROR** in handling of field: '" << argv[i+1] << "'" << std::endl;
|
||||
lf_gl_syntax();
|
||||
return 1;
|
||||
}
|
||||
if (pos != strlen(argv[i+1])) {
|
||||
std::cout << std::endl;
|
||||
std::cout << "**ERROR** in handling of field: '" << argv[i+1] << "'" << std::endl;
|
||||
lf_gl_syntax();
|
||||
return 1;
|
||||
}
|
||||
param[0] = dval;
|
||||
try {
|
||||
dval = std::stod(argv[i+2], &pos);
|
||||
} catch (...) {
|
||||
std::cout << std::endl;
|
||||
std::cout << "**ERROR** in handling of width." << std::endl;
|
||||
lf_gl_syntax();
|
||||
return 1;
|
||||
}
|
||||
if (pos != strlen(argv[i+2])) {
|
||||
std::cout << std::endl;
|
||||
std::cout << "**ERROR** in handling of field: '" << argv[i+1] << "'" << std::endl;
|
||||
lf_gl_syntax();
|
||||
return 1;
|
||||
}
|
||||
param[1] = dval;
|
||||
try {
|
||||
dval = std::stod(argv[i+3], &pos);
|
||||
} catch (...) {
|
||||
std::cout << std::endl;
|
||||
std::cout << "**ERROR** in handling of hopp." << std::endl;
|
||||
lf_gl_syntax();
|
||||
return 1;
|
||||
}
|
||||
if (pos != strlen(argv[i+3])) {
|
||||
std::cout << std::endl;
|
||||
std::cout << "**ERROR** in handling of field: '" << argv[i+1] << "'" << std::endl;
|
||||
lf_gl_syntax();
|
||||
return 1;
|
||||
}
|
||||
param[2] = dval;
|
||||
i += 3;
|
||||
} else if (!strcmp(argv[i], "-a")) {
|
||||
if (i+2 >= argc) {
|
||||
std::cout << std::endl;
|
||||
std::cout << "**ERROR** in handling parameters for '-a'. Not enough input present." << std::endl;
|
||||
lf_gl_syntax();
|
||||
return 1;
|
||||
}
|
||||
param[0] = 0; // ZF approximation
|
||||
try {
|
||||
dval = std::stod(argv[i+1], &pos);
|
||||
} catch (...) {
|
||||
std::cout << std::endl;
|
||||
std::cout << "**ERROR** in handling of width." << std::endl;
|
||||
lf_gl_syntax();
|
||||
return 1;
|
||||
}
|
||||
if (pos != strlen(argv[i+1])) {
|
||||
std::cout << std::endl;
|
||||
std::cout << "**ERROR** in handling of field: '" << argv[i+1] << "'" << std::endl;
|
||||
lf_gl_syntax();
|
||||
return 1;
|
||||
}
|
||||
param[1] = dval;
|
||||
try {
|
||||
dval = std::stod(argv[i+2], &pos);
|
||||
} catch (...) {
|
||||
std::cout << std::endl;
|
||||
std::cout << "**ERROR** in handling of hopp." << std::endl;
|
||||
lf_gl_syntax();
|
||||
return 1;
|
||||
}
|
||||
if (pos != strlen(argv[i+2])) {
|
||||
std::cout << std::endl;
|
||||
std::cout << "**ERROR** in handling of field: '" << argv[i+1] << "'" << std::endl;
|
||||
lf_gl_syntax();
|
||||
return 1;
|
||||
}
|
||||
param[2] = dval;
|
||||
i += 2;
|
||||
zf_approx = true;
|
||||
} else if (!strcmp(argv[i], "-t")) {
|
||||
if (i+1 >= argc) {
|
||||
std::cout << std::endl;
|
||||
std::cout << "**ERROR** in handling option -g. Not enough input present." << std::endl;
|
||||
lf_gl_syntax();
|
||||
return 1;
|
||||
}
|
||||
try {
|
||||
dval = std::stod(argv[i+1], &pos);
|
||||
} catch (...) {
|
||||
std::cout << std::endl;
|
||||
std::cout << "**ERROR** in handling of tmax." << std::endl;
|
||||
lf_gl_syntax();
|
||||
return 1;
|
||||
}
|
||||
if (pos != strlen(argv[i+1])) {
|
||||
std::cout << std::endl;
|
||||
std::cout << "**ERROR** in handling of field: '" << argv[i+1] << "'" << std::endl;
|
||||
lf_gl_syntax();
|
||||
return 1;
|
||||
}
|
||||
tmax = dval;
|
||||
i++;
|
||||
} else if (!strcmp(argv[i], "-g")) {
|
||||
if (i+1 >= argc) {
|
||||
std::cout << std::endl;
|
||||
std::cout << "**ERROR** in handling option -g. Not enough input present." << std::endl;
|
||||
lf_gl_syntax();
|
||||
return 1;
|
||||
}
|
||||
if (!strcmp(argv[i+1], "1")) {
|
||||
gaussian_only = true;
|
||||
} else if (!strcmp(argv[i+1], "0")) {
|
||||
gaussian_only = false;
|
||||
} else {
|
||||
std::cout << std::endl;
|
||||
std::cout << "**ERROR** in handling option -g." << std::endl;
|
||||
lf_gl_syntax();
|
||||
return 1;
|
||||
}
|
||||
i++;
|
||||
} else if (!strcmp(argv[i], "-o")) {
|
||||
if (i+1 >= argc) {
|
||||
std::cout << std::endl;
|
||||
std::cout << "**ERROR** in handling option -o. file name missing?" << std::endl;
|
||||
lf_gl_syntax();
|
||||
return 1;
|
||||
}
|
||||
flnOut = std::string(argv[i+1]);
|
||||
}
|
||||
}
|
||||
|
||||
if (flnOut == "") {
|
||||
std::cout << std::endl;
|
||||
std::cout << "**ERROR** missing output file name." << std::endl;
|
||||
lf_gl_syntax();
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::cout << "param: " << param[0] << ", " << param[1] << ", " << param[2] << std::endl;
|
||||
if (gaussian_only)
|
||||
std::cout << "Gaussian LF only" << std::endl;
|
||||
else
|
||||
std::cout << "Gaussian averaged -> Lorentz LF" << std::endl;
|
||||
std::cout << "ZF Approx: " << zf_approx << std::endl;
|
||||
std::cout << "flnOut: " << flnOut << std::endl;
|
||||
|
||||
std::vector<double> tt;
|
||||
std::vector<double> pol;
|
||||
if (zf_approx) {
|
||||
lf_zf_approx(gaussian_only, param, tmax, tt, pol);
|
||||
} else { // full calculation
|
||||
if (gaussian_only) {
|
||||
PGKT_LF gkt_lf(param, tmax);
|
||||
if (!gkt_lf.IsValid()) {
|
||||
std::cout << "**ERROR** in Gaussian LF calculation" << std::endl;
|
||||
return 2;
|
||||
}
|
||||
tt = gkt_lf.GetTime();
|
||||
pol = gkt_lf.GetPol();
|
||||
} else {
|
||||
PLGKT_LF lgkt_lf(param, tmax);
|
||||
if (!lgkt_lf.IsValid()) {
|
||||
std::cout << "**ERROR** in Gaussian/Lorentzian LF calculation" << std::endl;
|
||||
return 2;
|
||||
}
|
||||
tt = lgkt_lf.GetTime();
|
||||
pol = lgkt_lf.GetPol();
|
||||
}
|
||||
}
|
||||
|
||||
lf_gl_write(flnOut, zf_approx, gaussian_only, param, tt, pol);
|
||||
|
||||
return 0;
|
||||
}
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2011-2024 by Andreas Suter *
|
||||
* Copyright (C) 2011-2025 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) 2011-2024 by Andreas Suter *
|
||||
* Copyright (C) 2011-2025 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) 2011-2024 by Andreas Suter *
|
||||
* Copyright (C) 2011-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
2
src/external/MagProximity/PMagProximity.h
vendored
2
src/external/MagProximity/PMagProximity.h
vendored
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2011-2024 by Andreas Suter *
|
||||
* Copyright (C) 2011-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
@ -10,7 +10,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2011-2024 by Andreas Suter *
|
||||
* Copyright (C) 2011-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2009-2025 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) 2011-2024 by Andreas Suter *
|
||||
* Copyright (C) 2011-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
2
src/external/MusrRoot/CMakeLists.txt
vendored
2
src/external/MusrRoot/CMakeLists.txt
vendored
@ -22,7 +22,7 @@ set(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
set(exec_prefix "\$\{prefix\}")
|
||||
set(libdir "\$\{exec_prefix\}/lib")
|
||||
set(includedir "\$\{prefix\}/include")
|
||||
set(MUSR_ROOT_VERSION "1.0.0")
|
||||
set(MUSR_ROOT_VERSION "1.1.0")
|
||||
set(MUSR_ROOT_LIBRARY_NAME "TMusrRunHeader")
|
||||
configure_file("TMusrRunHeader.pc.in" "TMusrRunHeader.pc" @ONLY)
|
||||
|
||||
|
35
src/external/MusrRoot/TMusrRunHeader.cpp
vendored
35
src/external/MusrRoot/TMusrRunHeader.cpp
vendored
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -395,6 +395,23 @@ Bool_t TMusrRunHeader::FillFolder(TFolder *folder)
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// FillDirectory (public)
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Fills the RunHeader directory. This is needed to write it to a ROOT file.
|
||||
* It walks through all information and attaches it to the directory or replaces
|
||||
* it, if it is already present.
|
||||
*
|
||||
* \param dir to be filled
|
||||
*/
|
||||
Bool_t TMusrRunHeader::FillDirectory(TDirectoryFile *dir)
|
||||
{
|
||||
// NOT YET IMPLEMENTED
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GetTypeOfPath (public)
|
||||
//--------------------------------------------------------------------------
|
||||
@ -873,6 +890,22 @@ Bool_t TMusrRunHeader::ExtractAll(TFolder *folder)
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// ExtractAll (public)
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Reads all data from an open ROOT-file structure and feeds all the necessary
|
||||
* internal data objects.
|
||||
*
|
||||
* \param dir
|
||||
*/
|
||||
Bool_t TMusrRunHeader::ExtractAll(TDirectoryFile *dir)
|
||||
{
|
||||
// NOT YET IMPLEMENTED
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// ExtractHeaderInformation (public)
|
||||
//--------------------------------------------------------------------------
|
||||
|
5
src/external/MusrRoot/TMusrRunHeader.h
vendored
5
src/external/MusrRoot/TMusrRunHeader.h
vendored
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -38,6 +38,7 @@
|
||||
#include <TObjString.h>
|
||||
#include <TObjArray.h>
|
||||
#include <TFolder.h>
|
||||
#include <TDirectoryFile.h>
|
||||
|
||||
#define MRH_UNDEFINED -9.99e99
|
||||
|
||||
@ -129,8 +130,10 @@ public:
|
||||
virtual TString GetFileName() { return fFileName; }
|
||||
|
||||
virtual Bool_t FillFolder(TFolder *folder);
|
||||
virtual Bool_t FillDirectory(TDirectoryFile *dir);
|
||||
|
||||
virtual Bool_t ExtractAll(TFolder *folder);
|
||||
virtual Bool_t ExtractAll(TDirectoryFile *folder);
|
||||
virtual Bool_t ExtractHeaderInformation(TObjArray *headerInfo, TString path);
|
||||
|
||||
virtual TString GetTypeOfPath(TString pathName);
|
||||
|
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
2
src/external/Nonlocal/PNL_PippardFitter.cpp
vendored
2
src/external/Nonlocal/PNL_PippardFitter.cpp
vendored
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009-2024 by Andreas Suter *
|
||||
* Copyright (C) 2009-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
2
src/external/Nonlocal/PNL_PippardFitter.h
vendored
2
src/external/Nonlocal/PNL_PippardFitter.h
vendored
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009-2024 by Andreas Suter *
|
||||
* Copyright (C) 2009-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2009-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
2
src/external/Nonlocal/PNL_StartupHandler.cpp
vendored
2
src/external/Nonlocal/PNL_StartupHandler.cpp
vendored
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009-2024 by Andreas Suter *
|
||||
* Copyright (C) 2009-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
2
src/external/Nonlocal/PNL_StartupHandler.h
vendored
2
src/external/Nonlocal/PNL_StartupHandler.h
vendored
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009-2024 by Andreas Suter *
|
||||
* Copyright (C) 2009-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2009-2025 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-2024 by Andreas Suter *
|
||||
* Copyright (C) 2009-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
3
src/external/libCuba/src/common/stddecl.h
vendored
3
src/external/libCuba/src/common/stddecl.h
vendored
@ -16,6 +16,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
@ -324,7 +325,7 @@ if( fail == 0 && (t)->statefile && KEEPFILE == 0 ) unlink((t)->statefile)
|
||||
#define Extern extern "C"
|
||||
#else
|
||||
#define Extern extern
|
||||
typedef enum { false, true } bool;
|
||||
//typedef enum { false, true } bool;
|
||||
#endif
|
||||
|
||||
typedef const char cchar;
|
||||
|
@ -13,7 +13,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008-2024 by Bastian M. Wojek, Andreas Suter *
|
||||
* Copyright (C) 2008-2025 by Bastian M. Wojek, Andreas Suter *
|
||||
* *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
2
src/external/libGbGLF/PGbGLF.cpp
vendored
2
src/external/libGbGLF/PGbGLF.cpp
vendored
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
2
src/external/libGbGLF/PGbGLF.h
vendored
2
src/external/libGbGLF/PGbGLF.h
vendored
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||
* Copyright (C) 2007-2025 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
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