Compare commits
51 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bface6bf1e | |||
| e3c2149847 | |||
| f3414f687c | |||
| 44aacfca50 | |||
| 173d20f05e | |||
| ccc1dda352 | |||
| b4c7780ff5 | |||
| 2ba6e8a230 | |||
| 43b4566870 | |||
| b1ffba391a | |||
| 804c56fd1f | |||
| ae7f1a2168 | |||
| 3f2e96303a | |||
| 1b190830e9 | |||
| 7b19ba8b36 | |||
| 137a3f17c9 | |||
| 7e830a0c12 | |||
| e0ec00deab | |||
| 06d20d4086 | |||
| 56820e498f | |||
| eefc49bd25 | |||
| 0625bc008f | |||
|
|
f47fdf7e54 | ||
| 4aa903b879 | |||
| 57596ca441 | |||
| 5361727583 | |||
| 9a92ec2d8e | |||
| 17a31dfcc4 | |||
| 9cc1957b2d | |||
| faffaec6ac | |||
| 3cc36bcb6d | |||
| a3bcbefebe | |||
| a13ee27b9a | |||
| 27fe3ff5fd | |||
| fdc9ac8e7e | |||
| c85a12b61e | |||
| 06389416a6 | |||
| 3a1247e3ec | |||
| c5e5bddd10 | |||
| c44ae75e15 | |||
| d682004467 | |||
| 7486637998 | |||
| c75427513f | |||
| a34e9fe535 | |||
| 01ff382972 | |||
| 7ff3391d61 | |||
| c6602fb541 | |||
| 8274fb9d54 | |||
| 4f0590fe10 | |||
| 4f2041c141 | |||
| df03277c4c |
@@ -1,11 +1,7 @@
|
||||
# - musrfit
|
||||
cmake_minimum_required(VERSION 3.9)
|
||||
# - musrfit
|
||||
cmake_minimum_required(VERSION 3.17)
|
||||
|
||||
if (CMAKE_VERSION GREATER_EQUAL 3.12)
|
||||
cmake_policy(SET CMP0075 NEW)
|
||||
endif (CMAKE_VERSION GREATER_EQUAL 3.12)
|
||||
|
||||
project(musrfit VERSION 1.7.5 LANGUAGES C CXX)
|
||||
project(musrfit VERSION 1.8.1 LANGUAGES C CXX)
|
||||
|
||||
#--- musrfit specific options -------------------------------------------------
|
||||
option(nexus "build optional NeXus support. Needed for ISIS" OFF)
|
||||
@@ -21,7 +17,7 @@ set_property(CACHE qt_version PROPERTY STRINGS AUTO 3 4 5 6)
|
||||
|
||||
#--- 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
|
||||
@@ -35,7 +31,7 @@ endif ()
|
||||
|
||||
#--- the next two lines are needed that the math functions are found ----------
|
||||
set(CMAKE_REQUIRED_INCLUDES math.h)
|
||||
set(CMAKE_REQUIRED_LIBRARIES m)
|
||||
set(CMAKE_REQUIRED_LIBRARIES m)
|
||||
|
||||
include(CheckTypeSize)
|
||||
include(CheckIncludeFiles)
|
||||
@@ -84,17 +80,17 @@ if (ROOT_mathmore_FOUND)
|
||||
endif (ROOT_mathmore_FOUND)
|
||||
|
||||
#--- the next check is need to set a flag, since root 6.24 (minuit2) breaks
|
||||
#--- the backwards compatibility. ---------------------------------------------
|
||||
#--- the backwards compatibility. ---------------------------------------------
|
||||
if (ROOT_VERSION VERSION_LESS "6.23")
|
||||
set(ROOT_GRTEQ_24 0)
|
||||
else ()
|
||||
else ()
|
||||
set(ROOT_GRTEQ_24 1)
|
||||
endif ()
|
||||
set(ROOT_GRTEQ_24 ${ROOT_GRTEQ_24} CACHE INTERNAL "ROOT Version check")
|
||||
|
||||
#--- check for boost ----------------------------------------------------------
|
||||
find_package(Boost REQUIRED
|
||||
COMPONENTS
|
||||
COMPONENTS
|
||||
system
|
||||
filesystem
|
||||
)
|
||||
@@ -105,12 +101,6 @@ find_package(GSL REQUIRED)
|
||||
|
||||
#--- check for fftw3 ----------------------------------------------------------
|
||||
find_package(FFTW3 REQUIRED)
|
||||
if (FFTW3_THREAD_FOUND)
|
||||
set(HAVE_LIBFFTW3_THREADS 1 CACHE INTERNAL "fftw3_threads are available")
|
||||
endif (FFTW3_THREAD_FOUND)
|
||||
if (FFTW3F_THREAD_FOUND)
|
||||
set(HAVE_LIBFFTW3F_THREADS 1 CACHE INTERNAL "fftw3f_threads are available")
|
||||
endif (FFTW3F_THREAD_FOUND)
|
||||
|
||||
#--- check for libxml2 --------------------------------------------------------
|
||||
find_package(LibXml2 REQUIRED)
|
||||
@@ -135,7 +125,7 @@ if (qt_based_tools)
|
||||
find_package(Qt6Xml CONFIG REQUIRED)
|
||||
find_package(Qt6Network CONFIG REQUIRED)
|
||||
find_package(Qt6Svg CONFIG REQUIRED)
|
||||
find_package(Qt6PrintSupport CONFIG REQUIRED)
|
||||
find_package(Qt6PrintSupport CONFIG REQUIRED)
|
||||
endif (Qt6Core_FOUND)
|
||||
# try Qt5
|
||||
if (NOT Qt6Core_FOUND)
|
||||
@@ -209,7 +199,7 @@ endif (qt_based_tools)
|
||||
if (nexus)
|
||||
find_package(HDF5 COMPONENTS CXX REQUIRED )
|
||||
find_package(HDF4 REQUIRED)
|
||||
find_package(NeXus REQUIRED)
|
||||
find_package(NEXUS REQUIRED)
|
||||
add_definitions(-DPNEXUS_ENABLED)
|
||||
endif (nexus)
|
||||
|
||||
@@ -232,7 +222,7 @@ endif ()
|
||||
#--- propagate to the sub-directories -----------------------------------------
|
||||
add_subdirectory(src)
|
||||
|
||||
#--- write summary of the installation
|
||||
#--- write summary of the installation
|
||||
message("")
|
||||
message("|-----------------------------------------------------------------------|")
|
||||
message("| |")
|
||||
@@ -249,7 +239,7 @@ message("")
|
||||
message(" Requirements:")
|
||||
message(" -------------")
|
||||
message("")
|
||||
message(" FFTW3 found in ${FFTW3_INCLUDE_DIR}")
|
||||
message(" FFTW3 found in ${FFTW3_INCLUDE}")
|
||||
message(" GSL found in ${GSL_INCLUDE_DIRS}")
|
||||
message(" BOOST found in ${Boost_INCLUDE_DIRS}")
|
||||
message(" LibXML2 found in ${LIBXML2_INCLUDE_DIR}")
|
||||
@@ -264,14 +254,14 @@ endif (OpenMP_FOUND)
|
||||
|
||||
if (nexus)
|
||||
message("")
|
||||
message(" HDF4 found in ${HDF4_INCLUDE_DIRS}")
|
||||
message(" HDF4 found in ${HDF4_INCLUDE_DIRS}")
|
||||
message(" HDF5 found in ${HDF5_INCLUDE_DIRS}")
|
||||
message(" NeXus found in ${NEXUS_INCLUDE_DIR}")
|
||||
message(" NeXus found in ${NEXUS_INCLUDE_DIR}")
|
||||
endif (nexus)
|
||||
|
||||
message("")
|
||||
if (qt_based_tools)
|
||||
if (Qt6Core_FOUND)
|
||||
if (Qt6Core_FOUND)
|
||||
message(" Qt found in ${Qt6Core_INCLUDE_DIRS} (Version: ${Qt6Core_VERSION})")
|
||||
else (Qt6Core_FOUND)
|
||||
if (Qt5Core_FOUND)
|
||||
@@ -363,8 +353,8 @@ message("-----------------------------------------------------------------------
|
||||
message("")
|
||||
|
||||
#--- cpack specific info ......................................................
|
||||
file(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR} PROJECT_SOURCE_DIR_NATIVE)
|
||||
file(TO_NATIVE_PATH ${PROJECT_BINARY_DIR} PROJECT_BINARY_DIR_NATIVE)
|
||||
file(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR} PROJECT_SOURCE_DIR_NATIVE)
|
||||
file(TO_NATIVE_PATH ${PROJECT_BINARY_DIR} PROJECT_BINARY_DIR_NATIVE)
|
||||
string(REPLACE "\\" "\\\\" PROJECT_SOURCE_DIR_NATIVE_D ${PROJECT_SOURCE_DIR_NATIVE})
|
||||
string(REPLACE "\\" "\\\\" PROJECT_BINARY_DIR_NATIVE_D ${PROJECT_BINARY_DIR_NATIVE})
|
||||
|
||||
|
||||
17
ChangeLog
@@ -12,6 +12,23 @@ or
|
||||
|
||||
https://bitbucket.org/muonspin/musrfit/commits/all
|
||||
|
||||
Release of V1.8.0, 2022/05/22
|
||||
=============================
|
||||
|
||||
new: addRun - allows to add runs and write it to file
|
||||
refactoring of Class_MuSR_PSI: (i) class variables and methods renamed according to ROOT
|
||||
rules. (ii) start to modernize to newer c++ standards.
|
||||
|
||||
Release of V1.7.6, 2021/10/02
|
||||
=============================
|
||||
|
||||
new: choose number of threads from the commandline for OpenMP.
|
||||
|
||||
Release of V1.7.5, 2021/09/22
|
||||
=============================
|
||||
|
||||
make sure that phases stay within +-360 degrees.
|
||||
|
||||
Release of V1.7.4, 2021/06/16
|
||||
=============================
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# - Find fftw3 library
|
||||
# Find the native FFTW3 includes and library
|
||||
# This module defines
|
||||
# FFTW3_INCLUDE_DIR, where to find fftw3.h, etc.
|
||||
# FFTW3_INCLUDE, where to find fftw3.h, etc.
|
||||
# ---
|
||||
# FFTW3_LIBRARY, library to link against to use FFTW3
|
||||
# FFTW3_OMP_LIBRARY, library to link against to use FFTW3_omp
|
||||
@@ -31,17 +31,53 @@
|
||||
# FFTW3Q_OMP_FOUND, if false, do not try to use OpenMP FFTW3q.
|
||||
# FFTW3Q_THREADS_FOUND, if false, do not try to use threaded FFTW3q.
|
||||
|
||||
find_path(FFTW3_INCLUDE_DIR fftw3.h
|
||||
function(add_imported_library lib_name library headers)
|
||||
add_library(FFTW3::${lib_name} UNKNOWN IMPORTED)
|
||||
set_target_properties(FFTW3::${lib_name} PROPERTIES
|
||||
IMPORTED_LOCATION ${library}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${headers}
|
||||
)
|
||||
set(${lib_name}_FOUND 1 CACHE INTERNAL "FFTW3 ${lib_name} found" FORCE)
|
||||
set(${lib_name}_LIBRARY ${library}
|
||||
CACHE STRING "Path to FFTW3::${lib_name} library" FORCE)
|
||||
set(FFTW3_INCLUDE ${headers}
|
||||
CACHE STRING "Path to FFTW3 headers" FORCE)
|
||||
mark_as_advanced(FORCE ${lib_name}_LIBRARY)
|
||||
mark_as_advanced(FORCE FFTW3_INCLUDE)
|
||||
endfunction()
|
||||
|
||||
#as35 if (FFTW3_LIBRARY AND FFTW3_INCLUDE)
|
||||
#as35 add_imported_library(${FFTW3_LIBRARY} ${FFTW3_INCLUDE})
|
||||
#as35 if (FFTW3_OMP_LIBRARY AND FFTW3_INCLUDE)
|
||||
#as35 add_imported_library(${FFTW3_OMP_LIBRARY} ${FFTW3_INCLUDE})
|
||||
#as35 elseif (FFTW3_THREAD_LIBRARY AND FFTW3_INCLUDE)
|
||||
#as35 add_imported_library(${FFTW3_THRED_LIBRARY} ${FFTW3_INCLUDE})
|
||||
#as35 elseif (FFTW3L_LIBRARY AND FFTW3_INCLUDE)
|
||||
#as35 add_imported_library(${FFTW3L_LIBRARY} ${FFTW3_INCLUDE})
|
||||
#as35 elseif (FFTW3L_OMP_LIBRARY AND FFTW3_INCLUDE)
|
||||
#as35 add_imported_library(${FFTW3L_OMP_LIBRARY} ${FFTW3_INCLUDE})
|
||||
#as35 elseif (FFTW3L_THREAD_LIBRARY AND FFTW3_INCLUDE)
|
||||
#as35 add_imported_library(${FFTW3L_THRED_LIBRARY} ${FFTW3_INCLUDE})
|
||||
#as35 elseif (FFTW3F_LIBRARY AND FFTW3_INCLUDE)
|
||||
#as35 add_imported_library(${FFTW3F_LIBRARY} ${FFTW3_INCLUDE})
|
||||
#as35 elseif (FFTW3F_OMP_LIBRARY AND FFTW3_INCLUDE)
|
||||
#as35 add_imported_library(${FFTW3F_OMP_LIBRARY} ${FFTW3_INCLUDE})
|
||||
#as35 elseif (FFTW3F_THREAD_LIBRARY AND FFTW3_INCLUDE)
|
||||
#as35 add_imported_library(${FFTW3F_THRED_LIBRARY} ${FFTW3_INCLUDE})
|
||||
#as35 elseif (FFTW3Q_LIBRARY AND FFTW3_INCLUDE)
|
||||
#as35 add_imported_library(${FFTW3Q_LIBRARY} ${FFTW3_INCLUDE})
|
||||
#as35 elseif (FFTW3Q_OMP_LIBRARY AND FFTW3_INCLUDE)
|
||||
#as35 add_imported_library(${FFTW3Q_OMP_LIBRARY} ${FFTW3_INCLUDE})
|
||||
#as35 elseif (FFTW3Q_THREAD_LIBRARY AND FFTW3_INCLUDE)
|
||||
#as35 add_imported_library(${FFTW3Q_THRED_LIBRARY} ${FFTW3_INCLUDE})
|
||||
#as35 endif()
|
||||
#as35 return()
|
||||
#as35 endif()
|
||||
|
||||
find_path(FFTW3_INCLUDE NAMES fftw3.h
|
||||
HINTS "/usr/include" "/opt/local/include"
|
||||
)
|
||||
|
||||
# find position of fftw3.h from the end
|
||||
string(FIND "${FFTW3_INCLUDE_DIR}" "/fftw3.h" pos REVERSE)
|
||||
# truncate the string
|
||||
string(SUBSTRING "${FFTW3_INCLUDE_DIR}" 0 ${pos} substr)
|
||||
set(FFTW3_INCLUDE_DIR ${substr})
|
||||
unset(substr)
|
||||
|
||||
find_library(FFTW3_LIBRARY fftw3)
|
||||
find_library(FFTW3_OMP_LIBRARY fftw3_omp)
|
||||
find_library(FFTW3_THREAD_LIBRARY fftw3_threads)
|
||||
@@ -58,94 +94,126 @@ find_library(FFTW3Q_THREAD_LIBRARY fftw3q_threads)
|
||||
# handle the QUIETLY and REQUIRED arguments and set FFTW3_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
|
||||
|
||||
# FFTW3
|
||||
find_package_handle_standard_args(FFTW3
|
||||
REQUIRED_VARS FFTW3_LIBRARY FFTW3_INCLUDE_DIR
|
||||
VERSION_VAR "3")
|
||||
DEFAULT_MSG FFTW3_LIBRARY FFTW3_INCLUDE
|
||||
)
|
||||
if (FFTW3_FOUND)
|
||||
add_imported_library("FFTW3" "${FFTW3_LIBRARY}" "${FFTW3_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# FFTW3_OMP
|
||||
find_package_handle_standard_args(FFTW3_OMP
|
||||
REQUIRED_VARS FFTW3_OMP_LIBRARY FFTW3_INCLUDE_DIR
|
||||
VERSION_VAR "3")
|
||||
REQUIRED_VARS FFTW3_OMP_LIBRARY FFTW3_INCLUDE
|
||||
HANDLE_COMPONENTS
|
||||
NAME_MISMATCHED
|
||||
)
|
||||
if (FFTW3_OMP_FOUND)
|
||||
add_imported_library("FFTW3_OMP" "${FFTW3_OMP_LIBRARY}" "${FFTW3_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# FFTW3_THREAD
|
||||
find_package_handle_standard_args(FFTW3_THREAD
|
||||
REQUIRED_VARS FFTW3_THREAD_LIBRARY FFTW3_INCLUDE_DIR
|
||||
VERSION_VAR "3")
|
||||
REQUIRED_VARS FFTW3_THREAD_LIBRARY FFTW3_INCLUDE
|
||||
HANDLE_COMPONENTS
|
||||
NAME_MISMATCHED
|
||||
)
|
||||
if (FFTW3_THREAD_FOUND)
|
||||
add_imported_library("FFTW3_THREAD" "${FFTW3_THREAD_LIBRARY}" "${FFTW3_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# FFTW3L
|
||||
find_package_handle_standard_args(FFTW3L
|
||||
REQUIRED_VARS FFTW3L_LIBRARY FFTW3_INCLUDE_DIR
|
||||
VERSION_VAR "3")
|
||||
REQUIRED_VARS FFTW3L_LIBRARY FFTW3_INCLUDE
|
||||
HANDLE_COMPONENTS
|
||||
NAME_MISMATCHED
|
||||
)
|
||||
if (FFTW3L_FOUND)
|
||||
add_imported_library("FFTW3L" "${FFTW3L_LIBRARY}" "${FFTW3_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# FFTW3L_OMP
|
||||
find_package_handle_standard_args(FFTW3L_OMP
|
||||
REQUIRED_VARS FFTW3L_OMP_LIBRARY FFTW3_INCLUDE_DIR
|
||||
VERSION_VAR "3")
|
||||
REQUIRED_VARS FFTW3L_OMP_LIBRARY FFTW3_INCLUDE
|
||||
HANDLE_COMPONENTS
|
||||
NAME_MISMATCHED
|
||||
)
|
||||
if (FFTW3L_OMP_FOUND)
|
||||
add_imported_library("FFTW3L_OMP" "${FFTW3L_OMP_LIBRARY}" "${FFTW3_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# FFTW3L_THREAD
|
||||
find_package_handle_standard_args(FFTW3L_THREAD
|
||||
REQUIRED_VARS FFTW3L_THREAD_LIBRARY FFTW3_INCLUDE_DIR
|
||||
VERSION_VAR "3")
|
||||
REQUIRED_VARS FFTW3L_THREAD_LIBRARY FFTW3_INCLUDE
|
||||
HANDLE_COMPONENTS
|
||||
NAME_MISMATCHED
|
||||
)
|
||||
if (FFTW3L_THREAD_FOUND)
|
||||
add_imported_library("FFTW3L_THREAD" "${FFTW3L_THREAD_LIBRARY}" "${FFTW3_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# FFTW3F
|
||||
find_package_handle_standard_args(FFTW3F
|
||||
REQUIRED_VARS FFTW3F_LIBRARY FFTW3_INCLUDE_DIR
|
||||
VERSION_VAR "3")
|
||||
REQUIRED_VARS FFTW3F_LIBRARY FFTW3_INCLUDE
|
||||
HANDLE_COMPONENTS
|
||||
NAME_MISMATCHED
|
||||
)
|
||||
if (FFTW3F_FOUND)
|
||||
add_imported_library("FFTW3F" "${FFTW3F_LIBRARY}" "${FFTW3_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# FFTW3F_OMP
|
||||
find_package_handle_standard_args(FFTW3F_OMP
|
||||
REQUIRED_VARS FFTW3F_OMP_LIBRARY FFTW3_INCLUDE_DIR
|
||||
VERSION_VAR "3")
|
||||
REQUIRED_VARS FFTW3F_OMP_LIBRARY FFTW3_INCLUDE
|
||||
HANDLE_COMPONENTS
|
||||
NAME_MISMATCHED
|
||||
)
|
||||
if (FFTW3F_OMP_FOUND)
|
||||
add_imported_library("FFTW3F_OMP" "${FFTW3F_OMP_LIBRARY}" "${FFTW3_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# FFTW3F_THREAD
|
||||
find_package_handle_standard_args(FFTW3F_THREAD
|
||||
REQUIRED_VARS FFTW3F_THREAD_LIBRARY FFTW3_INCLUDE_DIR
|
||||
VERSION_VAR "3")
|
||||
REQUIRED_VARS FFTW3F_THREAD_LIBRARY FFTW3_INCLUDE
|
||||
HANDLE_COMPONENTS
|
||||
NAME_MISMATCHED
|
||||
)
|
||||
if (FFTW3F_THREAD_FOUND)
|
||||
add_imported_library("FFTW3F_THREAD" "${FFTW3F_THREAD_LIBRARY}" "${FFTW3_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# FFTW3Q
|
||||
find_package_handle_standard_args(FFTW3Q
|
||||
REQUIRED_VARS FFTW3Q_LIBRARY FFTW3_INCLUDE_DIR
|
||||
VERSION_VAR "3")
|
||||
REQUIRED_VARS FFTW3Q_LIBRARY FFTW3_INCLUDE
|
||||
HANDLE_COMPONENTS
|
||||
NAME_MISMATCHED
|
||||
)
|
||||
if (FFTW3Q_FOUND)
|
||||
add_imported_library("FFTW3Q" "${FFTW3Q_LIBRARY}" "${FFTW3_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# FFTW3Q_OMP
|
||||
find_package_handle_standard_args(FFTW3Q_OMP
|
||||
REQUIRED_VARS FFTW3Q_OMP_LIBRARY FFTW3_INCLUDE_DIR
|
||||
VERSION_VAR "3")
|
||||
REQUIRED_VARS FFTW3Q_OMP_LIBRARY FFTW3_INCLUDE
|
||||
HANDLE_COMPONENTS
|
||||
NAME_MISMATCHED
|
||||
)
|
||||
if (FFTW3Q_OMP_FOUND)
|
||||
add_imported_library("FFTW3Q_OMP" "${FFTW3Q_OMP_LIBRARY}" "${FFTW3_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# FFTW3Q_THREAD
|
||||
find_package_handle_standard_args(FFTW3Q_THREAD
|
||||
REQUIRED_VARS FFTW3Q_THREAD_LIBRARY FFTW3_INCLUDE_DIR
|
||||
VERSION_VAR "3")
|
||||
|
||||
if (NOT FFTW3_FOUND)
|
||||
unset(FFTW3_LIBRARY)
|
||||
endif()
|
||||
if (NOT FFTW3_OMP_FOUND)
|
||||
unset(FFTW3_OMP_LIBRARY)
|
||||
endif()
|
||||
if (NOT FFTW3_THREAD_FOUND)
|
||||
unset(FFTW3_THREAD_LIBRARY)
|
||||
REQUIRED_VARS FFTW3Q_THREAD_LIBRARY FFTW3_INCLUDE
|
||||
HANDLE_COMPONENTS
|
||||
NAME_MISMATCHED
|
||||
)
|
||||
if (FFTW3Q_THREAD_FOUND)
|
||||
add_imported_library("FFTW3Q_THREAD" "${FFTW3Q_THREAD_LIBRARY}" "${FFTW3_INCLUDE}")
|
||||
endif()
|
||||
|
||||
if (NOT FFTW3L_FOUND)
|
||||
unset(FFTW3L_LIBRARY)
|
||||
endif()
|
||||
if (NOT FFTW3L_OMP_FOUND)
|
||||
unset(FFTW3L_OMP_LIBRARY)
|
||||
endif()
|
||||
if (NOT FFTW3L_THREAD_FOUND)
|
||||
unset(FFTW3L_THREAD_LIBRARY)
|
||||
endif()
|
||||
|
||||
if (NOT FFTW3F_FOUND)
|
||||
unset(FFTW3F_LIBRARY)
|
||||
endif()
|
||||
if (NOT FFTW3F_OMP_FOUND)
|
||||
unset(FFTW3F_OMP_LIBRARY)
|
||||
endif()
|
||||
if (NOT FFTW3F_THREAD_FOUND)
|
||||
unset(FFTW3F_THREAD_LIBRARY)
|
||||
endif()
|
||||
|
||||
if (NOT FFTW3Q_FOUND)
|
||||
unset(FFTW3Q_LIBRARY)
|
||||
endif()
|
||||
if (NOT FFTW3Q_OMP_FOUND)
|
||||
unset(FFTW3Q_OMP_LIBRARY)
|
||||
endif()
|
||||
if (NOT FFTW3Q_THREAD_FOUND)
|
||||
unset(FFTW3Q_THREAD_LIBRARY)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
FFTW3_INCLUDE_DIR
|
||||
FFTW3_LIBRARY FFTW3_OMP_LIBRARY FFTW3_THREAD_LIBRARY
|
||||
FFTW3L_LIBRARY FFTW3L_OMP_LIBRARY FFTW3L_THREAD_LIBRARY
|
||||
FFTW3F_LIBRARY FFTW3F_OMP_LIBRARY FFTW3F_THREAD_LIBRARY
|
||||
FFTW3Q_LIBRARY FFTW3Q_OMP_LIBRARY FFTW3Q_THREAD_LIBRARY
|
||||
)
|
||||
|
||||
if (FFTW3_FOUND)
|
||||
message("-- Found FFTW3: ${FFTW3_INCLUDE_DIR}")
|
||||
message("-- Found FFTW3: ${FFTW3_INCLUDE}")
|
||||
endif (FFTW3_FOUND)
|
||||
|
||||
4
doc/html/.buildinfo
Normal file
@@ -0,0 +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: 4e935cd35ad4b5e15fdb7bfc2da9495e
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
|
Before Width: | Height: | Size: 673 B |
BIN
doc/html/_static/alert_info_32.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
doc/html/_static/alert_warning_32.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
doc/html/_static/bg-page.png
Normal file
|
After Width: | Height: | Size: 164 B |
BIN
doc/html/_static/bullet_orange.png
Normal file
|
After Width: | Height: | Size: 365 B |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
12
doc/html/_static/documentation_options.js
Normal file
@@ -0,0 +1,12 @@
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
||||
VERSION: '1.7.6',
|
||||
LANGUAGE: 'None',
|
||||
COLLAPSE_INDEX: false,
|
||||
BUILDER: 'html',
|
||||
FILE_SUFFIX: '.html',
|
||||
LINK_SUFFIX: '.html',
|
||||
HAS_SOURCE: true,
|
||||
SOURCELINK_SUFFIX: '.txt',
|
||||
NAVIGATION_WITH_KEYS: false
|
||||
};
|
||||
|
Before Width: | Height: | Size: 368 B |
|
Before Width: | Height: | Size: 363 B |
371
doc/html/_static/haiku.css
Normal file
@@ -0,0 +1,371 @@
|
||||
/*
|
||||
* haiku.css_t
|
||||
* ~~~~~~~~~~~
|
||||
*
|
||||
* Sphinx stylesheet -- haiku theme.
|
||||
*
|
||||
* Adapted from http://haiku-os.org/docs/Haiku-doc.css.
|
||||
* Original copyright message:
|
||||
*
|
||||
* Copyright 2008-2009, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Francois Revol <revol@free.fr>
|
||||
* Stephan Assmus <superstippi@gmx.de>
|
||||
* Braden Ewing <brewin@gmail.com>
|
||||
* Humdinger <humdingerb@gmail.com>
|
||||
*
|
||||
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
@import url("basic.css");
|
||||
|
||||
html {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
background: #FFF url(bg-page.png) top left repeat-x;
|
||||
}
|
||||
|
||||
body {
|
||||
line-height: 1.5;
|
||||
margin: auto;
|
||||
padding: 0px;
|
||||
font-family: "DejaVu Sans", Arial, Helvetica, sans-serif;
|
||||
min-width: 59em;
|
||||
max-width: 70em;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
div.footer {
|
||||
padding: 8px;
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
/* link colors and text decoration */
|
||||
|
||||
a:link {
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
color: #dc3c01;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
color: #892601;
|
||||
}
|
||||
|
||||
a:hover, a:active {
|
||||
text-decoration: underline;
|
||||
color: #ff4500;
|
||||
}
|
||||
|
||||
/* Some headers act as anchors, don't give them a hover effect */
|
||||
|
||||
h1 a:hover, a:active {
|
||||
text-decoration: none;
|
||||
color: #0c3762;
|
||||
}
|
||||
|
||||
h2 a:hover, a:active {
|
||||
text-decoration: none;
|
||||
color: #0c3762;
|
||||
}
|
||||
|
||||
h3 a:hover, a:active {
|
||||
text-decoration: none;
|
||||
color: #0c3762;
|
||||
}
|
||||
|
||||
h4 a:hover, a:active {
|
||||
text-decoration: none;
|
||||
color: #0c3762;
|
||||
}
|
||||
|
||||
a.headerlink {
|
||||
color: #a7ce38;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
a.headerlink:hover {
|
||||
color: #a7ce38;
|
||||
}
|
||||
|
||||
/* basic text elements */
|
||||
|
||||
div.content {
|
||||
margin-top: 20px;
|
||||
margin-left: 40px;
|
||||
margin-right: 40px;
|
||||
margin-bottom: 50px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
/* heading and navigation */
|
||||
|
||||
div.header {
|
||||
position: relative;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
height: 85px;
|
||||
/* background: #eeeeee; */
|
||||
padding: 0 40px;
|
||||
}
|
||||
div.header h1 {
|
||||
font-size: 1.6em;
|
||||
font-weight: normal;
|
||||
letter-spacing: 1px;
|
||||
color: #0c3762;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding-top: 15px;
|
||||
}
|
||||
div.header h1 a {
|
||||
font-weight: normal;
|
||||
color: #0c3762;
|
||||
}
|
||||
div.header h2 {
|
||||
font-size: 1.3em;
|
||||
font-weight: normal;
|
||||
letter-spacing: 1px;
|
||||
text-transform: uppercase;
|
||||
color: #aaa;
|
||||
border: 0;
|
||||
margin-top: -3px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.header img.rightlogo {
|
||||
float: right;
|
||||
}
|
||||
|
||||
|
||||
div.title {
|
||||
font-size: 1.3em;
|
||||
font-weight: bold;
|
||||
color: #0c3762;
|
||||
border-bottom: dotted thin #e0e0e0;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
div.topnav {
|
||||
/* background: #e0e0e0; */
|
||||
}
|
||||
div.topnav p {
|
||||
margin-top: 0;
|
||||
margin-left: 40px;
|
||||
margin-right: 40px;
|
||||
margin-bottom: 0px;
|
||||
text-align: right;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
div.bottomnav {
|
||||
background: #eeeeee;
|
||||
}
|
||||
div.bottomnav p {
|
||||
margin-right: 40px;
|
||||
text-align: right;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
a.uplink {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
/* contents box */
|
||||
|
||||
table.index {
|
||||
margin: 0px 0px 30px 30px;
|
||||
padding: 1px;
|
||||
border-width: 1px;
|
||||
border-style: dotted;
|
||||
border-color: #e0e0e0;
|
||||
}
|
||||
table.index tr.heading {
|
||||
background-color: #e0e0e0;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
table.index tr.index {
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
table.index td {
|
||||
padding: 5px 20px;
|
||||
}
|
||||
|
||||
table.index a:link, table.index a:visited {
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
color: #dc3c01;
|
||||
}
|
||||
table.index a:hover, table.index a:active {
|
||||
text-decoration: underline;
|
||||
color: #ff4500;
|
||||
}
|
||||
|
||||
|
||||
/* Haiku User Guide styles and layout */
|
||||
|
||||
/* Rounded corner boxes */
|
||||
/* Common declarations */
|
||||
div.admonition {
|
||||
-webkit-border-radius: 10px;
|
||||
-khtml-border-radius: 10px;
|
||||
-moz-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
border-style: dotted;
|
||||
border-width: thin;
|
||||
border-color: #dcdcdc;
|
||||
padding: 10px 15px 10px 15px;
|
||||
margin-bottom: 15px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
div.note {
|
||||
padding: 10px 15px 10px 80px;
|
||||
background: #e4ffde url(alert_info_32.png) 15px 15px no-repeat;
|
||||
min-height: 42px;
|
||||
}
|
||||
div.warning {
|
||||
padding: 10px 15px 10px 80px;
|
||||
background: #fffbc6 url(alert_warning_32.png) 15px 15px no-repeat;
|
||||
min-height: 42px;
|
||||
}
|
||||
div.seealso {
|
||||
background: #e4ffde;
|
||||
}
|
||||
|
||||
/* More layout and styles */
|
||||
h1 {
|
||||
font-size: 1.3em;
|
||||
font-weight: bold;
|
||||
color: #0c3762;
|
||||
border-bottom: dotted thin #e0e0e0;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.2em;
|
||||
font-weight: normal;
|
||||
color: #0c3762;
|
||||
border-bottom: dotted thin #e0e0e0;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.1em;
|
||||
font-weight: normal;
|
||||
color: #0c3762;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.0em;
|
||||
font-weight: normal;
|
||||
color: #0c3762;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
p {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
p.last {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
ol {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 5px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
li {
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
div.content ul > li {
|
||||
-moz-background-clip:border;
|
||||
-moz-background-inline-policy:continuous;
|
||||
-moz-background-origin:padding;
|
||||
background: transparent url(bullet_orange.png) no-repeat scroll left 0.45em;
|
||||
list-style-image: none;
|
||||
list-style-type: none;
|
||||
padding: 0 0 0 1.666em;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
tt {
|
||||
background-color: #e2e2e2;
|
||||
font-size: 1.0em;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
pre {
|
||||
border-color: #0c3762;
|
||||
border-style: dotted;
|
||||
border-width: thin;
|
||||
margin: 0 0 12px 0;
|
||||
padding: 0.8em;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
hr {
|
||||
border-top: 1px solid #ccc;
|
||||
border-bottom: 0;
|
||||
border-right: 0;
|
||||
border-left: 0;
|
||||
margin-bottom: 10px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/* printer only pretty stuff */
|
||||
@media print {
|
||||
.noprint {
|
||||
display: none;
|
||||
}
|
||||
/* for acronyms we want their definitions inlined at print time */
|
||||
acronym[title]:after {
|
||||
font-size: small;
|
||||
content: " (" attr(title) ")";
|
||||
font-style: italic;
|
||||
}
|
||||
/* and not have mozilla dotted underline */
|
||||
acronym {
|
||||
border: none;
|
||||
}
|
||||
div.topnav, div.bottomnav, div.header, table.index {
|
||||
display: none;
|
||||
}
|
||||
div.content {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
html {
|
||||
background: #FFF;
|
||||
}
|
||||
}
|
||||
|
||||
.viewcode-back {
|
||||
font-family: "DejaVu Sans", Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
div.viewcode-block:target {
|
||||
background-color: #f4debf;
|
||||
border-top: 1px solid #ac9;
|
||||
border-bottom: 1px solid #ac9;
|
||||
margin: -1px -10px;
|
||||
padding: 0 12px;
|
||||
}
|
||||
10872
doc/html/_static/jquery-3.5.1.js
vendored
Normal file
297
doc/html/_static/language_data.js
Normal file
@@ -0,0 +1,297 @@
|
||||
/*
|
||||
* language_data.js
|
||||
* ~~~~~~~~~~~~~~~~
|
||||
*
|
||||
* This script contains the language-specific data used by searchtools.js,
|
||||
* namely the list of stopwords, stemmer, scorer and splitter.
|
||||
*
|
||||
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
|
||||
|
||||
|
||||
/* Non-minified version JS is _stemmer.js if file is provided */
|
||||
/**
|
||||
* Porter Stemmer
|
||||
*/
|
||||
var Stemmer = function() {
|
||||
|
||||
var step2list = {
|
||||
ational: 'ate',
|
||||
tional: 'tion',
|
||||
enci: 'ence',
|
||||
anci: 'ance',
|
||||
izer: 'ize',
|
||||
bli: 'ble',
|
||||
alli: 'al',
|
||||
entli: 'ent',
|
||||
eli: 'e',
|
||||
ousli: 'ous',
|
||||
ization: 'ize',
|
||||
ation: 'ate',
|
||||
ator: 'ate',
|
||||
alism: 'al',
|
||||
iveness: 'ive',
|
||||
fulness: 'ful',
|
||||
ousness: 'ous',
|
||||
aliti: 'al',
|
||||
iviti: 'ive',
|
||||
biliti: 'ble',
|
||||
logi: 'log'
|
||||
};
|
||||
|
||||
var step3list = {
|
||||
icate: 'ic',
|
||||
ative: '',
|
||||
alize: 'al',
|
||||
iciti: 'ic',
|
||||
ical: 'ic',
|
||||
ful: '',
|
||||
ness: ''
|
||||
};
|
||||
|
||||
var c = "[^aeiou]"; // consonant
|
||||
var v = "[aeiouy]"; // vowel
|
||||
var C = c + "[^aeiouy]*"; // consonant sequence
|
||||
var V = v + "[aeiou]*"; // vowel sequence
|
||||
|
||||
var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
|
||||
var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
|
||||
var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
|
||||
var s_v = "^(" + C + ")?" + v; // vowel in stem
|
||||
|
||||
this.stemWord = function (w) {
|
||||
var stem;
|
||||
var suffix;
|
||||
var firstch;
|
||||
var origword = w;
|
||||
|
||||
if (w.length < 3)
|
||||
return w;
|
||||
|
||||
var re;
|
||||
var re2;
|
||||
var re3;
|
||||
var re4;
|
||||
|
||||
firstch = w.substr(0,1);
|
||||
if (firstch == "y")
|
||||
w = firstch.toUpperCase() + w.substr(1);
|
||||
|
||||
// Step 1a
|
||||
re = /^(.+?)(ss|i)es$/;
|
||||
re2 = /^(.+?)([^s])s$/;
|
||||
|
||||
if (re.test(w))
|
||||
w = w.replace(re,"$1$2");
|
||||
else if (re2.test(w))
|
||||
w = w.replace(re2,"$1$2");
|
||||
|
||||
// Step 1b
|
||||
re = /^(.+?)eed$/;
|
||||
re2 = /^(.+?)(ed|ing)$/;
|
||||
if (re.test(w)) {
|
||||
var fp = re.exec(w);
|
||||
re = new RegExp(mgr0);
|
||||
if (re.test(fp[1])) {
|
||||
re = /.$/;
|
||||
w = w.replace(re,"");
|
||||
}
|
||||
}
|
||||
else if (re2.test(w)) {
|
||||
var fp = re2.exec(w);
|
||||
stem = fp[1];
|
||||
re2 = new RegExp(s_v);
|
||||
if (re2.test(stem)) {
|
||||
w = stem;
|
||||
re2 = /(at|bl|iz)$/;
|
||||
re3 = new RegExp("([^aeiouylsz])\\1$");
|
||||
re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
|
||||
if (re2.test(w))
|
||||
w = w + "e";
|
||||
else if (re3.test(w)) {
|
||||
re = /.$/;
|
||||
w = w.replace(re,"");
|
||||
}
|
||||
else if (re4.test(w))
|
||||
w = w + "e";
|
||||
}
|
||||
}
|
||||
|
||||
// Step 1c
|
||||
re = /^(.+?)y$/;
|
||||
if (re.test(w)) {
|
||||
var fp = re.exec(w);
|
||||
stem = fp[1];
|
||||
re = new RegExp(s_v);
|
||||
if (re.test(stem))
|
||||
w = stem + "i";
|
||||
}
|
||||
|
||||
// Step 2
|
||||
re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
|
||||
if (re.test(w)) {
|
||||
var fp = re.exec(w);
|
||||
stem = fp[1];
|
||||
suffix = fp[2];
|
||||
re = new RegExp(mgr0);
|
||||
if (re.test(stem))
|
||||
w = stem + step2list[suffix];
|
||||
}
|
||||
|
||||
// Step 3
|
||||
re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
|
||||
if (re.test(w)) {
|
||||
var fp = re.exec(w);
|
||||
stem = fp[1];
|
||||
suffix = fp[2];
|
||||
re = new RegExp(mgr0);
|
||||
if (re.test(stem))
|
||||
w = stem + step3list[suffix];
|
||||
}
|
||||
|
||||
// Step 4
|
||||
re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
|
||||
re2 = /^(.+?)(s|t)(ion)$/;
|
||||
if (re.test(w)) {
|
||||
var fp = re.exec(w);
|
||||
stem = fp[1];
|
||||
re = new RegExp(mgr1);
|
||||
if (re.test(stem))
|
||||
w = stem;
|
||||
}
|
||||
else if (re2.test(w)) {
|
||||
var fp = re2.exec(w);
|
||||
stem = fp[1] + fp[2];
|
||||
re2 = new RegExp(mgr1);
|
||||
if (re2.test(stem))
|
||||
w = stem;
|
||||
}
|
||||
|
||||
// Step 5
|
||||
re = /^(.+?)e$/;
|
||||
if (re.test(w)) {
|
||||
var fp = re.exec(w);
|
||||
stem = fp[1];
|
||||
re = new RegExp(mgr1);
|
||||
re2 = new RegExp(meq1);
|
||||
re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
|
||||
if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
|
||||
w = stem;
|
||||
}
|
||||
re = /ll$/;
|
||||
re2 = new RegExp(mgr1);
|
||||
if (re.test(w) && re2.test(w)) {
|
||||
re = /.$/;
|
||||
w = w.replace(re,"");
|
||||
}
|
||||
|
||||
// and turn initial Y back to y
|
||||
if (firstch == "y")
|
||||
w = firstch.toLowerCase() + w.substr(1);
|
||||
return w;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var splitChars = (function() {
|
||||
var result = {};
|
||||
var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
|
||||
1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702,
|
||||
2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971,
|
||||
2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345,
|
||||
3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761,
|
||||
3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823,
|
||||
4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125,
|
||||
8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695,
|
||||
11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587,
|
||||
43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141];
|
||||
var i, j, start, end;
|
||||
for (i = 0; i < singles.length; i++) {
|
||||
result[singles[i]] = true;
|
||||
}
|
||||
var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709],
|
||||
[722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161],
|
||||
[1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568],
|
||||
[1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807],
|
||||
[1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047],
|
||||
[2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383],
|
||||
[2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450],
|
||||
[2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547],
|
||||
[2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673],
|
||||
[2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820],
|
||||
[2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946],
|
||||
[2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023],
|
||||
[3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173],
|
||||
[3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332],
|
||||
[3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481],
|
||||
[3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718],
|
||||
[3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791],
|
||||
[3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095],
|
||||
[4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205],
|
||||
[4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687],
|
||||
[4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968],
|
||||
[4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869],
|
||||
[5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102],
|
||||
[6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271],
|
||||
[6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592],
|
||||
[6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822],
|
||||
[6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167],
|
||||
[7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959],
|
||||
[7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143],
|
||||
[8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318],
|
||||
[8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483],
|
||||
[8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101],
|
||||
[10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567],
|
||||
[11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292],
|
||||
[12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444],
|
||||
[12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783],
|
||||
[12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311],
|
||||
[19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511],
|
||||
[42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774],
|
||||
[42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071],
|
||||
[43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263],
|
||||
[43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519],
|
||||
[43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647],
|
||||
[43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967],
|
||||
[44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295],
|
||||
[57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274],
|
||||
[64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007],
|
||||
[65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381],
|
||||
[65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]];
|
||||
for (i = 0; i < ranges.length; i++) {
|
||||
start = ranges[i][0];
|
||||
end = ranges[i][1];
|
||||
for (j = start; j <= end; j++) {
|
||||
result[j] = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
})();
|
||||
|
||||
function splitQuery(query) {
|
||||
var result = [];
|
||||
var start = -1;
|
||||
for (var i = 0; i < query.length; i++) {
|
||||
if (splitChars[query.charCodeAt(i)]) {
|
||||
if (start !== -1) {
|
||||
result.push(query.slice(start, i));
|
||||
start = -1;
|
||||
}
|
||||
} else if (start === -1) {
|
||||
start = i;
|
||||
}
|
||||
}
|
||||
if (start !== -1) {
|
||||
result.push(query.slice(start));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
999
doc/html/_static/underscore-1.3.1.js
Normal file
@@ -0,0 +1,999 @@
|
||||
// Underscore.js 1.3.1
|
||||
// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
|
||||
// Underscore is freely distributable under the MIT license.
|
||||
// Portions of Underscore are inspired or borrowed from Prototype,
|
||||
// Oliver Steele's Functional, and John Resig's Micro-Templating.
|
||||
// For all details and documentation:
|
||||
// http://documentcloud.github.com/underscore
|
||||
|
||||
(function() {
|
||||
|
||||
// Baseline setup
|
||||
// --------------
|
||||
|
||||
// Establish the root object, `window` in the browser, or `global` on the server.
|
||||
var root = this;
|
||||
|
||||
// Save the previous value of the `_` variable.
|
||||
var previousUnderscore = root._;
|
||||
|
||||
// Establish the object that gets returned to break out of a loop iteration.
|
||||
var breaker = {};
|
||||
|
||||
// Save bytes in the minified (but not gzipped) version:
|
||||
var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
|
||||
|
||||
// Create quick reference variables for speed access to core prototypes.
|
||||
var slice = ArrayProto.slice,
|
||||
unshift = ArrayProto.unshift,
|
||||
toString = ObjProto.toString,
|
||||
hasOwnProperty = ObjProto.hasOwnProperty;
|
||||
|
||||
// All **ECMAScript 5** native function implementations that we hope to use
|
||||
// are declared here.
|
||||
var
|
||||
nativeForEach = ArrayProto.forEach,
|
||||
nativeMap = ArrayProto.map,
|
||||
nativeReduce = ArrayProto.reduce,
|
||||
nativeReduceRight = ArrayProto.reduceRight,
|
||||
nativeFilter = ArrayProto.filter,
|
||||
nativeEvery = ArrayProto.every,
|
||||
nativeSome = ArrayProto.some,
|
||||
nativeIndexOf = ArrayProto.indexOf,
|
||||
nativeLastIndexOf = ArrayProto.lastIndexOf,
|
||||
nativeIsArray = Array.isArray,
|
||||
nativeKeys = Object.keys,
|
||||
nativeBind = FuncProto.bind;
|
||||
|
||||
// Create a safe reference to the Underscore object for use below.
|
||||
var _ = function(obj) { return new wrapper(obj); };
|
||||
|
||||
// Export the Underscore object for **Node.js**, with
|
||||
// backwards-compatibility for the old `require()` API. If we're in
|
||||
// the browser, add `_` as a global object via a string identifier,
|
||||
// for Closure Compiler "advanced" mode.
|
||||
if (typeof exports !== 'undefined') {
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
exports = module.exports = _;
|
||||
}
|
||||
exports._ = _;
|
||||
} else {
|
||||
root['_'] = _;
|
||||
}
|
||||
|
||||
// Current version.
|
||||
_.VERSION = '1.3.1';
|
||||
|
||||
// Collection Functions
|
||||
// --------------------
|
||||
|
||||
// The cornerstone, an `each` implementation, aka `forEach`.
|
||||
// Handles objects with the built-in `forEach`, arrays, and raw objects.
|
||||
// Delegates to **ECMAScript 5**'s native `forEach` if available.
|
||||
var each = _.each = _.forEach = function(obj, iterator, context) {
|
||||
if (obj == null) return;
|
||||
if (nativeForEach && obj.forEach === nativeForEach) {
|
||||
obj.forEach(iterator, context);
|
||||
} else if (obj.length === +obj.length) {
|
||||
for (var i = 0, l = obj.length; i < l; i++) {
|
||||
if (i in obj && iterator.call(context, obj[i], i, obj) === breaker) return;
|
||||
}
|
||||
} else {
|
||||
for (var key in obj) {
|
||||
if (_.has(obj, key)) {
|
||||
if (iterator.call(context, obj[key], key, obj) === breaker) return;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Return the results of applying the iterator to each element.
|
||||
// Delegates to **ECMAScript 5**'s native `map` if available.
|
||||
_.map = _.collect = function(obj, iterator, context) {
|
||||
var results = [];
|
||||
if (obj == null) return results;
|
||||
if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
|
||||
each(obj, function(value, index, list) {
|
||||
results[results.length] = iterator.call(context, value, index, list);
|
||||
});
|
||||
if (obj.length === +obj.length) results.length = obj.length;
|
||||
return results;
|
||||
};
|
||||
|
||||
// **Reduce** builds up a single result from a list of values, aka `inject`,
|
||||
// or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
|
||||
_.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
|
||||
var initial = arguments.length > 2;
|
||||
if (obj == null) obj = [];
|
||||
if (nativeReduce && obj.reduce === nativeReduce) {
|
||||
if (context) iterator = _.bind(iterator, context);
|
||||
return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
|
||||
}
|
||||
each(obj, function(value, index, list) {
|
||||
if (!initial) {
|
||||
memo = value;
|
||||
initial = true;
|
||||
} else {
|
||||
memo = iterator.call(context, memo, value, index, list);
|
||||
}
|
||||
});
|
||||
if (!initial) throw new TypeError('Reduce of empty array with no initial value');
|
||||
return memo;
|
||||
};
|
||||
|
||||
// The right-associative version of reduce, also known as `foldr`.
|
||||
// Delegates to **ECMAScript 5**'s native `reduceRight` if available.
|
||||
_.reduceRight = _.foldr = function(obj, iterator, memo, context) {
|
||||
var initial = arguments.length > 2;
|
||||
if (obj == null) obj = [];
|
||||
if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
|
||||
if (context) iterator = _.bind(iterator, context);
|
||||
return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
|
||||
}
|
||||
var reversed = _.toArray(obj).reverse();
|
||||
if (context && !initial) iterator = _.bind(iterator, context);
|
||||
return initial ? _.reduce(reversed, iterator, memo, context) : _.reduce(reversed, iterator);
|
||||
};
|
||||
|
||||
// Return the first value which passes a truth test. Aliased as `detect`.
|
||||
_.find = _.detect = function(obj, iterator, context) {
|
||||
var result;
|
||||
any(obj, function(value, index, list) {
|
||||
if (iterator.call(context, value, index, list)) {
|
||||
result = value;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
// Return all the elements that pass a truth test.
|
||||
// Delegates to **ECMAScript 5**'s native `filter` if available.
|
||||
// Aliased as `select`.
|
||||
_.filter = _.select = function(obj, iterator, context) {
|
||||
var results = [];
|
||||
if (obj == null) return results;
|
||||
if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
|
||||
each(obj, function(value, index, list) {
|
||||
if (iterator.call(context, value, index, list)) results[results.length] = value;
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
// Return all the elements for which a truth test fails.
|
||||
_.reject = function(obj, iterator, context) {
|
||||
var results = [];
|
||||
if (obj == null) return results;
|
||||
each(obj, function(value, index, list) {
|
||||
if (!iterator.call(context, value, index, list)) results[results.length] = value;
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
// Determine whether all of the elements match a truth test.
|
||||
// Delegates to **ECMAScript 5**'s native `every` if available.
|
||||
// Aliased as `all`.
|
||||
_.every = _.all = function(obj, iterator, context) {
|
||||
var result = true;
|
||||
if (obj == null) return result;
|
||||
if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
|
||||
each(obj, function(value, index, list) {
|
||||
if (!(result = result && iterator.call(context, value, index, list))) return breaker;
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
// Determine if at least one element in the object matches a truth test.
|
||||
// Delegates to **ECMAScript 5**'s native `some` if available.
|
||||
// Aliased as `any`.
|
||||
var any = _.some = _.any = function(obj, iterator, context) {
|
||||
iterator || (iterator = _.identity);
|
||||
var result = false;
|
||||
if (obj == null) return result;
|
||||
if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
|
||||
each(obj, function(value, index, list) {
|
||||
if (result || (result = iterator.call(context, value, index, list))) return breaker;
|
||||
});
|
||||
return !!result;
|
||||
};
|
||||
|
||||
// Determine if a given value is included in the array or object using `===`.
|
||||
// Aliased as `contains`.
|
||||
_.include = _.contains = function(obj, target) {
|
||||
var found = false;
|
||||
if (obj == null) return found;
|
||||
if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
|
||||
found = any(obj, function(value) {
|
||||
return value === target;
|
||||
});
|
||||
return found;
|
||||
};
|
||||
|
||||
// Invoke a method (with arguments) on every item in a collection.
|
||||
_.invoke = function(obj, method) {
|
||||
var args = slice.call(arguments, 2);
|
||||
return _.map(obj, function(value) {
|
||||
return (_.isFunction(method) ? method || value : value[method]).apply(value, args);
|
||||
});
|
||||
};
|
||||
|
||||
// Convenience version of a common use case of `map`: fetching a property.
|
||||
_.pluck = function(obj, key) {
|
||||
return _.map(obj, function(value){ return value[key]; });
|
||||
};
|
||||
|
||||
// Return the maximum element or (element-based computation).
|
||||
_.max = function(obj, iterator, context) {
|
||||
if (!iterator && _.isArray(obj)) return Math.max.apply(Math, obj);
|
||||
if (!iterator && _.isEmpty(obj)) return -Infinity;
|
||||
var result = {computed : -Infinity};
|
||||
each(obj, function(value, index, list) {
|
||||
var computed = iterator ? iterator.call(context, value, index, list) : value;
|
||||
computed >= result.computed && (result = {value : value, computed : computed});
|
||||
});
|
||||
return result.value;
|
||||
};
|
||||
|
||||
// Return the minimum element (or element-based computation).
|
||||
_.min = function(obj, iterator, context) {
|
||||
if (!iterator && _.isArray(obj)) return Math.min.apply(Math, obj);
|
||||
if (!iterator && _.isEmpty(obj)) return Infinity;
|
||||
var result = {computed : Infinity};
|
||||
each(obj, function(value, index, list) {
|
||||
var computed = iterator ? iterator.call(context, value, index, list) : value;
|
||||
computed < result.computed && (result = {value : value, computed : computed});
|
||||
});
|
||||
return result.value;
|
||||
};
|
||||
|
||||
// Shuffle an array.
|
||||
_.shuffle = function(obj) {
|
||||
var shuffled = [], rand;
|
||||
each(obj, function(value, index, list) {
|
||||
if (index == 0) {
|
||||
shuffled[0] = value;
|
||||
} else {
|
||||
rand = Math.floor(Math.random() * (index + 1));
|
||||
shuffled[index] = shuffled[rand];
|
||||
shuffled[rand] = value;
|
||||
}
|
||||
});
|
||||
return shuffled;
|
||||
};
|
||||
|
||||
// Sort the object's values by a criterion produced by an iterator.
|
||||
_.sortBy = function(obj, iterator, context) {
|
||||
return _.pluck(_.map(obj, function(value, index, list) {
|
||||
return {
|
||||
value : value,
|
||||
criteria : iterator.call(context, value, index, list)
|
||||
};
|
||||
}).sort(function(left, right) {
|
||||
var a = left.criteria, b = right.criteria;
|
||||
return a < b ? -1 : a > b ? 1 : 0;
|
||||
}), 'value');
|
||||
};
|
||||
|
||||
// Groups the object's values by a criterion. Pass either a string attribute
|
||||
// to group by, or a function that returns the criterion.
|
||||
_.groupBy = function(obj, val) {
|
||||
var result = {};
|
||||
var iterator = _.isFunction(val) ? val : function(obj) { return obj[val]; };
|
||||
each(obj, function(value, index) {
|
||||
var key = iterator(value, index);
|
||||
(result[key] || (result[key] = [])).push(value);
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
// Use a comparator function to figure out at what index an object should
|
||||
// be inserted so as to maintain order. Uses binary search.
|
||||
_.sortedIndex = function(array, obj, iterator) {
|
||||
iterator || (iterator = _.identity);
|
||||
var low = 0, high = array.length;
|
||||
while (low < high) {
|
||||
var mid = (low + high) >> 1;
|
||||
iterator(array[mid]) < iterator(obj) ? low = mid + 1 : high = mid;
|
||||
}
|
||||
return low;
|
||||
};
|
||||
|
||||
// Safely convert anything iterable into a real, live array.
|
||||
_.toArray = function(iterable) {
|
||||
if (!iterable) return [];
|
||||
if (iterable.toArray) return iterable.toArray();
|
||||
if (_.isArray(iterable)) return slice.call(iterable);
|
||||
if (_.isArguments(iterable)) return slice.call(iterable);
|
||||
return _.values(iterable);
|
||||
};
|
||||
|
||||
// Return the number of elements in an object.
|
||||
_.size = function(obj) {
|
||||
return _.toArray(obj).length;
|
||||
};
|
||||
|
||||
// Array Functions
|
||||
// ---------------
|
||||
|
||||
// Get the first element of an array. Passing **n** will return the first N
|
||||
// values in the array. Aliased as `head`. The **guard** check allows it to work
|
||||
// with `_.map`.
|
||||
_.first = _.head = function(array, n, guard) {
|
||||
return (n != null) && !guard ? slice.call(array, 0, n) : array[0];
|
||||
};
|
||||
|
||||
// Returns everything but the last entry of the array. Especcialy useful on
|
||||
// the arguments object. Passing **n** will return all the values in
|
||||
// the array, excluding the last N. The **guard** check allows it to work with
|
||||
// `_.map`.
|
||||
_.initial = function(array, n, guard) {
|
||||
return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
|
||||
};
|
||||
|
||||
// Get the last element of an array. Passing **n** will return the last N
|
||||
// values in the array. The **guard** check allows it to work with `_.map`.
|
||||
_.last = function(array, n, guard) {
|
||||
if ((n != null) && !guard) {
|
||||
return slice.call(array, Math.max(array.length - n, 0));
|
||||
} else {
|
||||
return array[array.length - 1];
|
||||
}
|
||||
};
|
||||
|
||||
// Returns everything but the first entry of the array. Aliased as `tail`.
|
||||
// Especially useful on the arguments object. Passing an **index** will return
|
||||
// the rest of the values in the array from that index onward. The **guard**
|
||||
// check allows it to work with `_.map`.
|
||||
_.rest = _.tail = function(array, index, guard) {
|
||||
return slice.call(array, (index == null) || guard ? 1 : index);
|
||||
};
|
||||
|
||||
// Trim out all falsy values from an array.
|
||||
_.compact = function(array) {
|
||||
return _.filter(array, function(value){ return !!value; });
|
||||
};
|
||||
|
||||
// Return a completely flattened version of an array.
|
||||
_.flatten = function(array, shallow) {
|
||||
return _.reduce(array, function(memo, value) {
|
||||
if (_.isArray(value)) return memo.concat(shallow ? value : _.flatten(value));
|
||||
memo[memo.length] = value;
|
||||
return memo;
|
||||
}, []);
|
||||
};
|
||||
|
||||
// Return a version of the array that does not contain the specified value(s).
|
||||
_.without = function(array) {
|
||||
return _.difference(array, slice.call(arguments, 1));
|
||||
};
|
||||
|
||||
// Produce a duplicate-free version of the array. If the array has already
|
||||
// been sorted, you have the option of using a faster algorithm.
|
||||
// Aliased as `unique`.
|
||||
_.uniq = _.unique = function(array, isSorted, iterator) {
|
||||
var initial = iterator ? _.map(array, iterator) : array;
|
||||
var result = [];
|
||||
_.reduce(initial, function(memo, el, i) {
|
||||
if (0 == i || (isSorted === true ? _.last(memo) != el : !_.include(memo, el))) {
|
||||
memo[memo.length] = el;
|
||||
result[result.length] = array[i];
|
||||
}
|
||||
return memo;
|
||||
}, []);
|
||||
return result;
|
||||
};
|
||||
|
||||
// Produce an array that contains the union: each distinct element from all of
|
||||
// the passed-in arrays.
|
||||
_.union = function() {
|
||||
return _.uniq(_.flatten(arguments, true));
|
||||
};
|
||||
|
||||
// Produce an array that contains every item shared between all the
|
||||
// passed-in arrays. (Aliased as "intersect" for back-compat.)
|
||||
_.intersection = _.intersect = function(array) {
|
||||
var rest = slice.call(arguments, 1);
|
||||
return _.filter(_.uniq(array), function(item) {
|
||||
return _.every(rest, function(other) {
|
||||
return _.indexOf(other, item) >= 0;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// Take the difference between one array and a number of other arrays.
|
||||
// Only the elements present in just the first array will remain.
|
||||
_.difference = function(array) {
|
||||
var rest = _.flatten(slice.call(arguments, 1));
|
||||
return _.filter(array, function(value){ return !_.include(rest, value); });
|
||||
};
|
||||
|
||||
// Zip together multiple lists into a single array -- elements that share
|
||||
// an index go together.
|
||||
_.zip = function() {
|
||||
var args = slice.call(arguments);
|
||||
var length = _.max(_.pluck(args, 'length'));
|
||||
var results = new Array(length);
|
||||
for (var i = 0; i < length; i++) results[i] = _.pluck(args, "" + i);
|
||||
return results;
|
||||
};
|
||||
|
||||
// If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
|
||||
// we need this function. Return the position of the first occurrence of an
|
||||
// item in an array, or -1 if the item is not included in the array.
|
||||
// Delegates to **ECMAScript 5**'s native `indexOf` if available.
|
||||
// If the array is large and already in sort order, pass `true`
|
||||
// for **isSorted** to use binary search.
|
||||
_.indexOf = function(array, item, isSorted) {
|
||||
if (array == null) return -1;
|
||||
var i, l;
|
||||
if (isSorted) {
|
||||
i = _.sortedIndex(array, item);
|
||||
return array[i] === item ? i : -1;
|
||||
}
|
||||
if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item);
|
||||
for (i = 0, l = array.length; i < l; i++) if (i in array && array[i] === item) return i;
|
||||
return -1;
|
||||
};
|
||||
|
||||
// Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
|
||||
_.lastIndexOf = function(array, item) {
|
||||
if (array == null) return -1;
|
||||
if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) return array.lastIndexOf(item);
|
||||
var i = array.length;
|
||||
while (i--) if (i in array && array[i] === item) return i;
|
||||
return -1;
|
||||
};
|
||||
|
||||
// Generate an integer Array containing an arithmetic progression. A port of
|
||||
// the native Python `range()` function. See
|
||||
// [the Python documentation](http://docs.python.org/library/functions.html#range).
|
||||
_.range = function(start, stop, step) {
|
||||
if (arguments.length <= 1) {
|
||||
stop = start || 0;
|
||||
start = 0;
|
||||
}
|
||||
step = arguments[2] || 1;
|
||||
|
||||
var len = Math.max(Math.ceil((stop - start) / step), 0);
|
||||
var idx = 0;
|
||||
var range = new Array(len);
|
||||
|
||||
while(idx < len) {
|
||||
range[idx++] = start;
|
||||
start += step;
|
||||
}
|
||||
|
||||
return range;
|
||||
};
|
||||
|
||||
// Function (ahem) Functions
|
||||
// ------------------
|
||||
|
||||
// Reusable constructor function for prototype setting.
|
||||
var ctor = function(){};
|
||||
|
||||
// Create a function bound to a given object (assigning `this`, and arguments,
|
||||
// optionally). Binding with arguments is also known as `curry`.
|
||||
// Delegates to **ECMAScript 5**'s native `Function.bind` if available.
|
||||
// We check for `func.bind` first, to fail fast when `func` is undefined.
|
||||
_.bind = function bind(func, context) {
|
||||
var bound, args;
|
||||
if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
|
||||
if (!_.isFunction(func)) throw new TypeError;
|
||||
args = slice.call(arguments, 2);
|
||||
return bound = function() {
|
||||
if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
|
||||
ctor.prototype = func.prototype;
|
||||
var self = new ctor;
|
||||
var result = func.apply(self, args.concat(slice.call(arguments)));
|
||||
if (Object(result) === result) return result;
|
||||
return self;
|
||||
};
|
||||
};
|
||||
|
||||
// Bind all of an object's methods to that object. Useful for ensuring that
|
||||
// all callbacks defined on an object belong to it.
|
||||
_.bindAll = function(obj) {
|
||||
var funcs = slice.call(arguments, 1);
|
||||
if (funcs.length == 0) funcs = _.functions(obj);
|
||||
each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
|
||||
return obj;
|
||||
};
|
||||
|
||||
// Memoize an expensive function by storing its results.
|
||||
_.memoize = function(func, hasher) {
|
||||
var memo = {};
|
||||
hasher || (hasher = _.identity);
|
||||
return function() {
|
||||
var key = hasher.apply(this, arguments);
|
||||
return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
|
||||
};
|
||||
};
|
||||
|
||||
// Delays a function for the given number of milliseconds, and then calls
|
||||
// it with the arguments supplied.
|
||||
_.delay = function(func, wait) {
|
||||
var args = slice.call(arguments, 2);
|
||||
return setTimeout(function(){ return func.apply(func, args); }, wait);
|
||||
};
|
||||
|
||||
// Defers a function, scheduling it to run after the current call stack has
|
||||
// cleared.
|
||||
_.defer = function(func) {
|
||||
return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
|
||||
};
|
||||
|
||||
// Returns a function, that, when invoked, will only be triggered at most once
|
||||
// during a given window of time.
|
||||
_.throttle = function(func, wait) {
|
||||
var context, args, timeout, throttling, more;
|
||||
var whenDone = _.debounce(function(){ more = throttling = false; }, wait);
|
||||
return function() {
|
||||
context = this; args = arguments;
|
||||
var later = function() {
|
||||
timeout = null;
|
||||
if (more) func.apply(context, args);
|
||||
whenDone();
|
||||
};
|
||||
if (!timeout) timeout = setTimeout(later, wait);
|
||||
if (throttling) {
|
||||
more = true;
|
||||
} else {
|
||||
func.apply(context, args);
|
||||
}
|
||||
whenDone();
|
||||
throttling = true;
|
||||
};
|
||||
};
|
||||
|
||||
// Returns a function, that, as long as it continues to be invoked, will not
|
||||
// be triggered. The function will be called after it stops being called for
|
||||
// N milliseconds.
|
||||
_.debounce = function(func, wait) {
|
||||
var timeout;
|
||||
return function() {
|
||||
var context = this, args = arguments;
|
||||
var later = function() {
|
||||
timeout = null;
|
||||
func.apply(context, args);
|
||||
};
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(later, wait);
|
||||
};
|
||||
};
|
||||
|
||||
// Returns a function that will be executed at most one time, no matter how
|
||||
// often you call it. Useful for lazy initialization.
|
||||
_.once = function(func) {
|
||||
var ran = false, memo;
|
||||
return function() {
|
||||
if (ran) return memo;
|
||||
ran = true;
|
||||
return memo = func.apply(this, arguments);
|
||||
};
|
||||
};
|
||||
|
||||
// Returns the first function passed as an argument to the second,
|
||||
// allowing you to adjust arguments, run code before and after, and
|
||||
// conditionally execute the original function.
|
||||
_.wrap = function(func, wrapper) {
|
||||
return function() {
|
||||
var args = [func].concat(slice.call(arguments, 0));
|
||||
return wrapper.apply(this, args);
|
||||
};
|
||||
};
|
||||
|
||||
// Returns a function that is the composition of a list of functions, each
|
||||
// consuming the return value of the function that follows.
|
||||
_.compose = function() {
|
||||
var funcs = arguments;
|
||||
return function() {
|
||||
var args = arguments;
|
||||
for (var i = funcs.length - 1; i >= 0; i--) {
|
||||
args = [funcs[i].apply(this, args)];
|
||||
}
|
||||
return args[0];
|
||||
};
|
||||
};
|
||||
|
||||
// Returns a function that will only be executed after being called N times.
|
||||
_.after = function(times, func) {
|
||||
if (times <= 0) return func();
|
||||
return function() {
|
||||
if (--times < 1) { return func.apply(this, arguments); }
|
||||
};
|
||||
};
|
||||
|
||||
// Object Functions
|
||||
// ----------------
|
||||
|
||||
// Retrieve the names of an object's properties.
|
||||
// Delegates to **ECMAScript 5**'s native `Object.keys`
|
||||
_.keys = nativeKeys || function(obj) {
|
||||
if (obj !== Object(obj)) throw new TypeError('Invalid object');
|
||||
var keys = [];
|
||||
for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;
|
||||
return keys;
|
||||
};
|
||||
|
||||
// Retrieve the values of an object's properties.
|
||||
_.values = function(obj) {
|
||||
return _.map(obj, _.identity);
|
||||
};
|
||||
|
||||
// Return a sorted list of the function names available on the object.
|
||||
// Aliased as `methods`
|
||||
_.functions = _.methods = function(obj) {
|
||||
var names = [];
|
||||
for (var key in obj) {
|
||||
if (_.isFunction(obj[key])) names.push(key);
|
||||
}
|
||||
return names.sort();
|
||||
};
|
||||
|
||||
// Extend a given object with all the properties in passed-in object(s).
|
||||
_.extend = function(obj) {
|
||||
each(slice.call(arguments, 1), function(source) {
|
||||
for (var prop in source) {
|
||||
obj[prop] = source[prop];
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
};
|
||||
|
||||
// Fill in a given object with default properties.
|
||||
_.defaults = function(obj) {
|
||||
each(slice.call(arguments, 1), function(source) {
|
||||
for (var prop in source) {
|
||||
if (obj[prop] == null) obj[prop] = source[prop];
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
};
|
||||
|
||||
// Create a (shallow-cloned) duplicate of an object.
|
||||
_.clone = function(obj) {
|
||||
if (!_.isObject(obj)) return obj;
|
||||
return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
|
||||
};
|
||||
|
||||
// Invokes interceptor with the obj, and then returns obj.
|
||||
// The primary purpose of this method is to "tap into" a method chain, in
|
||||
// order to perform operations on intermediate results within the chain.
|
||||
_.tap = function(obj, interceptor) {
|
||||
interceptor(obj);
|
||||
return obj;
|
||||
};
|
||||
|
||||
// Internal recursive comparison function.
|
||||
function eq(a, b, stack) {
|
||||
// Identical objects are equal. `0 === -0`, but they aren't identical.
|
||||
// See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
|
||||
if (a === b) return a !== 0 || 1 / a == 1 / b;
|
||||
// A strict comparison is necessary because `null == undefined`.
|
||||
if (a == null || b == null) return a === b;
|
||||
// Unwrap any wrapped objects.
|
||||
if (a._chain) a = a._wrapped;
|
||||
if (b._chain) b = b._wrapped;
|
||||
// Invoke a custom `isEqual` method if one is provided.
|
||||
if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);
|
||||
if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);
|
||||
// Compare `[[Class]]` names.
|
||||
var className = toString.call(a);
|
||||
if (className != toString.call(b)) return false;
|
||||
switch (className) {
|
||||
// Strings, numbers, dates, and booleans are compared by value.
|
||||
case '[object String]':
|
||||
// Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
|
||||
// equivalent to `new String("5")`.
|
||||
return a == String(b);
|
||||
case '[object Number]':
|
||||
// `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
|
||||
// other numeric values.
|
||||
return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
|
||||
case '[object Date]':
|
||||
case '[object Boolean]':
|
||||
// Coerce dates and booleans to numeric primitive values. Dates are compared by their
|
||||
// millisecond representations. Note that invalid dates with millisecond representations
|
||||
// of `NaN` are not equivalent.
|
||||
return +a == +b;
|
||||
// RegExps are compared by their source patterns and flags.
|
||||
case '[object RegExp]':
|
||||
return a.source == b.source &&
|
||||
a.global == b.global &&
|
||||
a.multiline == b.multiline &&
|
||||
a.ignoreCase == b.ignoreCase;
|
||||
}
|
||||
if (typeof a != 'object' || typeof b != 'object') return false;
|
||||
// Assume equality for cyclic structures. The algorithm for detecting cyclic
|
||||
// structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
|
||||
var length = stack.length;
|
||||
while (length--) {
|
||||
// Linear search. Performance is inversely proportional to the number of
|
||||
// unique nested structures.
|
||||
if (stack[length] == a) return true;
|
||||
}
|
||||
// Add the first object to the stack of traversed objects.
|
||||
stack.push(a);
|
||||
var size = 0, result = true;
|
||||
// Recursively compare objects and arrays.
|
||||
if (className == '[object Array]') {
|
||||
// Compare array lengths to determine if a deep comparison is necessary.
|
||||
size = a.length;
|
||||
result = size == b.length;
|
||||
if (result) {
|
||||
// Deep compare the contents, ignoring non-numeric properties.
|
||||
while (size--) {
|
||||
// Ensure commutative equality for sparse arrays.
|
||||
if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Objects with different constructors are not equivalent.
|
||||
if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;
|
||||
// Deep compare objects.
|
||||
for (var key in a) {
|
||||
if (_.has(a, key)) {
|
||||
// Count the expected number of properties.
|
||||
size++;
|
||||
// Deep compare each member.
|
||||
if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break;
|
||||
}
|
||||
}
|
||||
// Ensure that both objects contain the same number of properties.
|
||||
if (result) {
|
||||
for (key in b) {
|
||||
if (_.has(b, key) && !(size--)) break;
|
||||
}
|
||||
result = !size;
|
||||
}
|
||||
}
|
||||
// Remove the first object from the stack of traversed objects.
|
||||
stack.pop();
|
||||
return result;
|
||||
}
|
||||
|
||||
// Perform a deep comparison to check if two objects are equal.
|
||||
_.isEqual = function(a, b) {
|
||||
return eq(a, b, []);
|
||||
};
|
||||
|
||||
// Is a given array, string, or object empty?
|
||||
// An "empty" object has no enumerable own-properties.
|
||||
_.isEmpty = function(obj) {
|
||||
if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
|
||||
for (var key in obj) if (_.has(obj, key)) return false;
|
||||
return true;
|
||||
};
|
||||
|
||||
// Is a given value a DOM element?
|
||||
_.isElement = function(obj) {
|
||||
return !!(obj && obj.nodeType == 1);
|
||||
};
|
||||
|
||||
// Is a given value an array?
|
||||
// Delegates to ECMA5's native Array.isArray
|
||||
_.isArray = nativeIsArray || function(obj) {
|
||||
return toString.call(obj) == '[object Array]';
|
||||
};
|
||||
|
||||
// Is a given variable an object?
|
||||
_.isObject = function(obj) {
|
||||
return obj === Object(obj);
|
||||
};
|
||||
|
||||
// Is a given variable an arguments object?
|
||||
_.isArguments = function(obj) {
|
||||
return toString.call(obj) == '[object Arguments]';
|
||||
};
|
||||
if (!_.isArguments(arguments)) {
|
||||
_.isArguments = function(obj) {
|
||||
return !!(obj && _.has(obj, 'callee'));
|
||||
};
|
||||
}
|
||||
|
||||
// Is a given value a function?
|
||||
_.isFunction = function(obj) {
|
||||
return toString.call(obj) == '[object Function]';
|
||||
};
|
||||
|
||||
// Is a given value a string?
|
||||
_.isString = function(obj) {
|
||||
return toString.call(obj) == '[object String]';
|
||||
};
|
||||
|
||||
// Is a given value a number?
|
||||
_.isNumber = function(obj) {
|
||||
return toString.call(obj) == '[object Number]';
|
||||
};
|
||||
|
||||
// Is the given value `NaN`?
|
||||
_.isNaN = function(obj) {
|
||||
// `NaN` is the only value for which `===` is not reflexive.
|
||||
return obj !== obj;
|
||||
};
|
||||
|
||||
// Is a given value a boolean?
|
||||
_.isBoolean = function(obj) {
|
||||
return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
|
||||
};
|
||||
|
||||
// Is a given value a date?
|
||||
_.isDate = function(obj) {
|
||||
return toString.call(obj) == '[object Date]';
|
||||
};
|
||||
|
||||
// Is the given value a regular expression?
|
||||
_.isRegExp = function(obj) {
|
||||
return toString.call(obj) == '[object RegExp]';
|
||||
};
|
||||
|
||||
// Is a given value equal to null?
|
||||
_.isNull = function(obj) {
|
||||
return obj === null;
|
||||
};
|
||||
|
||||
// Is a given variable undefined?
|
||||
_.isUndefined = function(obj) {
|
||||
return obj === void 0;
|
||||
};
|
||||
|
||||
// Has own property?
|
||||
_.has = function(obj, key) {
|
||||
return hasOwnProperty.call(obj, key);
|
||||
};
|
||||
|
||||
// Utility Functions
|
||||
// -----------------
|
||||
|
||||
// Run Underscore.js in *noConflict* mode, returning the `_` variable to its
|
||||
// previous owner. Returns a reference to the Underscore object.
|
||||
_.noConflict = function() {
|
||||
root._ = previousUnderscore;
|
||||
return this;
|
||||
};
|
||||
|
||||
// Keep the identity function around for default iterators.
|
||||
_.identity = function(value) {
|
||||
return value;
|
||||
};
|
||||
|
||||
// Run a function **n** times.
|
||||
_.times = function (n, iterator, context) {
|
||||
for (var i = 0; i < n; i++) iterator.call(context, i);
|
||||
};
|
||||
|
||||
// Escape a string for HTML interpolation.
|
||||
_.escape = function(string) {
|
||||
return (''+string).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\//g,'/');
|
||||
};
|
||||
|
||||
// Add your own custom functions to the Underscore object, ensuring that
|
||||
// they're correctly added to the OOP wrapper as well.
|
||||
_.mixin = function(obj) {
|
||||
each(_.functions(obj), function(name){
|
||||
addToWrapper(name, _[name] = obj[name]);
|
||||
});
|
||||
};
|
||||
|
||||
// Generate a unique integer id (unique within the entire client session).
|
||||
// Useful for temporary DOM ids.
|
||||
var idCounter = 0;
|
||||
_.uniqueId = function(prefix) {
|
||||
var id = idCounter++;
|
||||
return prefix ? prefix + id : id;
|
||||
};
|
||||
|
||||
// By default, Underscore uses ERB-style template delimiters, change the
|
||||
// following template settings to use alternative delimiters.
|
||||
_.templateSettings = {
|
||||
evaluate : /<%([\s\S]+?)%>/g,
|
||||
interpolate : /<%=([\s\S]+?)%>/g,
|
||||
escape : /<%-([\s\S]+?)%>/g
|
||||
};
|
||||
|
||||
// When customizing `templateSettings`, if you don't want to define an
|
||||
// interpolation, evaluation or escaping regex, we need one that is
|
||||
// guaranteed not to match.
|
||||
var noMatch = /.^/;
|
||||
|
||||
// Within an interpolation, evaluation, or escaping, remove HTML escaping
|
||||
// that had been previously added.
|
||||
var unescape = function(code) {
|
||||
return code.replace(/\\\\/g, '\\').replace(/\\'/g, "'");
|
||||
};
|
||||
|
||||
// JavaScript micro-templating, similar to John Resig's implementation.
|
||||
// Underscore templating handles arbitrary delimiters, preserves whitespace,
|
||||
// and correctly escapes quotes within interpolated code.
|
||||
_.template = function(str, data) {
|
||||
var c = _.templateSettings;
|
||||
var tmpl = 'var __p=[],print=function(){__p.push.apply(__p,arguments);};' +
|
||||
'with(obj||{}){__p.push(\'' +
|
||||
str.replace(/\\/g, '\\\\')
|
||||
.replace(/'/g, "\\'")
|
||||
.replace(c.escape || noMatch, function(match, code) {
|
||||
return "',_.escape(" + unescape(code) + "),'";
|
||||
})
|
||||
.replace(c.interpolate || noMatch, function(match, code) {
|
||||
return "'," + unescape(code) + ",'";
|
||||
})
|
||||
.replace(c.evaluate || noMatch, function(match, code) {
|
||||
return "');" + unescape(code).replace(/[\r\n\t]/g, ' ') + ";__p.push('";
|
||||
})
|
||||
.replace(/\r/g, '\\r')
|
||||
.replace(/\n/g, '\\n')
|
||||
.replace(/\t/g, '\\t')
|
||||
+ "');}return __p.join('');";
|
||||
var func = new Function('obj', '_', tmpl);
|
||||
if (data) return func(data, _);
|
||||
return function(data) {
|
||||
return func.call(this, data, _);
|
||||
};
|
||||
};
|
||||
|
||||
// Add a "chain" function, which will delegate to the wrapper.
|
||||
_.chain = function(obj) {
|
||||
return _(obj).chain();
|
||||
};
|
||||
|
||||
// The OOP Wrapper
|
||||
// ---------------
|
||||
|
||||
// If Underscore is called as a function, it returns a wrapped object that
|
||||
// can be used OO-style. This wrapper holds altered versions of all the
|
||||
// underscore functions. Wrapped objects may be chained.
|
||||
var wrapper = function(obj) { this._wrapped = obj; };
|
||||
|
||||
// Expose `wrapper.prototype` as `_.prototype`
|
||||
_.prototype = wrapper.prototype;
|
||||
|
||||
// Helper function to continue chaining intermediate results.
|
||||
var result = function(obj, chain) {
|
||||
return chain ? _(obj).chain() : obj;
|
||||
};
|
||||
|
||||
// A method to easily add functions to the OOP wrapper.
|
||||
var addToWrapper = function(name, func) {
|
||||
wrapper.prototype[name] = function() {
|
||||
var args = slice.call(arguments);
|
||||
unshift.call(args, this._wrapped);
|
||||
return result(func.apply(_, args), this._chain);
|
||||
};
|
||||
};
|
||||
|
||||
// Add all of the Underscore functions to the wrapper object.
|
||||
_.mixin(_);
|
||||
|
||||
// Add all mutator Array functions to the wrapper.
|
||||
each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
|
||||
var method = ArrayProto[name];
|
||||
wrapper.prototype[name] = function() {
|
||||
var wrapped = this._wrapped;
|
||||
method.apply(wrapped, arguments);
|
||||
var length = wrapped.length;
|
||||
if ((name == 'shift' || name == 'splice') && length === 0) delete wrapped[0];
|
||||
return result(wrapped, this._chain);
|
||||
};
|
||||
});
|
||||
|
||||
// Add all accessor Array functions to the wrapper.
|
||||
each(['concat', 'join', 'slice'], function(name) {
|
||||
var method = ArrayProto[name];
|
||||
wrapper.prototype[name] = function() {
|
||||
return result(method.apply(this._wrapped, arguments), this._chain);
|
||||
};
|
||||
});
|
||||
|
||||
// Start chaining a wrapped Underscore object.
|
||||
wrapper.prototype.chain = function() {
|
||||
this._chain = true;
|
||||
return this;
|
||||
};
|
||||
|
||||
// Extracts the result from a wrapped and chained object.
|
||||
wrapper.prototype.value = function() {
|
||||
return this._wrapped;
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
|
Before Width: | Height: | Size: 372 B |
|
Before Width: | Height: | Size: 363 B |
@@ -1,808 +0,0 @@
|
||||
/*
|
||||
* websupport.js
|
||||
* ~~~~~~~~~~~~~
|
||||
*
|
||||
* sphinx.websupport utilties for all documentation.
|
||||
*
|
||||
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
$.fn.autogrow = function() {
|
||||
return this.each(function() {
|
||||
var textarea = this;
|
||||
|
||||
$.fn.autogrow.resize(textarea);
|
||||
|
||||
$(textarea)
|
||||
.focus(function() {
|
||||
textarea.interval = setInterval(function() {
|
||||
$.fn.autogrow.resize(textarea);
|
||||
}, 500);
|
||||
})
|
||||
.blur(function() {
|
||||
clearInterval(textarea.interval);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.autogrow.resize = function(textarea) {
|
||||
var lineHeight = parseInt($(textarea).css('line-height'), 10);
|
||||
var lines = textarea.value.split('\n');
|
||||
var columns = textarea.cols;
|
||||
var lineCount = 0;
|
||||
$.each(lines, function() {
|
||||
lineCount += Math.ceil(this.length / columns) || 1;
|
||||
});
|
||||
var height = lineHeight * (lineCount + 1);
|
||||
$(textarea).css('height', height);
|
||||
};
|
||||
})(jQuery);
|
||||
|
||||
(function($) {
|
||||
var comp, by;
|
||||
|
||||
function init() {
|
||||
initEvents();
|
||||
initComparator();
|
||||
}
|
||||
|
||||
function initEvents() {
|
||||
$('a.comment-close').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
hide($(this).attr('id').substring(2));
|
||||
});
|
||||
$('a.vote').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
handleVote($(this));
|
||||
});
|
||||
$('a.reply').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
openReply($(this).attr('id').substring(2));
|
||||
});
|
||||
$('a.close-reply').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
closeReply($(this).attr('id').substring(2));
|
||||
});
|
||||
$('a.sort-option').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
handleReSort($(this));
|
||||
});
|
||||
$('a.show-proposal').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
showProposal($(this).attr('id').substring(2));
|
||||
});
|
||||
$('a.hide-proposal').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
hideProposal($(this).attr('id').substring(2));
|
||||
});
|
||||
$('a.show-propose-change').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
showProposeChange($(this).attr('id').substring(2));
|
||||
});
|
||||
$('a.hide-propose-change').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
hideProposeChange($(this).attr('id').substring(2));
|
||||
});
|
||||
$('a.accept-comment').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
acceptComment($(this).attr('id').substring(2));
|
||||
});
|
||||
$('a.delete-comment').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
deleteComment($(this).attr('id').substring(2));
|
||||
});
|
||||
$('a.comment-markup').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
toggleCommentMarkupBox($(this).attr('id').substring(2));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Set comp, which is a comparator function used for sorting and
|
||||
* inserting comments into the list.
|
||||
*/
|
||||
function setComparator() {
|
||||
// If the first three letters are "asc", sort in ascending order
|
||||
// and remove the prefix.
|
||||
if (by.substring(0,3) == 'asc') {
|
||||
var i = by.substring(3);
|
||||
comp = function(a, b) { return a[i] - b[i]; };
|
||||
} else {
|
||||
// Otherwise sort in descending order.
|
||||
comp = function(a, b) { return b[by] - a[by]; };
|
||||
}
|
||||
|
||||
// Reset link styles and format the selected sort option.
|
||||
$('a.sel').attr('href', '#').removeClass('sel');
|
||||
$('a.by' + by).removeAttr('href').addClass('sel');
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a comp function. If the user has preferences stored in
|
||||
* the sortBy cookie, use those, otherwise use the default.
|
||||
*/
|
||||
function initComparator() {
|
||||
by = 'rating'; // Default to sort by rating.
|
||||
// If the sortBy cookie is set, use that instead.
|
||||
if (document.cookie.length > 0) {
|
||||
var start = document.cookie.indexOf('sortBy=');
|
||||
if (start != -1) {
|
||||
start = start + 7;
|
||||
var end = document.cookie.indexOf(";", start);
|
||||
if (end == -1) {
|
||||
end = document.cookie.length;
|
||||
by = unescape(document.cookie.substring(start, end));
|
||||
}
|
||||
}
|
||||
}
|
||||
setComparator();
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a comment div.
|
||||
*/
|
||||
function show(id) {
|
||||
$('#ao' + id).hide();
|
||||
$('#ah' + id).show();
|
||||
var context = $.extend({id: id}, opts);
|
||||
var popup = $(renderTemplate(popupTemplate, context)).hide();
|
||||
popup.find('textarea[name="proposal"]').hide();
|
||||
popup.find('a.by' + by).addClass('sel');
|
||||
var form = popup.find('#cf' + id);
|
||||
form.submit(function(event) {
|
||||
event.preventDefault();
|
||||
addComment(form);
|
||||
});
|
||||
$('#s' + id).after(popup);
|
||||
popup.slideDown('fast', function() {
|
||||
getComments(id);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide a comment div.
|
||||
*/
|
||||
function hide(id) {
|
||||
$('#ah' + id).hide();
|
||||
$('#ao' + id).show();
|
||||
var div = $('#sc' + id);
|
||||
div.slideUp('fast', function() {
|
||||
div.remove();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform an ajax request to get comments for a node
|
||||
* and insert the comments into the comments tree.
|
||||
*/
|
||||
function getComments(id) {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: opts.getCommentsURL,
|
||||
data: {node: id},
|
||||
success: function(data, textStatus, request) {
|
||||
var ul = $('#cl' + id);
|
||||
var speed = 100;
|
||||
$('#cf' + id)
|
||||
.find('textarea[name="proposal"]')
|
||||
.data('source', data.source);
|
||||
|
||||
if (data.comments.length === 0) {
|
||||
ul.html('<li>No comments yet.</li>');
|
||||
ul.data('empty', true);
|
||||
} else {
|
||||
// If there are comments, sort them and put them in the list.
|
||||
var comments = sortComments(data.comments);
|
||||
speed = data.comments.length * 100;
|
||||
appendComments(comments, ul);
|
||||
ul.data('empty', false);
|
||||
}
|
||||
$('#cn' + id).slideUp(speed + 200);
|
||||
ul.slideDown(speed);
|
||||
},
|
||||
error: function(request, textStatus, error) {
|
||||
showError('Oops, there was a problem retrieving the comments.');
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a comment via ajax and insert the comment into the comment tree.
|
||||
*/
|
||||
function addComment(form) {
|
||||
var node_id = form.find('input[name="node"]').val();
|
||||
var parent_id = form.find('input[name="parent"]').val();
|
||||
var text = form.find('textarea[name="comment"]').val();
|
||||
var proposal = form.find('textarea[name="proposal"]').val();
|
||||
|
||||
if (text == '') {
|
||||
showError('Please enter a comment.');
|
||||
return;
|
||||
}
|
||||
|
||||
// Disable the form that is being submitted.
|
||||
form.find('textarea,input').attr('disabled', 'disabled');
|
||||
|
||||
// Send the comment to the server.
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: opts.addCommentURL,
|
||||
dataType: 'json',
|
||||
data: {
|
||||
node: node_id,
|
||||
parent: parent_id,
|
||||
text: text,
|
||||
proposal: proposal
|
||||
},
|
||||
success: function(data, textStatus, error) {
|
||||
// Reset the form.
|
||||
if (node_id) {
|
||||
hideProposeChange(node_id);
|
||||
}
|
||||
form.find('textarea')
|
||||
.val('')
|
||||
.add(form.find('input'))
|
||||
.removeAttr('disabled');
|
||||
var ul = $('#cl' + (node_id || parent_id));
|
||||
if (ul.data('empty')) {
|
||||
$(ul).empty();
|
||||
ul.data('empty', false);
|
||||
}
|
||||
insertComment(data.comment);
|
||||
var ao = $('#ao' + node_id);
|
||||
ao.find('img').attr({'src': opts.commentBrightImage});
|
||||
if (node_id) {
|
||||
// if this was a "root" comment, remove the commenting box
|
||||
// (the user can get it back by reopening the comment popup)
|
||||
$('#ca' + node_id).slideUp();
|
||||
}
|
||||
},
|
||||
error: function(request, textStatus, error) {
|
||||
form.find('textarea,input').removeAttr('disabled');
|
||||
showError('Oops, there was a problem adding the comment.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively append comments to the main comment list and children
|
||||
* lists, creating the comment tree.
|
||||
*/
|
||||
function appendComments(comments, ul) {
|
||||
$.each(comments, function() {
|
||||
var div = createCommentDiv(this);
|
||||
ul.append($(document.createElement('li')).html(div));
|
||||
appendComments(this.children, div.find('ul.comment-children'));
|
||||
// To avoid stagnating data, don't store the comments children in data.
|
||||
this.children = null;
|
||||
div.data('comment', this);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* After adding a new comment, it must be inserted in the correct
|
||||
* location in the comment tree.
|
||||
*/
|
||||
function insertComment(comment) {
|
||||
var div = createCommentDiv(comment);
|
||||
|
||||
// To avoid stagnating data, don't store the comments children in data.
|
||||
comment.children = null;
|
||||
div.data('comment', comment);
|
||||
|
||||
var ul = $('#cl' + (comment.node || comment.parent));
|
||||
var siblings = getChildren(ul);
|
||||
|
||||
var li = $(document.createElement('li'));
|
||||
li.hide();
|
||||
|
||||
// Determine where in the parents children list to insert this comment.
|
||||
for(i=0; i < siblings.length; i++) {
|
||||
if (comp(comment, siblings[i]) <= 0) {
|
||||
$('#cd' + siblings[i].id)
|
||||
.parent()
|
||||
.before(li.html(div));
|
||||
li.slideDown('fast');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// If we get here, this comment rates lower than all the others,
|
||||
// or it is the only comment in the list.
|
||||
ul.append(li.html(div));
|
||||
li.slideDown('fast');
|
||||
}
|
||||
|
||||
function acceptComment(id) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: opts.acceptCommentURL,
|
||||
data: {id: id},
|
||||
success: function(data, textStatus, request) {
|
||||
$('#cm' + id).fadeOut('fast');
|
||||
$('#cd' + id).removeClass('moderate');
|
||||
},
|
||||
error: function(request, textStatus, error) {
|
||||
showError('Oops, there was a problem accepting the comment.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function deleteComment(id) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: opts.deleteCommentURL,
|
||||
data: {id: id},
|
||||
success: function(data, textStatus, request) {
|
||||
var div = $('#cd' + id);
|
||||
if (data == 'delete') {
|
||||
// Moderator mode: remove the comment and all children immediately
|
||||
div.slideUp('fast', function() {
|
||||
div.remove();
|
||||
});
|
||||
return;
|
||||
}
|
||||
// User mode: only mark the comment as deleted
|
||||
div
|
||||
.find('span.user-id:first')
|
||||
.text('[deleted]').end()
|
||||
.find('div.comment-text:first')
|
||||
.text('[deleted]').end()
|
||||
.find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id +
|
||||
', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id)
|
||||
.remove();
|
||||
var comment = div.data('comment');
|
||||
comment.username = '[deleted]';
|
||||
comment.text = '[deleted]';
|
||||
div.data('comment', comment);
|
||||
},
|
||||
error: function(request, textStatus, error) {
|
||||
showError('Oops, there was a problem deleting the comment.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showProposal(id) {
|
||||
$('#sp' + id).hide();
|
||||
$('#hp' + id).show();
|
||||
$('#pr' + id).slideDown('fast');
|
||||
}
|
||||
|
||||
function hideProposal(id) {
|
||||
$('#hp' + id).hide();
|
||||
$('#sp' + id).show();
|
||||
$('#pr' + id).slideUp('fast');
|
||||
}
|
||||
|
||||
function showProposeChange(id) {
|
||||
$('#pc' + id).hide();
|
||||
$('#hc' + id).show();
|
||||
var textarea = $('#pt' + id);
|
||||
textarea.val(textarea.data('source'));
|
||||
$.fn.autogrow.resize(textarea[0]);
|
||||
textarea.slideDown('fast');
|
||||
}
|
||||
|
||||
function hideProposeChange(id) {
|
||||
$('#hc' + id).hide();
|
||||
$('#pc' + id).show();
|
||||
var textarea = $('#pt' + id);
|
||||
textarea.val('').removeAttr('disabled');
|
||||
textarea.slideUp('fast');
|
||||
}
|
||||
|
||||
function toggleCommentMarkupBox(id) {
|
||||
$('#mb' + id).toggle();
|
||||
}
|
||||
|
||||
/** Handle when the user clicks on a sort by link. */
|
||||
function handleReSort(link) {
|
||||
var classes = link.attr('class').split(/\s+/);
|
||||
for (var i=0; i<classes.length; i++) {
|
||||
if (classes[i] != 'sort-option') {
|
||||
by = classes[i].substring(2);
|
||||
}
|
||||
}
|
||||
setComparator();
|
||||
// Save/update the sortBy cookie.
|
||||
var expiration = new Date();
|
||||
expiration.setDate(expiration.getDate() + 365);
|
||||
document.cookie= 'sortBy=' + escape(by) +
|
||||
';expires=' + expiration.toUTCString();
|
||||
$('ul.comment-ul').each(function(index, ul) {
|
||||
var comments = getChildren($(ul), true);
|
||||
comments = sortComments(comments);
|
||||
appendComments(comments, $(ul).empty());
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to process a vote when a user clicks an arrow.
|
||||
*/
|
||||
function handleVote(link) {
|
||||
if (!opts.voting) {
|
||||
showError("You'll need to login to vote.");
|
||||
return;
|
||||
}
|
||||
|
||||
var id = link.attr('id');
|
||||
if (!id) {
|
||||
// Didn't click on one of the voting arrows.
|
||||
return;
|
||||
}
|
||||
// If it is an unvote, the new vote value is 0,
|
||||
// Otherwise it's 1 for an upvote, or -1 for a downvote.
|
||||
var value = 0;
|
||||
if (id.charAt(1) != 'u') {
|
||||
value = id.charAt(0) == 'u' ? 1 : -1;
|
||||
}
|
||||
// The data to be sent to the server.
|
||||
var d = {
|
||||
comment_id: id.substring(2),
|
||||
value: value
|
||||
};
|
||||
|
||||
// Swap the vote and unvote links.
|
||||
link.hide();
|
||||
$('#' + id.charAt(0) + (id.charAt(1) == 'u' ? 'v' : 'u') + d.comment_id)
|
||||
.show();
|
||||
|
||||
// The div the comment is displayed in.
|
||||
var div = $('div#cd' + d.comment_id);
|
||||
var data = div.data('comment');
|
||||
|
||||
// If this is not an unvote, and the other vote arrow has
|
||||
// already been pressed, unpress it.
|
||||
if ((d.value !== 0) && (data.vote === d.value * -1)) {
|
||||
$('#' + (d.value == 1 ? 'd' : 'u') + 'u' + d.comment_id).hide();
|
||||
$('#' + (d.value == 1 ? 'd' : 'u') + 'v' + d.comment_id).show();
|
||||
}
|
||||
|
||||
// Update the comments rating in the local data.
|
||||
data.rating += (data.vote === 0) ? d.value : (d.value - data.vote);
|
||||
data.vote = d.value;
|
||||
div.data('comment', data);
|
||||
|
||||
// Change the rating text.
|
||||
div.find('.rating:first')
|
||||
.text(data.rating + ' point' + (data.rating == 1 ? '' : 's'));
|
||||
|
||||
// Send the vote information to the server.
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: opts.processVoteURL,
|
||||
data: d,
|
||||
error: function(request, textStatus, error) {
|
||||
showError('Oops, there was a problem casting that vote.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Open a reply form used to reply to an existing comment.
|
||||
*/
|
||||
function openReply(id) {
|
||||
// Swap out the reply link for the hide link
|
||||
$('#rl' + id).hide();
|
||||
$('#cr' + id).show();
|
||||
|
||||
// Add the reply li to the children ul.
|
||||
var div = $(renderTemplate(replyTemplate, {id: id})).hide();
|
||||
$('#cl' + id)
|
||||
.prepend(div)
|
||||
// Setup the submit handler for the reply form.
|
||||
.find('#rf' + id)
|
||||
.submit(function(event) {
|
||||
event.preventDefault();
|
||||
addComment($('#rf' + id));
|
||||
closeReply(id);
|
||||
})
|
||||
.find('input[type=button]')
|
||||
.click(function() {
|
||||
closeReply(id);
|
||||
});
|
||||
div.slideDown('fast', function() {
|
||||
$('#rf' + id).find('textarea').focus();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Close the reply form opened with openReply.
|
||||
*/
|
||||
function closeReply(id) {
|
||||
// Remove the reply div from the DOM.
|
||||
$('#rd' + id).slideUp('fast', function() {
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
// Swap out the hide link for the reply link
|
||||
$('#cr' + id).hide();
|
||||
$('#rl' + id).show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively sort a tree of comments using the comp comparator.
|
||||
*/
|
||||
function sortComments(comments) {
|
||||
comments.sort(comp);
|
||||
$.each(comments, function() {
|
||||
this.children = sortComments(this.children);
|
||||
});
|
||||
return comments;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the children comments from a ul. If recursive is true,
|
||||
* recursively include childrens' children.
|
||||
*/
|
||||
function getChildren(ul, recursive) {
|
||||
var children = [];
|
||||
ul.children().children("[id^='cd']")
|
||||
.each(function() {
|
||||
var comment = $(this).data('comment');
|
||||
if (recursive)
|
||||
comment.children = getChildren($(this).find('#cl' + comment.id), true);
|
||||
children.push(comment);
|
||||
});
|
||||
return children;
|
||||
}
|
||||
|
||||
/** Create a div to display a comment in. */
|
||||
function createCommentDiv(comment) {
|
||||
if (!comment.displayed && !opts.moderator) {
|
||||
return $('<div class="moderate">Thank you! Your comment will show up '
|
||||
+ 'once it is has been approved by a moderator.</div>');
|
||||
}
|
||||
// Prettify the comment rating.
|
||||
comment.pretty_rating = comment.rating + ' point' +
|
||||
(comment.rating == 1 ? '' : 's');
|
||||
// Make a class (for displaying not yet moderated comments differently)
|
||||
comment.css_class = comment.displayed ? '' : ' moderate';
|
||||
// Create a div for this comment.
|
||||
var context = $.extend({}, opts, comment);
|
||||
var div = $(renderTemplate(commentTemplate, context));
|
||||
|
||||
// If the user has voted on this comment, highlight the correct arrow.
|
||||
if (comment.vote) {
|
||||
var direction = (comment.vote == 1) ? 'u' : 'd';
|
||||
div.find('#' + direction + 'v' + comment.id).hide();
|
||||
div.find('#' + direction + 'u' + comment.id).show();
|
||||
}
|
||||
|
||||
if (opts.moderator || comment.text != '[deleted]') {
|
||||
div.find('a.reply').show();
|
||||
if (comment.proposal_diff)
|
||||
div.find('#sp' + comment.id).show();
|
||||
if (opts.moderator && !comment.displayed)
|
||||
div.find('#cm' + comment.id).show();
|
||||
if (opts.moderator || (opts.username == comment.username))
|
||||
div.find('#dc' + comment.id).show();
|
||||
}
|
||||
return div;
|
||||
}
|
||||
|
||||
/**
|
||||
* A simple template renderer. Placeholders such as <%id%> are replaced
|
||||
* by context['id'] with items being escaped. Placeholders such as <#id#>
|
||||
* are not escaped.
|
||||
*/
|
||||
function renderTemplate(template, context) {
|
||||
var esc = $(document.createElement('div'));
|
||||
|
||||
function handle(ph, escape) {
|
||||
var cur = context;
|
||||
$.each(ph.split('.'), function() {
|
||||
cur = cur[this];
|
||||
});
|
||||
return escape ? esc.text(cur || "").html() : cur;
|
||||
}
|
||||
|
||||
return template.replace(/<([%#])([\w\.]*)\1>/g, function() {
|
||||
return handle(arguments[2], arguments[1] == '%' ? true : false);
|
||||
});
|
||||
}
|
||||
|
||||
/** Flash an error message briefly. */
|
||||
function showError(message) {
|
||||
$(document.createElement('div')).attr({'class': 'popup-error'})
|
||||
.append($(document.createElement('div'))
|
||||
.attr({'class': 'error-message'}).text(message))
|
||||
.appendTo('body')
|
||||
.fadeIn("slow")
|
||||
.delay(2000)
|
||||
.fadeOut("slow");
|
||||
}
|
||||
|
||||
/** Add a link the user uses to open the comments popup. */
|
||||
$.fn.comment = function() {
|
||||
return this.each(function() {
|
||||
var id = $(this).attr('id').substring(1);
|
||||
var count = COMMENT_METADATA[id];
|
||||
var title = count + ' comment' + (count == 1 ? '' : 's');
|
||||
var image = count > 0 ? opts.commentBrightImage : opts.commentImage;
|
||||
var addcls = count == 0 ? ' nocomment' : '';
|
||||
$(this)
|
||||
.append(
|
||||
$(document.createElement('a')).attr({
|
||||
href: '#',
|
||||
'class': 'sphinx-comment-open' + addcls,
|
||||
id: 'ao' + id
|
||||
})
|
||||
.append($(document.createElement('img')).attr({
|
||||
src: image,
|
||||
alt: 'comment',
|
||||
title: title
|
||||
}))
|
||||
.click(function(event) {
|
||||
event.preventDefault();
|
||||
show($(this).attr('id').substring(2));
|
||||
})
|
||||
)
|
||||
.append(
|
||||
$(document.createElement('a')).attr({
|
||||
href: '#',
|
||||
'class': 'sphinx-comment-close hidden',
|
||||
id: 'ah' + id
|
||||
})
|
||||
.append($(document.createElement('img')).attr({
|
||||
src: opts.closeCommentImage,
|
||||
alt: 'close',
|
||||
title: 'close'
|
||||
}))
|
||||
.click(function(event) {
|
||||
event.preventDefault();
|
||||
hide($(this).attr('id').substring(2));
|
||||
})
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
var opts = {
|
||||
processVoteURL: '/_process_vote',
|
||||
addCommentURL: '/_add_comment',
|
||||
getCommentsURL: '/_get_comments',
|
||||
acceptCommentURL: '/_accept_comment',
|
||||
deleteCommentURL: '/_delete_comment',
|
||||
commentImage: '/static/_static/comment.png',
|
||||
closeCommentImage: '/static/_static/comment-close.png',
|
||||
loadingImage: '/static/_static/ajax-loader.gif',
|
||||
commentBrightImage: '/static/_static/comment-bright.png',
|
||||
upArrow: '/static/_static/up.png',
|
||||
downArrow: '/static/_static/down.png',
|
||||
upArrowPressed: '/static/_static/up-pressed.png',
|
||||
downArrowPressed: '/static/_static/down-pressed.png',
|
||||
voting: false,
|
||||
moderator: false
|
||||
};
|
||||
|
||||
if (typeof COMMENT_OPTIONS != "undefined") {
|
||||
opts = jQuery.extend(opts, COMMENT_OPTIONS);
|
||||
}
|
||||
|
||||
var popupTemplate = '\
|
||||
<div class="sphinx-comments" id="sc<%id%>">\
|
||||
<p class="sort-options">\
|
||||
Sort by:\
|
||||
<a href="#" class="sort-option byrating">best rated</a>\
|
||||
<a href="#" class="sort-option byascage">newest</a>\
|
||||
<a href="#" class="sort-option byage">oldest</a>\
|
||||
</p>\
|
||||
<div class="comment-header">Comments</div>\
|
||||
<div class="comment-loading" id="cn<%id%>">\
|
||||
loading comments... <img src="<%loadingImage%>" alt="" /></div>\
|
||||
<ul id="cl<%id%>" class="comment-ul"></ul>\
|
||||
<div id="ca<%id%>">\
|
||||
<p class="add-a-comment">Add a comment\
|
||||
(<a href="#" class="comment-markup" id="ab<%id%>">markup</a>):</p>\
|
||||
<div class="comment-markup-box" id="mb<%id%>">\
|
||||
reStructured text markup: <i>*emph*</i>, <b>**strong**</b>, \
|
||||
<tt>``code``</tt>, \
|
||||
code blocks: <tt>::</tt> and an indented block after blank line</div>\
|
||||
<form method="post" id="cf<%id%>" class="comment-form" action="">\
|
||||
<textarea name="comment" cols="80"></textarea>\
|
||||
<p class="propose-button">\
|
||||
<a href="#" id="pc<%id%>" class="show-propose-change">\
|
||||
Propose a change ▹\
|
||||
</a>\
|
||||
<a href="#" id="hc<%id%>" class="hide-propose-change">\
|
||||
Propose a change ▿\
|
||||
</a>\
|
||||
</p>\
|
||||
<textarea name="proposal" id="pt<%id%>" cols="80"\
|
||||
spellcheck="false"></textarea>\
|
||||
<input type="submit" value="Add comment" />\
|
||||
<input type="hidden" name="node" value="<%id%>" />\
|
||||
<input type="hidden" name="parent" value="" />\
|
||||
</form>\
|
||||
</div>\
|
||||
</div>';
|
||||
|
||||
var commentTemplate = '\
|
||||
<div id="cd<%id%>" class="sphinx-comment<%css_class%>">\
|
||||
<div class="vote">\
|
||||
<div class="arrow">\
|
||||
<a href="#" id="uv<%id%>" class="vote" title="vote up">\
|
||||
<img src="<%upArrow%>" />\
|
||||
</a>\
|
||||
<a href="#" id="uu<%id%>" class="un vote" title="vote up">\
|
||||
<img src="<%upArrowPressed%>" />\
|
||||
</a>\
|
||||
</div>\
|
||||
<div class="arrow">\
|
||||
<a href="#" id="dv<%id%>" class="vote" title="vote down">\
|
||||
<img src="<%downArrow%>" id="da<%id%>" />\
|
||||
</a>\
|
||||
<a href="#" id="du<%id%>" class="un vote" title="vote down">\
|
||||
<img src="<%downArrowPressed%>" />\
|
||||
</a>\
|
||||
</div>\
|
||||
</div>\
|
||||
<div class="comment-content">\
|
||||
<p class="tagline comment">\
|
||||
<span class="user-id"><%username%></span>\
|
||||
<span class="rating"><%pretty_rating%></span>\
|
||||
<span class="delta"><%time.delta%></span>\
|
||||
</p>\
|
||||
<div class="comment-text comment"><#text#></div>\
|
||||
<p class="comment-opts comment">\
|
||||
<a href="#" class="reply hidden" id="rl<%id%>">reply ▹</a>\
|
||||
<a href="#" class="close-reply" id="cr<%id%>">reply ▿</a>\
|
||||
<a href="#" id="sp<%id%>" class="show-proposal">proposal ▹</a>\
|
||||
<a href="#" id="hp<%id%>" class="hide-proposal">proposal ▿</a>\
|
||||
<a href="#" id="dc<%id%>" class="delete-comment hidden">delete</a>\
|
||||
<span id="cm<%id%>" class="moderation hidden">\
|
||||
<a href="#" id="ac<%id%>" class="accept-comment">accept</a>\
|
||||
</span>\
|
||||
</p>\
|
||||
<pre class="proposal" id="pr<%id%>">\
|
||||
<#proposal_diff#>\
|
||||
</pre>\
|
||||
<ul class="comment-children" id="cl<%id%>"></ul>\
|
||||
</div>\
|
||||
<div class="clearleft"></div>\
|
||||
</div>\
|
||||
</div>';
|
||||
|
||||
var replyTemplate = '\
|
||||
<li>\
|
||||
<div class="reply-div" id="rd<%id%>">\
|
||||
<form id="rf<%id%>">\
|
||||
<textarea name="comment" cols="80"></textarea>\
|
||||
<input type="submit" value="Add reply" />\
|
||||
<input type="button" value="Cancel" />\
|
||||
<input type="hidden" name="parent" value="<%id%>" />\
|
||||
<input type="hidden" name="node" value="" />\
|
||||
</form>\
|
||||
</div>\
|
||||
</li>';
|
||||
|
||||
$(document).ready(function() {
|
||||
init();
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
$(document).ready(function() {
|
||||
// add comment anchors for all paragraphs that are commentable
|
||||
$('.sphinx-has-comment').comment();
|
||||
|
||||
// highlight search words in search results
|
||||
$("div.context").each(function() {
|
||||
var params = $.getQueryParameters();
|
||||
var terms = (params.q) ? params.q[0].split(/\s+/) : [];
|
||||
var result = $(this);
|
||||
$.each(terms, function() {
|
||||
result.highlightText(this.toLowerCase(), 'highlighted');
|
||||
});
|
||||
});
|
||||
|
||||
// directly open comment window if requested
|
||||
var anchor = document.location.hash;
|
||||
if (anchor.substring(0, 9) == '#comment-') {
|
||||
$('#ao' + anchor.substring(9)).click();
|
||||
document.location.hash = '#s' + anchor.substring(9);
|
||||
}
|
||||
});
|
||||
@@ -6,15 +6,15 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Acknowledgements — musrfit 1.7.4 documentation</title>
|
||||
<title>Acknowledgements — musrfit 1.8.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.7.4',
|
||||
VERSION: '1.8.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,32 +24,29 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.7.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.8.0 documentation" href="index.html" />
|
||||
<link rel="next" title="Bugtracking" href="bugtracking.html" />
|
||||
<link rel="prev" title="MusrRoot - an Extensible Open File Format for μSR" href="musr-root.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="bugtracking.html" title="Bugtracking"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="musr-root.html" title="MusrRoot - an Extensible Open File Format for μSR"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>musrfit 1.8.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>Acknowledgements</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
«  <a href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="bugtracking.html">Bugtracking</a>  »
|
||||
</p>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
|
||||
<div class="section" id="acknowledgements">
|
||||
<span id="acknowledgment"></span><span id="index-0"></span><h1>Acknowledgements<a class="headerlink" href="#acknowledgements" title="Permalink to this headline">¶</a></h1>
|
||||
<dl class="docutils">
|
||||
@@ -67,57 +64,22 @@ extremely competent way to deal with his projects as well as to deal with the ch
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="musr-root.html"
|
||||
title="previous chapter">MusrRoot - an Extensible Open File Format for μSR</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="bugtracking.html"
|
||||
title="next chapter">Bugtracking</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="_sources/acknowledgement.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
«  <a href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="bugtracking.html">Bugtracking</a>  »
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="bugtracking.html" title="Bugtracking"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="musr-root.html" title="MusrRoot - an Extensible Open File Format for μSR"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Apr 09, 2021.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on May 29, 2022.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>any2many - a Universal μSR-file-format converter — musrfit 1.7.4 documentation</title>
|
||||
<title>any2many - a Universal μSR-file-format converter — musrfit 1.8.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.7.4',
|
||||
VERSION: '1.8.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,32 +24,29 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.7.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.8.0 documentation" href="index.html" />
|
||||
<link rel="next" title="MusrRoot - an Extensible Open File Format for μSR" href="musr-root.html" />
|
||||
<link rel="prev" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files" href="msr2data.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="musr-root.html" title="MusrRoot - an Extensible Open File Format for μSR"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="msr2data.html" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>musrfit 1.8.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>any2many - a Universal μSR-file-format converter</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
«  <a href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr Files</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a>  »
|
||||
</p>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
|
||||
<div class="section" id="any2many-a-universal-mgrsr-file-format-converter">
|
||||
<span id="index-0"></span><h1>any2many - a Universal μSR-file-format converter<a class="headerlink" href="#any2many-a-universal-mgrsr-file-format-converter" title="Permalink to this headline">¶</a></h1>
|
||||
<p><tt class="docutils literal"><span class="pre">any2many</span></tt> allows to convert most μSR-file-formats from one to the other.
|
||||
@@ -57,57 +54,22 @@ For a detailed description see <a class="reference internal" href="user-manual.h
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="msr2data.html"
|
||||
title="previous chapter">msr2data - A Program for Automatically Processing Multiple <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr Files</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="musr-root.html"
|
||||
title="next chapter">MusrRoot - an Extensible Open File Format for μSR</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="_sources/any2many.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
«  <a href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr Files</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a>  »
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="musr-root.html" title="MusrRoot - an Extensible Open File Format for μSR"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="msr2data.html" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Apr 09, 2021.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on May 29, 2022.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Bugtracking — musrfit 1.7.4 documentation</title>
|
||||
<title>Bugtracking — musrfit 1.8.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.7.4',
|
||||
VERSION: '1.8.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,28 +24,26 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.7.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.8.0 documentation" href="index.html" />
|
||||
<link rel="prev" title="Acknowledgements" href="acknowledgement.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="acknowledgement.html" title="Acknowledgements"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>musrfit 1.8.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>Bugtracking</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
«  <a href="acknowledgement.html">Acknowledgements</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
</p>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
|
||||
<div class="section" id="bugtracking">
|
||||
<span id="index-0"></span><span id="id1"></span><h1>Bugtracking<a class="headerlink" href="#bugtracking" title="Permalink to this headline">¶</a></h1>
|
||||
<p>For reporting bugs or requesting new features and improvements please use
|
||||
@@ -54,51 +52,20 @@ or send an e-mail to A. Suter at PSI.</p>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="acknowledgement.html"
|
||||
title="previous chapter">Acknowledgements</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="_sources/bugtracking.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
«  <a href="acknowledgement.html">Acknowledgements</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="acknowledgement.html" title="Acknowledgements"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Apr 09, 2021.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on May 29, 2022.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>How to Cite musrfit? — musrfit 1.7.4 documentation</title>
|
||||
<title>How to Cite musrfit? — musrfit 1.8.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.7.4',
|
||||
VERSION: '1.8.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,32 +24,29 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.7.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.8.0 documentation" href="index.html" />
|
||||
<link rel="next" title="Tutorial for musrfit" href="tutorial.html" />
|
||||
<link rel="prev" title="Welcome to the musrfit documentation!" href="index.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="tutorial.html" title="Tutorial for musrfit"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="index.html" title="Welcome to the musrfit documentation!"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>musrfit 1.8.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>How to Cite musrfit?</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
«  <a href="index.html">Welcome to the musrfit documentation!</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="tutorial.html">Tutorial for <tt class="docutils literal"><span class="pre">musrfit</span></tt></a>  »
|
||||
</p>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
|
||||
<div class="section" id="how-to-cite-musrfit">
|
||||
<span id="cite"></span><span id="index-0"></span><h1>How to Cite <tt class="docutils literal"><span class="pre">musrfit</span></tt>?<a class="headerlink" href="#how-to-cite-musrfit" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Since quite some effort is going into the development and maintenance of the <tt class="docutils literal"><span class="pre">musrfit</span></tt> package, you should at least acknowledge it in your publication if you have used it to analyze your data. Even better of course is to cite it properly by the reference given beneath</p>
|
||||
@@ -69,57 +66,22 @@
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="index.html"
|
||||
title="previous chapter">Welcome to the musrfit documentation!</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="tutorial.html"
|
||||
title="next chapter">Tutorial for <tt class="docutils literal"><span class="pre">musrfit</span></tt></a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="_sources/cite.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
«  <a href="index.html">Welcome to the musrfit documentation!</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="tutorial.html">Tutorial for <tt class="docutils literal"><span class="pre">musrfit</span></tt></a>  »
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="tutorial.html" title="Tutorial for musrfit"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="index.html" title="Welcome to the musrfit documentation!"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Apr 09, 2021.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on May 29, 2022.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -7,15 +7,15 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Index — musrfit 1.7.4 documentation</title>
|
||||
<title>Index — musrfit 1.8.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.7.4',
|
||||
VERSION: '1.8.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -25,24 +25,23 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.7.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.8.0 documentation" href="index.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="#" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>musrfit 1.8.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>Index</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
</p>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
|
||||
|
||||
<h1 id="index">Index</h1>
|
||||
|
||||
@@ -89,21 +88,25 @@
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-19">addrun</a>
|
||||
<dt><a href="user-manual.html#index-20">addrun</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-36">addt0-asymmetry</a>
|
||||
<dt><a href="user-manual.html#index-10">addRunApp</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-35">addt0-single-histo</a>
|
||||
<dt><a href="user-manual.html#index-37">addt0-asymmetry</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-36">addt0-single-histo</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="user-manual.html#index-21">alpha-beta</a>
|
||||
<dt><a href="user-manual.html#index-22">alpha-beta</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@@ -111,11 +114,11 @@
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-70">asymmetry-fit</a>
|
||||
<dt><a href="user-manual.html#index-71">asymmetry-fit</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-71">asymmetry-rrf-fit</a>
|
||||
<dt><a href="user-manual.html#index-72">asymmetry-rrf-fit</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
@@ -125,19 +128,19 @@
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="user-manual.html#index-23">backgr.fit</a>
|
||||
<dt><a href="user-manual.html#index-24">backgr.fit</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-28">backgr.fix</a>
|
||||
<dt><a href="user-manual.html#index-29">backgr.fix</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-30">background-asymmetry</a>
|
||||
<dt><a href="user-manual.html#index-31">background-asymmetry</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-29">background-single-histo</a>
|
||||
<dt><a href="user-manual.html#index-30">background-single-histo</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@@ -151,7 +154,7 @@
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-73">bnmr-asymmetry-fit</a>
|
||||
<dt><a href="user-manual.html#index-74">bnmr-asymmetry-fit</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@@ -176,14 +179,10 @@
|
||||
<dt><a href="cite.html#index-0">cite</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="setup-dks.html#index-2">cuda-install</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="setup-standard.html#index-21">cygwin</a>
|
||||
<dt><a href="setup-dks.html#index-2">cuda-install</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
@@ -193,11 +192,11 @@
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="user-manual.html#index-32">data-asymmetry</a>
|
||||
<dt><a href="user-manual.html#index-33">data-asymmetry</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-31">data-single-histo</a>
|
||||
<dt><a href="user-manual.html#index-32">data-single-histo</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@@ -205,7 +204,7 @@
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-42">dks-command-overview</a>
|
||||
<dt><a href="user-manual.html#index-43">dks-command-overview</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@@ -251,61 +250,61 @@
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="setup-standard.html#index-30">fink</a>
|
||||
<dt><a href="setup-standard.html#index-24">fink</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-38">fit</a>
|
||||
<dt><a href="user-manual.html#index-39">fit</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-67">fit-types</a>
|
||||
<dt><a href="user-manual.html#index-68">fit-types</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-20">fittype</a>
|
||||
<dt><a href="user-manual.html#index-21">fittype</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-26">forward</a>
|
||||
<dt><a href="user-manual.html#index-27">forward</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-27">forward-backward</a>
|
||||
<dt><a href="user-manual.html#index-28">forward-backward</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-49">fourier-block-apodization</a>
|
||||
<dt><a href="user-manual.html#index-50">fourier-block-apodization</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="user-manual.html#index-48">fourier-block-dc-corrected</a>
|
||||
<dt><a href="user-manual.html#index-49">fourier-block-dc-corrected</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-47">fourier-block-fourier_power</a>
|
||||
<dt><a href="user-manual.html#index-48">fourier-block-fourier_power</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-51">fourier-block-phase</a>
|
||||
<dt><a href="user-manual.html#index-52">fourier-block-phase</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-50">fourier-block-plot</a>
|
||||
<dt><a href="user-manual.html#index-51">fourier-block-plot</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-53">fourier-block-range</a>
|
||||
<dt><a href="user-manual.html#index-54">fourier-block-range</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-52">fourier-block-range_for_phase_correction</a>
|
||||
<dt><a href="user-manual.html#index-53">fourier-block-range_for_phase_correction</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-46">fourier-block-units</a>
|
||||
<dt><a href="user-manual.html#index-47">fourier-block-units</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
@@ -383,7 +382,7 @@
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-24">lifetime</a>
|
||||
<dt><a href="user-manual.html#index-25">lifetime</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
@@ -415,15 +414,15 @@
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="setup-standard.html#index-27">macports</a>
|
||||
<dt><a href="setup-standard.html#index-21">macports</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-25">map</a>
|
||||
<dt><a href="user-manual.html#index-26">map</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-16">meta-information</a>
|
||||
<dt><a href="user-manual.html#index-17">meta-information</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@@ -431,99 +430,99 @@
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-41">minuit2-command-overview</a>
|
||||
<dt><a href="user-manual.html#index-42">minuit2-command-overview</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-40">msr-commands-block</a>
|
||||
<dt><a href="user-manual.html#index-41">msr-commands-block</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-44">msr-commands-block-dks</a>
|
||||
<dt><a href="user-manual.html#index-45">msr-commands-block-dks</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-11">msr-file-format</a>
|
||||
<dt><a href="user-manual.html#index-12">msr-file-format</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-13">msr-fitparameter-block</a>
|
||||
<dt><a href="user-manual.html#index-14">msr-fitparameter-block</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-45">msr-fourier-block</a>
|
||||
<dt><a href="user-manual.html#index-46">msr-fourier-block</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-15">msr-functions-block</a>
|
||||
<dt><a href="user-manual.html#index-16">msr-functions-block</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-17">msr-global-block</a>
|
||||
<dt><a href="user-manual.html#index-18">msr-global-block</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-54">msr-plot-block</a>
|
||||
<dt><a href="user-manual.html#index-55">msr-plot-block</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-55">msr-plot-block-lifetimecorrection</a>
|
||||
<dt><a href="user-manual.html#index-56">msr-plot-block-lifetimecorrection</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-61">msr-plot-block-logx</a>
|
||||
<dt><a href="user-manual.html#index-62">msr-plot-block-logx</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-62">msr-plot-block-logy</a>
|
||||
<dt><a href="user-manual.html#index-63">msr-plot-block-logy</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-57">msr-plot-block-range</a>
|
||||
<dt><a href="user-manual.html#index-58">msr-plot-block-range</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-64">msr-plot-block-rrf_freq</a>
|
||||
<dt><a href="user-manual.html#index-65">msr-plot-block-rrf_freq</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-63">msr-plot-block-rrf_packing</a>
|
||||
<dt><a href="user-manual.html#index-64">msr-plot-block-rrf_packing</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-65">msr-plot-block-rrf_phase</a>
|
||||
<dt><a href="user-manual.html#index-66">msr-plot-block-rrf_phase</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-56">msr-plot-block-runs</a>
|
||||
<dt><a href="user-manual.html#index-57">msr-plot-block-runs</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-58">msr-plot-block-sub_ranges</a>
|
||||
<dt><a href="user-manual.html#index-59">msr-plot-block-sub_ranges</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-59">msr-plot-block-use_fit_ranges</a>
|
||||
<dt><a href="user-manual.html#index-60">msr-plot-block-use_fit_ranges</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-60">msr-plot-block-view_packing</a>
|
||||
<dt><a href="user-manual.html#index-61">msr-plot-block-view_packing</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-18">msr-run-block</a>
|
||||
<dt><a href="user-manual.html#index-19">msr-run-block</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-66">msr-statistc-block</a>
|
||||
<dt><a href="user-manual.html#index-67">msr-statistc-block</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-14">msr-theory-block</a>
|
||||
<dt><a href="user-manual.html#index-15">msr-theory-block</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-12">msr-title-block</a>
|
||||
<dt><a href="user-manual.html#index-13">msr-title-block</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@@ -550,6 +549,8 @@
|
||||
<dt><a href="mupp.html#index-0">mupp</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="mupp.html#index-1">mupp-gui</a>
|
||||
</dt>
|
||||
@@ -558,8 +559,6 @@
|
||||
<dt><a href="mupp.html#index-2">mupp-scripting</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="mupp.html#index-3">mupp-usage</a>
|
||||
</dt>
|
||||
@@ -569,7 +568,7 @@
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="setup-standard.html#index-35">musredit-build-macos</a>
|
||||
<dt><a href="setup-standard.html#index-29">musredit-build-macos</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@@ -581,10 +580,6 @@
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="setup-standard.html#index-26">musredit-install-windows</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="musredit.html#index-1">musredit_startup</a>
|
||||
</dt>
|
||||
|
||||
@@ -597,11 +592,7 @@
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="setup-standard.html#index-34">musrfit-build-cmake-macos</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="setup-standard.html#index-25">musrfit-build-cmake-windows</a>
|
||||
<dt><a href="setup-standard.html#index-28">musrfit-build-cmake-macos</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@@ -609,15 +600,11 @@
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="setup-standard.html#index-33">musrfit-build-macos</a>
|
||||
<dt><a href="setup-standard.html#index-27">musrfit-build-macos</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="setup-standard.html#index-24">musrfit-build-windows</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-43">musrfit-command-block-details</a>
|
||||
<dt><a href="user-manual.html#index-44">musrfit-command-block-details</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@@ -625,7 +612,7 @@
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-10">musrfit-startup</a>
|
||||
<dt><a href="user-manual.html#index-11">musrfit-startup</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@@ -707,7 +694,7 @@
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="user-manual.html#index-72">negative-muon-musr-fit</a>
|
||||
<dt><a href="user-manual.html#index-73">negative-muon-musr-fit</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@@ -715,7 +702,7 @@
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="setup-standard.html#index-31">nexus-build-fink</a>
|
||||
<dt><a href="setup-standard.html#index-25">nexus-build-fink</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@@ -725,19 +712,15 @@
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="setup-standard.html#index-28">nexus-build-macports</a>
|
||||
<dt><a href="setup-standard.html#index-22">nexus-build-macports</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="setup-standard.html#index-22">nexus-build-windows</a>
|
||||
<dt><a href="user-manual.html#index-75">non-musr-fit</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-74">non-musr-fit</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-22">norm</a>
|
||||
<dt><a href="user-manual.html#index-23">norm</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
@@ -757,7 +740,7 @@
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="user-manual.html#index-39">packing</a>
|
||||
<dt><a href="user-manual.html#index-40">packing</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@@ -795,11 +778,11 @@
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="user-manual.html#index-78">rge-handler</a>
|
||||
<dt><a href="user-manual.html#index-79">rge-handler</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="setup-standard.html#index-32">root-build-fink</a>
|
||||
<dt><a href="setup-standard.html#index-26">root-build-fink</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@@ -809,11 +792,7 @@
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="setup-standard.html#index-29">root-build-macports</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="setup-standard.html#index-23">root-build-windows</a>
|
||||
<dt><a href="setup-standard.html#index-23">root-build-macports</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@@ -835,13 +814,13 @@
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-68">single-histogram-fit</a>
|
||||
<dt><a href="user-manual.html#index-69">single-histogram-fit</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="user-manual.html#index-69">single-histogram-rrf-fit</a>
|
||||
<dt><a href="user-manual.html#index-70">single-histogram-rrf-fit</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@@ -859,15 +838,15 @@
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="user-manual.html#index-34">t0-asymmetry</a>
|
||||
<dt><a href="user-manual.html#index-35">t0-asymmetry</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-33">t0-single-histo</a>
|
||||
<dt><a href="user-manual.html#index-34">t0-single-histo</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-79">technical-musrfit</a>
|
||||
<dt><a href="user-manual.html#index-80">technical-musrfit</a>
|
||||
</dt>
|
||||
|
||||
|
||||
@@ -899,15 +878,15 @@
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="user-manual.html#index-75">user-functions</a>
|
||||
<dt><a href="user-manual.html#index-76">user-functions</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-77">user-functions-with-global-part</a>
|
||||
<dt><a href="user-manual.html#index-78">user-functions-with-global-part</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="user-manual.html#index-76">user-functions-without-global-part</a>
|
||||
<dt><a href="user-manual.html#index-77">user-functions-without-global-part</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
@@ -955,7 +934,7 @@
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="user-manual.html#index-37">xy-data</a>
|
||||
<dt><a href="user-manual.html#index-38">xy-data</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
@@ -963,43 +942,18 @@
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="#" title="General Index"
|
||||
>index</a></li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Apr 09, 2021.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on May 29, 2022.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Welcome to the musrfit documentation! — musrfit 1.7.4 documentation</title>
|
||||
<title>Welcome to the musrfit documentation! — musrfit 1.8.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.7.4',
|
||||
VERSION: '1.8.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,28 +24,26 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.7.4 documentation" href="#" />
|
||||
<link rel="top" title="musrfit 1.8.0 documentation" href="#" />
|
||||
<link rel="next" title="How to Cite musrfit?" href="cite.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="cite.html" title="How to Cite musrfit?"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li><a href="#">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="header"><h1 class="heading"><a href="#">
|
||||
<span>musrfit 1.8.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>Welcome to the musrfit documentation!</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
<a class="uplink" href="#">Contents</a>
|
||||
  ::  
|
||||
<a href="cite.html">How to Cite <tt class="docutils literal"><span class="pre">musrfit</span></tt>?</a>  »
|
||||
</p>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
|
||||
<div class="section" id="welcome-to-the-musrfit-documentation">
|
||||
<h1>Welcome to the musrfit documentation!<a class="headerlink" href="#welcome-to-the-musrfit-documentation" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="toctree-wrapper compound">
|
||||
@@ -135,57 +133,20 @@
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h3><a href="#">Table Of Contents</a></h3>
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">Welcome to the musrfit documentation!</a></li>
|
||||
<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
|
||||
</ul>
|
||||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
<a class="uplink" href="#">Contents</a>
|
||||
  ::  
|
||||
<a href="cite.html">How to Cite <tt class="docutils literal"><span class="pre">musrfit</span></tt>?</a>  »
|
||||
</p>
|
||||
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="cite.html"
|
||||
title="next chapter">How to Cite <tt class="docutils literal"><span class="pre">musrfit</span></tt>?</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="_sources/index.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="cite.html" title="How to Cite musrfit?"
|
||||
>next</a> |</li>
|
||||
<li><a href="#">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Apr 09, 2021.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on May 29, 2022.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>msr2data - A Program for Automatically Processing Multiple musrfit msr Files — musrfit 1.7.4 documentation</title>
|
||||
<title>msr2data - A Program for Automatically Processing Multiple musrfit msr Files — musrfit 1.8.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.7.4',
|
||||
VERSION: '1.8.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,32 +24,29 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.7.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.8.0 documentation" href="index.html" />
|
||||
<link rel="next" title="any2many - a Universal μSR-file-format converter" href="any2many.html" />
|
||||
<link rel="prev" title="mupp - μSR Parameter Plotter" href="mupp.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="any2many.html" title="any2many - a Universal μSR-file-format converter"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="mupp.html" title="mupp - μSR Parameter Plotter"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>musrfit 1.8.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>msr2data - A Program for Automatically Processing Multiple musrfit msr Files</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
«  <a href="mupp.html">mupp - μSR Parameter Plotter</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="any2many.html">any2many - a Universal μSR-file-format converter</a>  »
|
||||
</p>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
|
||||
<div class="section" id="msr2data-a-program-for-automatically-processing-multiple-musrfit-msr-files">
|
||||
<span id="msr2data"></span><span id="index-0"></span><h1>msr2data - A Program for Automatically Processing Multiple <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr Files<a class="headerlink" href="#msr2data-a-program-for-automatically-processing-multiple-musrfit-msr-files" title="Permalink to this headline">¶</a></h1>
|
||||
<p><tt class="docutils literal"><span class="pre">msr2data</span></tt> (originally written by B. M. Wojek) is a program implemented in <tt class="docutils literal"><span class="pre">C++</span></tt>. Its purpose is
|
||||
@@ -369,77 +366,22 @@ fit serves as template for the second and so on. The template field stays empty
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h3><a href="index.html">Table Of Contents</a></h3>
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">msr2data - A Program for Automatically Processing Multiple <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr Files</a><ul>
|
||||
<li><a class="reference internal" href="#basic-types-of-usage">Basic Types of Usage</a><ul>
|
||||
<li><a class="reference internal" href="#run-list-file-structure">Run List File Structure</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#optional-parameters">Optional Parameters</a></li>
|
||||
<li><a class="reference internal" href="#the-global-mode">The Global Mode</a><ul>
|
||||
<li><a class="reference internal" href="#file-generation">File Generation</a></li>
|
||||
<li><a class="reference internal" href="#parameter-extraction">Parameter Extraction</a></li>
|
||||
<li><a class="reference internal" href="#the-extended-global-mode">The Extended Global Mode</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#known-limitations">Known Limitations</a></li>
|
||||
<li><a class="reference internal" href="#the-graphical-user-interface-for-msr2data-provided-by-musredit">The Graphical User Interface for msr2data Provided by musredit</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
«  <a href="mupp.html">mupp - μSR Parameter Plotter</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="any2many.html">any2many - a Universal μSR-file-format converter</a>  »
|
||||
</p>
|
||||
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="mupp.html"
|
||||
title="previous chapter">mupp - μSR Parameter Plotter</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="any2many.html"
|
||||
title="next chapter">any2many - a Universal μSR-file-format converter</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="_sources/msr2data.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="any2many.html" title="any2many - a Universal μSR-file-format converter"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="mupp.html" title="mupp - μSR Parameter Plotter"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Apr 09, 2021.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on May 29, 2022.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>mupp - μSR Parameter Plotter — musrfit 1.7.4 documentation</title>
|
||||
<title>mupp - μSR Parameter Plotter — musrfit 1.8.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.7.4',
|
||||
VERSION: '1.8.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,32 +24,29 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.7.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.8.0 documentation" href="index.html" />
|
||||
<link rel="next" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files" href="msr2data.html" />
|
||||
<link rel="prev" title="musredit: the GUI Based Interface to musrfit" href="musredit.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="msr2data.html" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="musredit.html" title="musredit: the GUI Based Interface to musrfit"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>musrfit 1.8.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>mupp - μSR Parameter Plotter</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
«  <a href="musredit.html"><tt class="docutils literal"><span class="pre">musredit</span></tt>: the GUI Based Interface to <tt class="docutils literal"><span class="pre">musrfit</span></tt></a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr Files</a>  »
|
||||
</p>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
|
||||
<div class="section" id="mupp-mgrsr-parameter-plotter">
|
||||
<span id="mupp"></span><span id="index-0"></span><h1>mupp - μSR Parameter Plotter<a class="headerlink" href="#mupp-mgrsr-parameter-plotter" title="Permalink to this headline">¶</a></h1>
|
||||
<p><tt class="docutils literal"><span class="pre">mupp</span></tt> is a little helper program which allows to quickly plot a collection of msr-file parameters,
|
||||
@@ -266,70 +263,22 @@ SCRIPT COMMANDS:
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h3><a href="index.html">Table Of Contents</a></h3>
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">mupp - μSR Parameter Plotter</a><ul>
|
||||
<li><a class="reference internal" href="#the-graphical-user-interface">The Graphical User Interface</a><ul>
|
||||
<li><a class="reference internal" href="#define-variable-dialog">Define Variable Dialog</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#the-scripting-interface">The Scripting Interface</a></li>
|
||||
<li><a class="reference internal" href="#the-usage-summary">The Usage Summary</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
«  <a href="musredit.html"><tt class="docutils literal"><span class="pre">musredit</span></tt>: the GUI Based Interface to <tt class="docutils literal"><span class="pre">musrfit</span></tt></a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr Files</a>  »
|
||||
</p>
|
||||
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="musredit.html"
|
||||
title="previous chapter"><tt class="docutils literal"><span class="pre">musredit</span></tt>: the GUI Based Interface to <tt class="docutils literal"><span class="pre">musrfit</span></tt></a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="msr2data.html"
|
||||
title="next chapter">msr2data - A Program for Automatically Processing Multiple <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr Files</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="_sources/mupp.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="msr2data.html" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="musredit.html" title="musredit: the GUI Based Interface to musrfit"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Apr 09, 2021.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on May 29, 2022.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>MusrRoot - an Extensible Open File Format for μSR — musrfit 1.7.4 documentation</title>
|
||||
<title>MusrRoot - an Extensible Open File Format for μSR — musrfit 1.8.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.7.4',
|
||||
VERSION: '1.8.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,32 +24,29 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.7.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.8.0 documentation" href="index.html" />
|
||||
<link rel="next" title="Acknowledgements" href="acknowledgement.html" />
|
||||
<link rel="prev" title="any2many - a Universal μSR-file-format converter" href="any2many.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="acknowledgement.html" title="Acknowledgements"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="any2many.html" title="any2many - a Universal μSR-file-format converter"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>musrfit 1.8.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>MusrRoot - an Extensible Open File Format for μSR</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
«  <a href="any2many.html">any2many - a Universal μSR-file-format converter</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="acknowledgement.html">Acknowledgements</a>  »
|
||||
</p>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
|
||||
<div class="section" id="musrroot-an-extensible-open-file-format-for-mgrsr">
|
||||
<span id="musrroot"></span><span id="index-0"></span><h1>MusrRoot - an Extensible Open File Format for μSR<a class="headerlink" href="#musrroot-an-extensible-open-file-format-for-mgrsr" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Until 2011 different μSR file formats were used within PSI. The bulk-μSR instruments were
|
||||
@@ -847,88 +844,22 @@ the entry has been added. The last token, <tt class="docutils literal"><span cla
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h3><a href="index.html">Table Of Contents</a></h3>
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">MusrRoot - an Extensible Open File Format for μSR</a><ul>
|
||||
<li><a class="reference internal" href="#some-basics-concerning-root-files">Some Basics Concerning ROOT Files</a></li>
|
||||
<li><a class="reference internal" href="#id1">MusrRoot an Extensible Open File Format for μSR</a><ul>
|
||||
<li><a class="reference internal" href="#run-information-contained-in-runheader">Run Information Contained in <tt class="docutils literal"><span class="pre">RunHeader</span></tt></a><ul>
|
||||
<li><a class="reference internal" href="#runinfo-overview"><tt class="docutils literal"><span class="pre">RunInfo</span></tt> Overview</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#tmusrrunheader-concept">TMusrRunHeader Concept</a><ul>
|
||||
<li><a class="reference internal" href="#user-interface-for-musrroot-run-header">User Interface for MusrRoot Run Header</a><ul>
|
||||
<li><a class="reference internal" href="#writing-a-musrroot-run-header">Writing a MusrRoot Run Header</a></li>
|
||||
<li><a class="reference internal" href="#reading-a-musrroot-run-header">Reading a MusrRoot Run Header</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#validation-of-a-musrroot-file">Validation of a MusrRoot File</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#runinfo-required">RunInfo (Required)</a></li>
|
||||
<li><a class="reference internal" href="#detectorinfo-required">DetectorInfo (Required)</a></li>
|
||||
<li><a class="reference internal" href="#sampleenvironmentinfo-required">SampleEnvironmentInfo (Required)</a></li>
|
||||
<li><a class="reference internal" href="#magneticfieldenvironmentinfo-required">MagneticFieldEnvironmentInfo (Required)</a></li>
|
||||
<li><a class="reference internal" href="#beamlineinfo-required">BeamlineInfo (Required)</a></li>
|
||||
<li><a class="reference internal" href="#exhaustive-musrroot-tree-including-everything-required">Exhaustive MusrRoot Tree Including Everything Required</a></li>
|
||||
<li><a class="reference internal" href="#tmusrrunphysicalquantity-possible-representations">TMusrRunPhysicalQuantity - Possible Representations</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
«  <a href="any2many.html">any2many - a Universal μSR-file-format converter</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="acknowledgement.html">Acknowledgements</a>  »
|
||||
</p>
|
||||
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="any2many.html"
|
||||
title="previous chapter">any2many - a Universal μSR-file-format converter</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="acknowledgement.html"
|
||||
title="next chapter">Acknowledgements</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="_sources/musr-root.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="acknowledgement.html" title="Acknowledgements"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="any2many.html" title="any2many - a Universal μSR-file-format converter"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Apr 09, 2021.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on May 29, 2022.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>musredit: the GUI Based Interface to musrfit — musrfit 1.7.4 documentation</title>
|
||||
<title>musredit: the GUI Based Interface to musrfit — musrfit 1.8.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.7.4',
|
||||
VERSION: '1.8.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,32 +24,29 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.7.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.8.0 documentation" href="index.html" />
|
||||
<link rel="next" title="mupp - μSR Parameter Plotter" href="mupp.html" />
|
||||
<link rel="prev" title="Setting up musrfit / DKS: High Speed Fitting with GPU’s" href="setup-dks.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="mupp.html" title="mupp - μSR Parameter Plotter"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="setup-dks.html" title="Setting up musrfit / DKS: High Speed Fitting with GPU’s"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>musrfit 1.8.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>musredit: the GUI Based Interface to musrfit</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
«  <a href="setup-dks.html">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> / <tt class="docutils literal"><span class="pre">DKS</span></tt>: High Speed Fitting with GPU’s</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="mupp.html">mupp - μSR Parameter Plotter</a>  »
|
||||
</p>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
|
||||
<div class="section" id="musredit-the-gui-based-interface-to-musrfit">
|
||||
<span id="musredit-sec"></span><span id="index-0"></span><h1><tt class="docutils literal"><span class="pre">musredit</span></tt>: the GUI Based Interface to <tt class="docutils literal"><span class="pre">musrfit</span></tt><a class="headerlink" href="#musredit-the-gui-based-interface-to-musrfit" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="introduction">
|
||||
@@ -480,82 +477,22 @@ the corresponding fit parameter value, except the phases where the step will be
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h3><a href="index.html">Table Of Contents</a></h3>
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#"><tt class="docutils literal"><span class="pre">musredit</span></tt>: the GUI Based Interface to <tt class="docutils literal"><span class="pre">musrfit</span></tt></a><ul>
|
||||
<li><a class="reference internal" href="#introduction">Introduction</a></li>
|
||||
<li><a class="reference internal" href="#available-executable-configuration-files-and-their-basic-usage">Available Executable, Configuration Files and their Basic Usage</a><ul>
|
||||
<li><a class="reference internal" href="#musredit-musrgui">musredit (musrgui)</a></li>
|
||||
<li><a class="reference internal" href="#musredit-startup-xml">musredit_startup.xml</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#musredit-features">musredit Features</a></li>
|
||||
<li><a class="reference internal" href="#id1">musrWiz</a><ul>
|
||||
<li><a class="reference internal" href="#musrwiz-introduction">musrWiz-Introduction</a></li>
|
||||
<li><a class="reference internal" href="#musrwiz-theory">musrWiz - Theory</a></li>
|
||||
<li><a class="reference internal" href="#musrwiz-functions">musrWiz - Functions</a></li>
|
||||
<li><a class="reference internal" href="#musrwiz-maps">musrWiz - Maps</a></li>
|
||||
<li><a class="reference internal" href="#musrwiz-fit-parameters">musrWiz - Fit Parameters</a></li>
|
||||
<li><a class="reference internal" href="#musrwiz-fit-info">musrWiz - Fit Info</a></li>
|
||||
<li><a class="reference internal" href="#musrwiz-create">musrWiz - Create</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#musrstep">musrStep</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
«  <a href="setup-dks.html">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> / <tt class="docutils literal"><span class="pre">DKS</span></tt>: High Speed Fitting with GPU’s</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="mupp.html">mupp - μSR Parameter Plotter</a>  »
|
||||
</p>
|
||||
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="setup-dks.html"
|
||||
title="previous chapter">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> / <tt class="docutils literal"><span class="pre">DKS</span></tt>: High Speed Fitting with GPU’s</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="mupp.html"
|
||||
title="next chapter">mupp - μSR Parameter Plotter</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="_sources/musredit.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="mupp.html" title="mupp - μSR Parameter Plotter"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="setup-dks.html" title="Setting up musrfit / DKS: High Speed Fitting with GPU’s"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Apr 09, 2021.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on May 29, 2022.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Search — musrfit 1.7.4 documentation</title>
|
||||
<title>Search — musrfit 1.8.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.7.4',
|
||||
VERSION: '1.8.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -25,7 +25,7 @@
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<script type="text/javascript" src="_static/searchtools.js"></script>
|
||||
<link rel="top" title="musrfit 1.7.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.8.0 documentation" href="index.html" />
|
||||
<script type="text/javascript">
|
||||
jQuery(function() { Search.loadIndex("searchindex.js"); });
|
||||
</script>
|
||||
@@ -35,21 +35,20 @@
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>musrfit 1.8.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>Search</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
</p>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
|
||||
<h1 id="search-documentation">Search</h1>
|
||||
<div id="fallback" class="admonition warning">
|
||||
<script type="text/javascript">$('#fallback').hide();</script>
|
||||
@@ -74,27 +73,18 @@
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
</div>
|
||||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Apr 09, 2021.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on May 29, 2022.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Setting up musrfit / DKS: High Speed Fitting with GPU’s — musrfit 1.7.4 documentation</title>
|
||||
<title>Setting up musrfit / DKS: High Speed Fitting with GPU’s — musrfit 1.8.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.7.4',
|
||||
VERSION: '1.8.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,32 +24,29 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.7.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.8.0 documentation" href="index.html" />
|
||||
<link rel="next" title="musredit: the GUI Based Interface to musrfit" href="musredit.html" />
|
||||
<link rel="prev" title="Setting up musrfit on Different Platforms" href="setup-standard.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="musredit.html" title="musredit: the GUI Based Interface to musrfit"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="setup-standard.html" title="Setting up musrfit on Different Platforms"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>musrfit 1.8.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>Setting up musrfit / DKS: High Speed Fitting with GPU’s</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
«  <a href="setup-standard.html">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> on Different Platforms</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="musredit.html"><tt class="docutils literal"><span class="pre">musredit</span></tt>: the GUI Based Interface to <tt class="docutils literal"><span class="pre">musrfit</span></tt></a>  »
|
||||
</p>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
|
||||
<div class="section" id="setting-up-musrfit-dks-high-speed-fitting-with-gpu-s">
|
||||
<span id="setup-dks"></span><span id="index-0"></span><h1>Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> / <tt class="docutils literal"><span class="pre">DKS</span></tt>: High Speed Fitting with GPU’s<a class="headerlink" href="#setting-up-musrfit-dks-high-speed-fitting-with-gpu-s" title="Permalink to this headline">¶</a></h1>
|
||||
<p>In the years 2016/2017 we explored ways to speed up current fitting frameworks, especially <tt class="docutils literal"><span class="pre">musrfit.</span></tt>
|
||||
@@ -255,78 +252,22 @@ The only thing you need <tt class="docutils literal"><span class="pre">DKS</span
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h3><a href="index.html">Table Of Contents</a></h3>
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> / <tt class="docutils literal"><span class="pre">DKS</span></tt>: High Speed Fitting with GPU’s</a><ul>
|
||||
<li><a class="reference internal" href="#setting-up-musrfit-dks-for-a-tesla-k40c-nvidia">Setting up <tt class="docutils literal"><span class="pre">musrfit/DKS</span></tt> for a Tesla K40c (NVIDIA)</a><ul>
|
||||
<li><a class="reference internal" href="#driver-installation-for-the-tesla-k40c">Driver Installation for the Tesla K40c</a></li>
|
||||
<li><a class="reference internal" href="#installation-of-cuda">Installation of CUDA</a></li>
|
||||
<li><a class="reference internal" href="#installation-of-dks">Installation of DKS</a></li>
|
||||
<li><a class="reference internal" href="#installation-of-musrfit-for-dks">Installation of musrfit for DKS</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#setting-up-musrfit-dks-for-a-amd-graphic-card-radeon-r9-390x">Setting up <tt class="docutils literal"><span class="pre">musrfit/DKS</span></tt> for a AMD Graphic Card (Radeon R9 390X)</a><ul>
|
||||
<li><a class="reference internal" href="#driver-installation-for-an-amd-graphic-card-e-g-radeon-r9-390x">Driver Installation for an AMD Graphic Card, <em>e.g.</em> Radeon R9 390X</a></li>
|
||||
<li><a class="reference internal" href="#amd-app-software-development-kit-sdk-to-enable-opencl-support">AMD APP Software Development Kit (SDK) to enable <tt class="docutils literal"><span class="pre">OpenCL</span></tt> support</a></li>
|
||||
<li><a class="reference internal" href="#installation-of-dks-and-musrfit">Installation of DKS and musrfit</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#setting-up-musrfit-dks-for-macos-for-opencl-support">Setting up <tt class="docutils literal"><span class="pre">musrfit/DKS</span></tt> for macOS for OpenCL support</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
«  <a href="setup-standard.html">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> on Different Platforms</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="musredit.html"><tt class="docutils literal"><span class="pre">musredit</span></tt>: the GUI Based Interface to <tt class="docutils literal"><span class="pre">musrfit</span></tt></a>  »
|
||||
</p>
|
||||
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="setup-standard.html"
|
||||
title="previous chapter">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> on Different Platforms</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="musredit.html"
|
||||
title="next chapter"><tt class="docutils literal"><span class="pre">musredit</span></tt>: the GUI Based Interface to <tt class="docutils literal"><span class="pre">musrfit</span></tt></a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="_sources/setup-dks.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="musredit.html" title="musredit: the GUI Based Interface to musrfit"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="setup-standard.html" title="Setting up musrfit on Different Platforms"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Apr 09, 2021.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on May 29, 2022.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Setting up musrfit on Different Platforms — musrfit 1.7.4 documentation</title>
|
||||
<title>Setting up musrfit on Different Platforms — musrfit 1.8.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.7.4',
|
||||
VERSION: '1.8.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,32 +24,29 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.7.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.8.0 documentation" href="index.html" />
|
||||
<link rel="next" title="Setting up musrfit / DKS: High Speed Fitting with GPU’s" href="setup-dks.html" />
|
||||
<link rel="prev" title="Documentation of user libs (user functions)" href="user-libs.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="setup-dks.html" title="Setting up musrfit / DKS: High Speed Fitting with GPU’s"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="user-libs.html" title="Documentation of user libs (user functions)"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>musrfit 1.8.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>Setting up musrfit on Different Platforms</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
«  <a href="user-libs.html">Documentation of user libs (user functions)</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="setup-dks.html">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> / <tt class="docutils literal"><span class="pre">DKS</span></tt>: High Speed Fitting with GPU’s</a>  »
|
||||
</p>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
|
||||
<div class="section" id="setting-up-musrfit-on-different-platforms">
|
||||
<span id="musrfit-setup"></span><span id="index-0"></span><h1>Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> on Different Platforms<a class="headerlink" href="#setting-up-musrfit-on-different-platforms" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="supported-operating-systems-and-software-requirements">
|
||||
@@ -117,15 +114,14 @@ Currently the <tt class="docutils literal"><span class="pre">MXML</span></tt> su
|
||||
<dt><strong>GNU/Linux</strong></dt>
|
||||
<dd>No serious problems are currently known. Tested distributions: <a class="reference external" href="https://www.redhat.com/de/technologies/linux-platforms/enterprise-linux">RHEL</a>, <a class="reference external" href="https://getfedora.org/">Fedora</a>,
|
||||
<a class="reference external" href="https://www.debian.org/">Debian</a>, <a class="reference external" href="https://www.ubuntu.com/">Ubuntu</a>, <a class="reference external" href="https://linuxmint.com/">Mint</a>, <a class="reference external" href="https://en.opensuse.org/Main_Page">openSUSE</a>,
|
||||
<a class="reference external" href="https://de.manjaro.org/">manjaro</a>, and <a class="reference external" href="https://antergos.com/">antergos</a>.</dd>
|
||||
and <cite>manjaro <https://de.manjaro.org/></cite>.</dd>
|
||||
<dt><strong>Mac OS X/macOS</strong></dt>
|
||||
<dd>No serious problems are currently known for macOS ≥ 10.6.</dd>
|
||||
<dd>No serious problems are currently known for macOS ≥ 10.6. <tt class="docutils literal"><span class="pre">musrfit</span></tt> is ARM M1 ready.</dd>
|
||||
<dt><strong>MS Windows</strong></dt>
|
||||
<dd><p class="first">Native <em>MS Windows</em> support is currently not available. Potential ways to get <tt class="docutils literal"><span class="pre">musrfit</span></tt> running are:</p>
|
||||
<ul class="last simple">
|
||||
<li>via installation of Linux via the Microsoft App store for Windows 10.</li>
|
||||
<li>via installation of Linux via the Microsoft App store for Windows 10/11 (see <a class="reference external" href="https://docs.microsoft.com/en-us/windows/wsl/install">Install Linux on Windows with WSL</a>).</li>
|
||||
<li>via installation of the virtual machine on which you install Linux (probably the easiest for most Windows users).</li>
|
||||
<li>via <a class="reference external" href="https://www.cygwin.com/">cygwin</a>.</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -141,34 +137,35 @@ the distributor and could be easily installed in the form of binary packages. If
|
||||
the libraries and the header (dev, devel) files.</p>
|
||||
<p>On a <a class="reference external" href="https://www.redhat.com/en">Red Hat Linux</a> (or other RPM-package base Linux distributions) system the following command executed as <em>superuser</em>
|
||||
from the shell will do the trick (never type the ‘$’ it is the shell prompt of your system):</p>
|
||||
<p>For <strong>Qt4</strong>:</p>
|
||||
<p>For <strong>Qt4</strong> (deprecated):</p>
|
||||
<blockquote>
|
||||
<div><div class="highlight-bash"><div class="highlight"><pre><span></span>$ yum install git cmake boost-devel gsl-devel fftw-devel libxml2-devel qt-devel qtwebkit-devel
|
||||
</pre></div>
|
||||
</div>
|
||||
</div></blockquote>
|
||||
<p>For <strong>Qt5</strong>:</p>
|
||||
<p>For <strong>Qt5/Qt6</strong>:</p>
|
||||
<blockquote>
|
||||
<div><div class="highlight-bash"><div class="highlight"><pre><span></span>$ yum install epel-release
|
||||
$ yum install git cmake boost-devel gsl-devel fftw-devel libxml2-devel qt5-qtbase-devel qt5-qtsvg-devel
|
||||
</pre></div>
|
||||
</div>
|
||||
</div></blockquote>
|
||||
<p>Depending on your distribution <strong>Qt4</strong> is still the default but is likely to be replaced by <strong>Qt5</strong> in the very near future.</p>
|
||||
<p>If using <tt class="docutils literal"><span class="pre">Qt6</span></tt> replace <tt class="docutils literal"><span class="pre">qt5-qtbase-devel</span> <span class="pre">qt5-qtsvg-devel</span></tt> by <tt class="docutils literal"><span class="pre">qt6-qtbase-devel</span> <span class="pre">qt6-qtsvg-devel</span></tt></p>
|
||||
<p>When dealing with a distribution that uses the dpkg/apt package manager like <a class="reference external" href="https://www.debian.org/">Debian</a> or <a class="reference external" href="https://www.ubuntu.com/">Ubuntu</a>
|
||||
the installation would look like:</p>
|
||||
<p>For <strong>Qt4</strong>:</p>
|
||||
<p>For <strong>Qt4</strong> (deprecated):</p>
|
||||
<blockquote>
|
||||
<div><div class="highlight-bash"><div class="highlight"><pre><span></span>$ apt-get install git cmake libboost-dev libgsl-dev libfftw3-dev libxml2-dev libqt4-dev libqtwebkit-dev
|
||||
<div><div class="highlight-bash"><div class="highlight"><pre><span></span>$ apt-get install git cmake libboost-dev libboost-filesystem-dev libboost-system-dev libgsl-dev libfftw3-dev libxml2-dev libqt4-dev libqtwebkit-dev
|
||||
</pre></div>
|
||||
</div>
|
||||
</div></blockquote>
|
||||
<p>For <strong>Qt5</strong>:</p>
|
||||
<p>For <strong>Qt5/Qt6</strong>:</p>
|
||||
<blockquote>
|
||||
<div><div class="highlight-bash"><div class="highlight"><pre><span></span>$ apt-get install git cmake libboost-dev libgsl-dev libfftw3-dev libxml2-dev qt5-default qtbase5-dev libqt5svg5-dev
|
||||
<div><div class="highlight-bash"><div class="highlight"><pre><span></span>$ apt-get install git cmake libboost-dev libboost-filesystem-dev libboost-system-dev libgsl-dev libfftw3-dev libxml2-dev qt5-default qtbase5-dev libqt5svg5-dev
|
||||
</pre></div>
|
||||
</div>
|
||||
</div></blockquote>
|
||||
<p>If using <tt class="docutils literal"><span class="pre">Qt6</span></tt> replace <tt class="docutils literal"><span class="pre">qt5-default</span> <span class="pre">qtbase5-dev</span> <span class="pre">libqt5svg5-dev</span></tt> by <tt class="docutils literal"><span class="pre">qt6-default</span> <span class="pre">qtbase6-dev</span> <span class="pre">libqt6svg6-dev</span></tt></p>
|
||||
<p>Everyone should know best himself which is the way to install distribution software on the chosen distribution.</p>
|
||||
<p>In case the distribution does not include the required software it has to be compiled from the source files. This means either to download
|
||||
the source code from the corresponding website, or to clone the git repo. If you need to follow this line, please check the install details of the corresponding package.</p>
|
||||
@@ -382,8 +379,8 @@ detailed information on this XML file refer to the <a class="reference internal"
|
||||
<p>In the latest version of <tt class="docutils literal"><span class="pre">musrfit</span></tt> the configure script tries to determine automatically the highest available <tt class="docutils literal"><span class="pre">Qt</span></tt> version.
|
||||
In case this is found, the editor <tt class="docutils literal"><span class="pre">musredit</span></tt> is built already together with <tt class="docutils literal"><span class="pre">musrfit</span></tt>.</p>
|
||||
</div>
|
||||
<div class="section" id="musrgui-depreciated">
|
||||
<h3>musrgui (depreciated)<a class="headerlink" href="#musrgui-depreciated" title="Permalink to this headline">¶</a></h3>
|
||||
<div class="section" id="musrgui-deprecated">
|
||||
<h3>musrgui (deprecated)<a class="headerlink" href="#musrgui-deprecated" title="Permalink to this headline">¶</a></h3>
|
||||
<p>If <tt class="docutils literal"><span class="pre">Qt4.6</span></tt> or higher is not available but <tt class="docutils literal"><span class="pre">Qt3</span></tt> is set up <tt class="docutils literal"><span class="pre">musrgui</span></tt> can be installed. For this please
|
||||
follow the instructions for the <tt class="docutils literal"><span class="pre">musredit</span></tt> installation where simply every <tt class="docutils literal"><span class="pre">musredit</span></tt> occurrence has to
|
||||
be replaced by <tt class="docutils literal"><span class="pre">musrgui</span></tt>. If there are problems during the <tt class="docutils literal"><span class="pre">qmake</span></tt> step, <em>e.g.</em>
|
||||
@@ -407,14 +404,14 @@ $ musrview test-histo-ROOT-NPP.msr
|
||||
<h2>MS Windows<a class="headerlink" href="#ms-windows" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">The description here is only for the very brave ones. It hasn’t been tested for quite a while and therefore gives you
|
||||
rather a flavour of what needs to be done rather than a real instruction how to setup <tt class="docutils literal"><span class="pre">musrfit</span></tt>. If you just need
|
||||
<tt class="docutils literal"><span class="pre">musrfit</span></tt> to work on a MS Windows platform, it is recommended to install it via a linux virtual machine!</p>
|
||||
<p class="last">For adventurous guys using Windows 10/11, there is the possibility to activate the built in Ubuntu bash-shell. It allows
|
||||
to install <tt class="docutils literal"><span class="pre">musrfit</span></tt> as described in the Linux section. For details to setup the Linux sub-system for MS Windows
|
||||
see <a class="reference external" href="https://docs.microsoft.com/en-us/windows/wsl/install">Install Linux on Windows with WSL</a>.</p>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">For adventurous guys using Windows 10, there is the possibility to activate the built in Ubuntu bash-shell. It allows
|
||||
to install <tt class="docutils literal"><span class="pre">musrfit</span></tt> as described in the Linux section.</p>
|
||||
<p class="last">Another possibility is to setup linux as a virtual machine with VirtualBox are other alike tools. This way you separate
|
||||
Linux / ROOT / musrfit from the default MS Windows system.</p>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
@@ -422,259 +419,13 @@ to install <tt class="docutils literal"><span class="pre">musrfit</span></tt> as
|
||||
in the absolute path or in case you do, do not wonder if some errors occur! msr files, however, might be saved in such
|
||||
directories like <tt class="docutils literal"><span class="pre">...\My</span> <span class="pre">Documents\...</span></tt></p>
|
||||
</div>
|
||||
<p>Under Windows a native installation is not supported but there is the possibility to run musrfit through <a class="reference external" href="https://www.cygwin.com/">cygwin</a>
|
||||
which has the great advantage that one gains additionally various nice UNIX tools also for other purposes.
|
||||
Please also be aware of the fact that the X server which is going to be installed with <tt class="docutils literal"><span class="pre">Cygwin</span></tt> has to be started
|
||||
(<em>e.g.</em> by selecting it from the “Programs” folder) before any graphical application (<tt class="docutils literal"><span class="pre">musrview</span></tt>, <tt class="docutils literal"><span class="pre">musrgui</span></tt>, etc.) is started.</p>
|
||||
<div class="section" id="id5">
|
||||
<h3>Requirements<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3>
|
||||
<div class="section" id="setting-up-cygwin">
|
||||
<span id="index-21"></span><h4>Setting up Cygwin<a class="headerlink" href="#setting-up-cygwin" title="Permalink to this headline">¶</a></h4>
|
||||
<p>For the start go to the Cygwin website, download the setup file and use it to install Cygwin 1.7 or newer. During the installation
|
||||
process you will be asked where you want to install Cygwin and normally the default choice should just be fine. At some point you
|
||||
will be asked which packages should be installed. Make sure that you choose at least the following (or packages with revisions close
|
||||
to the following) in order to fulfill the <tt class="docutils literal"><span class="pre">musrfit</span></tt> requirements and be able to work with this base system:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span>a2ps, alternatives, autoconf, automake, base-cygwin, base-files, base-passwd bash, bash-completion,
|
||||
bc, binutils, bison, boost, boost-devel, bzip2, cmake, colorgcc, coreutils, curl, cygutils, cygwin,
|
||||
editrights, fftw3, findutils, flex, font-adobe-dpi100, font-adobe-dpi75, font-alias,
|
||||
font-bitstream-dpi100, font-bitstream-dpi75, font-encodings, font-ibm-type1, font-sun-misc, font-util,
|
||||
font-xfree86-type1, fontconfig, freeglut, gawk, gcc-tools-autoconf, gcc-tools-automake, gcc4,
|
||||
gcc4-core, gcc4-fortran, gcc4-g++, gccmakedep, gd, gettext, ghostscript, ghostscript-fonts-std,
|
||||
giflib, gmp, grep, groff, gsl, gsl-apps, gsl-devel, gv, gzip, inputproto, jasper, jpeg, lapack,
|
||||
less, libboost, libbz2_1, libcharset1, libcurl4, libfftw3-devel, libfftw3_3, libgcc1, libgd-devel,
|
||||
libgif-devel, libGL-devel, libGL1, libGLU-devel, libGLU1, libglut-devel, libglut3, libgmp-devel,
|
||||
libgmp3, libgomp1, libICE-devel, libICE6, libjpeg-devel, libjpeg62, liblapack-devel, libmpfr-devel,
|
||||
libmpfr1, libncurses-devel, libncurses9, libOSMesa-devel, libOSMesa7, libpng, libpng14, libpng14-devel,
|
||||
libreadline6, libSM-devel, libSM6, libssh2_1, libstdc++6, libstdc++6-devel, libtiff-devel, libtiff5,
|
||||
libtool, libX11-devel, libX11_6, libXau-devel, libXau6, libXaw7, libxcb-devel, libxcb-xlib-devel,
|
||||
libXcursor-devel, libXcursor1, libXdmcp-devel, libXdmcp6, libXext-devel, libXext6, libXfixes-devel,
|
||||
libXfixes3, libXfont-devel, libXfont1, libXft-devel, libXft2, libXi-devel, libXi6, libxkbfile1,
|
||||
libxml2, libxml2-devel, libXmu-devel, libXmu6, libXpm-devel, libXpm4, libXrender-devel, libXrender1,
|
||||
libXt-devel, libXt6, login, m4, make, makedepend, man, mpfr, nano, opengl, openssh, openssl, pdftk,
|
||||
perl, ping, pkg-config, psutils, python, qt3, qt3-bin, qt3-devel, readline, rebase, rgb, rsync, run,
|
||||
screen, sed, subversion, tar, tcltk, terminfo, unzip, util-linux, vim, w32api, which,
|
||||
X-start-menu-icons, xauth, xextproto, xfontsel, xinit, xkbcomp, xkeyboard-config, xkill, xlogo,
|
||||
xlsfonts, xorg-cf-files, xorg-scripts, xorg-server, xproto, xrdb, xrefresh, xset, xterm, zip, zlib,
|
||||
zlib-devel, zlib0, libQt3Support4-devel, libQtAssistantClient4-devel, libQtCore4-devel,
|
||||
libQtDBus4-devel, libQtDesigner4-devel, libQtGui4-devel, libQtHelp4-devel, libQtNetwork4-devel,
|
||||
libQtOpenGL4-devel, libQtScript4-devel, libQtScriptTools4-devel, libQtSql4-devel, libQtSvg4-devel,
|
||||
libQtTest4-devel, libQtWebKit4-devel, libQtXml4-devel, libQtXmlPatterns4-devel
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>After these installations already most of the required software is present and the Cygwin shell can be started now for the further steps!
|
||||
Inside the shell the POSIX naming convention applies, therefore, paths will be given with separating “/” instead of “” in DOS. The file
|
||||
structure accessible through this shell can also be accessed through the Windows Explorer — just go to the directory which you specified
|
||||
as “cygwin root” during the installation: this is the equivalent to “/” in the shell. By default, the different hard drives or network shares
|
||||
like <tt class="docutils literal"><span class="pre">C:\</span></tt> can be found at <tt class="docutils literal"><span class="pre">/cygdrive/c/</span></tt> in the shell — the cygdrive prefix can in principle also be changed but for now we stick to the default.</p>
|
||||
<p>Since later on the boost header files should be used and in the standard Cygwin installation these are found at a version specific location,
|
||||
the later handling will be easier if a symbolic link to these files is created now in the terminal (in case it had not been present before):</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ ln -sf /usr/include/boost-x_yy_z/boost /usr/include/boost
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>where <tt class="docutils literal"><span class="pre">x_yy_z</span></tt> has to be substituted by the correct version number, <em>e.g.</em> <tt class="docutils literal"><span class="pre">1_33_1</span></tt>.</p>
|
||||
</div>
|
||||
<div class="section" id="id6">
|
||||
<h4>Everything but ROOT and NeXus<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h4>
|
||||
</div>
|
||||
<div class="section" id="index-22">
|
||||
<span id="id7"></span><h4>Installation of NeXus requirements (optional)<a class="headerlink" href="#index-22" title="Permalink to this headline">¶</a></h4>
|
||||
<p>Only if <tt class="docutils literal"><span class="pre">musrfit</span></tt> should support reading data files in the <tt class="docutils literal"><span class="pre">NeXus</span></tt> format the further required software has
|
||||
to be set up. Under <tt class="docutils literal"><span class="pre">Cygwin</span></tt> of all the required libraries only <tt class="docutils literal"><span class="pre">HDF5</span></tt> is available. The packages <tt class="docutils literal"><span class="pre">hdf5</span></tt> and
|
||||
<tt class="docutils literal"><span class="pre">libhdf5-devel</span></tt> can be installed through the <tt class="docutils literal"><span class="pre">Cygwin</span></tt> setup. One should also make sure that <tt class="docutils literal"><span class="pre">bison</span></tt>, <tt class="docutils literal"><span class="pre">flex</span></tt>
|
||||
and a package containing <tt class="docutils literal"><span class="pre">/usr/lib/librpc.a</span></tt> (<em>e.g.</em> <tt class="docutils literal"><span class="pre">sunrpc</span> <span class="pre">=</span> <span class="pre">4.0-3</span></tt>, but <em>not</em> <tt class="docutils literal"><span class="pre">sunrpc</span> <span class="pre">=</span> <span class="pre">4.0-4</span></tt>) are installed.</p>
|
||||
<p><strong>Only NeXus Version ≥ 4.4 is support!</strong></p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span>
|
||||
$ mkdir nexus
|
||||
$ <span class="nb">cd</span> nexus
|
||||
$ curl http://www.hdfgroup.org/ftp/lib-external/jpeg/src/jpegsrc.v6b.tar.gz -G <span class="p">|</span> tar xz
|
||||
$ <span class="nb">cd</span> jpeg-6b
|
||||
$ ./configure --prefix<span class="o">=</span>/usr/local --enable-static
|
||||
$ make
|
||||
$ make install
|
||||
$ <span class="nb">cd</span> ..
|
||||
$ <span class="c1"># create a directory for the NeXus source code</span>
|
||||
$ mkdir nexus
|
||||
$ <span class="nb">cd</span> nexus
|
||||
$ <span class="c1"># get the source code from the master repository</span>
|
||||
$ git clone https://github.com/nexusformat/code.git
|
||||
$ <span class="c1"># next we will build NeXus out-of-source</span>
|
||||
$ mkdir build
|
||||
$ <span class="nb">cd</span> build
|
||||
$ cmake -DENABLE_HDF5<span class="o">=</span><span class="m">1</span> -DENABLE_HDF4<span class="o">=</span><span class="m">1</span> -DENABLE_MXML<span class="o">=</span><span class="m">0</span> ../code
|
||||
$ make
|
||||
$ make install
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="index-23">
|
||||
<span id="id8"></span><h4>ROOT<a class="headerlink" href="#index-23" title="Permalink to this headline">¶</a></h4>
|
||||
<p>In order to install the <tt class="docutils literal"><span class="pre">ROOT</span></tt> system, there are two possibilities:</p>
|
||||
<ul>
|
||||
<li><p class="first">Download the precompiled Cygwin GCC 4.3 (or newer) package of the most recent <tt class="docutils literal"><span class="pre">ROOT</span></tt> version
|
||||
from the <a class="reference external" href="https://root.cern.ch/downloading-root">web page</a> and unpack it in a <tt class="docutils literal"><span class="pre">Cygwin</span></tt> shell
|
||||
(in order to get the line endings correctly) at the final location. Suppose the package has been
|
||||
downloaded to <tt class="docutils literal"><span class="pre">C:\</span></tt> and the <tt class="docutils literal"><span class="pre">ROOT</span></tt> tree should be in <tt class="docutils literal"><span class="pre">C:\root</span></tt>, this is achieved by:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> /cygdrive/c
|
||||
$ tar xzf root_v5.xx.yy.win32gcc-gcc-4.3.tar.gz
|
||||
</pre></div>
|
||||
</div>
|
||||
</li>
|
||||
<li><p class="first">If due to some reason there was no precompiled Cygwin GCC 4.3 package available or <tt class="docutils literal"><span class="pre">ROOT</span></tt> should
|
||||
be built from source, one has to visit the <a class="reference external" href="https://root.cern.ch/downloading-root">web page</a>,
|
||||
download the ‘complete source tree for all systems’ and save it for instance in <tt class="docutils literal"><span class="pre">C:\</span></tt>.
|
||||
Then go to the Cygwin shell and unpack this source tree, configure it (here using the minimal set of options)
|
||||
and compile it as follows right below:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> /cygdrive/c
|
||||
$ tar xzf root_v5.xx.yy.source.tar.gz
|
||||
$ <span class="nb">cd</span> root
|
||||
$ ./configure win32gcc --gminimal --enable-asimage --enable-mathmore --enable-minuit2 --enable-xml
|
||||
$ make
|
||||
</pre></div>
|
||||
</div>
|
||||
</li>
|
||||
<li><p class="first">In order to finalize the <tt class="docutils literal"><span class="pre">ROOT</span></tt> installation and to prepare already the installation of <tt class="docutils literal"><span class="pre">musrfit</span></tt> and
|
||||
<tt class="docutils literal"><span class="pre">musredit</span></tt> this is a good time for setting necessary environment variables for the use in Cygwin. For
|
||||
accomplishing that put the following lines at the end of the <tt class="docutils literal"><span class="pre">/home/Username/.bashrc</span></tt> (<tt class="docutils literal"><span class="pre">C:\cygwin\home\Username\.bashrc</span></tt>
|
||||
for the user <tt class="docutils literal"><span class="pre">Username</span></tt> and the <tt class="docutils literal"><span class="pre">cygwin</span> <span class="pre">root</span></tt> at <tt class="docutils literal"><span class="pre">C:\cygwin</span></tt>):</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">DISPLAY</span><span class="o">=</span>:0.0
|
||||
<span class="nb">export</span> <span class="nv">QTDIR</span><span class="o">=</span>/usr/lib/qt4
|
||||
<span class="nb">export</span> <span class="nv">ROOTSYS</span><span class="o">=</span>/cygdrive/c/root
|
||||
<span class="nb">export</span> <span class="nv">PATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/bin:<span class="nv">$QTDIR</span>/bin:/usr/i686-pc-cygwin/bin:<span class="nv">$PATH</span>
|
||||
<span class="nb">export</span> <span class="nv">MUSRFITPATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/bin
|
||||
</pre></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Afterwards close the Cygwin shell and reopen it again for the installation of <tt class="docutils literal"><span class="pre">musrfit</span></tt>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="index-24">
|
||||
<span id="id9"></span><h3>musrfit<a class="headerlink" href="#index-24" title="Permalink to this headline">¶</a></h3>
|
||||
<p>First, the most recent source code should be downloaded. The preferred way of doing so is to clone the <tt class="docutils literal"><span class="pre">musrfit</span></tt>
|
||||
repository via git. Assuming the code should be located in <tt class="docutils literal"><span class="pre">~/musrfit</span></tt> this is achieved most easily calling from the terminal</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span>
|
||||
$ git clone https://bitbucket.org/muonspin/musrfit.git
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>or</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span>
|
||||
$ git clone git://gitlab.psi.ch/nemu/musrfit.git
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>If the repository had been checked out already before, one can update the local copy using:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> musrfit
|
||||
$ git pull
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>As an alternative (if git is not available), the source code can also be downloaded from the following
|
||||
web-page: <a class="reference external" href="https://bitbucket.org/muonspin/musrfit/downloads">musrfit at bitbucket</a>.</p>
|
||||
<div class="section" id="index-25">
|
||||
<span id="id10"></span><h4>musrfit build with cmake<a class="headerlink" href="#index-25" title="Permalink to this headline">¶</a></h4>
|
||||
<p>Currently the following configuration switches for <tt class="docutils literal"><span class="pre">musrfit</span></tt> are available:</p>
|
||||
<dl class="docutils">
|
||||
<dt><strong>-DCMAKE_INSTALL_PREFIX=<prefix-path></strong></dt>
|
||||
<dd>Specify the installation prefix, <em>i.e.</em> the place where <tt class="docutils literal"><span class="pre">musrfit</span></tt> shall be installed, <em>e.g.</em> <tt class="docutils literal"><span class="pre">$ROOTSYS</span></tt> if already defined (by default: <tt class="docutils literal"><span class="pre">/usr/local</span></tt>)</dd>
|
||||
<dt><strong>-Dnexus=<value></strong></dt>
|
||||
<dd>enable/disable the support of <tt class="docutils literal"><span class="pre">NeXus</span></tt> data files (requires the <tt class="docutils literal"><span class="pre">HDF4</span></tt>, <tt class="docutils literal"><span class="pre">HDF5</span></tt> and <tt class="docutils literal"><span class="pre">NeXus</span></tt> libraries to be installed).
|
||||
<value>=1 enables <tt class="docutils literal"><span class="pre">NeXus</span></tt>, <value>=0 disables <tt class="docutils literal"><span class="pre">NeXus</span></tt>. The default setting, <em>i.e.</em> the switch is not provided is <tt class="docutils literal"><span class="pre">NeXus</span></tt> support is disabled.</dd>
|
||||
<dt><strong>-DASlibs=<value></strong></dt>
|
||||
<dd>enable/disable the <tt class="docutils literal"><span class="pre">ASlibs</span></tt>. <value>=1 enables the <tt class="docutils literal"><span class="pre">ASlibs</span></tt>, <value>=0 disables the <tt class="docutils literal"><span class="pre">ASlibs</span></tt>.
|
||||
The default setting, <em>i.e.</em> the switch is not provided is <tt class="docutils literal"><span class="pre">ASlibs</span></tt> support is <em>disabled</em>. For details see Documentation of <a class="reference internal" href="user-libs.html#user-libs"><em>user libs</em></a>.</dd>
|
||||
<dt><strong>-DBMWlibs=<value></strong></dt>
|
||||
<dd>enable/disable the <tt class="docutils literal"><span class="pre">BMWlibs</span></tt>. <value>=1 enables the <tt class="docutils literal"><span class="pre">BMWlibs</span></tt>, <value>=0 disables the <tt class="docutils literal"><span class="pre">BMWlibs</span></tt>.
|
||||
The default setting, <em>i.e.</em> the switch is not provided is <tt class="docutils literal"><span class="pre">BMWlibs</span></tt> support is <em>disabled</em>. For details see Documentation of <a class="reference internal" href="user-libs.html#user-libs"><em>user libs</em></a>.</dd>
|
||||
<dt><strong>-DBNMRlibs=<value></strong></dt>
|
||||
<dd>enable/disable the <tt class="docutils literal"><span class="pre">BNMRlibs</span></tt>. <value>=1 enables the <tt class="docutils literal"><span class="pre">BNMRlibs</span></tt>, <value>=0 disables the <tt class="docutils literal"><span class="pre">BNMRlibs</span></tt>.
|
||||
The default setting, <em>i.e.</em> the switch is not provided is <tt class="docutils literal"><span class="pre">BNMRlibs</span></tt> support is <em>disabled</em>.</dd>
|
||||
<dt><strong>-Dqt_based_tools=<value></strong></dt>
|
||||
<dd>Will try to get <tt class="docutils literal"><span class="pre">musredit</span></tt>, <tt class="docutils literal"><span class="pre">musrWiz</span></tt>, <tt class="docutils literal"><span class="pre">musrStep</span></tt>, and <tt class="docutils literal"><span class="pre">mupp</span></tt> installed, if <tt class="docutils literal"><span class="pre">Qt</span></tt> is found.
|
||||
By default this is <em>enabled</em>. Again <value>=0 means disabled, <value>=1 enabled.</dd>
|
||||
<dt><strong>-Dqt_version=<value></strong></dt>
|
||||
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. <value> can take the values: <tt class="docutils literal"><span class="pre">AUTO,</span> <span class="pre">3,</span> <span class="pre">4,</span> <span class="pre">5,</span> <span class="pre">6</span></tt>.
|
||||
If the value is set to <tt class="docutils literal"><span class="pre">AUTO</span></tt>, this highest installed version is chosen, otherwise the specified version is used.</dd>
|
||||
<dt><strong>-Dtry_OpenMP=<value></strong></dt>
|
||||
<dd>Will check if <tt class="docutils literal"><span class="pre">OpenMP</span></tt> support is possible, and if yes use it. The default is <em>enabled</em>.</dd>
|
||||
</dl>
|
||||
<p>Normally it should not be necessary to make use of any of the options except for specifying the installation path with
|
||||
<tt class="docutils literal"><span class="pre">-DCMAKE_INSTALL_PREFIX</span></tt>. <tt class="docutils literal"><span class="pre">musrfit</span></tt> build with <tt class="docutils literal"><span class="pre">cmake</span></tt> takes the out-of-source approach. Therefore a typical
|
||||
configuration / make / install process including <tt class="docutils literal"><span class="pre">NeXus</span></tt> support would look like</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> <span class="nv">$HOME</span>/Apps/musrfit
|
||||
$ mkdir build
|
||||
$ <span class="nb">cd</span> build
|
||||
$ cmake ../ -DCMAKE_INSTALL_PREFIX<span class="o">=</span><span class="nv">$ROOTSYS</span> -Dnexus<span class="o">=</span><span class="m">1</span>
|
||||
<span class="c1"># below it is assumed that multiple cores are present, hence the -j8 option</span>
|
||||
$ cmake --build ./ --clean-first -- -j8
|
||||
$ make install
|
||||
$ /sbin/ldconfig <span class="c1"># (as superuser)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="index-26">
|
||||
<span id="id11"></span><h3>musredit<a class="headerlink" href="#index-26" title="Permalink to this headline">¶</a></h3>
|
||||
<p>In the latest version of <tt class="docutils literal"><span class="pre">musrfit</span></tt> the configure script tries to determine automatically if
|
||||
Qt4.5 or higher is set up on the machine. In case this is found, the editor <tt class="docutils literal"><span class="pre">musredit</span></tt> is built
|
||||
readily with <tt class="docutils literal"><span class="pre">musrfit</span></tt>. If not, try the following:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> src/musredit
|
||||
$ qmake-qt4 musredit.pro
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>If everything went fine <tt class="docutils literal"><span class="pre">musredit</span></tt> can be compiled and installed:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ make
|
||||
$ make install
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>In case one likes to get the editor started just with starting the X server from the Windows start
|
||||
menu the file <tt class="docutils literal"><span class="pre">~/.startxwinrc</span></tt> with the following contents can be created:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span><span class="ch">#!/bin/sh</span>
|
||||
|
||||
<span class="nb">export</span> <span class="nv">DISPLAY</span><span class="o">=</span>:0.0
|
||||
<span class="nb">export</span> <span class="nv">QTDIR</span><span class="o">=</span>/usr/lib/qt4
|
||||
<span class="nb">export</span> <span class="nv">ROOTSYS</span><span class="o">=</span>/cygdrive/c/root
|
||||
<span class="nb">export</span> <span class="nv">PATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/bin:<span class="nv">$QTDIR</span>/bin:/usr/i686-pc-cygwin/bin:<span class="nv">$PATH</span>
|
||||
<span class="nb">export</span> <span class="nv">MUSRFITPATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/bin
|
||||
|
||||
musredit <span class="p">&</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="id12">
|
||||
<h3>musrgui (depreciated)<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h3>
|
||||
<p>If <tt class="docutils literal"><span class="pre">Qt4.5</span></tt> or higher is not available but <tt class="docutils literal"><span class="pre">Qt3</span></tt> is set up <tt class="docutils literal"><span class="pre">musrgui</span></tt> can be installed. For this
|
||||
please follow the instructions for the <tt class="docutils literal"><span class="pre">musredit</span></tt> installation where simply every <tt class="docutils literal"><span class="pre">musredit</span></tt> occurrence
|
||||
has to be replaced by <tt class="docutils literal"><span class="pre">musrgui</span></tt>, and <tt class="docutils literal"><span class="pre">qt4</span></tt> is replaced by <tt class="docutils literal"><span class="pre">qt3</span></tt>.</p>
|
||||
</div>
|
||||
<div class="section" id="id13">
|
||||
<h3>Check the installation<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h3>
|
||||
<p>In order to perform a quick test for finding out if the installation has been completed successfully,
|
||||
a few msr files together with the corresponding data files can be found in the <tt class="docutils literal"><span class="pre">musrfit</span></tt> source tree
|
||||
at doc/examples/.
|
||||
If <tt class="docutils literal"><span class="pre">musrgui</span></tt> has been installed, just open one of the <tt class="docutils literal"><span class="pre">test-*.msr</span></tt> files in the editor and test
|
||||
the <tt class="docutils literal"><span class="pre">musrfit</span></tt> functionalities. Otherwise, if only the terminal should be used, as an initial test
|
||||
for instance the following could be done:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> doc/examples
|
||||
$ musrview test-histo-ROOT-NPP.msr
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="potential-problems">
|
||||
<h3>Potential Problems<a class="headerlink" href="#potential-problems" title="Permalink to this headline">¶</a></h3>
|
||||
<p>It might be that especially when running on Windows 7 <tt class="docutils literal"><span class="pre">musredit</span></tt> and <tt class="docutils literal"><span class="pre">musrgui</span></tt> produce errors like a
|
||||
“STATUS_ACCESS_VIOLATION”. In this case, try to do the following: Close all Cygwin programs (including
|
||||
the terminals and X server) and run from a Windows command prompt (cmd)</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ C:<span class="se">\c</span>ygwin<span class="se">\b</span>in<span class="se">\a</span>sh.exe /bin/rebaseall
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>If this does not resolve the problem, try to change the compatibility settings of <tt class="docutils literal"><span class="pre">C:\cygwin\bin\sh.exe</span></tt>
|
||||
and <tt class="docutils literal"><span class="pre">C:\cygwin\bin\bash.exe</span></tt> so that they are executed with administrator privileges.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="mac-os-x-macos">
|
||||
<h2>Mac OS X / macOS<a class="headerlink" href="#mac-os-x-macos" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">macOS 11 alias <strong>Big Sur</strong>: <tt class="docutils literal"><span class="pre">musrfit</span></tt> is ready for <strong>Big Sur</strong> on Intel based macs. The <tt class="docutils literal"><span class="pre">DKS</span></tt> version of
|
||||
<tt class="docutils literal"><span class="pre">musrfit</span></tt> for macOS <strong>Big Sur</strong> is ready as well.</p>
|
||||
<p class="last">macOS 12 alias <strong>Monterey</strong>: <tt class="docutils literal"><span class="pre">musrfit</span></tt> is ready for <strong>Monterey</strong> on Intel <strong>and</strong> M1 (Apple Silicon) based macs, both running natively.
|
||||
The <tt class="docutils literal"><span class="pre">DKS</span></tt> version of <tt class="docutils literal"><span class="pre">musrfit</span></tt> for macOS <strong>Monterey</strong> is ready as well.</p>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
@@ -693,7 +444,7 @@ unistall <tt class="docutils literal"><span class="pre">musrfit</span></tt>, <tt
|
||||
installation of <a class="reference external" href="https://www.macports.org/">MacPorts</a> / <a class="reference external" href="http://www.finkproject.org/">Fink</a> , <tt class="docutils literal"><span class="pre">ROOT</span></tt>, and <tt class="docutils literal"><span class="pre">musrfit</span></tt> from scratch!</p>
|
||||
</div>
|
||||
<div class="section" id="requirements-macports">
|
||||
<span id="index-27"></span><h3>Requirements (MacPorts)<a class="headerlink" href="#requirements-macports" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="index-21"></span><h3>Requirements (MacPorts)<a class="headerlink" href="#requirements-macports" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Before proceeding with the usage of the <tt class="docutils literal"><span class="pre">MacPorts</span></tt> system first a few useful tools provided by Apple together
|
||||
with OS X (on the installation DVD/CDs) should be installed:</p>
|
||||
<blockquote>
|
||||
@@ -750,8 +501,8 @@ add a new line pointing to your local copy, <em>e.g.</em></p>
|
||||
</div>
|
||||
<p>With <tt class="docutils literal"><span class="pre">Qt5</span></tt>, <tt class="docutils literal"><span class="pre">musredit</span></tt> will be installed. If it happens that you used <tt class="docutils literal"><span class="pre">musrgui</span></tt> in the past,
|
||||
please change over to <tt class="docutils literal"><span class="pre">musredit</span></tt> since there will be no further development for <tt class="docutils literal"><span class="pre">musrgui</span></tt> anymore!</p>
|
||||
<div class="section" id="index-28">
|
||||
<span id="id14"></span><h4>Installation of NeXus requirements (optional)<a class="headerlink" href="#index-28" title="Permalink to this headline">¶</a></h4>
|
||||
<div class="section" id="index-22">
|
||||
<span id="id6"></span><h4>Installation of NeXus requirements (optional)<a class="headerlink" href="#index-22" title="Permalink to this headline">¶</a></h4>
|
||||
<p><em>Only</em> if <tt class="docutils literal"><span class="pre">musrfit</span></tt> should support reading data files in the <tt class="docutils literal"><span class="pre">NeXus</span></tt> format the further required packages are set up:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ sudo port -v install hdf4 hdf5
|
||||
</pre></div>
|
||||
@@ -772,8 +523,8 @@ $ sudo make install
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="index-29">
|
||||
<span id="id15"></span><h4>ROOT<a class="headerlink" href="#index-29" title="Permalink to this headline">¶</a></h4>
|
||||
<div class="section" id="index-23">
|
||||
<span id="id7"></span><h4>ROOT<a class="headerlink" href="#index-23" title="Permalink to this headline">¶</a></h4>
|
||||
<p><strong>The default ROOT version is based on ROOT 6.xx/yy!</strong></p>
|
||||
<div class="section" id="root-installed-via-package-installer">
|
||||
<h5>ROOT installed via package installer<a class="headerlink" href="#root-installed-via-package-installer" title="Permalink to this headline">¶</a></h5>
|
||||
@@ -850,15 +601,15 @@ into the file <tt class="docutils literal"><span class="pre">~/.MacOSX/environme
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">ROOTSYS</span><span class="o">=</span><span class="nv">$HOME</span>/Applications/root/root_exec
|
||||
<span class="nb">export</span> <span class="nv">MUSRFITPATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/bin
|
||||
<span class="nb">export</span> <span class="nv">PATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/bin:<span class="nv">$QTDIR</span>/bin:<span class="nv">$PATH</span>
|
||||
<span class="nb">export</span> <span class="nv">LD_LIBRARY_PATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/lib:<span class="nv">$LD_LIBRARY_PATH</span>
|
||||
<span class="nb">export</span> <span class="nv">DYLD_LIBRARY_PATH</span><span class="o">=</span><span class="nv">$ROOTSYS</span>/lib:<span class="nv">$DYLD_LIBRARY_PATH</span>
|
||||
|
||||
launchctl setenv ROOTSYS <span class="nv">$ROOTSYS</span>
|
||||
launchctl setenv MUSRFITPATH <span class="nv">$MUSRFITPATH</span>
|
||||
launchctl setenv PATH <span class="nv">$PATH</span>
|
||||
launchctl setenv LD_LIBRARY_PATH <span class="nv">$LD_LIBRARY_PATH</span>
|
||||
launchctl setenv DYLD_LIBRARY_PATH <span class="nv">$DYLD_LIBRARY_PATH</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>After this you will need to “execute” <tt class="docutils literal"><span class="pre">.profile</span></tt> before proceeding:</p>
|
||||
<p>After this you will need to “execute” <tt class="docutils literal"><span class="pre">.profile</span></tt> or <tt class="docutils literal"><span class="pre">.zprofile</span></tt> before proceeding:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nb">source</span> <span class="nv">$HOME</span>/.profile
|
||||
</pre></div>
|
||||
</div>
|
||||
@@ -885,7 +636,7 @@ but no proper fix is available. The workaround to get it right is to install the
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="requirements-fink">
|
||||
<span id="index-30"></span><h3>Requirements (Fink)<a class="headerlink" href="#requirements-fink" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="index-24"></span><h3>Requirements (Fink)<a class="headerlink" href="#requirements-fink" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Before proceeding with the usage of the <a class="reference external" href="http://www.finkproject.org/">Fink</a> system first a few useful tools provided by Apple together with OS X (on the installation DVD/CDs) should be installed:</p>
|
||||
<dl class="docutils">
|
||||
<dt><strong>Xcode</strong></dt>
|
||||
@@ -942,8 +693,8 @@ specific location, the later handling will be easier if a symbolic link to this
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>where <tt class="docutils literal"><span class="pre">x_yy_z</span></tt> has to be substituted by the correct version number, <em>e.g.</em> <tt class="docutils literal"><span class="pre">1_63_0</span></tt>.</p>
|
||||
<div class="section" id="index-31">
|
||||
<span id="id17"></span><h4>Installation of NeXus requirements (optional)<a class="headerlink" href="#index-31" title="Permalink to this headline">¶</a></h4>
|
||||
<div class="section" id="index-25">
|
||||
<span id="id9"></span><h4>Installation of NeXus requirements (optional)<a class="headerlink" href="#index-25" title="Permalink to this headline">¶</a></h4>
|
||||
<p><em>Only</em> if <tt class="docutils literal"><span class="pre">musrfit</span></tt> should support reading data files in the <tt class="docutils literal"><span class="pre">NeXus</span></tt> format the further required
|
||||
packages can be installed through Fink (check for the most recent versions):</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span>libjpeg hdf hdf5-cpp11 hdf5-cpp11-shlibs
|
||||
@@ -965,11 +716,11 @@ $ sudo make install
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="index-32">
|
||||
<span id="id18"></span><h4>ROOT<a class="headerlink" href="#index-32" title="Permalink to this headline">¶</a></h4>
|
||||
<div class="section" id="index-26">
|
||||
<span id="id10"></span><h4>ROOT<a class="headerlink" href="#index-26" title="Permalink to this headline">¶</a></h4>
|
||||
<p><strong>The default ROOT version is based on ROOT 6.xx/yy!</strong></p>
|
||||
<div class="section" id="id19">
|
||||
<h5>ROOT installed via package installer<a class="headerlink" href="#id19" title="Permalink to this headline">¶</a></h5>
|
||||
<div class="section" id="id11">
|
||||
<h5>ROOT installed via package installer<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h5>
|
||||
<p>The lazy way to get <tt class="docutils literal"><span class="pre">ROOT</span></tt> installed is via package installer. If your macOS is directly supported
|
||||
by the <tt class="docutils literal"><span class="pre">ROOT</span></tt> people you can download the package installer from the <tt class="docutils literal"><span class="pre">ROOT</span></tt> <a class="reference external" href="https://root.cern.ch/downloading-root">download page</a>.
|
||||
Choose the latest <tt class="docutils literal"><span class="pre">ROOT</span></tt> release and download you macOS version dmg-file, <em>e.g.</em> for macOS 10.13 (High Sierra)
|
||||
@@ -983,8 +734,8 @@ $ sudo ln -s root_v6.16.00 root
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="id21">
|
||||
<h5>ROOT installed from source<a class="headerlink" href="#id21" title="Permalink to this headline">¶</a></h5>
|
||||
<div class="section" id="id13">
|
||||
<h5>ROOT installed from source<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h5>
|
||||
<p>The best way to get <tt class="docutils literal"><span class="pre">ROOT</span></tt> exactly the way needed for <tt class="docutils literal"><span class="pre">musrfit</span></tt> is to install it from source.
|
||||
Before describing it, please make sure that you have installed all required packages listed under
|
||||
<a class="reference internal" href="#supported-operating-systems"><em>Requested Software</em></a> (<em>e.g.</em> <tt class="docutils literal"><span class="pre">fftw</span></tt>, <tt class="docutils literal"><span class="pre">gsl</span></tt>, etc).</p>
|
||||
@@ -1014,8 +765,8 @@ $ make install
|
||||
</div>
|
||||
<p>For further details see <a class="reference external" href="https://root.cern.ch/building-root">Installing ROOT from Source</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="id23">
|
||||
<h5>Setting up Environment Variables for ROOT and musrfit<a class="headerlink" href="#id23" title="Permalink to this headline">¶</a></h5>
|
||||
<div class="section" id="id15">
|
||||
<h5>Setting up Environment Variables for ROOT and musrfit<a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h5>
|
||||
<p>Since Apple in its wisdom decided that programs started from a shell are treated differently than Apps if it is coming to
|
||||
system variables, we need to work harder compared to a Linux system.</p>
|
||||
<p><strong>For Mac OS X < 10.8:</strong></p>
|
||||
@@ -1058,8 +809,8 @@ launchctl setenv LD_LIBRARY_PATH <span class="nv">$LD_LIBRARY_PATH</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="index-33">
|
||||
<span id="id24"></span><h3>musrfit<a class="headerlink" href="#index-33" title="Permalink to this headline">¶</a></h3>
|
||||
<div class="section" id="index-27">
|
||||
<span id="id16"></span><h3>musrfit<a class="headerlink" href="#index-27" title="Permalink to this headline">¶</a></h3>
|
||||
<p>First, the most recent source code should be downloaded. First, the most recent source code should be downloaded.
|
||||
The preferred way of doing so is to clone the <tt class="docutils literal"><span class="pre">musrfit</span></tt> repository via git. Assuming the code should be located
|
||||
in <tt class="docutils literal"><span class="pre">~/Applications/musrfit</span></tt> this is achieved most easily calling from the termin</p>
|
||||
@@ -1081,8 +832,8 @@ $ git pull
|
||||
</div>
|
||||
<p>As an alternative (<em>if git is not available</em>), the source code can also be downloaded from the following
|
||||
web-page: <a class="reference external" href="https://bitbucket.org/muonspin/musrfit/downloads">musrfit at bitbucket</a>.</p>
|
||||
<div class="section" id="index-34">
|
||||
<span id="id25"></span><h4>musrfit build with cmake<a class="headerlink" href="#index-34" title="Permalink to this headline">¶</a></h4>
|
||||
<div class="section" id="index-28">
|
||||
<span id="id17"></span><h4>musrfit build with cmake<a class="headerlink" href="#index-28" title="Permalink to this headline">¶</a></h4>
|
||||
<p>Currently the following configuration switches for <tt class="docutils literal"><span class="pre">musrfit</span></tt> are available:</p>
|
||||
<dl class="docutils">
|
||||
<dt><strong>-DCMAKE_INSTALL_PREFIX=<prefix-path></strong></dt>
|
||||
@@ -1122,8 +873,8 @@ $ /sbin/ldconfig <span class="c1"># (as superus
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="id26">
|
||||
<h4>musrfit last step of the installation<a class="headerlink" href="#id26" title="Permalink to this headline">¶</a></h4>
|
||||
<div class="section" id="id18">
|
||||
<h4>musrfit last step of the installation<a class="headerlink" href="#id18" title="Permalink to this headline">¶</a></h4>
|
||||
<p>In order to finish the installation of <tt class="docutils literal"><span class="pre">musrfit</span></tt> two more things should be done:</p>
|
||||
<ul class="simple">
|
||||
<li>Define the <tt class="docutils literal"><span class="pre">MUSRFITPATH</span></tt> environment variable containing the path to the <tt class="docutils literal"><span class="pre">musrfit</span></tt> executables and <tt class="docutils literal"><span class="pre">XML</span></tt> files.
|
||||
@@ -1139,8 +890,8 @@ detailed information on this XML file refer to the <a class="reference internal"
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="index-35">
|
||||
<span id="id27"></span><h3>musredit<a class="headerlink" href="#index-35" title="Permalink to this headline">¶</a></h3>
|
||||
<div class="section" id="index-29">
|
||||
<span id="id19"></span><h3>musredit<a class="headerlink" href="#index-29" title="Permalink to this headline">¶</a></h3>
|
||||
<p>In the latest version of <tt class="docutils literal"><span class="pre">musrfit</span></tt> the configure script tries to determine automatically the highest
|
||||
available Qt version. In case this is found, the editor <tt class="docutils literal"><span class="pre">musredit</span></tt> is built already together with <tt class="docutils literal"><span class="pre">musrfit</span></tt>.
|
||||
If not, try the following:</p>
|
||||
@@ -1176,8 +927,8 @@ accomplish that, add the following lines to <tt class="docutils literal"><span c
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="id28">
|
||||
<h3>Check the installation<a class="headerlink" href="#id28" title="Permalink to this headline">¶</a></h3>
|
||||
<div class="section" id="id20">
|
||||
<h3>Check the installation<a class="headerlink" href="#id20" title="Permalink to this headline">¶</a></h3>
|
||||
<p>In order to perform a quick test for finding out if the installation has been completed successfully, a few msr
|
||||
files together with the corresponding data files can be found in the musrfit source tree at <tt class="docutils literal"><span class="pre">doc/examples/</span></tt>.
|
||||
If <tt class="docutils literal"><span class="pre">musrgui</span></tt> has been installed, just open one of the <tt class="docutils literal"><span class="pre">test-*.msr</span></tt> files in the editor and test the <tt class="docutils literal"><span class="pre">musrfit</span></tt>
|
||||
@@ -1191,123 +942,22 @@ $ musrview test-histo-ROOT-NPP.msr
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h3><a href="index.html">Table Of Contents</a></h3>
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> on Different Platforms</a><ul>
|
||||
<li><a class="reference internal" href="#supported-operating-systems-and-software-requirements">Supported Operating Systems and Software Requirements</a></li>
|
||||
<li><a class="reference internal" href="#os-restrictions">OS Restrictions</a></li>
|
||||
<li><a class="reference internal" href="#gnu-linux">GNU/Linux</a><ul>
|
||||
<li><a class="reference internal" href="#requirements">Requirements</a><ul>
|
||||
<li><a class="reference internal" href="#everything-but-root-and-nexus">Everything but ROOT and NeXus</a></li>
|
||||
<li><a class="reference internal" href="#installation-of-nexus-requirements-optional">Installation of NeXus requirements (optional)</a></li>
|
||||
<li><a class="reference internal" href="#index-16">ROOT</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#musrfit">musrfit</a><ul>
|
||||
<li><a class="reference internal" href="#musrfit-build-with-cmake">musrfit build with cmake</a></li>
|
||||
<li><a class="reference internal" href="#musrfit-last-step-of-the-installation">musrfit last step of the installation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#musredit">musredit</a></li>
|
||||
<li><a class="reference internal" href="#musrgui-depreciated">musrgui (depreciated)</a></li>
|
||||
<li><a class="reference internal" href="#check-the-installation">Check the installation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#ms-windows">MS Windows</a><ul>
|
||||
<li><a class="reference internal" href="#id5">Requirements</a><ul>
|
||||
<li><a class="reference internal" href="#setting-up-cygwin">Setting up Cygwin</a></li>
|
||||
<li><a class="reference internal" href="#id6">Everything but ROOT and NeXus</a></li>
|
||||
<li><a class="reference internal" href="#index-22">Installation of NeXus requirements (optional)</a></li>
|
||||
<li><a class="reference internal" href="#index-23">ROOT</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#index-24">musrfit</a><ul>
|
||||
<li><a class="reference internal" href="#index-25">musrfit build with cmake</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#index-26">musredit</a></li>
|
||||
<li><a class="reference internal" href="#id12">musrgui (depreciated)</a></li>
|
||||
<li><a class="reference internal" href="#id13">Check the installation</a></li>
|
||||
<li><a class="reference internal" href="#potential-problems">Potential Problems</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#mac-os-x-macos">Mac OS X / macOS</a><ul>
|
||||
<li><a class="reference internal" href="#requirements-macports">Requirements (MacPorts)</a><ul>
|
||||
<li><a class="reference internal" href="#index-28">Installation of NeXus requirements (optional)</a></li>
|
||||
<li><a class="reference internal" href="#index-29">ROOT</a></li>
|
||||
<li><a class="reference internal" href="#notes-on-macos-catalina">Notes on macOS Catalina</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#requirements-fink">Requirements (Fink)</a><ul>
|
||||
<li><a class="reference internal" href="#index-31">Installation of NeXus requirements (optional)</a></li>
|
||||
<li><a class="reference internal" href="#index-32">ROOT</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#index-33">musrfit</a><ul>
|
||||
<li><a class="reference internal" href="#index-34">musrfit build with cmake</a></li>
|
||||
<li><a class="reference internal" href="#id26">musrfit last step of the installation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#index-35">musredit</a></li>
|
||||
<li><a class="reference internal" href="#musrgui-obsolete">musrgui (obsolete)</a></li>
|
||||
<li><a class="reference internal" href="#id28">Check the installation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
«  <a href="user-libs.html">Documentation of user libs (user functions)</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="setup-dks.html">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> / <tt class="docutils literal"><span class="pre">DKS</span></tt>: High Speed Fitting with GPU’s</a>  »
|
||||
</p>
|
||||
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="user-libs.html"
|
||||
title="previous chapter">Documentation of user libs (user functions)</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="setup-dks.html"
|
||||
title="next chapter">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> / <tt class="docutils literal"><span class="pre">DKS</span></tt>: High Speed Fitting with GPU’s</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="_sources/setup-standard.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="setup-dks.html" title="Setting up musrfit / DKS: High Speed Fitting with GPU’s"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="user-libs.html" title="Documentation of user libs (user functions)"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Apr 09, 2021.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on May 29, 2022.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Tutorial for musrfit — musrfit 1.7.4 documentation</title>
|
||||
<title>Tutorial for musrfit — musrfit 1.8.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.7.4',
|
||||
VERSION: '1.8.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,32 +24,29 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.7.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.8.0 documentation" href="index.html" />
|
||||
<link rel="next" title="User manual" href="user-manual.html" />
|
||||
<link rel="prev" title="How to Cite musrfit?" href="cite.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="user-manual.html" title="User manual"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="cite.html" title="How to Cite musrfit?"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>musrfit 1.8.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>Tutorial for musrfit</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
«  <a href="cite.html">How to Cite <tt class="docutils literal"><span class="pre">musrfit</span></tt>?</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="user-manual.html">User manual</a>  »
|
||||
</p>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
|
||||
<div class="section" id="tutorial-for-musrfit">
|
||||
<span id="index-0"></span><h1>Tutorial for <tt class="docutils literal"><span class="pre">musrfit</span></tt><a class="headerlink" href="#tutorial-for-musrfit" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="single-histogram-fit-tutorial">
|
||||
@@ -381,74 +378,22 @@ For a complete description please refer to the manuals of <a class="reference in
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h3><a href="index.html">Table Of Contents</a></h3>
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">Tutorial for <tt class="docutils literal"><span class="pre">musrfit</span></tt></a><ul>
|
||||
<li><a class="reference internal" href="#single-histogram-fit-tutorial">Single-histogram-fit tutorial</a><ul>
|
||||
<li><a class="reference internal" href="#the-msr-file">The msr file</a></li>
|
||||
<li><a class="reference internal" href="#determine-t0-and-the-data-range-using-musrt0">Determine t0 and the data range using musrt0</a></li>
|
||||
<li><a class="reference internal" href="#fit-the-model-to-the-data-using-musrfit">Fit the model to the data using <tt class="docutils literal"><span class="pre">musrfit</span></tt></a></li>
|
||||
<li><a class="reference internal" href="#view-the-data-and-the-fit-using-musrview">View the data and the fit using <tt class="docutils literal"><span class="pre">musrview</span></tt></a></li>
|
||||
<li><a class="reference internal" href="#process-multiple-msr-files-using-msr2data">Process multiple msr files using <tt class="docutils literal"><span class="pre">msr2data</span></tt></a></li>
|
||||
<li><a class="reference internal" href="#further-reading">Further reading</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#asymmtery-fit-tutorial">Asymmtery-fit tutorial</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
«  <a href="cite.html">How to Cite <tt class="docutils literal"><span class="pre">musrfit</span></tt>?</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="user-manual.html">User manual</a>  »
|
||||
</p>
|
||||
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="cite.html"
|
||||
title="previous chapter">How to Cite <tt class="docutils literal"><span class="pre">musrfit</span></tt>?</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="user-manual.html"
|
||||
title="next chapter">User manual</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="_sources/tutorial.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="user-manual.html" title="User manual"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="cite.html" title="How to Cite musrfit?"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Apr 09, 2021.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on May 29, 2022.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Documentation of user libs (user functions) — musrfit 1.7.4 documentation</title>
|
||||
<title>Documentation of user libs (user functions) — musrfit 1.8.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.7.4',
|
||||
VERSION: '1.8.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,32 +24,29 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.7.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.8.0 documentation" href="index.html" />
|
||||
<link rel="next" title="Setting up musrfit on Different Platforms" href="setup-standard.html" />
|
||||
<link rel="prev" title="User manual" href="user-manual.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="setup-standard.html" title="Setting up musrfit on Different Platforms"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="user-manual.html" title="User manual"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>musrfit 1.8.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>Documentation of user libs (user functions)</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
«  <a href="user-manual.html">User manual</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="setup-standard.html">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> on Different Platforms</a>  »
|
||||
</p>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
|
||||
<div class="section" id="documentation-of-user-libs-user-functions">
|
||||
<span id="user-libs"></span><span id="index-0"></span><h1>Documentation of user libs (user functions)<a class="headerlink" href="#documentation-of-user-libs-user-functions" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="meissner-profiles-vortex-lattice-related-functions-bmw-libs">
|
||||
@@ -600,74 +597,22 @@ K(m)&=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h3><a href="index.html">Table Of Contents</a></h3>
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">Documentation of user libs (user functions)</a><ul>
|
||||
<li><a class="reference internal" href="#meissner-profiles-vortex-lattice-related-functions-bmw-libs">Meissner-Profiles / Vortex-Lattice related functions (BMW libs)</a><ul>
|
||||
<li><a class="reference internal" href="#libfitpofb">libFitPofB</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#nonlocal-superconductivity-related-meissner-screening-functions-as-libs">Nonlocal superconductivity related Meissner screening functions (AS libs)</a></li>
|
||||
<li><a class="reference internal" href="#functions-to-analyze-bgr-nmr-data-bnmr-libs">Functions to analyze β-NMR data (BNMR libs)</a><ul>
|
||||
<li><a class="reference internal" href="#libbnmr">libBNMR</a></li>
|
||||
<li><a class="reference internal" href="#liblineprofile">libLineProfile</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
«  <a href="user-manual.html">User manual</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="setup-standard.html">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> on Different Platforms</a>  »
|
||||
</p>
|
||||
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="user-manual.html"
|
||||
title="previous chapter">User manual</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="setup-standard.html"
|
||||
title="next chapter">Setting up <tt class="docutils literal"><span class="pre">musrfit</span></tt> on Different Platforms</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="_sources/user-libs.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="setup-standard.html" title="Setting up musrfit on Different Platforms"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="user-manual.html" title="User manual"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Apr 09, 2021.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on May 29, 2022.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>User manual — musrfit 1.7.4 documentation</title>
|
||||
<title>User manual — musrfit 1.8.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.7.4',
|
||||
VERSION: '1.8.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,32 +24,29 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.7.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.8.0 documentation" href="index.html" />
|
||||
<link rel="next" title="Documentation of user libs (user functions)" href="user-libs.html" />
|
||||
<link rel="prev" title="Tutorial for musrfit" href="tutorial.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="user-libs.html" title="Documentation of user libs (user functions)"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="tutorial.html" title="Tutorial for musrfit"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="header"><h1 class="heading"><a href="index.html">
|
||||
<span>musrfit 1.8.0 documentation</span></a></h1>
|
||||
<h2 class="heading"><span>User manual</span></h2>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
«  <a href="tutorial.html">Tutorial for <tt class="docutils literal"><span class="pre">musrfit</span></tt></a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="user-libs.html">Documentation of user libs (user functions)</a>  »
|
||||
</p>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
|
||||
<div class="section" id="user-manual">
|
||||
<span id="index-0"></span><span id="id1"></span><h1>User manual<a class="headerlink" href="#user-manual" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="introduction">
|
||||
@@ -65,23 +62,28 @@
|
||||
<dl class="docutils">
|
||||
<dt><strong><msr-file></strong></dt>
|
||||
<dd>filename of the msr input file defining all the details needed for performing a fit to a specified set of data. This is the only mandatory parameter.</dd>
|
||||
<dt><strong>-k, - -keep-mn2-output</strong></dt>
|
||||
<dt><strong>-k, –keep-mn2-output</strong></dt>
|
||||
<dd>selects the option for keeping the output of <tt class="docutils literal"><span class="pre">MINUIT2</span></tt> including the correlation coefficients between different parameters and renaming the files <tt class="docutils literal"><span class="pre">MINUIT2.OUTPUT</span></tt> and <tt class="docutils literal"><span class="pre">MINUIT2.root</span></tt> to <tt class="docutils literal"><span class="pre"><msr_file_without_extension>-mn2.output</span></tt> and <tt class="docutils literal"><span class="pre"><msr_file_without_extension>-mn2.root</span></tt>, respectively, <em>e.g.</em> <tt class="docutils literal"><span class="pre"><msr_file></span></tt> = <tt class="docutils literal"><span class="pre">8472.msr</span></tt> will result in <tt class="docutils literal"><span class="pre">8472-mn2.output</span></tt>, <tt class="docutils literal"><span class="pre">8472-mn2.root</span></tt>.</dd>
|
||||
<dt><strong>-c, - -chisq-only</strong></dt>
|
||||
<dt><strong>-c, –chisq-only</strong></dt>
|
||||
<dd>Instead of fitting the model, <tt class="docutils literal"><span class="pre">musrfit</span></tt> calculates <span class="math">\(\chi^2\)</span> or max. log-likelihood, maxLH, only once and sends the result to the standard output if called with this option. This is <em>e.g.</em> useful for the adjustment of the initial values of the fit parameters.</dd>
|
||||
<dt><strong>-t, - -title-from-data-file</strong></dt>
|
||||
<dt><strong>-t, –title-from-data-file</strong></dt>
|
||||
<dd>If this option is given <tt class="docutils literal"><span class="pre">musrfit</span></tt> will replace the title in the <tt class="docutils literal"><span class="pre"><msr_file></span></tt> by the run title in the data file of the first run appearing in a RUN block. In case there is no run title in the data file no substitution is done.</dd>
|
||||
<dt><strong>-e, - -estimateN0</strong></dt>
|
||||
<dt><strong>-e, –estimateN0</strong></dt>
|
||||
<dd>estimate <span class="math">\(N_0\)</span> for single histogram fits.</dd>
|
||||
<dt><strong>-p, - -per-run-block-chisq</strong></dt>
|
||||
<dt><strong>-p, –per-run-block-chisq</strong></dt>
|
||||
<dd>will write per run block chisq/maxLH into the msr-file.</dd>
|
||||
<dt><strong>- -dump <type></strong></dt>
|
||||
<dt><strong>-n, –no-of-cores-avail</strong></dt>
|
||||
<dd>print out how many cores are available (only vaild for OpenMP)</dd>
|
||||
<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>–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>
|
||||
<dt><strong>–timeout <timeout_tag></strong></dt>
|
||||
<dd>overwrites the predefined timeout of 3600 sec. <timeout_tag> <span class="math">\(\leq\)</span> 0 means the timeout facility is not enabled. <timeout_tag> > 0, <em>e.g.</em> <tt class="docutils literal"><span class="pre">nn</span></tt> will set the timeout to <tt class="docutils literal"><span class="pre">nn</span></tt> (sec). If during a fit this timeout is reached, <tt class="docutils literal"><span class="pre">musrfit</span></tt> will terminate. This is used to prevent orphan <tt class="docutils literal"><span class="pre">musrfit</span></tt> processes to jam the system.</dd>
|
||||
<dt><strong>- -help</strong></dt>
|
||||
<dt><strong>–help</strong></dt>
|
||||
<dd>displays a small help notice in the shell explaining the basic usage of the program.</dd>
|
||||
<dt><strong>- -version</strong></dt>
|
||||
<dt><strong>–version</strong></dt>
|
||||
<dd>prints the version number of <tt class="docutils literal"><span class="pre">musrfit</span></tt></dd>
|
||||
</dl>
|
||||
<p>If called with a msr input file, <em>e.g.</em></p>
|
||||
@@ -101,22 +103,22 @@
|
||||
<dl class="docutils">
|
||||
<dt><strong><msr_file></strong></dt>
|
||||
<dd>name of the msr input or output file to be displayed. This is the only mandatory parameter.</dd>
|
||||
<dt><strong>- -help</strong></dt>
|
||||
<dt><strong>–help</strong></dt>
|
||||
<dd>displays a small help notice in the shell explaining the basic usage of the program.</dd>
|
||||
<dt><strong>- -version</strong></dt>
|
||||
<dt><strong>–version</strong></dt>
|
||||
<dd>prints the version number of <tt class="docutils literal"><span class="pre">musrview</span></tt>.</dd>
|
||||
<dt><strong>-f, - -fourier</strong></dt>
|
||||
<dt><strong>-f, –fourier</strong></dt>
|
||||
<dd>will directly present the Fourier transform of the <msr_file> with Fourier options as defined in the <msr_file>.</dd>
|
||||
<dt><strong>-a, - -avg</strong></dt>
|
||||
<dt><strong>-a, –avg</strong></dt>
|
||||
<dd>will directly present the averaged data/Fourier of the <msr_file>.</dd>
|
||||
<dt><strong>-1, - -one_to_one</strong></dt>
|
||||
<dt><strong>-1, –one_to_one</strong></dt>
|
||||
<dd>calculate the theory points <em>only</em> at the data points.</dd>
|
||||
<dt><strong>- -<graphic_format_extension></strong></dt>
|
||||
<dt><strong>–<graphic_format_extension></strong></dt>
|
||||
<dd>will produce a graphics output file without starting a ROOT session. The filename is based on the name of the <msr_file>, <em>e.g.</em> 8472.msr will result in 8472_0.png.
|
||||
Supported values for <tt class="docutils literal"><span class="pre"><graphic_format_extension></span></tt> are <em>eps</em>, <em>pdf</em>, <em>gif</em>, <em>jpg</em>, <em>png</em>, <em>svg</em>, <em>xpm</em>, and, <em>root</em>.</dd>
|
||||
<dt><strong>- -ascii</strong></dt>
|
||||
<dt><strong>–ascii</strong></dt>
|
||||
<dd>will generate an ascii dump of the data and theory as plotted.</dd>
|
||||
<dt><strong>- -timeout <timeout></strong></dt>
|
||||
<dt><strong>–timeout <timeout></strong></dt>
|
||||
<dd><timeout> given in seconds after which <tt class="docutils literal"><span class="pre">musrview</span></tt> terminates. If <timeout> <span class="math">\(\leq\)</span> 0, no timeout will take place. Default for <timeout> is 0.</dd>
|
||||
</dl>
|
||||
<p>If called with a msr file and the <tt class="docutils literal"><span class="pre">--<graphic_format_extension></span></tt> option, <em>e.g.</em></p>
|
||||
@@ -175,55 +177,55 @@ Supported values for <tt class="docutils literal"><span class="pre"><graphic_
|
||||
<dd><dl class="first last docutils">
|
||||
<dt><strong><msr_files></strong></dt>
|
||||
<dd>msr-file name(s). These msr-files are used for the Fourier transform. It can be a list of msr-files, <em>e.g.</em> <tt class="docutils literal"><span class="pre">musrFT</span> <span class="pre">3110.msr</span> <span class="pre">3111.msr</span></tt></dd>
|
||||
<dt><strong>-df, - -data-file <data-file></strong></dt>
|
||||
<dt><strong>-df, –data-file <data-file></strong></dt>
|
||||
<dd>This allows to feed only μSR data file(s) to perform the Fourier transform. Since the extended <msr-file> information are missing, they will need to be provided by to options, or <tt class="docutils literal"><span class="pre">musrFT</span></tt> tries to guess, based on <a class="reference internal" href="#musrfit-startup"><em>musrfit_startup.xml</em></a> settings.</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt><strong>Options</strong></dt>
|
||||
<dd><dl class="first last docutils">
|
||||
<dt><strong>- -help</strong></dt>
|
||||
<dt><strong>–help</strong></dt>
|
||||
<dd>display a help and exit.</dd>
|
||||
<dt><strong>- -version</strong></dt>
|
||||
<dt><strong>–version</strong></dt>
|
||||
<dd>output version information and exit.</dd>
|
||||
<dt><strong>-g, - -graphic-format <graphic-format-extension></strong></dt>
|
||||
<dt><strong>-g, –graphic-format <graphic-format-extension></strong></dt>
|
||||
<dd>will produce a graphic-output-file without starting a root session. The name is based either on the <msr-file> or the <data-file>, <em>e.g.</em> <tt class="docutils literal"><span class="pre">3310.msr</span> <span class="pre">-></span> <span class="pre">3310_0.png</span></tt>. Supported graphic-format-extension: <em>eps</em>, <em>pdf</em>, <em>gif</em>, <em>jpg</em>, <em>png</em>, <em>svg</em>, <em>xpm</em>, and <em>root</em>.</dd>
|
||||
<dt><strong>- -dump <fln></strong></dt>
|
||||
<dt><strong>–dump <fln></strong></dt>
|
||||
<dd>rather than starting a root session and showing Fourier graphs of the data, it will output the Fourier data in an ascii file <fln>.</dd>
|
||||
<dt><strong>-br, - -background-range <start> <end></strong></dt>
|
||||
<dt><strong>-br, –background-range <start> <end></strong></dt>
|
||||
<dd>background interval used to estimate the background to be subtracted before the Fourier transform. <start>, <end> to be given in bins.</dd>
|
||||
<dt><strong>-bg, - -background</strong></dt>
|
||||
<dt><strong>-bg, –background</strong></dt>
|
||||
<dd>gives the background explicit for each histogram.</dd>
|
||||
<dt><strong>-fo, - -fourier-option <fopt></strong></dt>
|
||||
<dt><strong>-fo, –fourier-option <fopt></strong></dt>
|
||||
<dd><fopt> can be ‘<em>real</em>‘, ‘<em>imag</em>‘, ‘<em>real+imag</em>‘, ‘<em>power</em>‘, or ‘<em>phase</em>‘. If this is not defined (neither on the command line nor in the <a class="reference internal" href="#musrfit-startup"><em>musrfit_startup.xml</em></a>) ‘<em>power</em>‘ will be used.</dd>
|
||||
<dt><strong>-ap, - -apodization <val></strong></dt>
|
||||
<dt><strong>-ap, –apodization <val></strong></dt>
|
||||
<dd><val> can be either ‘<em>none</em>‘, ‘<em>weak</em>‘, ‘<em>medium</em>‘, ‘<em>strong</em>‘. Default will be ‘<em>none</em>‘.</dd>
|
||||
<dt><strong>-fp, - -fourier-power <N></strong></dt>
|
||||
<dt><strong>-fp, –fourier-power <N></strong></dt>
|
||||
<dd><N> being the Fourier power, i.e. <tt class="docutils literal"><span class="pre">2^<N></span></tt> used for zero padding. Default is -1, i.e. <em>no</em> zero padding will be performed.</dd>
|
||||
<dt><strong>-u, - -units <units></strong></dt>
|
||||
<dt><strong>-u, –units <units></strong></dt>
|
||||
<dd><units> is used to define the abscissa of the Fourier transform. One may choose between the fields (<em>Gauss</em>) or (<em>Tesla</em>), the frequency (<em>MHz</em>), and the angular-frequency domain (<em>Mc/s</em>). Default will be ‘<em>MHz</em>‘.</dd>
|
||||
<dt><strong>-ph, - -phase <val></strong></dt>
|
||||
<dt><strong>-ph, –phase <val></strong></dt>
|
||||
<dd>defines the initial phase <val>. This only is of concern for ‘<em>real</em>‘, ‘<em>imag</em>‘, and ‘<em>real+imag</em>‘. Default will be 0.0.</dd>
|
||||
<dt><strong>-fr, - -fourier-range <start> <end></strong></dt>
|
||||
<dt><strong>-fr, –fourier-range <start> <end></strong></dt>
|
||||
<dd>Fourier range. <start>, <end> are interpreted in the units given. Default will be -1.0 for both which means, take the full Fourier range.</dd>
|
||||
<dt><strong>-tr, - -time-range <start> <end></strong></dt>
|
||||
<dt><strong>-tr, –time-range <start> <end></strong></dt>
|
||||
<dd>time domain range to be used for Fourier transform. <start>, <end> are to be given in (μs). If nothing is provided, the full time range found in the data file(s) will be used.</dd>
|
||||
<dt><strong>- -histo <list></strong></dt>
|
||||
<dt><strong>–histo <list></strong></dt>
|
||||
<dd>give the <list> of histograms to be used for the Fourier transform. <em>E.g.</em> <tt class="docutils literal"><span class="pre">musrFT</span> <span class="pre">-df</span> <span class="pre">lem15_his_01234.root</span> <span class="pre">--histo</span> <span class="pre">1</span> <span class="pre">3</span></tt>, will only be needed together with the option <tt class="docutils literal"><span class="pre">--data-file</span></tt>. If multiple data files are given, <list> will apply to all data-files given. If <tt class="docutils literal"><span class="pre">--histo</span></tt> is not given, <em>all</em> histos of a data file will be used. <list> can be anything like: 2 3 6, or 2-17, or 1-6 9, etc.</dd>
|
||||
<dt><strong>-a, - -average</strong></dt>
|
||||
<dt><strong>-a, –average</strong></dt>
|
||||
<dd>show the average of all <strong>ALL</strong> Fourier transformed data.</dd>
|
||||
<dt><strong>-ad, - -average-per-data-set</strong></dt>
|
||||
<dt><strong>-ad, –average-per-data-set</strong></dt>
|
||||
<dd>show the average of <strong>per-data-set</strong> Fourier transformed data.</dd>
|
||||
<dt><strong>- -t0 <list></strong></dt>
|
||||
<dd>A list of t0’s can be provided. This in conjunction with <tt class="docutils literal"><span class="pre">--data-file</span></tt> and <tt class="docutils literal"><span class="pre">--fourier-option</span> <span class="pre">real</span></tt> allows to get the proper initial phase if t0’s are known. If a single t0 for multiple histos is given, it is assume, that this t0 is common to <em>all</em> histos. Example: <tt class="docutils literal"><span class="pre">musrFT</span> <span class="pre">-df</span> <span class="pre">lem15_his_01234.root</span> <span class="pre">-fo</span> <span class="pre">real</span> <span class="pre">--t0</span> <span class="pre">2750</span> <span class="pre">--histo</span> <span class="pre">1</span> <span class="pre">3</span></tt>.</dd>
|
||||
<dt><strong>-pa, - -packing <N></strong></dt>
|
||||
<dt><strong>-pa, –packing <N></strong></dt>
|
||||
<dd>if <N> (an integer), the time domain data will first be packed/rebinned by <N>.</dd>
|
||||
<dt><strong>- -title <title></strong></dt>
|
||||
<dt><strong>–title <title></strong></dt>
|
||||
<dd>give a global title for the plot.</dd>
|
||||
<dt><strong>- -create-msr-file <fln></strong></dt>
|
||||
<dt><strong>–create-msr-file <fln></strong></dt>
|
||||
<dd>creates a msr-file based on the command line options provided. This will help on the way to a full fitting model.</dd>
|
||||
<dt><strong>-lc, - -lifetimecorrection <fudge></strong></dt>
|
||||
<dt><strong>-lc, –lifetimecorrection <fudge></strong></dt>
|
||||
<dd>try to eliminate the muon life time decay. Only makes sense for low transverse fields. <fudge> is a tweaking factor (scaling factor for the estimated t0) and should be kept around 1.0.</dd>
|
||||
<dt><strong>- -timeout <timeout></strong></dt>
|
||||
<dt><strong>–timeout <timeout></strong></dt>
|
||||
<dd><timeout> given in seconds after which <tt class="docutils literal"><span class="pre">musrFT</span></tt> terminates. If <timeout> <span class="math">\(\leq\)</span> 0, no timeout will take place. Default <timeout> is 3600 sec.</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
@@ -277,13 +279,13 @@ Supported values for <tt class="docutils literal"><span class="pre"><graphic_
|
||||
<dl class="docutils">
|
||||
<dt><strong><msr_file></strong></dt>
|
||||
<dd>name of an msr file.</dd>
|
||||
<dt><strong>-g, - -getT0FromPromptPeak [<firstGoodBinOffset>]</strong></dt>
|
||||
<dt><strong>-g, –getT0FromPromptPeak [<firstGoodBinOffset>]</strong></dt>
|
||||
<dd>tries to estimate t0 from the prompt peak (maximum entry) in each histogram and writes the corresponding values to the t0 lines in the <a class="reference internal" href="#msr-run-block"><em>RUN blocks</em></a> of the msr file. If an optional number <firstGoodBinOffset> is given, the lower limit of the data range will be set to t0 + <firstGoodBinOffset>.</dd>
|
||||
<dt><strong>- -timeout <timeout></strong></dt>
|
||||
<dt><strong>–timeout <timeout></strong></dt>
|
||||
<dd><timeout> given in seconds after which musrview terminates. If <timeout> <span class="math">\(\leq\)</span> 0, no timeout will take place. Default for <timeout> is 0.</dd>
|
||||
<dt><strong>- -help</strong></dt>
|
||||
<dt><strong>–help</strong></dt>
|
||||
<dd>displays a small help notice in the shell explaining the basic usage of the program.</dd>
|
||||
<dt><strong>- -version</strong></dt>
|
||||
<dt><strong>–version</strong></dt>
|
||||
<dd>prints the version number of musrt0.</dd>
|
||||
</dl>
|
||||
<p>The interactive mode of <tt class="docutils literal"><span class="pre">musrt0</span></tt> is started if the program is called with a sole msr-file argument, <em>e.g.</em></p>
|
||||
@@ -327,7 +329,7 @@ Supported values for <tt class="docutils literal"><span class="pre"><graphic_
|
||||
<dd>input WKM msr file (mandatory first parameter).</dd>
|
||||
<dt><strong><msr_file_out></strong></dt>
|
||||
<dd>converted output musrfit msr file (mandatory second parameter).</dd>
|
||||
<dt><strong>- -help</strong></dt>
|
||||
<dt><strong>–help</strong></dt>
|
||||
<dd>displays a small help notice in the shell explaining the basic usage of the program.</dd>
|
||||
</dl>
|
||||
<p>A typical example then looks like:</p>
|
||||
@@ -410,13 +412,13 @@ Supported values for <tt class="docutils literal"><span class="pre"><graphic_
|
||||
<span id="index-9"></span><h3>dump_header<a class="headerlink" href="#dump-header" title="Permalink to this headline">¶</a></h3>
|
||||
<p><tt class="docutils literal"><span class="pre">dump_header</span></tt> is a little program which tries to read a μSR data file and sends the relevant information (required header info, start of the histos, etc.) to the standard output. Currently the following μSR data file formats are supported: <em>MusrROOT</em>, <em>ROOT</em> (old LEM format), <em>PSI-BIN</em>, <em>PSI-MDU</em>, <em>NeXus</em> (IDF1 and IDF2), <em>MUD</em>, and <em>WKM</em>.</p>
|
||||
<dl class="docutils">
|
||||
<dt><strong>-rn, - -runNo <runNo></strong></dt>
|
||||
<dt><strong>-rn, –runNo <runNo></strong></dt>
|
||||
<dd>run number of the header to be dumped.</dd>
|
||||
<dt><strong>-fn, - -fileName <fileName></strong></dt>
|
||||
<dt><strong>-fn, –fileName <fileName></strong></dt>
|
||||
<dd>muSR data file name.</dd>
|
||||
<dt><strong>-ff, - -fileFormat <fileFormat></strong></dt>
|
||||
<dt><strong>-ff, –fileFormat <fileFormat></strong></dt>
|
||||
<dd>where <fileFormat> is one of the above listed ones.</dd>
|
||||
<dt><strong>-y, - -year <year></strong></dt>
|
||||
<dt><strong>-y, –year <year></strong></dt>
|
||||
<dd><year> has to be a 4 digit value, <em>e.g.</em> 2005, if provided it is used to generate the file name for the given <runNo>, otherwise the current year is used. If a file name is given, this option has no effect.</dd>
|
||||
<dt><strong>-s, –summary</strong></dt>
|
||||
<dd>this option is used for LE-μSR data sets only. It will, additionally to the header information, print the summary file content.</dd>
|
||||
@@ -441,12 +443,77 @@ Supported values for <tt class="docutils literal"><span class="pre"><graphic_
|
||||
</div>
|
||||
<p>Will dump the LEM header information of run 3456 including the content of the run summary file.</p>
|
||||
</div>
|
||||
<div class="section" id="addrun">
|
||||
<span id="index-10"></span><h3>addRun<a class="headerlink" href="#addrun" title="Permalink to this headline">¶</a></h3>
|
||||
<p><tt class="docutils literal"><span class="pre">addRun</span></tt> allows to add the histograms of various runs and save the result in a file.
|
||||
This can be done either by a list of runs (option1), or by a run file (option2).</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>usage0: addRun [--help | -h] | [--version | -v]
|
||||
usage1: addRun <options1> -rl <runList>
|
||||
usage2: addRun <options2> -in <inputFile>
|
||||
|
||||
<option1>:
|
||||
-t0 <ival>: <ival> is a comma separted list of global t0-bin`s, or
|
||||
<ival> is a comma separted list of '-1', then it is assumed that there is a prompt peak.
|
||||
Under this condition the t0-bin will be determined automatically by
|
||||
the position of the max-value of the corresponing histograms.
|
||||
If t0's are not provided, t0-bin will be taken from the file.
|
||||
-f <format>: <format> is the output file format to be used.
|
||||
For supported formats see below.
|
||||
-y <year> : the year at which runs were measured. Format yyyy.
|
||||
If not provided, the current year is used.
|
||||
-i <instrument> : <instrument> is one of gps, ltf, flame, gpd, hifi, dolly, lem
|
||||
-m <dev> : <dev> is pta or tdc (only needed for bulk). Default: tdc
|
||||
-o <fln> : output file name.
|
||||
-rl <runList> can be:
|
||||
(i) <run0> <run1> <run2> ... <runN> : run numbers, e.g. 123 124
|
||||
(ii) <run0>-<runN> : a range, e.g. 123-125 -> 123 124 125
|
||||
(iii) <run0>:<runN>:<step> : a sequence, e.g. 123:127:2 -> 123 125 127
|
||||
<step> will give the step width and has to be a positive number!
|
||||
a <runList> can also combine (i)-(iii), e.g. 123 128-130 133, etc.
|
||||
|
||||
<option2>:
|
||||
-f <format>: <format> is file format of the output-file to be used.
|
||||
-o <fln> : output file name.
|
||||
-in <inputFile>: the file name of the file containing the necessary run information
|
||||
to add runs with various t0's, fgb's, lgb's, different years, etc.
|
||||
The structure of the <inputFile> is:
|
||||
Lines starting with a '%' and empty lines are ignored.
|
||||
A single run needs to provide the following information:
|
||||
file <path-name>: needs to be a full path name
|
||||
t0 <t0-bin> : needs to be the t0 bin or
|
||||
0 to take the t0 bin from the file, or
|
||||
-1 for automatic determination via prompt peak (see above).
|
||||
Example:
|
||||
% file 1. 6 histos present, hence 6 t0-bins
|
||||
file /home/test/data/deltat_tdc_gps_4324.bin
|
||||
t0 401, 400, 399, 400, 358, 400
|
||||
% file 2, take t0-bins from the file
|
||||
file /home/test/data/deltat_tdc_gps_4325.bin
|
||||
% file 3, deduce to t0-bin's from the prompt peak
|
||||
file /home/test/data/deltat_tdc_gps_4325.bin
|
||||
t0 -1, -1, -1, -1, -1, -1
|
||||
|
||||
Supported uSR file formats:
|
||||
MusrRoot, PSI-BIN, PSI-MDU, MUD, NeXus
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="musrfit-startup-xml">
|
||||
<span id="musrfit-startup"></span><span id="index-10"></span><h3>musrfit_startup.xml<a class="headerlink" href="#musrfit-startup-xml" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="musrfit-startup"></span><span id="index-11"></span><h3>musrfit_startup.xml<a class="headerlink" href="#musrfit-startup-xml" title="Permalink to this headline">¶</a></h3>
|
||||
<p><tt class="docutils literal"><span class="pre">musrfit_startup.xml</span></tt> is a configuration file located at <tt class="docutils literal"><span class="pre">$HOME\.musrfit</span></tt>. In this file the following XML tags are allowed to define settings:</p>
|
||||
<dl class="docutils">
|
||||
<dt><strong><data_path>PATH_TO_DATA</data_path></strong></dt>
|
||||
<dd>add the new path <tt class="docutils literal"><span class="pre">PATH_TO_DATA</span></tt> where <tt class="docutils literal"><span class="pre">musrfit</span></tt> and <tt class="docutils literal"><span class="pre">musrview</span></tt> will search for data files.</dd>
|
||||
<dt><strong><run_name_template inst=”instrument_name”>template</run_name_template></strong></dt>
|
||||
<dd><p class="first"><tt class="docutils literal"><span class="pre">instrument_name</span></tt> is the name of the instrument, e.g. gps. <tt class="docutils literal"><span class="pre">template</span></tt> allows to generate the potential path fragment where to search for files.
|
||||
These path fragments are added to all present <tt class="docutils literal"><span class="pre">data_path</span></tt>. This is used e.g. by addRun in order to find runs. To illustrate this here an example:</p>
|
||||
<p><tt class="docutils literal"><span class="pre">d%yyyy%/tdc/lem%yy%_his_%rrrr%.root</span></tt>.</p>
|
||||
<p><tt class="docutils literal"><span class="pre">%yyyy%</span></tt> will be replaced by the provided year (4 digits, e.g. 2020). <tt class="docutils literal"><span class="pre">%yy%</span></tt> will be replaced by the provided year (2 digits, e.g. 18).
|
||||
<tt class="docutils literal"><span class="pre">%rrrr%</span></tt> will be replaced by the run number. Here 4 <tt class="docutils literal"><span class="pre">r</span></tt> are given, hence the run 123 will be replaced to <tt class="docutils literal"><span class="pre">0123</span></tt>, i.e. leading zero’s will be added.
|
||||
For the given example <tt class="docutils literal"><span class="pre">%rrrrr%</span></tt> would be replaced to <tt class="docutils literal"><span class="pre">00123</span></tt> etc.</p>
|
||||
<p>If the year is 2019 and the run 123, the above template would be expanded to</p>
|
||||
<p class="last"><tt class="docutils literal"><span class="pre">d2019/tdc/lem19_his_0123.root</span></tt>.</p>
|
||||
</dd>
|
||||
<dt><strong><write_per_run_block_chisq>y/n</write_per_run_block_chisq></strong></dt>
|
||||
<dd>if enabled <span class="math">\(\chi^2\)</span> for each <a class="reference internal" href="#msr-run-block"><em>RUN block</em></a> will be written to the <a class="reference internal" href="#msr-statistic-block"><em>STATISTIC block</em></a> of the resulting msr file. Additionally,
|
||||
in case a <span class="math">\(\chi^2\)</span> single-histogram fit is done, also <a class="reference external" href="http://en.wikipedia.org/wiki/Pearson's_chi-square_test">Pearson’s</a> <span class="math">\(\chi^2\)</span> will be added.</dd>
|
||||
@@ -522,14 +589,14 @@ in case a <span class="math">\(\chi^2\)</span> single-histogram fit is done, als
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="description-of-the-msr-file-format">
|
||||
<span id="msr-file-format"></span><span id="index-11"></span><h2>Description of the msr File Format<a class="headerlink" href="#description-of-the-msr-file-format" title="Permalink to this headline">¶</a></h2>
|
||||
<span id="msr-file-format"></span><span id="index-12"></span><h2>Description of the msr File Format<a class="headerlink" href="#description-of-the-msr-file-format" title="Permalink to this headline">¶</a></h2>
|
||||
<p>The programs are using an input file to control their action. This input file has the extension <tt class="docutils literal"><span class="pre">.msr</span></tt> (msr file). The msr file is built up from different blocks. Each block starts with a keyword and is, with the exception of the title, terminated by an empty line. Comments start with the character <tt class="docutils literal"><span class="pre">#</span></tt>. The various input blocks are described below.</p>
|
||||
<div class="section" id="the-title">
|
||||
<span id="msr-title-block"></span><span id="index-12"></span><h3>The Title<a class="headerlink" href="#the-title" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="msr-title-block"></span><span id="index-13"></span><h3>The Title<a class="headerlink" href="#the-title" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The first line of the msr file is the title line. Unlike all the other input blocks, it does not start with a block keyword. It is just a simple text line, in which any information can be placed. The title text will be used in the graphical representation of the data as a headline.</p>
|
||||
</div>
|
||||
<div class="section" id="the-fitparameter-block">
|
||||
<span id="msr-fitparameter-block"></span><span id="index-13"></span><h3>The FITPARAMETER Block<a class="headerlink" href="#the-fitparameter-block" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="msr-fitparameter-block"></span><span id="index-14"></span><h3>The FITPARAMETER Block<a class="headerlink" href="#the-fitparameter-block" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The FITPARAMETER block is used to define the fit parameters in a MINUIT typical style. There are various possible parameter definitions which are listed here:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span>1. <no> <name> <value> <step>
|
||||
2. <no> <name> <value> <step> <lower_boundary> <upper_boundary>
|
||||
@@ -580,7 +647,7 @@ in case a <span class="math">\(\chi^2\)</span> single-histogram fit is done, als
|
||||
</table>
|
||||
</div>
|
||||
<div class="section" id="the-theory-block">
|
||||
<span id="msr-theory-block"></span><span id="index-14"></span><h3>The THEORY Block<a class="headerlink" href="#the-theory-block" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="msr-theory-block"></span><span id="index-15"></span><h3>The THEORY Block<a class="headerlink" href="#the-theory-block" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The THEORY block is used to define the fit function. There is a set of predefined functions available. It is also possible to use externally defined functions. How to use them will be explained afterwards, here only the predefined functions are described.</p>
|
||||
<table border="1" class="docutils">
|
||||
<colgroup>
|
||||
@@ -954,7 +1021,7 @@ userFcn libMyLibrary.so TMyFunction 2 3 4 map1 fun1
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="the-functions-block">
|
||||
<span id="msr-functions-block"></span><span id="index-15"></span><h3>The FUNCTIONS Block<a class="headerlink" href="#the-functions-block" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="msr-functions-block"></span><span id="index-16"></span><h3>The FUNCTIONS Block<a class="headerlink" href="#the-functions-block" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Here some auxiliary functions can be defined. These functions can currently <em>only</em> operate on the defined parameters, and some meta information from the data files.
|
||||
They can be used in the <a class="reference internal" href="#msr-theory-block"><em>THEORY block</em></a> and for three specific cases in the <a class="reference internal" href="#msr-run-block"><em>RUN block</em></a> (<cite>norm</cite>, <cite>alpha</cite>, and <cite>beta</cite>).
|
||||
Supported is the use of basic arithmetic:</p>
|
||||
@@ -979,7 +1046,7 @@ acosh(), asinh(), atanh(), exp(), log(), ln(), sqrt(), pow(base, exponent)</stro
|
||||
</ul>
|
||||
<p>The fit parameters are accessed either directly through parX, where ‘X’ is the number of the parameter in the <a class="reference internal" href="#msr-fitparameter-block"><em>FITPARAMETER block</em></a>,
|
||||
<em>e.g.</em> <em>par5</em> or through a mapping with mapY, where ‘Y’ specifies the mapping number in the <a class="reference internal" href="#msr-run-block"><em>RUN block</em></a> as explained below.</p>
|
||||
<p id="index-16">The available meta information form the data files are:</p>
|
||||
<p id="index-17">The available meta information form the data files are:</p>
|
||||
<table border="1" class="docutils">
|
||||
<colgroup>
|
||||
<col width="29%" />
|
||||
@@ -1039,7 +1106,7 @@ fun2 = par3 * ( 1.0 - par5 )
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="the-global-block">
|
||||
<span id="msr-global-block"></span><span id="index-17"></span><h3>The GLOBAL Block<a class="headerlink" href="#the-global-block" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="msr-global-block"></span><span id="index-18"></span><h3>The GLOBAL Block<a class="headerlink" href="#the-global-block" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The GLOBAL block is used to collect data which otherwise need to be specified in every single run entry of the <a class="reference internal" href="#msr-run-block"><em>RUN block</em></a>.
|
||||
Therefore, this block is only present to potentially shorten the msr file and to ease the handling for the user. The logic will by like that:</p>
|
||||
<ol class="arabic simple">
|
||||
@@ -1146,7 +1213,7 @@ fittype 0 (single histogram fit)
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="the-run-block">
|
||||
<span id="msr-run-block"></span><span id="index-18"></span><h3>The RUN Block<a class="headerlink" href="#the-run-block" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="msr-run-block"></span><span id="index-19"></span><h3>The RUN Block<a class="headerlink" href="#the-run-block" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The RUN block is used to collect the data needed for a particular run to be fitted. This includes the run name, fit type, data format, etc.
|
||||
The RUN block is slightly differently organized than the other blocks. The information is collected via labels followed by the information.
|
||||
Each run to be fitted has its <em>own</em> RUN block. A RUN block starts with a run-file line which has the structure</p>
|
||||
@@ -1220,7 +1287,7 @@ RUN beautiful-data MUE4 PSI DB
|
||||
</div>
|
||||
<p>After this short digression back to the RUN-block description.</p>
|
||||
<p>In order to describe the operations needed for fitting and plotting, quite some information are needed. These information are following the RUN statement and are listed below. Depending on the fit type these information vary and hence it is indicated for which fit/plot type the information is applicable</p>
|
||||
<span id="index-19"></span><dl class="docutils" id="msr-addrun">
|
||||
<span id="index-20"></span><dl class="docutils" id="msr-addrun">
|
||||
<dt><strong>ADDRUN <run_file_name> <beamline> <facility> <file_format></strong> (optional)</dt>
|
||||
<dd><p class="first">If an ADDRUN is just following after a RUN statement, these runs will be added. More than one ADDRUN statements are possible, <em>i.e.</em> adding up as many runs as wished. It is also possible to add runs with different file formats. If the t0’s are given in the data files, the ADDRUN statement is all what is needed, otherwise just add the t0’s with the addt0 statement.</p>
|
||||
<p>For a <a class="reference internal" href="#single-histogram-fit"><em>Single Histogram Fit</em></a> or a <a class="reference internal" href="#negative-muon-musr-fit"><em>MuMinus Fit</em></a> it will be</p>
|
||||
@@ -1239,7 +1306,7 @@ etc.
|
||||
<p class="last">ADDRUN is <em>not</em> available for the fit type <a class="reference internal" href="#non-musr-fit"><em>Non-muSR Fit</em></a>.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-20"></span><dl class="docutils" id="msr-fittype">
|
||||
<span id="index-21"></span><dl class="docutils" id="msr-fittype">
|
||||
<dt><strong>fittype</strong> (required if not already defined in the GLOBAL block)</dt>
|
||||
<dd><p class="first">This tag is used to indicate which type of fit is wished. The supported fit types are:</p>
|
||||
<dl class="docutils">
|
||||
@@ -1264,7 +1331,7 @@ etc.
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-21"></span><dl class="docutils" id="msr-alpha-beta">
|
||||
<span id="index-22"></span><dl class="docutils" id="msr-alpha-beta">
|
||||
<dt><strong>alpha, beta</strong> (fit type 2, 3, 5)</dt>
|
||||
<dd><p class="first">These parameters are used to correct the asymmetry for different detector efficiencies, solid angles and initial asymmetries. They are defined as <span class="math">\(\alpha = N_{0,b}/N_{0,f}\)</span> and <span class="math">\(\beta = A_{0,b}/A_{0,f}\)</span>. If the parameters are not specified in the <a class="reference internal" href="#msr-run-block"><em>RUN block</em></a>, for each one the value of 1 is assumed (for fittype 5, alpha is estimated from the ratio of <span class="math">\(\sum_i \left( N_{\mathrm{bp}}(i)+N_{\mathrm{bm}}(i) \right)\)</span> and <span class="math">\(\sum_i \left( N_{\mathrm{fp}}(i)+N_{\mathrm{fm}}(i) \right)\)</span>). Both, <cite>alpha</cite> as well as <cite>beta</cite> can be expressed through a function. Example for alpha with fit parameter number 1:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span>alpha 1
|
||||
@@ -1276,7 +1343,7 @@ etc.
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-22"></span><dl class="docutils" id="msr-norm">
|
||||
<span id="index-23"></span><dl class="docutils" id="msr-norm">
|
||||
<dt><strong>norm</strong> (fit type 0)</dt>
|
||||
<dd><p class="first">Number of the fit parameter that represents the normalization constant <span class="math">\(N_0\)</span> of the histogram; the value of this parameter is given either per nanosecond or per bin (see <a class="reference internal" href="#msr-commands-block"><em>below</em></a>).
|
||||
It is possible to substitute the parameter number by a function, for instance to relate <span class="math">\(N_0\)</span>‘s of different histograms through an <span class="math">\(\alpha\)</span>
|
||||
@@ -1290,25 +1357,25 @@ parameter. Example for a <tt class="docutils literal"><span class="pre">norm</sp
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-23"></span><dl class="docutils" id="msr-backgr-fit">
|
||||
<span id="index-24"></span><dl class="docutils" id="msr-backgr-fit">
|
||||
<dt><strong>backgr.fit</strong> (fit type 0)</dt>
|
||||
<dd>Parameter number specifying the constant background in a histogram. Its value is given either per nanosecond or per bin (see <a class="reference internal" href="#msr-commands-block"><em>below</em></a>). If this keyword is present,
|
||||
any information on a background line are ignored.</dd>
|
||||
</dl>
|
||||
<span id="index-24"></span><dl class="docutils" id="msr-lifetime">
|
||||
<span id="index-25"></span><dl class="docutils" id="msr-lifetime">
|
||||
<dt><strong>lifetime</strong> (fit type 0)</dt>
|
||||
<dd>Fit parameter representing the lifetime of the muon. If it is not specified the value <span class="math">\(\tau_\mu=2.1.7.49~ \mu\mathrm{s}\)</span> is used in the calculations.</dd>
|
||||
<dd>Fit parameter representing the lifetime of the muon. If it is not specified the value <span class="math">\(\tau_\mu=2.197019~ \mu\mathrm{s}\)</span> is used in the calculations.</dd>
|
||||
<dt><strong>lifetimecorrection</strong> (fit type 0) <em>obsolete</em></dt>
|
||||
<dd>Does not accept any arguments. If present, the output in <tt class="docutils literal"><span class="pre">musrview</span></tt> is corrected for the exponential decay of the muon. This item is <em>obsolete</em> in the RUN block
|
||||
and will be transferred to the <a class="reference internal" href="#msr-plot-block"><em>PLOT block</em></a>, which allows switching between histogram view and asymmetry view much quicker.</dd>
|
||||
</dl>
|
||||
<span id="index-25"></span><dl class="docutils" id="msr-map">
|
||||
<span id="index-26"></span><dl class="docutils" id="msr-map">
|
||||
<dt><strong>map</strong></dt>
|
||||
<dd>On this line the mapping of run-dependent parameters is done. Parameter numbers given here may be accessed through map1, map2, etc. in the
|
||||
<a class="reference internal" href="#msr-theory-block"><em>THEORY</em></a> and <a class="reference internal" href="#msr-functions-block"><em>FUNCTIONS</em></a> blocks (see also <a class="reference internal" href="#msr-map-intro"><em>maps</em></a>). The first ten maps
|
||||
are always present and have the value 0 if not used; however, the total number of maps is not restricted!</dd>
|
||||
</dl>
|
||||
<span id="index-26"></span><dl class="docutils" id="msr-forward">
|
||||
<span id="index-27"></span><dl class="docutils" id="msr-forward">
|
||||
<dt><strong>forward</strong> (fit type 0, 1, 4)</dt>
|
||||
<dd><p class="first">Number of the histogram in the data file to be processed. If histograms shall be grouped, all the numbers which shall be grouped. Examples:</p>
|
||||
<div class="last highlight-python"><div class="highlight"><pre><span></span>forward 3 # no grouping, take histogram number 3
|
||||
@@ -1318,7 +1385,7 @@ forward 1-10 12 # group histograms with numbers from 1 to 10 and additionally hi
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-27"></span><dl class="docutils" id="msr-forward-backward">
|
||||
<span id="index-28"></span><dl class="docutils" id="msr-forward-backward">
|
||||
<dt><strong>forward, backward</strong> (fit types 2, 3)</dt>
|
||||
<dd><p class="first">Numbers of the histograms in the data file that should be taken to calculate the asymmetry. If histograms shall be grouped, all the numbers which shall be grouped. Examples:</p>
|
||||
<div class="last highlight-python"><div class="highlight"><pre><span></span># build forward/backward asymmetry with histogram 1 and 3
|
||||
@@ -1342,12 +1409,12 @@ backward 3 4
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-28"></span><dl class="docutils" id="msr-backgr-fix">
|
||||
<span id="index-29"></span><dl class="docutils" id="msr-backgr-fix">
|
||||
<dt><strong>backgr.fix</strong> (fit types 0, 1, 2, 3, 5)</dt>
|
||||
<dd>A fixed constant background in counts per nanosecond or per bin (see <a class="reference internal" href="#msr-commands-block"><em>below</em></a>) may be given at this point.
|
||||
The background is specified for all histograms in the order <span class="math">\(B_f B_b [B_r B_l]\)</span>. If this keyword is present, <em>any</em> information on a <tt class="docutils literal"><span class="pre">background</span></tt> line is ignored.</dd>
|
||||
</dl>
|
||||
<span id="index-29"></span><dl class="docutils" id="msr-background-single-histo">
|
||||
<span id="index-30"></span><dl class="docutils" id="msr-background-single-histo">
|
||||
<dt><strong>background</strong> (fit type 0, 1)</dt>
|
||||
<dd><p class="first">The numbers of the first and the last channel of an interval from which the constant background should be calculated are specified here.
|
||||
In case histograms are being grouped, the specified channels are interpreted with respect to the first histogram. Example:</p>
|
||||
@@ -1356,7 +1423,7 @@ In case histograms are being grouped, the specified channels are interpreted wit
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-30"></span><dl class="docutils" id="msr-background-asymmetry">
|
||||
<span id="index-31"></span><dl class="docutils" id="msr-background-asymmetry">
|
||||
<dt><strong>background</strong> (fit types 2, 3, 5)</dt>
|
||||
<dd><p class="first">The numbers of the first and the last channel of an interval from which the constant background should be calculated are specified here.
|
||||
For all the histograms this is done together in the following order: <span class="math">\(k_{f,\rm first} k_{f,\rm last} k_{b,\rm first} k_{b, \rm last} [k_{r,\rm first} k_{r,\rm last} k_{l,\rm first} k_{l,\rm last}]\)</span>.
|
||||
@@ -1366,7 +1433,7 @@ In case histograms are being grouped, the specified channels are interpreted wit
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-31"></span><dl class="docutils" id="msr-data-single-histo">
|
||||
<span id="index-32"></span><dl class="docutils" id="msr-data-single-histo">
|
||||
<dt><strong>data</strong> (fit type 0, 1, 4)</dt>
|
||||
<dd><p class="first">The numbers of the first and the last channel of an interval from which the data is taken are specified here.
|
||||
In case histograms are being grouped, the specified channels are interpreted with respect to the first histogram.
|
||||
@@ -1376,7 +1443,7 @@ Typically these channels are referred to as <tt class="docutils literal"><span c
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-32"></span><dl class="docutils" id="msr-data-asymmetry">
|
||||
<span id="index-33"></span><dl class="docutils" id="msr-data-asymmetry">
|
||||
<dt><strong>data</strong> (fit type 2, 3, 5)</dt>
|
||||
<dd><p class="first">The numbers of the first and the last channel of an interval from which the data is taken are specified here.
|
||||
Typically these channels are referred to as first good bin / last good bin (fgb/lgb). For all the histograms this is
|
||||
@@ -1387,7 +1454,7 @@ In case histograms are being grouped, the specified channels are interpreted wit
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-33"></span><dl class="docutils" id="msr-t0-single-histo">
|
||||
<span id="index-34"></span><dl class="docutils" id="msr-t0-single-histo">
|
||||
<dt><strong>t0</strong> (fit type 0, 1, 4)</dt>
|
||||
<dd><p class="first">The number of the time-zero channel of the histogram. Example:</p>
|
||||
<div class="last highlight-python"><div class="highlight"><pre><span></span>t0 3419 # t0 channel = 3419
|
||||
@@ -1396,7 +1463,7 @@ t0 3419 3434 # t0 channels for groupings: forward f1 f2. 3419 t0 for f1, 3434
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-34"></span><dl class="docutils" id="msr-t0-asymmetry">
|
||||
<span id="index-35"></span><dl class="docutils" id="msr-t0-asymmetry">
|
||||
<dt><strong>t0</strong> (fit type 2, 3, 5)</dt>
|
||||
<dd><p class="first">The numbers of time-zero channels of the histograms in the order <span class="math">\(t_{0,f} t_{0,b}\)</span>. For fit type 5, the time-zero is the channel of the start of beam pulse. Example:</p>
|
||||
<div class="last highlight-python"><div class="highlight"><pre><span></span>t0 3419 3418 # t0 channels: forward (3419), backward (3418)
|
||||
@@ -1405,25 +1472,25 @@ t0 3419 3418 3417 3416 # t0 channels (assuming forward f1 f2, backward b1 b2): f
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-35"></span><dl class="docutils" id="msr-addt0-single-histo">
|
||||
<span id="index-36"></span><dl class="docutils" id="msr-addt0-single-histo">
|
||||
<dt><strong>addt0</strong> (fit type 0, 1, 4)</dt>
|
||||
<dd>The number of the time-zero channel of the histogram. If grouping of histograms is present (see <a class="reference internal" href="#msr-forward"><em>forward</em></a>) the
|
||||
same syntax as for <a class="reference internal" href="#msr-t0-single-histo"><em>t0</em></a> applies. If one addt0 is given, the total number of addt0’s needs to be equal to
|
||||
the total number of <a class="reference internal" href="#msr-addrun"><em>ADDRUN</em></a>‘s!</dd>
|
||||
</dl>
|
||||
<span id="index-36"></span><dl class="docutils" id="msr-addt0-asymmetry">
|
||||
<span id="index-37"></span><dl class="docutils" id="msr-addt0-asymmetry">
|
||||
<dt><strong>addt0</strong> (fit type 2, 3, 5)</dt>
|
||||
<dd>The numbers of time-zero channels of the histograms in the order <span class="math">\(t_{0,f} t_{0,b} [t_{0,r} t_{0,l}]\)</span>.
|
||||
If grouping of histograms is present (see <a class="reference internal" href="#msr-forward-backward"><em>forward</em></a>) the same syntax as for <a class="reference internal" href="#msr-t0-asymmetry"><em>t0</em></a> applies.
|
||||
If one addt0 is given, the total number of addt0’s needs to be equal to the total number of <a class="reference internal" href="#msr-addrun"><em>ADDRUN</em></a>‘s!</dd>
|
||||
</dl>
|
||||
<span id="index-37"></span><dl class="docutils" id="msr-xy-data">
|
||||
<span id="index-38"></span><dl class="docutils" id="msr-xy-data">
|
||||
<dt><strong>xy-data</strong> (fit type 8)</dt>
|
||||
<dd>Specification of the data from an ASCII or DB file which should be used as <em>x</em> and <em>y</em> data (in this order).
|
||||
For a simple ASCII file the column numbers are used, in the case of a DB file one can either specify the variable
|
||||
numbers or the name of the variables as given in the DB header.</dd>
|
||||
</dl>
|
||||
<span id="index-38"></span><dl class="docutils" id="msr-fit">
|
||||
<span id="index-39"></span><dl class="docutils" id="msr-fit">
|
||||
<dt><strong>fit</strong></dt>
|
||||
<dd><p class="first">The range of data that should be considered when the fitting is done. For the μSR fit types 0, 1, 2, 3, and 4 the
|
||||
starting and end times are given in micro-seconds. For the non-μSR fit type 8 the starting and end points of the
|
||||
@@ -1447,19 +1514,19 @@ An example:</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-39"></span><dl class="docutils" id="msr-packing">
|
||||
<span id="index-40"></span><dl class="docutils" id="msr-packing">
|
||||
<dt><strong>packing</strong></dt>
|
||||
<dd>Number of data channels to be binned together. For the non-μSR fit type 8 the binning is supposed to be 1.
|
||||
For the single histogram RRF fit (fittype 1) and asymmetry RRF fit (fittype 3) this parameter is meaningless.</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="section" id="the-commands-block">
|
||||
<span id="msr-commands-block"></span><span id="index-40"></span><h3>The COMMANDS Block<a class="headerlink" href="#the-commands-block" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="msr-commands-block"></span><span id="index-41"></span><h3>The COMMANDS Block<a class="headerlink" href="#the-commands-block" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The COMMANDS block is used to specify the commands which are passed from <tt class="docutils literal"><span class="pre">musrfit</span></tt> to <tt class="docutils literal"><span class="pre">MINUIT2</span></tt>. The supported commands
|
||||
after the <tt class="docutils literal"><span class="pre">COMMANDS</span></tt> keyword are listed in the two tables below (<a class="reference internal" href="#minuit2-command-overview"><em>Minuit2 Command Overview</em></a> and <a class="reference internal" href="#dks-command-overview"><em>DKS Command Overview</em></a>)
|
||||
and further described in <a class="reference internal" href="#musrfit-command-block-details"><em>musrfit Command Block Details</em></a>.</p>
|
||||
<div class="section" id="minuit2-command-overview">
|
||||
<span id="index-41"></span><span id="id21"></span><h4>Minuit2 Command Overview<a class="headerlink" href="#minuit2-command-overview" title="Permalink to this headline">¶</a></h4>
|
||||
<span id="index-42"></span><span id="id21"></span><h4>Minuit2 Command Overview<a class="headerlink" href="#minuit2-command-overview" title="Permalink to this headline">¶</a></h4>
|
||||
<table border="1" class="docutils">
|
||||
<colgroup>
|
||||
<col width="20%" />
|
||||
@@ -1608,7 +1675,7 @@ Used for statistical analysis only.</td>
|
||||
</table>
|
||||
</div>
|
||||
<div class="section" id="dks-command-overview">
|
||||
<span id="index-42"></span><span id="id31"></span><h4>DKS Command Overview<a class="headerlink" href="#dks-command-overview" title="Permalink to this headline">¶</a></h4>
|
||||
<span id="index-43"></span><span id="id31"></span><h4>DKS Command Overview<a class="headerlink" href="#dks-command-overview" title="Permalink to this headline">¶</a></h4>
|
||||
<table border="1" class="docutils">
|
||||
<colgroup>
|
||||
<col width="28%" />
|
||||
@@ -1676,7 +1743,7 @@ It allows to use all your threads of your CPU(s) during the minimization.</td></
|
||||
</table>
|
||||
</div>
|
||||
<div class="section" id="musrfit-command-block-details">
|
||||
<span id="index-43"></span><span id="id36"></span><h4><tt class="docutils literal"><span class="pre">musrfit</span></tt> Command Block Details<a class="headerlink" href="#musrfit-command-block-details" title="Permalink to this headline">¶</a></h4>
|
||||
<span id="index-44"></span><span id="id36"></span><h4><tt class="docutils literal"><span class="pre">musrfit</span></tt> Command Block Details<a class="headerlink" href="#musrfit-command-block-details" title="Permalink to this headline">¶</a></h4>
|
||||
<p>A standard COMMANDS block then looks like this:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">COMMANDS</span>
|
||||
<span class="n">MINIMIZE</span>
|
||||
@@ -1773,7 +1840,7 @@ SAVE
|
||||
<p><em>Note:</em> If a fit is invoked, the sector command results will only be written to file, if the fit <em>has converged</em>!</p>
|
||||
</div>
|
||||
<div class="section" id="dks-extensions-of-the-commands-block-enabling-gpu-and-general-opencl-support">
|
||||
<span id="msr-commands-block-dks"></span><span id="index-44"></span><h4>DKS extensions of the COMMANDS block enabling GPU and general OpenCL support<a class="headerlink" href="#dks-extensions-of-the-commands-block-enabling-gpu-and-general-opencl-support" title="Permalink to this headline">¶</a></h4>
|
||||
<span id="msr-commands-block-dks"></span><span id="index-45"></span><h4>DKS extensions of the COMMANDS block enabling GPU and general OpenCL support<a class="headerlink" href="#dks-extensions-of-the-commands-block-enabling-gpu-and-general-opencl-support" title="Permalink to this headline">¶</a></h4>
|
||||
<p>In case you are running the musrfit / DKS version, there are a couple commands which allow you to control the way how the fit shall be performed. These commands are:</p>
|
||||
<table border="1" class="docutils">
|
||||
<colgroup>
|
||||
@@ -1806,27 +1873,27 @@ In the <a class="reference internal" href="#msr-theory-block"><em>THEORY table</
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="the-fourier-block">
|
||||
<span id="msr-fourier-block"></span><span id="index-45"></span><h3>The FOURIER Block<a class="headerlink" href="#the-fourier-block" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="msr-fourier-block"></span><span id="index-46"></span><h3>The FOURIER Block<a class="headerlink" href="#the-fourier-block" title="Permalink to this headline">¶</a></h3>
|
||||
<p>If a Fourier transform is carried out the results are plotted within <tt class="docutils literal"><span class="pre">musrview</span></tt>. As input data the actual data <em>shown</em> in <tt class="docutils literal"><span class="pre">musrview</span></tt> is used,
|
||||
<em>i.e.</em> the currently time range shown in <tt class="docutils literal"><span class="pre">musrview</span></tt>! In the FOURIER block of the msr file all necessary parameters for calculating and presenting
|
||||
the Fourier transform of the data specified in the <a class="reference internal" href="#msr-plot-block"><em>PLOT block</em></a> is given. If the FOURIER block is not present in the msr file,
|
||||
either the parameters set in the <a class="reference internal" href="#musrfit-startup"><em>XML startup</em></a> file or the system defaults are taken when the Fourier transform is performed.
|
||||
The block starts with the <em>FOURIER</em> keyword and may contain the following entries on the successive lines:</p>
|
||||
<span id="index-46"></span><dl class="docutils" id="msr-fourier-block-units">
|
||||
<span id="index-47"></span><dl class="docutils" id="msr-fourier-block-units">
|
||||
<dt><strong>units</strong></dt>
|
||||
<dd>Here is specified in which domain the Fourier-transformed data is presented. One may choose between the fields (<em>Gauss</em>) or (<em>Tesla</em>), the frequency (<em>MHz</em>), and the angular-frequency domain (<em>Mc/s</em>).</dd>
|
||||
</dl>
|
||||
<span id="index-47"></span><dl class="docutils" id="msr-fourier-block-fourier-power">
|
||||
<span id="index-48"></span><dl class="docutils" id="msr-fourier-block-fourier-power">
|
||||
<dt><strong>fourier_power</strong></dt>
|
||||
<dd>It is possible (but not necessary) to set the number of data points used for the Fourier transform here. As argument the exponent <em>n<21</em> of a power of 2 is accepted.
|
||||
The number of data points is then 2<sup>n</sup>. <strong>Attention:</strong> If the number of points given here is bigger than the actual number of available data points,
|
||||
the input data vector is filled with zeros until the number of requested points is reached (<em>zero padding</em>)!</dd>
|
||||
</dl>
|
||||
<span id="index-48"></span><dl class="docutils" id="msr-fourier-block-dc-corrected">
|
||||
<span id="index-49"></span><dl class="docutils" id="msr-fourier-block-dc-corrected">
|
||||
<dt><strong>dc-corrected</strong></dt>
|
||||
<dd>a flag to remove a potential DC-offset of the signal. Allowed entries are <tt class="docutils literal"><span class="pre">dc-corrected</span> <span class="pre">true</span> <span class="pre">|</span> <span class="pre">1</span> <span class="pre">|</span> <span class="pre">false</span> <span class="pre">|</span> <span class="pre">0</span></tt>.</dd>
|
||||
</dl>
|
||||
<span id="index-49"></span><dl class="docutils" id="msr-fourier-block-apodization">
|
||||
<span id="index-50"></span><dl class="docutils" id="msr-fourier-block-apodization">
|
||||
<dt><strong>apodization</strong></dt>
|
||||
<dd><p class="first">Here is decided if the data should be apodized before the Fourier transform is performed and if yes, which apodization should be used (for further details about apodization of
|
||||
μSR data refer to the <a class="reference external" href="https://open.library.ubc.ca/cIRcle/collections/ubctheses/831/items/1.0085550">PhD thesis of T.M. Riseman (UBC)</a>). The argument to be put after the
|
||||
@@ -1844,7 +1911,7 @@ keyword is therefore one of the following: <strong>NONE, WEAK, MEDIUM</strong> o
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-50"></span><dl class="docutils" id="msr-fourier-block-plot">
|
||||
<span id="index-51"></span><dl class="docutils" id="msr-fourier-block-plot">
|
||||
<dt><strong>plot</strong></dt>
|
||||
<dd><p class="first">At this point it is possible to set the part of the Fourier-transformed data which should be plotted by default if the Fourier transform is done by pressing the <em>f</em>-key in <tt class="docutils literal"><span class="pre">musrview</span></tt>.
|
||||
The argument may be one of the following:</p>
|
||||
@@ -1862,7 +1929,7 @@ The argument may be one of the following:</p>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-51"></span><dl class="docutils" id="msr-fourier-block-phase">
|
||||
<span id="index-52"></span><dl class="docutils" id="msr-fourier-block-phase">
|
||||
<dt><strong>phase</strong></dt>
|
||||
<dd><p class="first">If a real Fourier shall be plotted, it is necessary to adopt the phases of the different detectors. The number of potentially provided phases can be either <strong>one</strong>, which means that this phase will be applied to <em>all</em> Fourier spectra,
|
||||
or the number of phases have to correspond to the number of runs in the plot block.</p>
|
||||
@@ -1915,12 +1982,12 @@ list example, the first parameter number will be the reference phase. The compac
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-52"></span><dl class="docutils" id="msr-fourier-block-range-for-phase-correction">
|
||||
<span id="index-53"></span><dl class="docutils" id="msr-fourier-block-range-for-phase-correction">
|
||||
<dt><strong>range_for_phase_correction</strong></dt>
|
||||
<dd>An interval in Fourier space given in units as define with the ‘units’ tag, or the tag ‘all’ in which case the range given under ‘range’ will be used.
|
||||
The given interval will be used for an automatic phasing of the real Fourier transform. This will allow to add real Fourier spectra coherently.</dd>
|
||||
</dl>
|
||||
<span id="index-53"></span><dl class="docutils" id="msr-fourier-block-range">
|
||||
<span id="index-54"></span><dl class="docutils" id="msr-fourier-block-range">
|
||||
<dt><strong>range</strong></dt>
|
||||
<dd>The plotting range is set here. The interval is specified through its start and end points given in the <em>units</em> set after the <strong>units</strong> tag.</dd>
|
||||
</dl>
|
||||
@@ -1936,20 +2003,20 @@ range 0.0 17.03
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="the-plot-block">
|
||||
<span id="msr-plot-block"></span><span id="index-54"></span><h3>The PLOT Block<a class="headerlink" href="#the-plot-block" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="msr-plot-block"></span><span id="index-55"></span><h3>The PLOT Block<a class="headerlink" href="#the-plot-block" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The PLOT block is intended to collect all the information needed for the graphical presentation of the data and fits using <tt class="docutils literal"><span class="pre">musrview</span></tt>.
|
||||
The PLOT keyword at the beginning of the block is followed by a number which indicates the plot type. The plot types have to match the <a class="reference internal" href="#fit-types"><em>fit types</em></a>.
|
||||
Additionally, it is possible to provide information using the following keywords:</p>
|
||||
<span id="index-55"></span><dl class="docutils" id="msr-plot-block-lifetimecorrection">
|
||||
<span id="index-56"></span><dl class="docutils" id="msr-plot-block-lifetimecorrection">
|
||||
<dt><strong>lifetimecorrection</strong></dt>
|
||||
<dd>Does not accept any arguments. If present, the output in <tt class="docutils literal"><span class="pre">musrview</span></tt> is corrected for the exponential decay of the muon. Only relevant for (type 0).</dd>
|
||||
</dl>
|
||||
<span id="index-56"></span><dl class="docutils" id="msr-plot-block-runs">
|
||||
<span id="index-57"></span><dl class="docutils" id="msr-plot-block-runs">
|
||||
<dt><strong>runs</strong></dt>
|
||||
<dd>The numbers of the runs to be plotted have to be put here. The runs are numbered according to their appearance in the <a class="reference internal" href="#msr-run-block"><em>RUN block</em></a>.
|
||||
The numbers is either a space separated list of numbers, an interval <em>e.g.</em> 1-16, or a combination of both.</dd>
|
||||
</dl>
|
||||
<span id="index-57"></span><dl class="docutils" id="msr-plot-block-range">
|
||||
<span id="index-58"></span><dl class="docutils" id="msr-plot-block-range">
|
||||
<dt><strong>range</strong></dt>
|
||||
<dd><p class="first">Here it is possible to define the plotting range explicitly. Depending on the plot type the following settings are allowed where the times are given in
|
||||
micro-seconds and the <em>N</em> in counts (types 0-4) or in counts/nsec (type 0, 1):</p>
|
||||
@@ -1963,7 +2030,7 @@ micro-seconds and the <em>N</em> in counts (types 0-4) or in counts/nsec (type 0
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-58"></span><dl class="docutils" id="msr-plot-block-sub-ranges">
|
||||
<span id="index-59"></span><dl class="docutils" id="msr-plot-block-sub-ranges">
|
||||
<dt><strong>sub_ranges</strong></dt>
|
||||
<dd><p class="first">Here it is possible to define the plotting range for each run individually. For the different plot types the command has the structure:</p>
|
||||
<dl class="last docutils">
|
||||
@@ -1976,31 +2043,31 @@ micro-seconds and the <em>N</em> in counts (types 0-4) or in counts/nsec (type 0
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
<span id="index-59"></span><dl class="docutils" id="msr-plot-block-use-fit-ranges">
|
||||
<span id="index-60"></span><dl class="docutils" id="msr-plot-block-use-fit-ranges">
|
||||
<dt><strong>use_fit_ranges</strong> [ <em>y</em><sub>min</sub> <em>y</em><sub>max</sub> ]</dt>
|
||||
<dd>The fit ranges of the individual runs are used to present the data. Optionally, an ordinate range can be provided.</dd>
|
||||
</dl>
|
||||
<span id="index-60"></span><dl class="docutils" id="msr-plot-block-view-packing">
|
||||
<span id="index-61"></span><dl class="docutils" id="msr-plot-block-view-packing">
|
||||
<dt><strong>view_packing</strong></dt>
|
||||
<dd>The data are presented in the packing given here rather than the binning used for the fit. <strong>WARNING:</strong> This is a global option and applies to all PLOT-blocks.</dd>
|
||||
</dl>
|
||||
<span id="index-61"></span><dl class="docutils" id="msr-plot-block-logx">
|
||||
<span id="index-62"></span><dl class="docutils" id="msr-plot-block-logx">
|
||||
<dt><strong>logx</strong></dt>
|
||||
<dd>Will present the time axis in a logarithmic scale. <em>So far no checking of negative and zero-valued data is performed, hence expect interesting output!</em></dd>
|
||||
</dl>
|
||||
<span id="index-62"></span><dl class="docutils" id="msr-plot-block-logy">
|
||||
<span id="index-63"></span><dl class="docutils" id="msr-plot-block-logy">
|
||||
<dt><strong>logy</strong></dt>
|
||||
<dd>Will present the axis of ordinates in a logarithmic scale. <em>So far no checking of negative and zero-valued data is performed, hence expect interesting output!</em></dd>
|
||||
</dl>
|
||||
<span id="index-63"></span><dl class="docutils" id="msr-plot-block-rrf-packing">
|
||||
<span id="index-64"></span><dl class="docutils" id="msr-plot-block-rrf-packing">
|
||||
<dt><strong>rrf_packing</strong> value</dt>
|
||||
<dd>In the rotating-reference-frame (RRF) representation, this will be the value for the packing. <strong>WARNING:</strong> For the time being, this is a global option and applies to all PLOT blocks.</dd>
|
||||
</dl>
|
||||
<span id="index-64"></span><dl class="docutils" id="msr-plot-block-rrf-freq">
|
||||
<span id="index-65"></span><dl class="docutils" id="msr-plot-block-rrf-freq">
|
||||
<dt><strong>rrf_freq</strong> value unit</dt>
|
||||
<dd>This entry provides the RRF “frequency” given by the value and the unit which can be: <em>kHz</em>, <em>MHz</em>, <em>Mc/s</em>, <em>G</em>, or <em>T</em>.</dd>
|
||||
</dl>
|
||||
<span id="index-65"></span><dl class="docutils" id="msr-plot-block-rrf-phase">
|
||||
<span id="index-66"></span><dl class="docutils" id="msr-plot-block-rrf-phase">
|
||||
<dt><strong>rrf_phase</strong> value</dt>
|
||||
<dd>A phase of the RRF can be provided, either as a value in degrees, or as a parX, <em>e.g.</em> par4, where ‘X’ is supposed to be the phase parameter number in the <a class="reference internal" href="#msr-fitparameter-block"><em>FITPARAMETER block</em></a>.</dd>
|
||||
<dt><strong>Notes:</strong></dt>
|
||||
@@ -2035,7 +2102,7 @@ rrf_packing 75
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="the-statistic-block">
|
||||
<span id="msr-statistic-block"></span><span id="index-66"></span><h3>The STATISTIC Block<a class="headerlink" href="#the-statistic-block" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="msr-statistic-block"></span><span id="index-67"></span><h3>The STATISTIC Block<a class="headerlink" href="#the-statistic-block" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The STATISTIC block is the last block of a msr file. It contains some information on the fit: the date and time as well as
|
||||
the absolute and normalized values of <span class="math">\(\chi^2\)</span> and the number of degrees of freedom in the fit.
|
||||
If enabled in the <a class="reference internal" href="#musrfit-startup"><em>XML file</em></a> for <span class="math">\(\chi^2\)</span>-single-histogram fits also <a class="reference external" href="http://en.wikipedia.org/wiki/Pearson's_chi-square_test">Pearson’s</a>
|
||||
@@ -2044,9 +2111,9 @@ If enabled in the <a class="reference internal" href="#musrfit-startup"><em>XML
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="fit-types">
|
||||
<span id="index-67"></span><span id="id37"></span><h2>Fit Types<a class="headerlink" href="#fit-types" title="Permalink to this headline">¶</a></h2>
|
||||
<span id="index-68"></span><span id="id37"></span><h2>Fit Types<a class="headerlink" href="#fit-types" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="section" id="single-histogram-fit-fit-type-0">
|
||||
<span id="single-histogram-fit"></span><span id="index-68"></span><h3>Single Histogram Fit (fit type 0)<a class="headerlink" href="#single-histogram-fit-fit-type-0" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="single-histogram-fit"></span><span id="index-69"></span><h3>Single Histogram Fit (fit type 0)<a class="headerlink" href="#single-histogram-fit-fit-type-0" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The single-histogram fit (fit type 0) is used to fit a function directly to the raw data using</p>
|
||||
<div class="math">
|
||||
\[N(t) = N_0 e^{-t/\tau_\mu} [ 1 + A(t) ] + N_{\rm bkg}\]</div>
|
||||
@@ -2067,7 +2134,7 @@ If the option lifetimecorrection is <em>set</em> in the PLOT block the asymmetry
|
||||
\[A(t) = \frac{N(t) - N_{\rm bkg}}{N_0} e^{+t/\tau_\mu} - 1\]</div>
|
||||
</div>
|
||||
<div class="section" id="single-histogram-rrf-fit-fit-type-1">
|
||||
<span id="single-histogram-rrf-fit"></span><span id="index-69"></span><h3>Single Histogram RRF Fit (fit type 1)<a class="headerlink" href="#single-histogram-rrf-fit-fit-type-1" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="single-histogram-rrf-fit"></span><span id="index-70"></span><h3>Single Histogram RRF Fit (fit type 1)<a class="headerlink" href="#single-histogram-rrf-fit-fit-type-1" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The single-histogram RRF fit (fit type 1) is used to fit the rotating reference frame asymmetry <span class="math">\(A_{\rm rrf}(t)\)</span> extracted from the raw data.
|
||||
The currently implemented version will fail at low fields/frequencies (for about < 1 Tesla). The same is true, if multiple frequencies with large
|
||||
enough separation are present, <em>e.g.</em> when dealing with muonium. <span class="math">\(A_{\rm rrf}(t)\)</span> is estimated the following way (for more details see the
|
||||
@@ -2091,7 +2158,7 @@ of the <span class="math">\(N_0\)</span> estimate, line shape distortion due to
|
||||
For more details see the rrf-memo found in the source code under <musrfit>/doc/memo/rrf/rrf-notes.pdf or <a class="reference external" href="http://dx.doi.org/10.7566/JPSCP.21.011051">Musrfit–Real Time Parameter Fitting Using GPUs</a></p>
|
||||
</div>
|
||||
<div class="section" id="asymmetry-fit-fit-type-2">
|
||||
<span id="asymmetry-fit"></span><span id="index-70"></span><h3>Asymmetry Fit (fit type 2)<a class="headerlink" href="#asymmetry-fit-fit-type-2" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="asymmetry-fit"></span><span id="index-71"></span><h3>Asymmetry Fit (fit type 2)<a class="headerlink" href="#asymmetry-fit-fit-type-2" title="Permalink to this headline">¶</a></h3>
|
||||
<p>For an asymmetry fit (fit type 2) two histograms are needed. These are given by the <a class="reference internal" href="#msr-forward-backward"><em>forward</em></a> and <a class="reference internal" href="#msr-forward-backward"><em>backward</em></a> keywords
|
||||
in the <a class="reference internal" href="#msr-run-block"><em>RUN block</em></a>. Additionally, the parameters <a class="reference internal" href="#msr-alpha-beta"><em>alpha</em></a> and <a class="reference internal" href="#msr-alpha-beta"><em>beta</em></a> which relate the detector
|
||||
efficiencies, solid angles and initial asymmetries of the two detectors can be supplied. The constant background for the two histograms is either given by
|
||||
@@ -2125,13 +2192,13 @@ efficiencies, solid angles and initial asymmetries of the two detectors can be s
|
||||
<p>and plotted together with the function given in the THEORY block.</p>
|
||||
</div>
|
||||
<div class="section" id="asymmetry-rrf-fit-fit-type-3">
|
||||
<span id="asymmetry-rrf-fit"></span><span id="index-71"></span><h3>Asymmetry RRF Fit (fit type 3)<a class="headerlink" href="#asymmetry-rrf-fit-fit-type-3" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="asymmetry-rrf-fit"></span><span id="index-72"></span><h3>Asymmetry RRF Fit (fit type 3)<a class="headerlink" href="#asymmetry-rrf-fit-fit-type-3" title="Permalink to this headline">¶</a></h3>
|
||||
<p>For asymmetry RRF Fit (fit type 3) two histograms are needed. In a first step, the unbinned asymmetry is formed as described for the asymmetry fit.
|
||||
Afterwards the RRF transformation is carried out, <em>i.e.</em> point 4. and 5. as sketched in the single histogramm RRF fit. The same reservations as for
|
||||
the single histogram RRF fit apply: <strong>if you not urgently need it: do not use it! There are better ways to deal with the analysis of high frequency data!</strong></p>
|
||||
</div>
|
||||
<div class="section" id="negative-muon-mgrsr-fit-fit-type-4">
|
||||
<span id="negative-muon-musr-fit"></span><span id="index-72"></span><h3>Negative Muon μSR Fit (fit type 4)<a class="headerlink" href="#negative-muon-mgrsr-fit-fit-type-4" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="negative-muon-musr-fit"></span><span id="index-73"></span><h3>Negative Muon μSR Fit (fit type 4)<a class="headerlink" href="#negative-muon-mgrsr-fit-fit-type-4" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The negative muon μSR fit (fit type 4) is used for single histogram fits of MuMinus, <em>i.e.</em></p>
|
||||
<div class="math">
|
||||
\[N(t) = \sum_i N_i\,\mathrm{e}^{-t/\tau_i} \left[ 1 + A_i(t)\right] + N_{\rm bkg}(t)\]</div>
|
||||
@@ -2147,7 +2214,7 @@ the single histogram RRF fit apply: <strong>if you not urgently need it: do not
|
||||
<p>Since MuMinus is quite generic, the full functional depends has to be written in the <a class="reference internal" href="#msr-theory-block"><em>THEORY Block</em></a>.</p>
|
||||
</div>
|
||||
<div class="section" id="beta-nmr-asymmetry-fit-fit-type-5">
|
||||
<span id="bnmr-asymmetry-fit"></span><span id="index-73"></span><h3>beta-NMR Asymmetry Fit (fit type 5)<a class="headerlink" href="#beta-nmr-asymmetry-fit-fit-type-5" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="bnmr-asymmetry-fit"></span><span id="index-74"></span><h3>beta-NMR Asymmetry Fit (fit type 5)<a class="headerlink" href="#beta-nmr-asymmetry-fit-fit-type-5" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Four histograms are needed for a beta-NMR asymmetry fit (fit type 5), two for positive helecity and two for negative. These are given by the <a class="reference internal" href="#msr-forward-backward"><em>forward</em></a> and <a class="reference internal" href="#msr-forward-backward"><em>backward</em></a> keywords
|
||||
in the <a class="reference internal" href="#msr-run-block"><em>RUN block</em></a>. Additionally, the parameters <a class="reference internal" href="#msr-alpha-beta"><em>alpha</em></a> and <a class="reference internal" href="#msr-alpha-beta"><em>beta</em></a> which relate the detector
|
||||
efficiencies, solid angles and initial asymmetries of the two detectors can be supplied. The constant background for the two histograms is either given by
|
||||
@@ -2187,7 +2254,7 @@ efficiencies, solid angles and initial asymmetries of the two detectors can be s
|
||||
<p>and plotted together with the function given in the THEORY block.</p>
|
||||
</div>
|
||||
<div class="section" id="non-mgrsr-fit-fit-type-8">
|
||||
<span id="non-musr-fit"></span><span id="index-74"></span><h3>Non-μSR Fit (fit type 8)<a class="headerlink" href="#non-mgrsr-fit-fit-type-8" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="non-musr-fit"></span><span id="index-75"></span><h3>Non-μSR Fit (fit type 8)<a class="headerlink" href="#non-mgrsr-fit-fit-type-8" title="Permalink to this headline">¶</a></h3>
|
||||
<p>In the case of a non-μSR fit (fit type 8) the fitting function is</p>
|
||||
<div class="math">
|
||||
\[y = f(x),\]</div>
|
||||
@@ -2196,7 +2263,7 @@ efficiencies, solid angles and initial asymmetries of the two detectors can be s
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="id38">
|
||||
<span id="index-75"></span><span id="id39"></span><h2>User Functions<a class="headerlink" href="#id38" title="Permalink to this headline">¶</a></h2>
|
||||
<span id="index-76"></span><span id="id39"></span><h2>User Functions<a class="headerlink" href="#id38" title="Permalink to this headline">¶</a></h2>
|
||||
<p><tt class="docutils literal"><span class="pre">musrfit</span></tt> offers the possibility to plug-in user-defined functions implemented in <tt class="docutils literal"><span class="pre">C++</span></tt> classes to the fitting and plotting routines.
|
||||
In order to do so, basically two things are needed:</p>
|
||||
<blockquote>
|
||||
@@ -2214,7 +2281,7 @@ In order to do so, basically two things are needed:</p>
|
||||
</div></blockquote>
|
||||
<p>Since the first is simpler this will be explained using an explicit example, before it is discussed why the second option is needed and how it can be used.</p>
|
||||
<div class="section" id="user-function-without-global-user-function-object-access">
|
||||
<span id="user-functions-without-global-part"></span><span id="index-76"></span><h3>User Function without global user-function-object access<a class="headerlink" href="#user-function-without-global-user-function-object-access" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="user-functions-without-global-part"></span><span id="index-77"></span><h3>User Function without global user-function-object access<a class="headerlink" href="#user-function-without-global-user-function-object-access" title="Permalink to this headline">¶</a></h3>
|
||||
<p>In the following it is explained in detail how the implementation of a user function is done using the simple example of <span class="math">\(f_a(x) = \sin(a x)/(a x)\)</span>,
|
||||
where the parameter <span class="math">\(a\)</span> should be determined by the fit. Although not necessary for this simple example, the source code is split into two parts,
|
||||
namely a header file <tt class="docutils literal"><span class="pre">TMyFunction.h</span></tt> containing the class declaration and a second file <tt class="docutils literal"><span class="pre">TMyFunction.cpp</span></tt> including the function implementation
|
||||
@@ -2312,7 +2379,7 @@ refer to the <a class="reference external" href="https://root.cern.ch/interactin
|
||||
<p>Finally, please be aware of the <a class="reference internal" href="#user-function-important"><em>remark</em></a> at the end of this section.</p>
|
||||
</div>
|
||||
<div class="section" id="user-function-with-global-user-function-object-access">
|
||||
<span id="user-functions-with-global-part"></span><span id="index-77"></span><h3>User Function with global user-function-object access<a class="headerlink" href="#user-function-with-global-user-function-object-access" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="user-functions-with-global-part"></span><span id="index-78"></span><h3>User Function with global user-function-object access<a class="headerlink" href="#user-function-with-global-user-function-object-access" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Before explaining how to use global objects within user functions, it will be shortly explained where is the problem and why this might be a sensible approach.
|
||||
In <tt class="docutils literal"><span class="pre">musrfit</span></tt> each <a class="reference internal" href="#msr-run-block"><em>RUN block</em></a> (histogram, asymmetry, ...) is owning its own theory-function tree. An example is shown in the figure below.
|
||||
The bluish nodes are default musrfit functions, whereas the red nodes represent user functions (here labeled by <tt class="docutils literal"><span class="pre">uF1</span></tt> and <tt class="docutils literal"><span class="pre">uF2</span></tt>). Without global user-function
|
||||
@@ -2451,7 +2518,7 @@ In case this cannot be ensured, the parallelization can be disabled by <em>̵
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="rge-file-handler-for-low-energy-mgrsr">
|
||||
<span id="rge-handler"></span><span id="index-78"></span><h3>rge-file handler for Low-Energy μSR<a class="headerlink" href="#rge-file-handler-for-low-energy-mgrsr" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="rge-handler"></span><span id="index-79"></span><h3>rge-file handler for Low-Energy μSR<a class="headerlink" href="#rge-file-handler-for-low-energy-mgrsr" title="Permalink to this headline">¶</a></h3>
|
||||
<p>In the case of LE-μSR, the muon stopping distribution might have a profound impact on the muon polarization function <span class="math">\(P(t)\)</span>. In case of transverse field μSR measurements it can be written as</p>
|
||||
<div class="math">
|
||||
\[P(t) = \int_0^\infty n(z) \cos(\gamma_\mu B(z) t + \varphi) \, dz\]</div>
|
||||
@@ -2595,113 +2662,28 @@ here:</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="technical-description-of-the-musrfit-framework">
|
||||
<span id="technical-musrfit"></span><span id="index-79"></span><h2>Technical Description of the musrfit framework<a class="headerlink" href="#technical-description-of-the-musrfit-framework" title="Permalink to this headline">¶</a></h2>
|
||||
<span id="technical-musrfit"></span><span id="index-80"></span><h2>Technical Description of the musrfit framework<a class="headerlink" href="#technical-description-of-the-musrfit-framework" title="Permalink to this headline">¶</a></h2>
|
||||
<p>A technical description of the musrfit framework can be found on its own <a class="reference external" href="http://lmu.web.psi.ch/musrfit/technical/index.html">docu</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h3><a href="index.html">Table Of Contents</a></h3>
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">User manual</a><ul>
|
||||
<li><a class="reference internal" href="#introduction">Introduction</a></li>
|
||||
<li><a class="reference internal" href="#available-executables-configuration-files-and-their-basic-usage">Available Executables, Configuration Files and their Basic Usage</a><ul>
|
||||
<li><a class="reference internal" href="#musrfit">musrfit</a></li>
|
||||
<li><a class="reference internal" href="#musrview">musrview</a></li>
|
||||
<li><a class="reference internal" href="#musrft">musrFT</a></li>
|
||||
<li><a class="reference internal" href="#musrt0">musrt0</a></li>
|
||||
<li><a class="reference internal" href="#msr2msr">msr2msr</a></li>
|
||||
<li><a class="reference internal" href="#msr2data">msr2data</a></li>
|
||||
<li><a class="reference internal" href="#any2many">any2many</a></li>
|
||||
<li><a class="reference internal" href="#dump-header">dump_header</a></li>
|
||||
<li><a class="reference internal" href="#musrfit-startup-xml">musrfit_startup.xml</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#description-of-the-msr-file-format">Description of the msr File Format</a><ul>
|
||||
<li><a class="reference internal" href="#the-title">The Title</a></li>
|
||||
<li><a class="reference internal" href="#the-fitparameter-block">The FITPARAMETER Block</a></li>
|
||||
<li><a class="reference internal" href="#the-theory-block">The THEORY Block</a></li>
|
||||
<li><a class="reference internal" href="#the-functions-block">The FUNCTIONS Block</a></li>
|
||||
<li><a class="reference internal" href="#the-global-block">The GLOBAL Block</a></li>
|
||||
<li><a class="reference internal" href="#the-run-block">The RUN Block</a></li>
|
||||
<li><a class="reference internal" href="#the-commands-block">The COMMANDS Block</a></li>
|
||||
<li><a class="reference internal" href="#the-fourier-block">The FOURIER Block</a></li>
|
||||
<li><a class="reference internal" href="#the-plot-block">The PLOT Block</a></li>
|
||||
<li><a class="reference internal" href="#the-statistic-block">The STATISTIC Block</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#fit-types">Fit Types</a><ul>
|
||||
<li><a class="reference internal" href="#single-histogram-fit-fit-type-0">Single Histogram Fit (fit type 0)</a></li>
|
||||
<li><a class="reference internal" href="#single-histogram-rrf-fit-fit-type-1">Single Histogram RRF Fit (fit type 1)</a></li>
|
||||
<li><a class="reference internal" href="#asymmetry-fit-fit-type-2">Asymmetry Fit (fit type 2)</a></li>
|
||||
<li><a class="reference internal" href="#asymmetry-rrf-fit-fit-type-3">Asymmetry RRF Fit (fit type 3)</a></li>
|
||||
<li><a class="reference internal" href="#negative-muon-mgrsr-fit-fit-type-4">Negative Muon μSR Fit (fit type 4)</a></li>
|
||||
<li><a class="reference internal" href="#beta-nmr-asymmetry-fit-fit-type-5">beta-NMR Asymmetry Fit (fit type 5)</a></li>
|
||||
<li><a class="reference internal" href="#non-mgrsr-fit-fit-type-8">Non-μSR Fit (fit type 8)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#id38">User Functions</a><ul>
|
||||
<li><a class="reference internal" href="#user-function-without-global-user-function-object-access">User Function without global user-function-object access</a></li>
|
||||
<li><a class="reference internal" href="#user-function-with-global-user-function-object-access">User Function with global user-function-object access</a></li>
|
||||
<li><a class="reference internal" href="#rge-file-handler-for-low-energy-mgrsr">rge-file handler for Low-Energy μSR</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#technical-description-of-the-musrfit-framework">Technical Description of the musrfit framework</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
«  <a href="tutorial.html">Tutorial for <tt class="docutils literal"><span class="pre">musrfit</span></tt></a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="user-libs.html">Documentation of user libs (user functions)</a>  »
|
||||
</p>
|
||||
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="tutorial.html"
|
||||
title="previous chapter">Tutorial for <tt class="docutils literal"><span class="pre">musrfit</span></tt></a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="user-libs.html"
|
||||
title="next chapter">Documentation of user libs (user functions)</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="_sources/user-manual.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="user-libs.html" title="Documentation of user libs (user functions)"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="tutorial.html" title="Tutorial for musrfit"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.7.4 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Apr 09, 2021.
|
||||
© Copyright 2022, Andreas Suter.
|
||||
Last updated on May 29, 2022.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -55,12 +55,22 @@ 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}")
|
||||
target_include_directories(addRun
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>
|
||||
)
|
||||
target_link_libraries(addRun ${ROOT_LIBRARIES} ${MUSRFIT_LIBS} ${Boost_LIBRARIES})
|
||||
|
||||
add_executable(any2many ${GIT_REV_H} any2many.cpp)
|
||||
target_compile_options(any2many BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV_H}")
|
||||
target_include_directories(any2many
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>
|
||||
@@ -72,7 +82,6 @@ target_compile_options(dump_header BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_
|
||||
target_include_directories(dump_header
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${NEXUS_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
@@ -90,7 +99,6 @@ target_compile_options(msr2data BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV
|
||||
target_include_directories(msr2data
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>
|
||||
@@ -105,7 +113,6 @@ target_compile_options(musrfit BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV_
|
||||
target_include_directories(musrfit
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>
|
||||
@@ -117,18 +124,17 @@ target_compile_options(musrFT BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV_H
|
||||
target_include_directories(musrFT
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>
|
||||
)
|
||||
target_link_libraries(musrFT ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} ${MUSRFIT_LIBS})
|
||||
target_link_libraries(musrFT FFTW3::FFTW3 ${ROOT_LIBRARIES} ${MUSRFIT_LIBS})
|
||||
|
||||
add_executable(musrRootValidation ${GIT_REV_H} musrRootValidation.cpp)
|
||||
target_compile_options(musrRootValidation BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV_H}")
|
||||
target_include_directories(musrRootValidation
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>
|
||||
@@ -141,7 +147,6 @@ target_compile_options(musrt0 BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV_H
|
||||
target_include_directories(musrt0
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>
|
||||
@@ -153,18 +158,17 @@ target_compile_options(musrview BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV
|
||||
target_include_directories(musrview
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>
|
||||
)
|
||||
target_link_libraries(musrview ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} ${MUSRFIT_LIBS})
|
||||
target_link_libraries(musrview FFTW3::FFTW3 ${ROOT_LIBRARIES} ${MUSRFIT_LIBS})
|
||||
|
||||
add_executable(write_musrRoot_runHeader ${GIT_REV_H} write_musrRoot_runHeader.cpp)
|
||||
target_compile_options(write_musrRoot_runHeader BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV_H}")
|
||||
target_include_directories(write_musrRoot_runHeader
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>
|
||||
@@ -176,6 +180,7 @@ target_link_libraries(write_musrRoot_runHeader ${ROOT_LIBRARIES} ${MUSRFIT_LIBS}
|
||||
#--- installation info --------------------------------------------------------
|
||||
install(
|
||||
TARGETS
|
||||
addRun
|
||||
any2many
|
||||
dump_header
|
||||
msr2data
|
||||
|
||||
851
src/addRun.cpp
Normal file
@@ -0,0 +1,851 @@
|
||||
/***************************************************************************
|
||||
|
||||
addRun.cpp
|
||||
|
||||
Author: Andreas Suter
|
||||
e-mail: andreas.suter@psi.ch
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2022 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. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#include <TString.h>
|
||||
|
||||
#ifdef HAVE_GIT_REV_H
|
||||
#include "git-revision.h"
|
||||
#endif
|
||||
|
||||
#include "PMusr.h"
|
||||
#include "PStartupHandler.h"
|
||||
#include "PRunDataHandler.h"
|
||||
#include "PFindRun.h"
|
||||
|
||||
struct PAddRunInfo {
|
||||
std::string fPathFileName{""};
|
||||
PIntVector fT0;
|
||||
std::string fFileFormat{""};
|
||||
};
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Sends the usage description to the standard output.
|
||||
*/
|
||||
void addRun_syntax()
|
||||
{
|
||||
std::cout << std::endl;
|
||||
std::cout << "usage0: addRun [--help | -h] | [--version | -v]" << std::endl;
|
||||
std::cout << "usage1: addRun <options1> -rl <runList>" << std::endl;
|
||||
std::cout << "usage2: addRun <options2> -in <inputFile>" << std::endl;
|
||||
std::cout << std::endl;
|
||||
std::cout << " <options1>:" << std::endl;
|
||||
std::cout << " -t0 <ival>: <ival> is a comma separted list of global t0-bin's, or" << std::endl;
|
||||
std::cout << " <ival> is a comma separted list of '-1', then it is assumed that there is a prompt peak." << std::endl;
|
||||
std::cout << " Under this condition the t0-bin will be determined automatically by" << std::endl;
|
||||
std::cout << " the position of the max-value of the corresponing histograms." << std::endl;
|
||||
std::cout << " If t0's are not provided, t0-bin will be taken from the file." << std::endl;
|
||||
std::cout << " -f <format>: <format> is the output file format to be used." << std::endl;
|
||||
std::cout << " For supported formats see below." << std::endl;
|
||||
std::cout << " -y <year> : the year at which runs were measured. Format yyyy." << std::endl;
|
||||
std::cout << " If not provided, the current year is used." << std::endl;
|
||||
std::cout << " -i <instrument> : <instrument> is one of gps, ltf, flame, gpd, hifi, dolly, lem" << std::endl;
|
||||
std::cout << " -m <dev> : <dev> is pta or tdc (only needed for bulk). Default: tdc" << std::endl;
|
||||
std::cout << " -o <fln> : output file name." << std::endl;
|
||||
std::cout << " -rl <runList> can be:" << std::endl ;
|
||||
std::cout << " (i) <run0> <run1> <run2> ... <runN> : run numbers, e.g. 123 124" << std::endl;
|
||||
std::cout << " (ii) <run0>-<runN> : a range, e.g. 123-125 -> 123 124 125" << std::endl;
|
||||
std::cout << " (iii) <run0>:<runN>:<step> : a sequence, e.g. 123:127:2 -> 123 125 127" << std::endl;
|
||||
std::cout << " <step> will give the step width and has to be a positive number!" << std::endl;
|
||||
std::cout << " a <runList> can also combine (i)-(iii), e.g. 123 128-130 133, etc." << std::endl;
|
||||
std::cout << std::endl;
|
||||
std::cout << " <options2>:" << std::endl;
|
||||
std::cout << " -f <format>: <format> is file format of the output-file to be used." << std::endl;
|
||||
std::cout << " -o <fln> : output file name." << std::endl;
|
||||
std::cout << " -in <inputFile>: the file name of the file containing the necessary run information" << std::endl;
|
||||
std::cout << " to add runs with various t0's, fgb's, lgb's, different years, etc." << std::endl;
|
||||
std::cout << " The structure of the <inputFile> is:" << std::endl;
|
||||
std::cout << " Lines starting with a '%' and empty lines are ignored." << std::endl;
|
||||
std::cout << " A single run needs to provide the following information:" << std::endl;
|
||||
std::cout << " file <path-name>: needs to be a full path name" << std::endl;
|
||||
std::cout << " t0 <t0-bin> : needs to be the t0 bin or " << std::endl;
|
||||
std::cout << " 0 to take the t0 bin from the file, or" << std::endl;
|
||||
std::cout << " -1 for automatic determination via prompt peak (see above)." << std::endl;
|
||||
std::cout << " Example:" << std::endl;
|
||||
std::cout << " % file 1. 6 histos present, hence 6 t0-bins" << std::endl;
|
||||
std::cout << " file /home/test/data/deltat_tdc_gps_4324.bin" << std::endl;
|
||||
std::cout << " t0 401, 400, 399, 400, 358, 400" << std::endl;
|
||||
std::cout << " % file 2, take t0-bins from the file" << std::endl;
|
||||
std::cout << " file /home/test/data/deltat_tdc_gps_4325.bin" << std::endl;
|
||||
std::cout << " % file 3, deduce to t0-bin's from the prompt peak" << std::endl;
|
||||
std::cout << " file /home/test/data/deltat_tdc_gps_4325.bin" << std::endl;
|
||||
std::cout << " t0 -1, -1, -1, -1, -1, -1" << std::endl;
|
||||
std::cout << std::endl;
|
||||
std::cout << " Supported uSR file formats:" << std::endl;
|
||||
std::cout << " MusrRoot, PSI-BIN, PSI-MDU, MUD, NeXus" << std::endl;
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p> check if the requested format is supported.
|
||||
*
|
||||
* @param format requested format string
|
||||
*
|
||||
* @return true if supported, false otherwise
|
||||
*/
|
||||
bool addRun_checkFormat(std::string &format) {
|
||||
bool result = false;
|
||||
boost::to_lower(format);
|
||||
|
||||
if (format == "psi-bin")
|
||||
format = "psibin";
|
||||
if (format == "psi-mud")
|
||||
format = "psimdu";
|
||||
|
||||
if (format == "musrroot") {
|
||||
result = true;
|
||||
} else if (format == "psibin") {
|
||||
result = true;
|
||||
} else if (format == "psimdu") {
|
||||
result = true;
|
||||
} else if (format == "mud") {
|
||||
result = true;
|
||||
} else if (format == "nexus") {
|
||||
result = true;
|
||||
} else if (format == "root") {
|
||||
result = true;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Reads the inputFile to extract the necessary information.
|
||||
* @param fileName
|
||||
* @param infoVec
|
||||
* @return
|
||||
*/
|
||||
bool addRun_readInputFiles(const std::string fileName, std::vector<PAddRunInfo> &infoVec)
|
||||
{
|
||||
PAddRunInfo info;
|
||||
char buf[256], str[256];
|
||||
std::ifstream fin(fileName.c_str(), std::ifstream::in);
|
||||
std::string line;
|
||||
char *tok{nullptr};
|
||||
int status, ival;
|
||||
bool lastWasFile{false};
|
||||
while (fin.good()) {
|
||||
fin.getline(buf, 256);
|
||||
line = buf;
|
||||
boost::trim_left(line);
|
||||
if (line.empty())
|
||||
continue;
|
||||
if (line[0] == '%')
|
||||
continue;
|
||||
strcpy(buf, line.c_str());
|
||||
tok = strtok(buf, " ");
|
||||
if (!strcmp(tok, "file")) {
|
||||
if (lastWasFile) {
|
||||
infoVec.push_back(info);
|
||||
info.fPathFileName = "";
|
||||
info.fT0.clear();
|
||||
}
|
||||
tok = strtok(NULL, " ");
|
||||
if (tok == NULL) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found label 'file' without argument." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
fin.close();
|
||||
return false;
|
||||
}
|
||||
info.fPathFileName = tok;
|
||||
lastWasFile = true;
|
||||
} else if (!strcmp(tok, "t0")) {
|
||||
while ((tok = strtok(NULL, ",")) != NULL) {
|
||||
status = sscanf(tok, "%d%s", &ival, str);
|
||||
if (status != 1) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found t0 argument '" << tok << "' which is not a number." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
fin.close();
|
||||
return false;
|
||||
}
|
||||
info.fT0.push_back(ival);
|
||||
}
|
||||
} else {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found unrecognized token '" << tok << "'." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
fin.close();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
infoVec.push_back(info);
|
||||
|
||||
fin.close();
|
||||
|
||||
// checks
|
||||
for (int i=0; i<infoVec.size(); i++) {
|
||||
if (infoVec[i].fPathFileName.empty()) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** something is wrong with the inputFile. Found empty pathName." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Automatically determines the t0-bin. This assumes that there is a
|
||||
* prompt peak in the data!
|
||||
*
|
||||
* @param vec histo data
|
||||
* @return maximum of the histo data
|
||||
*/
|
||||
UInt_t addRun_getPromptPeakPos(PDoubleVector *vec)
|
||||
{
|
||||
UInt_t pos=0;
|
||||
Double_t max=vec->at(0);
|
||||
|
||||
for (UInt_t i=0; i<vec->size(); i++) {
|
||||
if (max < vec->at(i)) {
|
||||
max = vec->at(i);
|
||||
pos = i;
|
||||
}
|
||||
}
|
||||
|
||||
return pos;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Filters the t0 arguments. Allowed is a comma separeted list of
|
||||
* integers > -2.
|
||||
*
|
||||
* @param argc argument counter
|
||||
* @param argv argument list
|
||||
* @param idx argument index from which to start
|
||||
* @param t0 vector
|
||||
*
|
||||
* @return true on success, false otherwise
|
||||
*/
|
||||
bool addRun_filter_t0(int argc, char *argv[], int &idx, PIntVector &t0)
|
||||
{
|
||||
int pos{idx}, status, ival;
|
||||
PIntVector tt0;
|
||||
// collect run list string from input
|
||||
for (int i=idx; i<argc; i++) {
|
||||
pos = i;
|
||||
if ((argv[i][0] == '-') && isalpha(argv[i][1])) { // next command
|
||||
pos = i-1;
|
||||
break;
|
||||
} else {
|
||||
status = sscanf(argv[i], "%d", &ival);
|
||||
if (status != 1) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found t0 value '" << argv[i] << "' which is not an integer." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return false;
|
||||
}
|
||||
tt0.push_back(ival);
|
||||
}
|
||||
}
|
||||
|
||||
// make sure that t0's > -2
|
||||
for (int i=0; i<tt0.size(); i++) {
|
||||
if (tt0[i] <= -2) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found t0 value '" << tt0[i] << "' which is out-of-range." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
idx = pos;
|
||||
t0 = tt0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Filters the runList arguments. Allowed are: (i) run1 run2 ... runN
|
||||
* (ii) runStart-runEnd, and (iii) runStart:runEnd:step
|
||||
*
|
||||
* @param argc argument counter
|
||||
* @param argv argument list
|
||||
* @param idx argument index from which to start
|
||||
* @param runList vector
|
||||
*
|
||||
* @return true on success, false otherwise
|
||||
*/
|
||||
bool addRun_filter_runList(int argc, char *argv[], int &idx, PUIntVector &runList)
|
||||
{
|
||||
int pos{idx};
|
||||
std::string runStr{""};
|
||||
// collect run list string from input
|
||||
for (int i=idx; i<argc; i++) {
|
||||
pos = i;
|
||||
if ((argv[i][0] == '-') && isalpha(argv[i][1])) { // next command
|
||||
pos = i-1;
|
||||
break;
|
||||
} else {
|
||||
runStr += argv[i];
|
||||
runStr += " ";
|
||||
}
|
||||
}
|
||||
// extract run list from string
|
||||
PStringNumberList rl(runStr);
|
||||
std::string errMsg{""};
|
||||
if (!rl.Parse(errMsg)) {
|
||||
std::cerr << "**ERROR** in run list: -rl " << runStr << std::endl;
|
||||
std::cerr << errMsg << std::endl;
|
||||
return false;
|
||||
}
|
||||
runList = rl.GetList();
|
||||
|
||||
idx = pos;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>addRun is used to add various runs.
|
||||
*
|
||||
* @param argc number of input arguments
|
||||
* @param argv list of input arguments
|
||||
*
|
||||
* @return PMUSR_SUCCESS if everthing went smooth, otherwise and error number
|
||||
*/
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// check for --help or --version
|
||||
if (argc == 2) {
|
||||
if (!strncmp(argv[1], "--help", 128) || !strncmp(argv[1], "-h", 128)) {
|
||||
addRun_syntax();
|
||||
return PMUSR_SUCCESS;
|
||||
} else if (!strncmp(argv[1], "--version", 128) || !strncmp(argv[1], "-v", 128)) {
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#ifdef HAVE_GIT_REV_H
|
||||
std::cout << std::endl << "addRun version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << " (" << BUILD_TYPE << "), ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
|
||||
#else
|
||||
std::cout << std::endl << "addRun version: " << PACKAGE_VERSION << " (" << BUILD_TYPE << "), ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
|
||||
#endif
|
||||
#else
|
||||
#ifdef HAVE_GIT_REV_H
|
||||
std::cout << std::endl << "addRun git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
|
||||
#else
|
||||
std::cout << std::endl << "addRun version: unkown." << std::endl << std::endl;
|
||||
#endif
|
||||
#endif
|
||||
return PMUSR_SUCCESS;
|
||||
} else {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** missing required input." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
addRun_syntax();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// filter arguments
|
||||
PIntVector t0;
|
||||
Int_t ival;
|
||||
UInt_t yearNum{0};
|
||||
std::string flnOut{""};
|
||||
std::string format{""}, year{""}, instrument{""}, dev{"tdc"};
|
||||
PUIntVector runList;
|
||||
std::string inputFln{""};
|
||||
int status;
|
||||
std::vector<PAddRunInfo> addRunInfo;
|
||||
|
||||
for (int i=1; i<argc; i++) {
|
||||
if (!strcmp(argv[i], "-t0")) {
|
||||
if (i+1 >= argc) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found -t0 without value." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return -1;
|
||||
}
|
||||
// deal with run-list here
|
||||
int idx=i+1;
|
||||
if (!addRun_filter_t0(argc, argv, idx, t0)) {
|
||||
return -2;
|
||||
}
|
||||
i=idx;
|
||||
} else if (!strcmp(argv[i], "-f")) {
|
||||
if (i+1 >= argc) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found -f without argument." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return -1;
|
||||
}
|
||||
format = argv[i+1];
|
||||
if (!addRun_checkFormat(format)) {
|
||||
format = "";
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found -f with unsupported format: '" << format << "'" << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return -2;
|
||||
}
|
||||
i++;
|
||||
} else if (!strcmp(argv[i], "-y")) {
|
||||
if (i+1 >= argc) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found -y without value." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return -1;
|
||||
}
|
||||
status = sscanf(argv[i+1], "%d", &ival);
|
||||
if (status != 1) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found invalid -y value: " << argv[i+1] << "." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return -2;
|
||||
}
|
||||
if (1900 - ival > 0) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found invalid -y value: " << argv[i+1] << "." << std::endl;
|
||||
std::cerr << " Format has to be YYYY." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return -2;
|
||||
}
|
||||
yearNum = ival;
|
||||
year = argv[i+1];
|
||||
i++;
|
||||
} else if (!strcmp(argv[i], "-i")) {
|
||||
if (i+1 >= argc) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found -i without argument." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return -1;
|
||||
}
|
||||
instrument = argv[i+1];
|
||||
boost::to_lower(instrument);
|
||||
i++;
|
||||
} else if (!strcmp(argv[i], "-m")) {
|
||||
if (i+1 >= argc) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found -m without argument." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return -1;
|
||||
}
|
||||
std::string str(argv[i+1]);
|
||||
boost::to_lower(str);
|
||||
if ((str != "pta") && (str != "tdc")) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found -m with unsupported argument '" << argv[i+1] << "'. Possible arguments are 'pta' or 'tdc'." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return -2;
|
||||
}
|
||||
dev = str;
|
||||
i++;
|
||||
} else if (!strcmp(argv[i], "-o")) {
|
||||
if (i+1 >= argc) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found -o without argument." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return -1;
|
||||
}
|
||||
flnOut = argv[i+1];
|
||||
i++;
|
||||
} else if (!strcmp(argv[i], "-rl")) {
|
||||
if (i+1 >= argc) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found -rl without argument." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return -1;
|
||||
}
|
||||
// deal with run-list here
|
||||
int idx=i+1;
|
||||
if (!addRun_filter_runList(argc, argv, idx, runList)) {
|
||||
return -2;
|
||||
}
|
||||
i=idx;
|
||||
} else if (!strcmp(argv[i], "-in")) {
|
||||
if (i+1 >= argc) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found -in without argument." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return -1;
|
||||
}
|
||||
inputFln = argv[i+1];
|
||||
i++;
|
||||
} else { // error
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found unexpected command line element '" << argv[i] << "'" << std::endl;
|
||||
std::cerr << std::endl;
|
||||
addRun_syntax();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// test for usage1 or usage2
|
||||
if (inputFln.empty() && (runList.size() == 0)) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** essential input for usage1 and usage2 is missing." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
addRun_syntax();
|
||||
return -3;
|
||||
}
|
||||
if (!inputFln.empty() && (runList.size() > 0)) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** cannot decide if usage1 or usage2." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
addRun_syntax();
|
||||
return -3;
|
||||
}
|
||||
|
||||
// read startup file
|
||||
char startup_path_name[128];
|
||||
TSAXParser *saxParser = new TSAXParser();
|
||||
PStartupHandler *startupHandler = new PStartupHandler();
|
||||
if (!startupHandler->StartupFileFound()) {
|
||||
std::cerr << std::endl << ">> addRun **WARNING** couldn't find " << startupHandler->GetStartupFilePath().Data();
|
||||
std::cerr << std::endl;
|
||||
// clean up
|
||||
if (saxParser) {
|
||||
delete saxParser;
|
||||
saxParser = nullptr;
|
||||
}
|
||||
if (startupHandler) {
|
||||
delete startupHandler;
|
||||
startupHandler = nullptr;
|
||||
}
|
||||
} else {
|
||||
strcpy(startup_path_name, startupHandler->GetStartupFilePath().Data());
|
||||
saxParser->ConnectToHandler("PStartupHandler", startupHandler);
|
||||
//status = saxParser->ParseFile(startup_path_name);
|
||||
// parsing the file as above seems to lead to problems in certain environments;
|
||||
// use the parseXmlFile function instead (see PStartupHandler.cpp for the definition)
|
||||
status = parseXmlFile(saxParser, startup_path_name);
|
||||
// check for parse errors
|
||||
if (status) { // error
|
||||
std::cerr << std::endl << ">> addRun **WARNING** Reading/parsing musrfit_startup.xml failed.";
|
||||
std::cerr << std::endl;
|
||||
// clean up
|
||||
if (saxParser) {
|
||||
delete saxParser;
|
||||
saxParser = nullptr;
|
||||
}
|
||||
if (startupHandler) {
|
||||
delete startupHandler;
|
||||
startupHandler = nullptr;
|
||||
}
|
||||
} else {
|
||||
startupHandler->CheckLists();
|
||||
}
|
||||
}
|
||||
|
||||
// additional tests needed for usage1 (currently for PSI use only)
|
||||
if (runList.size() > 0) {
|
||||
if (t0.empty()) {
|
||||
std::cout << ">> t0 not provided.";
|
||||
} else {
|
||||
std::cout << ">> t0: ";
|
||||
for (int i=0; i<t0.size(); i++)
|
||||
std::cout << t0[i] << ", ";
|
||||
}
|
||||
std::cout << std::endl;
|
||||
std::cout << ">> format: " << format << std::endl;
|
||||
std::cout << ">> year: " << year << std::endl;
|
||||
std::cout << ">> instrument: " << instrument << std::endl;
|
||||
std::cout << ">> fln out: " << flnOut << std::endl;
|
||||
std::cout << ">> runList: ";
|
||||
for (int i=0; i<runList.size(); i++)
|
||||
std::cout << runList[i] << ", ";
|
||||
std::cout << std::endl;
|
||||
|
||||
PAddRunInfo addRun;
|
||||
addRun.fT0 = t0;
|
||||
addRun.fFileFormat = format;
|
||||
// construct file names
|
||||
for (int i=0; i<runList.size(); i++) {
|
||||
PFindRun findRun(startupHandler->GetDataPathList(), startupHandler->GetRunNameTemplateList(), instrument, yearNum, runList[i]);
|
||||
if (findRun.FoundPathName()) {
|
||||
std::cout << ">> found path name: " << findRun.GetPathName() << std::endl;
|
||||
addRun.fPathFileName = findRun.GetPathName();
|
||||
addRunInfo.push_back(addRun);
|
||||
} else {
|
||||
std::cout << "**WARNING** run: " << runList[i] << " for instrument '" << instrument << "' and year '" << year << "' not found" << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// additional tests needed for usage2
|
||||
if (!inputFln.empty()) {
|
||||
// check if file exists
|
||||
if (!boost::filesystem::exists(inputFln)) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** file '" << inputFln << "' seems not to exist." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return -1;
|
||||
}
|
||||
// read input-file and data sets
|
||||
if (!addRun_readInputFiles(inputFln, addRunInfo)) {
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i=0; i<addRunInfo.size(); i++) {
|
||||
std::cout << ">> run " << i+1 << ": " << std::endl;
|
||||
std::cout << ">> fln : " << addRunInfo[i].fPathFileName << std::endl;
|
||||
if (addRunInfo[i].fT0.empty()) {
|
||||
std::cout << ">> t0 not provided.";
|
||||
} else {
|
||||
std::cout << ">> t0: ";
|
||||
for (int j=0; j<addRunInfo[i].fT0.size(); j++) {
|
||||
std::cout << addRunInfo[i].fT0[j] << ", ";
|
||||
}
|
||||
}
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
// load the files
|
||||
std::vector<PRunDataHandler*> runDataHandler;
|
||||
runDataHandler.resize(addRunInfo.size());
|
||||
Bool_t isGood{true};
|
||||
for (UInt_t i=0; i<runDataHandler.size(); i++) {
|
||||
if (startupHandler != nullptr) {
|
||||
runDataHandler[i] = new PRunDataHandler(addRunInfo[i].fPathFileName, addRunInfo[i].fFileFormat, startupHandler->GetDataPathList());
|
||||
if (runDataHandler[i] == nullptr) {
|
||||
isGood = false;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** couldn't invoke PRunDataHandler (i=" << i << ")." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
break;
|
||||
}
|
||||
runDataHandler[i]->ReadData();
|
||||
if (!runDataHandler[i]->IsAllDataAvailable()) {
|
||||
isGood = false;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** couldn't read data for PRunDataHandler (i=" << i << ")." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
runDataHandler[i] = new PRunDataHandler(addRunInfo[i].fPathFileName, addRunInfo[i].fFileFormat);
|
||||
if (runDataHandler[i] == nullptr) {
|
||||
isGood = false;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** couldn't invoke PRunDataHandler (i=" << i << ")." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
break;
|
||||
}
|
||||
runDataHandler[i]->ReadData();
|
||||
if (!runDataHandler[i]->IsAllDataAvailable()) {
|
||||
isGood = false;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** couldn't read data for PRunDataHandler (i=" << i << ")." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// make sure that the number of provided t0's are matching the number of histos from the run-file
|
||||
|
||||
// 1st make sure all the runs have the same number run data (==1 here)
|
||||
PAny2ManyInfo *info{nullptr};
|
||||
PRunDataHandler *dataOut{nullptr};
|
||||
if (isGood) {
|
||||
for (UInt_t i=1; i<runDataHandler.size(); i++) {
|
||||
if (runDataHandler[0]->GetNoOfRunData() != runDataHandler[i]->GetNoOfRunData()) {
|
||||
isGood = false;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** can only handle same number of run data per run handler." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
info = new PAny2ManyInfo();
|
||||
if (info == nullptr) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** couldn't invoke PAny2ManyInfo." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
isGood = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (isGood) {
|
||||
// prepare for the new added run data sets
|
||||
info->outFormat = format;
|
||||
info->year = year;
|
||||
info->outFileName = flnOut;
|
||||
dataOut = new PRunDataHandler(info);
|
||||
if (dataOut == nullptr) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** couldn't invoke PRunDataHandler for the output file." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
isGood = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (isGood) {
|
||||
// check that all runs have the same number of histograms
|
||||
for (UInt_t i=1; i<runDataHandler.size(); i++) {
|
||||
if (runDataHandler[0]->GetRunData()->GetNoOfHistos() != runDataHandler[0]->GetRunData()->GetNoOfHistos()) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** can only add runs with the same number of histograms." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
isGood = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isGood) {
|
||||
// add all the runs
|
||||
// take first run as the reference for the data
|
||||
std::vector<PDoubleVector*> addedHistos;
|
||||
addedHistos.resize(runDataHandler[0]->GetRunData()->GetNoOfHistos());
|
||||
for (UInt_t i=0; i<runDataHandler[0]->GetRunData()->GetNoOfHistos(); i++) {
|
||||
addedHistos[i] = runDataHandler[0]->GetRunData()->GetDataSet(i, false)->GetData();
|
||||
}
|
||||
// get the t0's for all the reference histos
|
||||
PIntVector t0Vec;
|
||||
t0Vec.resize(runDataHandler[0]->GetRunData()->GetNoOfHistos());
|
||||
if (addRunInfo[0].fT0.empty()) { // i.e. take t0's from data file
|
||||
for (UInt_t i=0; i<runDataHandler[0]->GetRunData()->GetNoOfHistos(); i++) {
|
||||
t0Vec[i] = runDataHandler[0]->GetRunData()->GetT0Bin(i+1);
|
||||
}
|
||||
addRunInfo[0].fT0 = t0Vec;
|
||||
} else { // t0 vector present
|
||||
// make sure that the number of t0's fit the number of histos
|
||||
if (addRunInfo[0].fT0.size() < runDataHandler[0]->GetRunData()->GetNoOfHistos()) {
|
||||
UInt_t counts=runDataHandler[0]->GetRunData()->GetNoOfHistos()-addRunInfo[0].fT0.size();
|
||||
for (UInt_t i=0; i<counts; i++)
|
||||
addRunInfo[0].fT0.push_back(0);
|
||||
}
|
||||
// check t0 data
|
||||
for (UInt_t i=0; i<addRunInfo[0].fT0.size(); i++) {
|
||||
if (addRunInfo[0].fT0[i] == 0) { // get t0 from file
|
||||
addRunInfo[0].fT0[i] = runDataHandler[0]->GetRunData()->GetT0Bin(i+1);
|
||||
} else if (addRunInfo[0].fT0[i] == -1) { // get t0 from prompt peak
|
||||
addRunInfo[0].fT0[i] = addRun_getPromptPeakPos(runDataHandler[0]->GetRunData()->GetDataSet(i, false)->GetData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// loop over the remaining runs, determine t0's if needed and add the data
|
||||
for (int i=1; i<runDataHandler.size(); i++) {
|
||||
// get the t0's for all the histos of a run to be added
|
||||
PIntVector t0Vec;
|
||||
t0Vec.resize(runDataHandler[i]->GetRunData()->GetNoOfHistos());
|
||||
if (addRunInfo[i].fT0.empty()) { // i.e. take t0's from data file
|
||||
for (UInt_t j=0; j<runDataHandler[i]->GetRunData()->GetNoOfHistos(); j++) {
|
||||
t0Vec[j] = runDataHandler[i]->GetRunData()->GetT0Bin(j+1);
|
||||
}
|
||||
addRunInfo[i].fT0 = t0Vec;
|
||||
} else { // t0 vector present
|
||||
// make sure that the number of t0's fit the number of histos
|
||||
if (addRunInfo[i].fT0.size() < runDataHandler[i]->GetRunData()->GetNoOfHistos()) {
|
||||
UInt_t counts=runDataHandler[i]->GetRunData()->GetNoOfHistos()-addRunInfo[i].fT0.size();
|
||||
for (UInt_t j=0; j<counts; j++)
|
||||
addRunInfo[i].fT0.push_back(0);
|
||||
}
|
||||
// check t0 data
|
||||
for (UInt_t j=0; j<addRunInfo[i].fT0.size(); j++) {
|
||||
if (addRunInfo[i].fT0[j] == 0) { // get t0 from file
|
||||
addRunInfo[i].fT0[j] = runDataHandler[i]->GetRunData()->GetT0Bin(j+1);
|
||||
} else if (addRunInfo[i].fT0[j] == -1) { // get t0 from prompt peak
|
||||
addRunInfo[i].fT0[j] = addRun_getPromptPeakPos(runDataHandler[i]->GetRunData()->GetDataSet(j, false)->GetData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// calculate the offset due to potential differences in t0's between runs
|
||||
PIntVector diff;
|
||||
diff.resize(addRunInfo[i].fT0.size());
|
||||
for (UInt_t j=0; j<diff.size(); j++) {
|
||||
diff[j] = addRunInfo[i].fT0[j] - addRunInfo[0].fT0[j];
|
||||
}
|
||||
|
||||
// add all the to be added histos of all remaining runs
|
||||
PDoubleVector *addData{nullptr};
|
||||
Int_t idx;
|
||||
for (int j=0; j<runDataHandler[i]->GetRunData()->GetNoOfHistos(); j++) { // loop over all histos
|
||||
addData = runDataHandler[i]->GetRunData()->GetDataSet(j, false)->GetData();
|
||||
for (int k=0; k<addedHistos[j]->size(); k++) { // loop over all elements of a histo
|
||||
idx = k + diff[j];
|
||||
if ((idx >= 0) && (idx < addData->size())) {
|
||||
addedHistos[j]->at(k) += addData->at(idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// feed all the necessary information for the data file
|
||||
PRawRunData *rawRunData = new PRawRunData();
|
||||
rawRunData = runDataHandler[0]->GetRunData(); // copy all
|
||||
rawRunData->SetGenerator("addRun");
|
||||
// overwrite the t0 values with the new ones
|
||||
for (UInt_t i=0; i<rawRunData->GetNoOfHistos(); i++) {
|
||||
rawRunData->GetDataSet(i, false)->SetTimeZeroBin(addRunInfo[0].fT0[i]);
|
||||
}
|
||||
// write histos
|
||||
for (UInt_t i=0; i<rawRunData->GetNoOfHistos(); i++) {
|
||||
rawRunData->GetDataSet(i, false)->SetData(*addedHistos[i]);
|
||||
}
|
||||
|
||||
// feed run data handler with new data
|
||||
if (dataOut->SetRunData(rawRunData)) {
|
||||
// write output file
|
||||
dataOut->WriteData();
|
||||
}
|
||||
}
|
||||
|
||||
// clean up
|
||||
if (startupHandler) {
|
||||
delete startupHandler;
|
||||
}
|
||||
if (info) {
|
||||
delete info;
|
||||
}
|
||||
if (dataOut) {
|
||||
delete dataOut;
|
||||
}
|
||||
for (int i=0; i<runDataHandler.size(); i++) {
|
||||
if (runDataHandler[i])
|
||||
delete runDataHandler[i];
|
||||
}
|
||||
runDataHandler.clear();
|
||||
|
||||
return PMUSR_SUCCESS;
|
||||
}
|
||||
@@ -66,9 +66,12 @@ void any2many_syntax()
|
||||
std::cout << std::endl << " e.g. 2010/lem10_his_0111.root 2010/lem10_his_0112.root";
|
||||
std::cout << std::endl << " -o <outputFileName> : this option only makes sense, if <filenameList-input>";
|
||||
std::cout << std::endl << " is a single input file name!";
|
||||
std::cout << std::endl << " -r <runList-input> : where <runList-input> is a list of run numbers";
|
||||
std::cout << std::endl << " separated by spaces ' ' of the form: <run1> <run2> <run3>";
|
||||
std::cout << std::endl << " etc., or a sequence of runs <runStart>-<runEnd>, e.g. 111-222";
|
||||
std::cout << std::endl << " -r <runList-input> : can be:";
|
||||
std::cout << std::endl << " (i) <run0>, <run1>, <run2>, ... <runN> : run numbers, e.g. 123 124";
|
||||
std::cout << std::endl << " (ii) <run0>-<runN> : a range, e.g. 123-125 -> 123 124 125";
|
||||
std::cout << std::endl << " (iii) <run0>:<runN>:<step> : a sequence, e.g. 123:127:2 -> 123 125 127";
|
||||
std::cout << std::endl << " <step> will give the step width and has to be a positive number!";
|
||||
std::cout << std::endl << " a <runList> can also combine (i)-(iii), e.g. 123 128-130 133, etc.";
|
||||
std::cout << std::endl << " -t <in-template> <out-template> : ";
|
||||
std::cout << std::endl << " <in-/out-template> : template file name. Needed for run-lists in";
|
||||
std::cout << std::endl << " order to generate the proper file names. The following template";
|
||||
@@ -280,34 +283,30 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
} else if (!strcmp(argv[i], "-r")) {
|
||||
if (i+1 < argc) {
|
||||
// first check for run list sequence of the form <runStartNo>-<runEndNo>
|
||||
int startNo, endNo;
|
||||
status = sscanf(argv[i+1], "%d-%d", &startNo, &endNo);
|
||||
if (status == 2) { // this is run list sequence
|
||||
if (endNo < startNo) {
|
||||
ival = startNo;
|
||||
startNo = endNo;
|
||||
endNo = ival;
|
||||
}
|
||||
for (int j=startNo; j<=endNo; j++)
|
||||
info.runList.push_back(j);
|
||||
i++;
|
||||
} else { // check for run list of the form <run1> <run2> ... <runN>
|
||||
bool done = false;
|
||||
int j = i+1;
|
||||
do {
|
||||
status = sscanf(argv[j], "%d", &ival);
|
||||
if (status == 1) {
|
||||
info.runList.push_back(ival);
|
||||
j++;
|
||||
} else {
|
||||
done = true;
|
||||
}
|
||||
} while (!done && (j<argc));
|
||||
i = j-1;
|
||||
if (j >= argc) // make sure that counter is still in range
|
||||
int pos{i+1};
|
||||
std::string runStr{""};
|
||||
// collect run list string from input
|
||||
for (int j=i+1; j<argc; j++) {
|
||||
pos = j;
|
||||
if ((argv[j][0] == '-') && isalpha(argv[j][1])) { // next command
|
||||
pos = j-1;
|
||||
break;
|
||||
} else {
|
||||
runStr += argv[j];
|
||||
runStr += " ";
|
||||
}
|
||||
}
|
||||
// extract run list from string
|
||||
PStringNumberList rl(runStr);
|
||||
std::string errMsg{""};
|
||||
if (!rl.Parse(errMsg)) {
|
||||
std::cerr << "**ERROR** in run list: -rl " << runStr << std::endl;
|
||||
std::cerr << errMsg << std::endl;
|
||||
return PMUSR_WRONG_STARTUP_SYNTAX;
|
||||
}
|
||||
info.runList = rl.GetList();
|
||||
// move the argument counter to the proper position
|
||||
i = pos;
|
||||
} else {
|
||||
std::cerr << std::endl << ">> any2many **ERROR** found input option '-r' without any arguments" << std::endl;
|
||||
show_syntax = true;
|
||||
|
||||
@@ -12,7 +12,7 @@ root_generate_dictionary(
|
||||
PFourierCanvas.h
|
||||
OPTIONS
|
||||
-I${MUSRFIT_INC}
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${FFTW3_INCLUDE}
|
||||
-inlineInputHeader
|
||||
LINKDEF ${MUSRFIT_INC}/PFourierCanvasLinkDef.h
|
||||
MODULE PFourierCanvas
|
||||
@@ -22,7 +22,7 @@ root_generate_dictionary(
|
||||
PMusrCanvas.h
|
||||
LINKDEF ${MUSRFIT_INC}/PMusrCanvasLinkDef.h
|
||||
OPTIONS
|
||||
-I${Boost_INCLUDE_DIR} -I${FFTW3_INCLUDE_DIR} -I${MUSRFIT_INC}
|
||||
-I${Boost_INCLUDE_DIR} -I${FFTW3_INCLUDE} -I${MUSRFIT_INC}
|
||||
-inlineInputHeader
|
||||
MODULE PMusrCanvas
|
||||
)
|
||||
@@ -31,7 +31,7 @@ root_generate_dictionary(
|
||||
PMusrT0.h
|
||||
LINKDEF ${MUSRFIT_INC}/PMusrT0LinkDef.h
|
||||
OPTIONS
|
||||
-I${Boost_INCLUDE_DIR} -I${FFTW3_INCLUDE_DIR} -I${MUSRFIT_INC}
|
||||
-I${Boost_INCLUDE_DIR} -I${FFTW3_INCLUDE} -I${MUSRFIT_INC}
|
||||
-inlineInputHeader
|
||||
MODULE PMusrT0
|
||||
)
|
||||
@@ -40,7 +40,7 @@ root_generate_dictionary(
|
||||
PStartupHandler.h
|
||||
LINKDEF ${MUSRFIT_INC}/PStartupHandlerLinkDef.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR} -I${MUSRFIT_INC}
|
||||
-I${FFTW3_INCLUDE} -I${MUSRFIT_INC}
|
||||
-inlineInputHeader
|
||||
MODULE PStartupHandler
|
||||
)
|
||||
@@ -50,7 +50,7 @@ root_generate_dictionary(
|
||||
LINKDEF ${MUSRFIT_INC}/PUserFcnBaseLinkDef.h
|
||||
OPTIONS
|
||||
-inlineInputHeader
|
||||
-I${FFTW3_INCLUDE_DIR} -I${MUSRFIT_INC}
|
||||
-I${FFTW3_INCLUDE} -I${MUSRFIT_INC}
|
||||
MODULE PUserFcnBase
|
||||
)
|
||||
root_generate_dictionary(
|
||||
@@ -59,7 +59,7 @@ root_generate_dictionary(
|
||||
OPTIONS
|
||||
-I${NONLOCAL_INC}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${FFTW3_INCLUDE}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-inlineInputHeader
|
||||
LINKDEF ${MUSRFIT_INC}/PRgeHandlerLinkDef.h
|
||||
@@ -82,6 +82,7 @@ configure_file("PRgeHandler.pc.in" "PRgeHandler.pc" @ONLY)
|
||||
|
||||
#--- lib creation -------------------------------------------------------------
|
||||
add_library(PMusr SHARED
|
||||
PFindRun.cpp
|
||||
PFitter.cpp
|
||||
PFitterFcn.cpp
|
||||
PFourier.cpp
|
||||
@@ -117,7 +118,7 @@ add_library(PMusr SHARED
|
||||
target_include_directories(
|
||||
PMusr BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${NEXUS_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/external/MusrRoot>
|
||||
@@ -153,11 +154,14 @@ set_target_properties(PRgeHandler
|
||||
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PUserFcnBase BEFORE PRIVATE $<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
PUserFcnBase BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
)
|
||||
|
||||
target_include_directories(
|
||||
PRgeHandler BEFORE PRIVATE $<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
PRgeHandler BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
)
|
||||
|
||||
#--- add ROOT Version >= 6.24 compile options if needed -----------------------
|
||||
@@ -172,7 +176,8 @@ endif (OpenMP_FOUND)
|
||||
|
||||
#--- add library dependencies -------------------------------------------------
|
||||
set(DependOnLibs ${ROOT_LIBARIES})
|
||||
set(DependOnLibs ${DependOnLibs} ${FFTW3_LIBRARY})
|
||||
#set(DependOnLibs ${DependOnLibs} ${FFTW3_LIBRARY})
|
||||
set(DependOnLibs ${DependOnLibs} FFTW3::FFTW3)
|
||||
set(DependOnLibs ${DependOnLibs} PUserFcnBase)
|
||||
set(DependOnLibs ${DependOnLibs} mud)
|
||||
set(DependOnLibs ${DependOnLibs} TMusrRunHeader)
|
||||
@@ -192,7 +197,7 @@ endif (OpenMP_FOUND)
|
||||
|
||||
target_link_libraries(PUserFcnBase ${ROOT_LIBRARIES})
|
||||
target_link_libraries(PRgeHandler ${Boost_LIBRARIES} ${ROOT_LIBRARIES})
|
||||
target_link_libraries(PMusr ${DependOnLibs})
|
||||
target_link_libraries(PMusr ${Boost_LIBRARIES} ${DependOnLibs})
|
||||
|
||||
#--- install PUserFcnBase solib -----------------------------------------------
|
||||
install(TARGETS PUserFcnBase DESTINATION lib)
|
||||
|
||||
149
src/classes/PFindRun.cpp
Normal file
@@ -0,0 +1,149 @@
|
||||
/***************************************************************************
|
||||
|
||||
PFindRun.cpp
|
||||
|
||||
Author: Andreas Suter
|
||||
e-mail: andreas.suter@psi.ch
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2022 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 <boost/filesystem.hpp>
|
||||
|
||||
#include "PFindRun.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief PFindRun::PFindRun
|
||||
* @param runNameTemplateList
|
||||
*/
|
||||
PFindRun::PFindRun(const PStringVector path, const PRunNameTemplateList runNameTemplateList) :
|
||||
fPath(path), fRunNameTemplateList(runNameTemplateList)
|
||||
{
|
||||
// nothing to be done here
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief PFindRun::PFindRun
|
||||
*
|
||||
* @param path
|
||||
* @param runNameTemplateList
|
||||
* @param instrument
|
||||
* @param year
|
||||
* @param run
|
||||
*/
|
||||
PFindRun::PFindRun(const PStringVector path, const PRunNameTemplateList runNameTemplateList,
|
||||
const TString &instrument, const UInt_t year, const UInt_t run) :
|
||||
fPath(path), fRunNameTemplateList(runNameTemplateList), fInstrument(instrument), fYear(year), fRun(run)
|
||||
{
|
||||
// nothing to be done here
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief PFindRun::DumpTemplateList
|
||||
*/
|
||||
void PFindRun::DumpTemplateList()
|
||||
{
|
||||
std::cout << "debug> instrument: " << fInstrument << std::endl;
|
||||
std::cout << "debug> year: " << fYear << std::endl;
|
||||
std::cout << "debug> run: " << fRun << std::endl;
|
||||
std::cout << "debug> ++++" << std::endl;
|
||||
std::cout << "debug> run name template list:" << std::endl;
|
||||
for (UInt_t i=0; i<fRunNameTemplateList.size(); i++) {
|
||||
std::cout << i << ": instrument: " << fRunNameTemplateList[i].instrument << ", template: " << fRunNameTemplateList[i].runNameTemplate << std::endl;
|
||||
}
|
||||
std::cout << "debug> ++++" << std::endl;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief PFindRun::CreatePathName
|
||||
* @param path
|
||||
* @param runNameTemplate
|
||||
* @return
|
||||
*/
|
||||
TString PFindRun::CreatePathName(const TString path, const TString runNameTemplate)
|
||||
{
|
||||
TString pathName{""};
|
||||
TString runName = runNameTemplate;
|
||||
TString yearStr = TString::Format("%d", fYear);
|
||||
TString yyStr;
|
||||
if (fYear < 2000)
|
||||
yyStr = TString::Format("%02d", fYear-1900);
|
||||
else
|
||||
yyStr = TString::Format("%02d", fYear-2000);
|
||||
runName.ReplaceAll("%yyyy%", yearStr);
|
||||
runName.ReplaceAll("%yy%", yyStr);
|
||||
|
||||
// run handling slightly more complicated, since various number of digits possible
|
||||
Int_t idx=-1;
|
||||
TString rr{""};
|
||||
for (Int_t i=2; i<10; i++) {
|
||||
rr ="%";
|
||||
for (Int_t j=0; j<i; j++)
|
||||
rr += "r";
|
||||
rr += "%";
|
||||
if (runName.Index(rr) != -1) {
|
||||
idx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
TString format = TString::Format("%%0%dd", idx);
|
||||
TString runStr = TString::Format(format, fRun);
|
||||
|
||||
if (idx != -1)
|
||||
runName.ReplaceAll(rr, runStr);
|
||||
|
||||
pathName = path;
|
||||
pathName += "/";
|
||||
pathName += runName;
|
||||
|
||||
return pathName;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief PFindRun::FoundPathName
|
||||
* @return
|
||||
*/
|
||||
Bool_t PFindRun::FoundPathName()
|
||||
{
|
||||
// find instrument name in path list
|
||||
TString pathName{""};
|
||||
for (Int_t i=0; i<fPath.size(); i++) {
|
||||
if (fPath[i].Index(fInstrument) != -1) {
|
||||
for (Int_t j=0; j<fRunNameTemplateList.size(); j++) {
|
||||
if (fRunNameTemplateList[j].instrument == fInstrument) {
|
||||
pathName = CreatePathName(fPath[i], fRunNameTemplateList[j].runNameTemplate);
|
||||
if (boost::filesystem::exists(pathName.Data())) {
|
||||
fPathName = pathName;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -361,7 +361,6 @@ void PFitter::GetPhaseParams()
|
||||
fPhase.resize(fRunInfo->GetNoOfParams());
|
||||
for (unsigned int i=0; i<fPhase.size(); i++)
|
||||
fPhase[i] = false;
|
||||
std::cout << "debug> fPhase.size()=" << fPhase.size() << std::endl;
|
||||
|
||||
// analyze theory block for parameters. Phases are present in the following
|
||||
// default functions:
|
||||
@@ -379,16 +378,13 @@ void PFitter::GetPhaseParams()
|
||||
line.Contains("skewedGss") || line.Contains("skg ") ||
|
||||
line.Contains("staticNKTF") || line.Contains("snktf ") ||
|
||||
line.Contains("dynamicNKTF") || line.Contains("dnktf ")) { // phase is 1st param
|
||||
std::cout << "debug> line: " << line.View() << std::endl;
|
||||
pos = 1;
|
||||
}
|
||||
if (line.Contains("internFld") || line.Contains("if ") ||
|
||||
line.Contains("internBsl") || line.Contains("ib ")) { // phase is 2nd param
|
||||
std::cout << "debug> line: " << line.View() << std::endl;
|
||||
pos = 2;
|
||||
}
|
||||
if (line.Contains("muMinusExpTF") || line.Contains("mmsetf ")) { // phase is 5th param
|
||||
std::cout << "debug> line: " << line.View() << std::endl;
|
||||
pos = 5;
|
||||
}
|
||||
|
||||
@@ -404,7 +400,6 @@ void PFitter::GetPhaseParams()
|
||||
if (tok->GetEntries() > pos) {
|
||||
ostr = dynamic_cast<TObjString*>(tok->At(pos));
|
||||
str = ostr->GetString();
|
||||
std::cout << "debug>> ostr=" << str.View() << std::endl;
|
||||
}
|
||||
// clean up
|
||||
delete tok;
|
||||
@@ -414,20 +409,17 @@ void PFitter::GetPhaseParams()
|
||||
if (str.Contains("fun")) { // function
|
||||
PIntVector parVec = GetParFromFun(str);
|
||||
for (int i=0; i<parVec.size(); i++) {
|
||||
std::cout << "debug> par from fun: " << parVec[i] << std::endl;
|
||||
if (parVec[i] <= fRunInfo->GetNoOfParams())
|
||||
fPhase[parVec[i]-1] = true;
|
||||
}
|
||||
} else if (str.Contains("map")) { // map
|
||||
PIntVector parVec = GetParFromMap(str);
|
||||
for (int i=0; i<parVec.size(); i++) {
|
||||
std::cout << "debug> par from map: " << parVec[i] << std::endl;
|
||||
if (parVec[i] <= fRunInfo->GetNoOfParams())
|
||||
fPhase[parVec[i]-1] = true;
|
||||
}
|
||||
} else { // must be a number
|
||||
int idx = str.Atoi();
|
||||
std::cout << "debug> idx=" << idx << std::endl;
|
||||
if (idx == 0) { // something went wrong, str is not an integer
|
||||
std::cerr << "PFitter::GetPhaseParams(): **ERROR** str=" << str.View() << " is not an integer!" << std::endl;
|
||||
return;
|
||||
@@ -440,9 +432,6 @@ void PFitter::GetPhaseParams()
|
||||
fPhase[idx] = true;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i=0; i<fPhase.size(); i++)
|
||||
std::cout << i+1 << ": " << fPhase[i] << std::endl;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -466,7 +455,6 @@ PIntVector PFitter::GetParFromFun(const TString funStr)
|
||||
|
||||
for (int i=0; i<funList->size(); i++) {
|
||||
if (funList->at(i).fLine.Contains(funStr)) {
|
||||
std::cout << "debug> funList " << i << ": " << funList->at(i).fLine.View() << std::endl;
|
||||
// tokenize function string
|
||||
tok = funList->at(i).fLine.Tokenize(" =+-*/");
|
||||
if (tok == nullptr) {
|
||||
@@ -479,7 +467,6 @@ PIntVector PFitter::GetParFromFun(const TString funStr)
|
||||
str = ostr->GetString();
|
||||
// parse tok for parX
|
||||
if (str.Contains("par")) {
|
||||
std::cout << "debug> fun tok contains par: " << str.View() << std::endl;
|
||||
// find start idx of par in token
|
||||
Ssiz_t idx = str.Index("par");
|
||||
idx += 3;
|
||||
@@ -487,12 +474,10 @@ PIntVector PFitter::GetParFromFun(const TString funStr)
|
||||
do {
|
||||
parStr += str[idx];
|
||||
} while (isdigit(str[idx++]));
|
||||
std::cout << "debug> par idx = " << parStr.View() << std::endl;
|
||||
parVec.push_back(parStr.Atoi());
|
||||
}
|
||||
// parse tok for mapX
|
||||
if (str.Contains("map")) {
|
||||
std::cout << "debug> fun tok contains map: " << str.View() << std::endl;
|
||||
// find start idx of par in token
|
||||
Ssiz_t idx = str.Index("map");
|
||||
idx += 3;
|
||||
@@ -500,7 +485,6 @@ PIntVector PFitter::GetParFromFun(const TString funStr)
|
||||
do {
|
||||
mapStr += str[idx];
|
||||
} while (isdigit(str[idx++]));
|
||||
std::cout << "debug> map string from fun: " << mapStr.View() << std::endl;
|
||||
PIntVector mapParVec = GetParFromMap(mapStr);
|
||||
for (int k=0; k<mapParVec.size(); k++) {
|
||||
parVec.push_back(mapParVec[k]);
|
||||
@@ -533,7 +517,6 @@ PIntVector PFitter::GetParFromMap(const TString mapStr)
|
||||
|
||||
TString str = mapStr;
|
||||
str.Remove(0,3); // remove map from string
|
||||
std::cout << "debug> mapX: X=" << str << std::endl;
|
||||
|
||||
int idx=str.Atoi();
|
||||
if (idx == 0) {
|
||||
@@ -747,7 +730,7 @@ Bool_t PFitter::DoFit()
|
||||
|
||||
// debugging information
|
||||
#ifdef HAVE_GOMP
|
||||
std::cout << std::endl << ">> Number of available threads for the function optimization: " << omp_get_num_procs() << std::endl;
|
||||
std::cout << std::endl << ">> Number of available threads for the function optimization: " << omp_get_max_threads() << std::endl;
|
||||
#endif
|
||||
|
||||
// real fit wanted
|
||||
|
||||
@@ -1308,7 +1308,9 @@ bool PMsr2Data::PrepareGlobalInputFile(unsigned int tempRun, const std::string &
|
||||
std::ostringstream oss;
|
||||
oss << path << "musrfit" << " " << *fRunVectorIter << "-OneRunFit" << fFileExtension << ".msr";
|
||||
std::cout << std::endl << ">> msr2data: **INFO** Calling " << oss.str() << std::endl;
|
||||
system(oss.str().c_str());
|
||||
if (system(oss.str().c_str()) == -1) {
|
||||
std::cerr << std::endl << "**ERROR** system call: " << oss.str().c_str() << " failed." << std::endl;
|
||||
}
|
||||
|
||||
++fRunVectorIter;
|
||||
}
|
||||
|
||||
@@ -1827,12 +1827,7 @@ Int_t PMsrHandler::WriteMsrFile(const Char_t *filename, std::map<UInt_t, TString
|
||||
if (fGlobal.GetFitRange(j) == -1)
|
||||
break;
|
||||
UInt_t neededWidth = 7;
|
||||
UInt_t neededPrec = 2;
|
||||
if (fGlobal.GetFitRange(j) > 0.0) { // global fit range present
|
||||
LastSignificant(fGlobal.GetFitRange(j));
|
||||
} else { // global fit range absent
|
||||
neededPrec = LastSignificant(fRuns[i].GetFitRange(j));
|
||||
}
|
||||
UInt_t neededPrec = LastSignificant(fGlobal.GetFitRange(j));
|
||||
fout.width(neededWidth);
|
||||
fout.precision(neededPrec);
|
||||
fout << std::left << std::fixed << fGlobal.GetFitRange(j);
|
||||
@@ -3868,7 +3863,7 @@ Bool_t PMsrHandler::FilterNumber(TString str, const Char_t *filter, Int_t offset
|
||||
Char_t *cstr, filterStr[32];
|
||||
cstr = new Char_t[str.Sizeof()];
|
||||
strncpy(cstr, str.Data(), str.Sizeof());
|
||||
sprintf(filterStr, "%s%%d", filter);
|
||||
snprintf(filterStr, sizeof(filterStr), "%s%%d", filter);
|
||||
|
||||
// get number if present
|
||||
found = sscanf(cstr, filterStr, &no_found);
|
||||
@@ -6614,7 +6609,7 @@ UInt_t PMsrHandler::LastSignificant(Double_t dval, UInt_t precLimit)
|
||||
|
||||
char str[128];
|
||||
|
||||
sprintf(str, "%lf", dval);
|
||||
snprintf(str, sizeof(str), "%lf", dval);
|
||||
|
||||
// find decimal point
|
||||
for (UInt_t i=0; i<strlen(str); i++) {
|
||||
@@ -6728,9 +6723,9 @@ TString PMsrHandler::BeautifyFourierPhaseParameterString()
|
||||
|
||||
if (phaseIter) {
|
||||
if (phaseRef != -1) {
|
||||
str = TString::Format("parR(%d, %d, %d)", fFourier.fPhaseParamNo[0], offset, fFourier.fPhaseParamNo.size());
|
||||
str = TString::Format("parR(%d, %d, %lu)", fFourier.fPhaseParamNo[0], offset, fFourier.fPhaseParamNo.size());
|
||||
} else {
|
||||
str = TString::Format("par(%d, %d, %d)", fFourier.fPhaseParamNo[0], offset, fFourier.fPhaseParamNo.size());
|
||||
str = TString::Format("par(%d, %d, %lu)", fFourier.fPhaseParamNo[0], offset, fFourier.fPhaseParamNo.size());
|
||||
}
|
||||
} else {
|
||||
str = TString("");
|
||||
|
||||
@@ -543,7 +543,7 @@ void PMusrCanvas::UpdateParamTheoryPad()
|
||||
for (UInt_t i=0; i<param.size(); i++) {
|
||||
str = "";
|
||||
accuracy = GetNeededAccuracy(param[i]);
|
||||
sprintf(accStr, "%%.%dlf", accuracy);
|
||||
snprintf(accStr, sizeof(accStr), "%%.%dlf", accuracy);
|
||||
// parameter no
|
||||
str += param[i].fNo;
|
||||
if (param[i].fNo<10)
|
||||
@@ -556,9 +556,9 @@ void PMusrCanvas::UpdateParamTheoryPad()
|
||||
str += " ";
|
||||
// parameter value
|
||||
if (round(param[i].fValue)-param[i].fValue==0)
|
||||
sprintf(cnum, "%.1lf", param[i].fValue);
|
||||
snprintf(cnum, sizeof(cnum), "%.1lf", param[i].fValue);
|
||||
else
|
||||
sprintf(cnum, accStr, param[i].fValue);
|
||||
snprintf(cnum, sizeof(cnum), accStr, param[i].fValue);
|
||||
str += cnum;
|
||||
for (Int_t j=0; j<9-(Int_t)strlen(cnum); j++) // fill spaces
|
||||
str += " ";
|
||||
@@ -572,22 +572,22 @@ void PMusrCanvas::UpdateParamTheoryPad()
|
||||
if ((fabs(fabs(param[i].fStep) - param[i].fPosError) < 0.1*fabs(param[i].fStep)) &&
|
||||
(fabs(fabs(param[i].fStep) - param[i].fPosError) < 0.1*param[i].fPosError)) {
|
||||
if (round(err)-err==0)
|
||||
sprintf(cnum, "%.1lf", err);
|
||||
snprintf(cnum, sizeof(cnum), "%.1lf", err);
|
||||
else
|
||||
sprintf(cnum, accStr, err);
|
||||
snprintf(cnum, sizeof(cnum), accStr, err);
|
||||
} else {
|
||||
sprintf(accStr, "%%.%dlf!!", accuracy);
|
||||
snprintf(accStr, sizeof(accStr), "%%.%dlf!!", accuracy);
|
||||
if (round(err)-err==0)
|
||||
sprintf(cnum, "%.1lf!!", err);
|
||||
snprintf(cnum, sizeof(cnum), "%.1lf!!", err);
|
||||
else
|
||||
sprintf(cnum, accStr, err);
|
||||
snprintf(cnum, sizeof(cnum), accStr, err);
|
||||
}
|
||||
str += cnum;
|
||||
} else { // minos was not used
|
||||
if (round(param[i].fStep)-param[i].fStep==0)
|
||||
sprintf(cnum, "%.1lf", param[i].fStep);
|
||||
snprintf(cnum, sizeof(cnum), "%.1lf", param[i].fStep);
|
||||
else
|
||||
sprintf(cnum, accStr, param[i].fStep);
|
||||
snprintf(cnum, sizeof(cnum), accStr, param[i].fStep);
|
||||
str += cnum;
|
||||
}
|
||||
ypos = 0.98-i*yoffset;
|
||||
@@ -936,13 +936,13 @@ void PMusrCanvas::UpdateInfoPad()
|
||||
tstr += TString("??,");
|
||||
} else if (ddvec->size() == 1){
|
||||
tstr += TString("T=");
|
||||
sprintf(sval, "%0.2lf", ddvec->at(0).first);
|
||||
snprintf(sval, sizeof(sval), "%0.2lf", ddvec->at(0).first);
|
||||
tstr += TString(sval) + TString("K,");
|
||||
} else {
|
||||
for(UInt_t i(0); i<ddvec->size(); ++i){
|
||||
sprintf(sval, "T%u=", i);
|
||||
snprintf(sval, sizeof(sval), "T%u=", i);
|
||||
tstr += TString(sval);
|
||||
sprintf(sval, "%0.2lf", ddvec->at(i).first);
|
||||
snprintf(sval, sizeof(sval), "%0.2lf", ddvec->at(i).first);
|
||||
tstr += TString(sval) + TString("K,");
|
||||
}
|
||||
}
|
||||
@@ -953,10 +953,10 @@ void PMusrCanvas::UpdateInfoPad()
|
||||
tstr += TString("??,");
|
||||
} else {
|
||||
if (dval < 1.0e4) { // Gauss makes sense as a unit
|
||||
sprintf(sval, "%0.2lf", dval);
|
||||
snprintf(sval, sizeof(sval), "%0.2lf", dval);
|
||||
tstr += TString(sval) + TString("G,");
|
||||
} else { // Tesla makes sense as a unit
|
||||
sprintf(sval, "%0.2lf", dval/1.0e4);
|
||||
snprintf(sval, sizeof(sval), "%0.2lf", dval/1.0e4);
|
||||
tstr += TString(sval) + TString("T,");
|
||||
}
|
||||
}
|
||||
@@ -967,10 +967,10 @@ void PMusrCanvas::UpdateInfoPad()
|
||||
tstr += TString("??,");
|
||||
} else {
|
||||
if (dval < 1.0e3) { // keV makes sense as a unit
|
||||
sprintf(sval, "%0.2lf", dval);
|
||||
snprintf(sval, sizeof(sval), "%0.2lf", dval);
|
||||
tstr += TString(sval) + TString("keV,");
|
||||
} else { // MeV makes sense as a unit
|
||||
sprintf(sval, "%0.2lf", dval/1.0e3);
|
||||
snprintf(sval, sizeof(sval), "%0.2lf", dval/1.0e3);
|
||||
tstr += TString(sval) + TString("MeV,");
|
||||
}
|
||||
}
|
||||
@@ -1225,7 +1225,6 @@ void PMusrCanvas::HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected)
|
||||
PlotFourierDifference();
|
||||
break;
|
||||
case kFourierDiff: // show difference between the Fourier data and the Fourier theory
|
||||
CleanupFourierDifference();
|
||||
HandleFourierDifference();
|
||||
PlotFourierDifference();
|
||||
break;
|
||||
@@ -1580,13 +1579,13 @@ void PMusrCanvas::SaveGraphicsAndQuit(Char_t *fileName, Char_t *graphicsFormat)
|
||||
}
|
||||
|
||||
if (fStartWithFourier)
|
||||
sprintf(ext, "_%d_F", fPlotNumber);
|
||||
snprintf(ext, sizeof(ext), "_%d_F", fPlotNumber);
|
||||
else
|
||||
sprintf(ext, "_%d", fPlotNumber);
|
||||
snprintf(ext, sizeof(ext), "_%d", fPlotNumber);
|
||||
str.Replace(idx, size, ext, strlen(ext));
|
||||
idx += strlen(ext);
|
||||
size = strlen(ext);
|
||||
sprintf(ext, ".%s", graphicsFormat);
|
||||
snprintf(ext, sizeof(ext), ".%s", graphicsFormat);
|
||||
str.Replace(idx, size, ext, strlen(ext));
|
||||
|
||||
std::cout << std::endl << ">> SaveGraphicsAndQuit: " << str.Data() << std::endl;
|
||||
@@ -3866,7 +3865,7 @@ void PMusrCanvas::HandleAverage()
|
||||
}
|
||||
if (fData[0].diffFourierRe != nullptr) {
|
||||
name = TString(fData[0].diffFourierRe->GetTitle()) + "_avg";
|
||||
fDataAvg.diff = new TH1F(name, name, fData[0].diffFourierRe->GetNbinsX(),
|
||||
fDataAvg.diffFourierRe = new TH1F(name, name, fData[0].diffFourierRe->GetNbinsX(),
|
||||
fData[0].diffFourierRe->GetXaxis()->GetXmin(),
|
||||
fData[0].diffFourierRe->GetXaxis()->GetXmax());
|
||||
}
|
||||
@@ -4126,10 +4125,10 @@ void PMusrCanvas::HandleAverage()
|
||||
fDataAvg.diffFourierPhase->SetBinContent(i, dval/fData.size());
|
||||
}
|
||||
// set marker color, line color, maker size, marker type
|
||||
fDataAvg.diffFourierPhase->SetMarkerColor(fData[0].dataFourierPhase->GetMarkerColor());
|
||||
fDataAvg.diffFourierPhase->SetLineColor(fData[0].dataFourierPhase->GetLineColor());
|
||||
fDataAvg.diffFourierPhase->SetMarkerSize(fData[0].dataFourierPhase->GetMarkerSize());
|
||||
fDataAvg.diffFourierPhase->SetMarkerStyle(fData[0].dataFourierPhase->GetMarkerStyle());
|
||||
fDataAvg.diffFourierPhase->SetMarkerColor(fData[0].diffFourierPhase->GetMarkerColor());
|
||||
fDataAvg.diffFourierPhase->SetLineColor(fData[0].diffFourierPhase->GetLineColor());
|
||||
fDataAvg.diffFourierPhase->SetMarkerSize(fData[0].diffFourierPhase->GetMarkerSize());
|
||||
fDataAvg.diffFourierPhase->SetMarkerStyle(fData[0].diffFourierPhase->GetMarkerStyle());
|
||||
}
|
||||
if (fDataAvg.diffFourierPhaseOptReal != nullptr) {
|
||||
for (Int_t i=0; i<fData[0].diffFourierPhaseOptReal->GetNbinsX(); i++) {
|
||||
@@ -6540,7 +6539,7 @@ UInt_t PMusrCanvas::GetNeededAccuracy(PMsrParamStructure param)
|
||||
if (param.fStep == 0.0) { // check if fit parameter is a constant, i.e. step==0
|
||||
char str[128];
|
||||
|
||||
sprintf(str, "%lf", param.fValue);
|
||||
snprintf(str, sizeof(str), "%lf", param.fValue);
|
||||
|
||||
// find decimal point
|
||||
for (UInt_t i=0; i<strlen(str); i++) {
|
||||
|
||||
@@ -1309,7 +1309,7 @@ Bool_t PRunAsymmetry::PrepareViewData(PRawRunData* runData, UInt_t histoNo[2])
|
||||
Int_t factor = 8; // 8 times more points for the theory (if fTheoAsData == false)
|
||||
|
||||
fData.SetTheoryTimeStart(fData.GetDataTimeStart());
|
||||
if (fTheoAsData) { // cacluate theory only at the data points
|
||||
if (fTheoAsData) { // calculate theory only at the data points
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep());
|
||||
} else {
|
||||
// finer binning for the theory (8 times as many points = factor)
|
||||
|
||||
@@ -1485,7 +1485,7 @@ Bool_t PRunAsymmetryBNMR::PrepareViewData(PRawRunData* runData, UInt_t histoNo[2
|
||||
|
||||
Int_t factor = 8; // 8 times more points for the theory (if fTheoAsData == false)
|
||||
fData.SetTheoryTimeStart(fData.GetDataTimeStart());
|
||||
if (fTheoAsData) { // cacluate theory only at the data points
|
||||
if (fTheoAsData) { // calculate theory only at the data points
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep());
|
||||
} else {
|
||||
// finer binning for the theory (8 times as many points = factor)
|
||||
|
||||
@@ -1224,7 +1224,7 @@ Bool_t PRunAsymmetryRRF::PrepareViewData(PRawRunData* runData, UInt_t histoNo[2]
|
||||
UInt_t size = runData->GetDataBin(histoNo[0])->size();
|
||||
Int_t factor = 8; // 8 times more points for the theory (if fTheoAsData == false)
|
||||
fData.SetTheoryTimeStart(fData.GetDataTimeStart());
|
||||
if (fTheoAsData) { // cacluate theory only at the data points
|
||||
if (fTheoAsData) { // calculate theory only at the data points
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep());
|
||||
} else {
|
||||
// finer binning for the theory (8 times as many points = factor)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* Copyright (C) 2007-2022 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@@ -275,6 +275,21 @@ void PRunDataHandler::ReadData()
|
||||
else
|
||||
fAllDataAvailable = true;
|
||||
} else if (!fRunPathName.IsWhitespace()) { // i.e. file name triggered
|
||||
if (fFileFormat == "") { // try to guess the file format if fromat hasn't been provided
|
||||
TString ext=fRunPathName;
|
||||
Ssiz_t pos=ext.Last('.');
|
||||
ext.Remove(0, pos+1);
|
||||
if (!ext.CompareTo("bin", TString::kIgnoreCase))
|
||||
fFileFormat = "psibin";
|
||||
else if (!ext.CompareTo("root", TString::kIgnoreCase))
|
||||
fFileFormat = "musrroot";
|
||||
else if (!ext.CompareTo("msr", TString::kIgnoreCase))
|
||||
fFileFormat = "mud";
|
||||
else if (!ext.CompareTo("nxs", TString::kIgnoreCase))
|
||||
fFileFormat = "nexus";
|
||||
else if (!ext.CompareTo("mdu", TString::kIgnoreCase))
|
||||
fFileFormat = "psimdu";
|
||||
}
|
||||
if ((fFileFormat == "MusrRoot") || (fFileFormat == "musrroot")) {
|
||||
fAllDataAvailable = ReadRootFile();
|
||||
} else if ((fFileFormat == "NeXus") || (fFileFormat == "nexus")) {
|
||||
@@ -310,15 +325,102 @@ void PRunDataHandler::ConvertData()
|
||||
fAllDataAvailable = true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// SetRunData
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Set a raw run data set.
|
||||
*
|
||||
* @param data pointer to the raw run data set
|
||||
* @param idx index to where to write it.
|
||||
*
|
||||
* @return true in case of success, false otherwise.
|
||||
*/
|
||||
Bool_t PRunDataHandler::SetRunData(PRawRunData *data, UInt_t idx)
|
||||
{
|
||||
if ((idx == 0) && (fData.size() == 0)) {
|
||||
fData.resize(1);
|
||||
}
|
||||
if (idx >= fData.size()) {
|
||||
std::cerr << std::endl << ">>PRunDataHandler::SetRunData(): **ERROR** idx=" << idx << " is out-of-range (0.." << fData.size() << ")." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
fData[idx] = *data;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// WriteData
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Write data. This routine is used to write a single file.
|
||||
*/
|
||||
void PRunDataHandler::WriteData()
|
||||
Bool_t PRunDataHandler::WriteData(TString fileName)
|
||||
{
|
||||
if ((fAny2ManyInfo == nullptr) && (fileName="")) {
|
||||
std::cerr << std::endl << ">> PRunDataHandler::WriteData(): **ERROR** insufficient information: no fileName nor fAny2ManyInfo object.";
|
||||
std::cerr << std::endl << " Cannot write data under this conditions." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// get output file format tag, first try via fAny2ManyInfo
|
||||
Int_t outTag = A2M_UNDEFINED;
|
||||
if (fAny2ManyInfo != nullptr) {
|
||||
if (!fAny2ManyInfo->outFormat.CompareTo("musrroot", TString::kIgnoreCase))
|
||||
outTag = A2M_MUSR_ROOT;
|
||||
else if (!fAny2ManyInfo->outFormat.CompareTo("psibin", TString::kIgnoreCase))
|
||||
outTag = A2M_PSIBIN;
|
||||
else if (!fAny2ManyInfo->outFormat.CompareTo("psimdu", TString::kIgnoreCase))
|
||||
outTag = A2M_PSIMDU;
|
||||
else if (!fAny2ManyInfo->outFormat.CompareTo("mud",TString::kIgnoreCase))
|
||||
outTag = A2M_MUD;
|
||||
else if (fAny2ManyInfo->outFormat.BeginsWith("nexus", TString::kIgnoreCase))
|
||||
outTag = A2M_NEXUS;
|
||||
else
|
||||
outTag = A2M_UNDEFINED;
|
||||
} else { // only fileName is given, try to guess from the extension
|
||||
// STILL MISSING
|
||||
}
|
||||
|
||||
if (outTag == A2M_UNDEFINED) {
|
||||
std::cerr << std::endl << ">> PRunDataHandler::WriteData(): **ERROR** no valid output data file format found: '" << fAny2ManyInfo->outFormat.Data() << "'" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
Bool_t success{true};
|
||||
switch (outTag) {
|
||||
case A2M_MUSR_ROOT:
|
||||
if (fAny2ManyInfo->outFileName.Length() == 0)
|
||||
success = WriteMusrRootFile(fileName);
|
||||
else
|
||||
success = WriteMusrRootFile(fAny2ManyInfo->outFileName);
|
||||
break;
|
||||
case A2M_PSIBIN:
|
||||
case A2M_PSIMDU:
|
||||
if (fAny2ManyInfo->outFileName.Length() == 0)
|
||||
success = WritePsiBinFile(fileName);
|
||||
else
|
||||
success = WritePsiBinFile(fAny2ManyInfo->outFileName);
|
||||
break;
|
||||
case A2M_MUD:
|
||||
if (fAny2ManyInfo->outFileName.Length() == 0)
|
||||
success = WriteMudFile(fileName);
|
||||
else
|
||||
success = WriteMudFile(fAny2ManyInfo->outFileName);
|
||||
break;
|
||||
case A2M_NEXUS:
|
||||
if (fAny2ManyInfo->outFileName.Length() == 0)
|
||||
success = WriteNexusFile(fileName);
|
||||
else
|
||||
success = WriteNexusFile(fAny2ManyInfo->outFileName);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -721,28 +823,34 @@ Bool_t PRunDataHandler::ReadWriteFilesList()
|
||||
else // bzip2
|
||||
fln += TString(".tar.bz2");
|
||||
if (fAny2ManyInfo->compressionTag == 1) // gzip
|
||||
sprintf(cmd, "tar -zcf %s %s", fln.Data(), fAny2ManyInfo->outPathFileName[0].Data());
|
||||
snprintf(cmd, sizeof(cmd), "tar -zcf %s %s", fln.Data(), fAny2ManyInfo->outPathFileName[0].Data());
|
||||
else // bzip2
|
||||
sprintf(cmd, "tar -jcf %s %s", fln.Data(), fAny2ManyInfo->outPathFileName[0].Data());
|
||||
system(cmd);
|
||||
snprintf(cmd, sizeof(cmd), "tar -jcf %s %s", fln.Data(), fAny2ManyInfo->outPathFileName[0].Data());
|
||||
if (system(cmd) == -1) {
|
||||
std::cerr << "**ERROR** cmd: " << cmd << " failed." << std::endl;
|
||||
}
|
||||
} else {
|
||||
fln += TString(".tar");
|
||||
for (UInt_t i=0; i<fAny2ManyInfo->outPathFileName.size(); i++) {
|
||||
if (i==0) {
|
||||
sprintf(cmd, "tar -cf %s %s", fln.Data(), fAny2ManyInfo->outPathFileName[i].Data());
|
||||
snprintf(cmd, sizeof(cmd), "tar -cf %s %s", fln.Data(), fAny2ManyInfo->outPathFileName[i].Data());
|
||||
} else {
|
||||
sprintf(cmd, "tar -rf %s %s", fln.Data(), fAny2ManyInfo->outPathFileName[i].Data());
|
||||
snprintf(cmd, sizeof(cmd), "tar -rf %s %s", fln.Data(), fAny2ManyInfo->outPathFileName[i].Data());
|
||||
}
|
||||
if (system(cmd) == -1) {
|
||||
std::cerr << "**ERROR** cmd: " << cmd << " failed." << std::endl;
|
||||
}
|
||||
system(cmd);
|
||||
}
|
||||
if (fAny2ManyInfo->compressionTag == 1) { // gzip
|
||||
sprintf(cmd, "gzip %s", fln.Data());
|
||||
snprintf(cmd, sizeof(cmd), "gzip %s", fln.Data());
|
||||
fln += ".gz";
|
||||
} else {
|
||||
sprintf(cmd, "bzip2 -z %s", fln.Data());
|
||||
snprintf(cmd, sizeof(cmd), "bzip2 -z %s", fln.Data());
|
||||
fln += ".bz2";
|
||||
}
|
||||
system(cmd);
|
||||
if (system(cmd) == -1) {
|
||||
std::cerr << "**ERROR** cmd: " << cmd << " failed." << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
// check if the compressed file shall be streamed to the stdout
|
||||
@@ -1534,7 +1642,7 @@ Bool_t PRunDataHandler::ReadRootFile()
|
||||
// get all the data
|
||||
Char_t histoName[32];
|
||||
for (Int_t i=0; i<noOfHistos; i++) {
|
||||
sprintf(histoName, "hDecay%02d", i);
|
||||
snprintf(histoName, sizeof(histoName), "hDecay%02d", i);
|
||||
TH1F *histo = dynamic_cast<TH1F*>(folder->FindObjectAny(histoName));
|
||||
if (!histo) {
|
||||
std::cerr << std::endl << ">> PRunDataHandler::ReadRootFile: **ERROR** Couldn't get histo " << histoName;
|
||||
@@ -1563,14 +1671,14 @@ Bool_t PRunDataHandler::ReadRootFile()
|
||||
histoData.clear();
|
||||
}
|
||||
// check if any post pileup histos are present at all (this is not the case for LEM data 2006 and earlier)
|
||||
sprintf(histoName, "hDecay%02d", POST_PILEUP_HISTO_OFFSET);
|
||||
snprintf(histoName, sizeof(histoName), "hDecay%02d", POST_PILEUP_HISTO_OFFSET);
|
||||
if (!folder->FindObjectAny(histoName)) {
|
||||
std::cerr << std::endl << ">> PRunDataHandler::ReadRootFile: **WARNING** Couldn't get histo " << histoName;
|
||||
std::cerr << std::endl << ">> most probably this is an old (2006 or earlier) LEM file without post pileup histos.";
|
||||
std::cerr << std::endl;
|
||||
} else {
|
||||
for (Int_t i=0; i<noOfHistos; i++) {
|
||||
sprintf(histoName, "hDecay%02d", i+POST_PILEUP_HISTO_OFFSET);
|
||||
snprintf(histoName, sizeof(histoName), "hDecay%02d", i+POST_PILEUP_HISTO_OFFSET);
|
||||
TH1F *histo = dynamic_cast<TH1F*>(folder->FindObjectAny(histoName));
|
||||
if (!histo) {
|
||||
std::cerr << std::endl << ">> PRunDataHandler::ReadRootFile: **ERROR** Couldn't get histo " << histoName;
|
||||
@@ -2677,7 +2785,7 @@ Bool_t PRunDataHandler::ReadPsiBinFile()
|
||||
Bool_t success;
|
||||
|
||||
// read psi bin file
|
||||
status = psiBin.read(fRunPathName.Data());
|
||||
status = psiBin.Read(fRunPathName.Data());
|
||||
switch (status) {
|
||||
case 0: // everything perfect
|
||||
success = true;
|
||||
@@ -2766,32 +2874,32 @@ Bool_t PRunDataHandler::ReadPsiBinFile()
|
||||
// keep run name
|
||||
runData.SetRunName(fRunName);
|
||||
// get run title
|
||||
runData.SetRunTitle(TString(psiBin.get_comment().c_str())); // run title
|
||||
runData.SetRunTitle(TString(psiBin.GetComment().c_str())); // run title
|
||||
// get run number
|
||||
runData.SetRunNumber(psiBin.get_runNumber_int());
|
||||
runData.SetRunNumber(psiBin.GetRunNumberInt());
|
||||
// get setup
|
||||
runData.SetSetup(TString(psiBin.get_comment().c_str()));
|
||||
runData.SetSetup(TString(psiBin.GetComment().c_str()));
|
||||
// get sample
|
||||
runData.SetSample(TString(psiBin.get_sample().c_str()));
|
||||
runData.SetSample(TString(psiBin.GetSample().c_str()));
|
||||
// get orientation
|
||||
runData.SetOrientation(TString(psiBin.get_orient().c_str()));
|
||||
runData.SetOrientation(TString(psiBin.GetOrient().c_str()));
|
||||
// get comment
|
||||
runData.SetComment(TString(psiBin.get_comment().c_str()));
|
||||
runData.SetComment(TString(psiBin.GetComment().c_str()));
|
||||
// set LEM specific information to default value since it is not in the file and not used...
|
||||
runData.SetEnergy(PMUSR_UNDEFINED);
|
||||
runData.SetTransport(PMUSR_UNDEFINED);
|
||||
// get field
|
||||
Double_t scale = 0.0;
|
||||
if (psiBin.get_field().rfind("G") != std::string::npos)
|
||||
if (psiBin.GetField().rfind("G") != std::string::npos)
|
||||
scale = 1.0;
|
||||
if (psiBin.get_field().rfind("T") != std::string::npos)
|
||||
if (psiBin.GetField().rfind("T") != std::string::npos)
|
||||
scale = 1.0e4;
|
||||
status = sscanf(psiBin.get_field().c_str(), "%lf", &dval);
|
||||
status = sscanf(psiBin.GetField().c_str(), "%lf", &dval);
|
||||
if (status == 1)
|
||||
runData.SetField(scale*dval);
|
||||
// get temperature
|
||||
PDoubleVector tempVec(psiBin.get_temperatures_vector());
|
||||
PDoubleVector tempDevVec(psiBin.get_devTemperatures_vector());
|
||||
PDoubleVector tempVec(psiBin.GetTemperaturesVector());
|
||||
PDoubleVector tempDevVec(psiBin.GetDevTemperaturesVector());
|
||||
if ((tempVec.size() > 1) && (tempDevVec.size() > 1) && tempVec[0] && tempVec[1]) {
|
||||
// take only the first two values for now...
|
||||
//maybe that's not enough - e.g. in older GPD data I saw the "correct values in the second and third entry..."
|
||||
@@ -2801,16 +2909,16 @@ Bool_t PRunDataHandler::ReadPsiBinFile()
|
||||
tempVec.clear();
|
||||
tempDevVec.clear();
|
||||
} else {
|
||||
status = sscanf(psiBin.get_temp().c_str(), "%lfK", &dval);
|
||||
status = sscanf(psiBin.GetTemp().c_str(), "%lfK", &dval);
|
||||
if (status == 1)
|
||||
runData.SetTemperature(0, dval, 0.0);
|
||||
}
|
||||
|
||||
// get time resolution (ns)
|
||||
runData.SetTimeResolution(psiBin.get_binWidth_ns());
|
||||
runData.SetTimeResolution(psiBin.GetBinWidthNanoSec());
|
||||
|
||||
// get start/stop time
|
||||
std::vector<std::string> sDateTime = psiBin.get_timeStart_vector();
|
||||
std::vector<std::string> sDateTime = psiBin.GetTimeStartVector();
|
||||
if (sDateTime.size() < 2) {
|
||||
std::cerr << std::endl << ">> **WARNING** psi-bin file: couldn't obtain run start date/time" << std::endl;
|
||||
}
|
||||
@@ -2824,7 +2932,7 @@ Bool_t PRunDataHandler::ReadPsiBinFile()
|
||||
runData.SetStartTime(sDateTime[1]);
|
||||
sDateTime.clear();
|
||||
|
||||
sDateTime = psiBin.get_timeStop_vector();
|
||||
sDateTime = psiBin.GetTimeStopVector();
|
||||
if (sDateTime.size() < 2) {
|
||||
std::cerr << std::endl << ">> **WARNING** psi-bin file: couldn't obtain run stop date/time" << std::endl;
|
||||
}
|
||||
@@ -2839,7 +2947,7 @@ Bool_t PRunDataHandler::ReadPsiBinFile()
|
||||
sDateTime.clear();
|
||||
|
||||
// get t0's
|
||||
PIntVector t0 = psiBin.get_t0_vector();
|
||||
PIntVector t0 = psiBin.GetT0Vector();
|
||||
|
||||
if (t0.empty()) {
|
||||
std::cerr << std::endl << ">> **ERROR** psi-bin file: couldn't obtain any t0's";
|
||||
@@ -2848,7 +2956,7 @@ Bool_t PRunDataHandler::ReadPsiBinFile()
|
||||
}
|
||||
|
||||
// get first good bin
|
||||
PIntVector fgb = psiBin.get_firstGood_vector();
|
||||
PIntVector fgb = psiBin.GetFirstGoodVector();
|
||||
if (fgb.empty()) {
|
||||
std::cerr << std::endl << ">> **ERROR** psi-bin file: couldn't obtain any fgb's";
|
||||
std::cerr << std::endl;
|
||||
@@ -2856,7 +2964,7 @@ Bool_t PRunDataHandler::ReadPsiBinFile()
|
||||
}
|
||||
|
||||
// get last good bin
|
||||
PIntVector lgb = psiBin.get_lastGood_vector();
|
||||
PIntVector lgb = psiBin.GetLastGoodVector();
|
||||
if (lgb.empty()) {
|
||||
std::cerr << std::endl << ">> **ERROR** psi-bin file: couldn't obtain any lgb's";
|
||||
std::cerr << std::endl;
|
||||
@@ -2866,13 +2974,12 @@ Bool_t PRunDataHandler::ReadPsiBinFile()
|
||||
// fill raw data
|
||||
PRawRunDataSet dataSet;
|
||||
PDoubleVector histoData;
|
||||
Int_t *histo;
|
||||
for (Int_t i=0; i<psiBin.get_numberHisto_int(); i++) {
|
||||
histo = psiBin.get_histo_array_int(i);
|
||||
for (Int_t j=0; j<psiBin.get_histoLength_bin(); j++) {
|
||||
std::vector<Int_t> histo;
|
||||
for (Int_t i=0; i<psiBin.GetNumberHistoInt(); i++) {
|
||||
histo = psiBin.GetHistoArrayInt(i);
|
||||
for (Int_t j=0; j<psiBin.GetHistoLengthBin(); j++) {
|
||||
histoData.push_back(histo[j]);
|
||||
}
|
||||
delete[] histo;
|
||||
|
||||
// estimate T0 from maximum of the data
|
||||
Double_t maxVal = 0.0;
|
||||
@@ -2885,7 +2992,7 @@ Bool_t PRunDataHandler::ReadPsiBinFile()
|
||||
}
|
||||
|
||||
dataSet.Clear();
|
||||
dataSet.SetName(psiBin.get_nameHisto(i).c_str());
|
||||
dataSet.SetName(psiBin.GetNameHisto(i).c_str());
|
||||
dataSet.SetHistoNo(i+1); // i.e. hist numbering starts at 1
|
||||
if (i < static_cast<Int_t>(t0.size()))
|
||||
dataSet.SetTimeZeroBin(t0[i]);
|
||||
@@ -4569,7 +4676,7 @@ Bool_t PRunDataHandler::WriteRootFile(TString fln)
|
||||
return false;
|
||||
}
|
||||
size = dataSet->GetData()->size();
|
||||
sprintf(str, "hDecay%02d", static_cast<Int_t>(i));
|
||||
snprintf(str, sizeof(str), "hDecay%02d", static_cast<Int_t>(i));
|
||||
histo = new TH1F(str, str, size+1, -0.5, static_cast<Double_t>(size)+0.5);
|
||||
for (UInt_t j=0; j<size; j++) {
|
||||
histo->SetBinContent(j+1, dataSet->GetData()->at(j));
|
||||
@@ -4587,7 +4694,7 @@ Bool_t PRunDataHandler::WriteRootFile(TString fln)
|
||||
return false;
|
||||
}
|
||||
size = dataSet->GetData()->size();
|
||||
sprintf(str, "hDecay%02d", static_cast<Int_t>(i));
|
||||
snprintf(str, sizeof(str), "hDecay%02d", static_cast<Int_t>(i));
|
||||
histo = new TH1F(str, str, static_cast<UInt_t>(size/fAny2ManyInfo->rebin)+1, -0.5, static_cast<Double_t>(size)/static_cast<Double_t>(fAny2ManyInfo->rebin)+0.5);
|
||||
dataCount = 0;
|
||||
for (UInt_t j=0; j<size; j++) {
|
||||
@@ -5189,15 +5296,15 @@ Bool_t PRunDataHandler::WritePsiBinFile(TString fln)
|
||||
|
||||
// fill header information
|
||||
// run number
|
||||
psibin.put_runNumber_int(fData[0].GetRunNumber());
|
||||
psibin.PutRunNumberInt(fData[0].GetRunNumber());
|
||||
// length of histograms
|
||||
UInt_t histo0 = 1;
|
||||
if (fAny2ManyInfo->groupHistoList.size() != 0) { // red/green list found
|
||||
histo0 = fAny2ManyInfo->groupHistoList[0]+1; // take the first available red/green entry
|
||||
}
|
||||
psibin.put_histoLength_bin(static_cast<int>(fData[0].GetDataBin(histo0)->size()/fAny2ManyInfo->rebin));
|
||||
psibin.PutHistoLengthBin(static_cast<int>(fData[0].GetDataBin(histo0)->size()/fAny2ManyInfo->rebin));
|
||||
// number of histograms
|
||||
psibin.put_numberHisto_int(static_cast<int>(fData[0].GetNoOfHistos()));
|
||||
psibin.PutNumberHistoInt(static_cast<int>(fData[0].GetNoOfHistos()));
|
||||
// run title = sample (10 char) / temp (10 char) / field (10 char) / orientation (10 char)
|
||||
char cstr[11];
|
||||
// sample
|
||||
@@ -5206,35 +5313,35 @@ Bool_t PRunDataHandler::WritePsiBinFile(TString fln)
|
||||
else
|
||||
strcpy(cstr, "??");
|
||||
cstr[10] = '\0';
|
||||
psibin.put_sample(cstr);
|
||||
psibin.PutSample(cstr);
|
||||
// temp
|
||||
if (fData[0].GetNoOfTemperatures() > 0)
|
||||
snprintf(cstr, 10, "%.1f K", fData[0].GetTemperature(0));
|
||||
else
|
||||
strcpy(cstr, "?? K");
|
||||
cstr[10] = '\0';
|
||||
psibin.put_temp(cstr);
|
||||
psibin.PutTemp(cstr);
|
||||
// field
|
||||
if (fData[0].GetField() > 0)
|
||||
snprintf(cstr, 10, "%.1f G", fData[0].GetField());
|
||||
else
|
||||
strcpy(cstr, "?? G");
|
||||
cstr[10] = '\0';
|
||||
psibin.put_field(cstr);
|
||||
psibin.PutField(cstr);
|
||||
// orientation
|
||||
if (fData[0].GetOrientation()->Length() > 0)
|
||||
strncpy(cstr, fData[0].GetOrientation()->Data(), 10);
|
||||
else
|
||||
strcpy(cstr, "??");
|
||||
cstr[10] = '\0';
|
||||
psibin.put_orient(cstr);
|
||||
psibin.PutOrient(cstr);
|
||||
// setup
|
||||
if (fData[0].GetSetup()->Length() > 0)
|
||||
strncpy(cstr, fData[0].GetSetup()->Data(), 10);
|
||||
else
|
||||
strcpy(cstr, "??");
|
||||
cstr[10] = '\0';
|
||||
psibin.put_setup(cstr);
|
||||
psibin.PutSetup(cstr);
|
||||
|
||||
// handle PSI-BIN start/stop Time/Date. PSI-BIN requires: Time -> HH:MM:SS, and Date -> DD-MMM-YY
|
||||
// internally given: Time -> HH:MM:SS, and Date -> YYYY-MM-DD
|
||||
@@ -5245,7 +5352,7 @@ Bool_t PRunDataHandler::WritePsiBinFile(TString fln)
|
||||
int year, month, day;
|
||||
|
||||
// 28-Aug-2014, TP: the following line does not work, it generates the wrong date
|
||||
//dt.Set(fData[0].GetStartDateTime());
|
||||
//dt.Set(fData[0].GetStartDateTime()); //as35
|
||||
// the following generates the correct date entry
|
||||
date.Append(*fData[0].GetStartDate());
|
||||
sscanf((const char*)date.Data(),"%04d-%02d-%02d", &year, &month, &day);
|
||||
@@ -5262,7 +5369,7 @@ Bool_t PRunDataHandler::WritePsiBinFile(TString fln)
|
||||
strncpy(cstr, fData[0].GetStartTime()->Data(), 8);
|
||||
cstr[8] = '\0';
|
||||
svec.push_back(cstr);
|
||||
psibin.put_timeStart_vector(svec);
|
||||
psibin.PutTimeStartVector(svec);
|
||||
svec.clear();
|
||||
|
||||
// run stop date
|
||||
@@ -5285,32 +5392,32 @@ Bool_t PRunDataHandler::WritePsiBinFile(TString fln)
|
||||
strncpy(cstr, fData[0].GetStopTime()->Data(), 8);
|
||||
cstr[8] = '\0';
|
||||
svec.push_back(cstr);
|
||||
psibin.put_timeStop_vector(svec);
|
||||
psibin.PutTimeStopVector(svec);
|
||||
svec.clear();
|
||||
|
||||
// number of measured temperatures
|
||||
psibin.put_numberTemperature_int(fData[0].GetNoOfTemperatures());
|
||||
psibin.PutNumberTemperatureInt(fData[0].GetNoOfTemperatures());
|
||||
|
||||
// mean temperatures
|
||||
std::vector<double> dvec;
|
||||
for (UInt_t i=0; i<fData[0].GetNoOfTemperatures(); i++)
|
||||
dvec.push_back(fData[0].GetTemperature(i));
|
||||
psibin.put_temperatures_vector(dvec);
|
||||
psibin.PutTemperaturesVector(dvec);
|
||||
|
||||
// standard deviation of temperatures
|
||||
dvec.clear();
|
||||
for (UInt_t i=0; i<fData[0].GetNoOfTemperatures(); i++)
|
||||
dvec.push_back(fData[0].GetTempError(i));
|
||||
psibin.put_devTemperatures_vector(dvec);
|
||||
psibin.PutDevTemperaturesVector(dvec);
|
||||
|
||||
// write comment
|
||||
psibin.put_comment(fData[0].GetRunTitle()->Data());
|
||||
psibin.PutComment(fData[0].GetRunTitle()->Data());
|
||||
|
||||
// write time resolution
|
||||
psibin.put_binWidth_ns(fData[0].GetTimeResolution()*fAny2ManyInfo->rebin);
|
||||
psibin.PutBinWidthNanoSec(fData[0].GetTimeResolution()*fAny2ManyInfo->rebin);
|
||||
|
||||
// write scaler dummies
|
||||
psibin.put_numberScaler_int(0);
|
||||
psibin.PutNumberScalerInt(0);
|
||||
|
||||
// feed detector related info like, histogram names, t0, fgb, lgb
|
||||
Int_t ival = 0;
|
||||
@@ -5328,16 +5435,16 @@ Bool_t PRunDataHandler::WritePsiBinFile(TString fln)
|
||||
str = dataSet->GetName();
|
||||
if (!str.CompareTo("n/a"))
|
||||
str.Form("Detector%3d", i+1);
|
||||
psibin.put_nameHisto(str.Data(), i);
|
||||
psibin.PutNameHisto(str.Data(), i);
|
||||
// time zero bin
|
||||
ival = static_cast<Int_t>(dataSet->GetTimeZeroBin()/fAny2ManyInfo->rebin);
|
||||
psibin.put_t0_int(i, ival);
|
||||
psibin.PutT0Int(i, ival);
|
||||
// first good bin
|
||||
ival = static_cast<Int_t>(dataSet->GetFirstGoodBin()/fAny2ManyInfo->rebin);
|
||||
psibin.put_firstGood_int(i, ival);
|
||||
psibin.PutFirstGoodInt(i, ival);
|
||||
// last good bin
|
||||
ival = static_cast<Int_t>(dataSet->GetLastGoodBin()/fAny2ManyInfo->rebin);
|
||||
psibin.put_lastGood_int(i, ival);
|
||||
psibin.PutLastGoodInt(i, ival);
|
||||
}
|
||||
|
||||
// feed histos
|
||||
@@ -5380,19 +5487,19 @@ Bool_t PRunDataHandler::WritePsiBinFile(TString fln)
|
||||
}
|
||||
}
|
||||
}
|
||||
status = psibin.put_histo_array_int(histos);
|
||||
status = psibin.PutHistoArrayInt(histos, 2); // tag 2 means: lift histo length restriction on only make sure it is < 32512
|
||||
if (status != 0) {
|
||||
std::cerr << std::endl << ">> PRunDataHandler::WritePsiBinFile(): " << psibin.ConsistencyStatus() << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!psibin.CheckDataConsistency()) {
|
||||
if (!psibin.CheckDataConsistency(2)) {
|
||||
std::cerr << std::endl << ">> PRunDataHandler::WritePsiBinFile(): " << psibin.ConsistencyStatus() << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// write data to file
|
||||
status = psibin.write(fln.Data());
|
||||
status = psibin.Write(fln.Data());
|
||||
|
||||
if (status != 0) {
|
||||
std::cerr << std::endl << ">> PRunDataHandler::WritePsiBinFile(): " << psibin.WriteStatus() << std::endl;
|
||||
@@ -5451,9 +5558,9 @@ Bool_t PRunDataHandler::WriteMudFile(TString fln)
|
||||
MUD_setOrient(fd, (char *)fData[0].GetOrientation()->Data());
|
||||
MUD_setDas(fd, dummy);
|
||||
MUD_setExperimenter(fd, dummy);
|
||||
sprintf(info, "%lf+-%lf (K)", fData[0].GetTemperature(0), fData[0].GetTempError(0));
|
||||
snprintf(info, sizeof(info), "%lf+-%lf (K)", fData[0].GetTemperature(0), fData[0].GetTempError(0));
|
||||
MUD_setTemperature(fd, info);
|
||||
sprintf(info, "%lf", fData[0].GetField());
|
||||
snprintf(info, sizeof(info), "%lf", fData[0].GetField());
|
||||
MUD_setField(fd, info);
|
||||
|
||||
// generate the histograms
|
||||
@@ -5953,6 +6060,9 @@ TString PRunDataHandler::GenerateOutputFileName(const TString fileName, const TS
|
||||
TString fln = fileName;
|
||||
ok = true;
|
||||
|
||||
if (fAny2ManyInfo == nullptr)
|
||||
return fln;
|
||||
|
||||
// generate output file name if needed
|
||||
if (!fAny2ManyInfo->useStandardOutput || (fAny2ManyInfo->compressionTag > 0)) {
|
||||
if (fln.Length() == 0) {
|
||||
@@ -6109,7 +6219,7 @@ TString PRunDataHandler::FileNameFromTemplate(TString &fileNameTemplate, Int_t r
|
||||
if (idx == str.Length()) { // 'r' only
|
||||
TString runStr("");
|
||||
char fmt[128];
|
||||
sprintf(fmt , "%%0%dd", str.Length());
|
||||
snprintf(fmt, sizeof(fmt), "%%0%dd", str.Length());
|
||||
runStr.Form(fmt, run);
|
||||
result += runStr;
|
||||
} else { // not only 'r'
|
||||
|
||||
@@ -757,7 +757,7 @@ Bool_t PRunMuMinus::PrepareRawViewData(PRawRunData* runData, const UInt_t histoN
|
||||
|
||||
Int_t factor = 8; // 8 times more points for the theory (if fTheoAsData == false)
|
||||
fData.SetTheoryTimeStart(fData.GetDataTimeStart());
|
||||
if (fTheoAsData) { // cacluate theory only at the data points
|
||||
if (fTheoAsData) { // calculate theory only at the data points
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep());
|
||||
} else {
|
||||
// finer binning for the theory (8 times as many points = factor)
|
||||
|
||||
@@ -1073,7 +1073,7 @@ Bool_t PRunSingleHisto::PrepareRawViewData(PRawRunData* runData, const UInt_t hi
|
||||
UInt_t size = fForward.size();
|
||||
Int_t factor = 8; // 8 times more points for the theory (if fTheoAsData == false)
|
||||
fData.SetTheoryTimeStart(fData.GetDataTimeStart());
|
||||
if (fTheoAsData) { // cacluate theory only at the data points
|
||||
if (fTheoAsData) { // calculate theory only at the data points
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep());
|
||||
} else {
|
||||
// finer binning for the theory (8 times as many points = factor)
|
||||
@@ -1321,7 +1321,7 @@ Bool_t PRunSingleHisto::PrepareViewData(PRawRunData* runData, const UInt_t histo
|
||||
|
||||
if (wRRF == 0) { // no RRF
|
||||
fData.SetTheoryTimeStart(fData.GetDataTimeStart());
|
||||
if (fTheoAsData) { // cacluate theory only at the data points
|
||||
if (fTheoAsData) { // calculate theory only at the data points
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep());
|
||||
} else {
|
||||
// finer binning for the theory (8 times as many points = factor)
|
||||
|
||||
@@ -762,7 +762,7 @@ Bool_t PRunSingleHistoRRF::PrepareViewData(PRawRunData* runData, const UInt_t hi
|
||||
UInt_t size = fForward.size();
|
||||
Int_t factor = 8; // 8 times more points for the theory (if fTheoAsData == false)
|
||||
fData.SetTheoryTimeStart(fData.GetDataTimeStart());
|
||||
if (fTheoAsData) { // cacluate theory only at the data points
|
||||
if (fTheoAsData) { // calculate theory only at the data points
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep());
|
||||
} else {
|
||||
// finer binning for the theory (8 times as many points = factor)
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
#include <TObjArray.h>
|
||||
#include <TObjString.h>
|
||||
#include <TColor.h>
|
||||
#include <TList.h>
|
||||
#include <TXMLAttr.h>
|
||||
|
||||
#include "PStartupHandler.h"
|
||||
|
||||
@@ -112,7 +114,7 @@ PStartupHandler::PStartupHandler()
|
||||
// check if the startup file is found under $HOME/.musrfit
|
||||
home = getenv("HOME");
|
||||
if (home != nullptr) {
|
||||
sprintf(startup_path_name, "%s/.musrfit/musrfit_startup.xml", home);
|
||||
snprintf(startup_path_name, sizeof(startup_path_name), "%s/.musrfit/musrfit_startup.xml", home);
|
||||
if (StartupFileExists(startup_path_name)) {
|
||||
fStartupFilePath = TString(startup_path_name);
|
||||
fStartupFileFound = true;
|
||||
@@ -123,7 +125,7 @@ PStartupHandler::PStartupHandler()
|
||||
// check if the MUSRFITPATH system variable is set
|
||||
pmusrpath = getenv("MUSRFITPATH");
|
||||
if (pmusrpath != nullptr) {
|
||||
sprintf(startup_path_name, "%s/musrfit_startup.xml", pmusrpath);
|
||||
snprintf(startup_path_name, sizeof(startup_path_name), "%s/musrfit_startup.xml", pmusrpath);
|
||||
if (StartupFileExists(startup_path_name)) {
|
||||
fStartupFilePath = TString(startup_path_name);
|
||||
fStartupFileFound = true;
|
||||
@@ -133,9 +135,9 @@ PStartupHandler::PStartupHandler()
|
||||
if (!fStartupFileFound) { // MUSRFITPATH not set or empty, will try $ROOTSYS/bin
|
||||
home = getenv("ROOTSYS");
|
||||
if (home != nullptr) {
|
||||
sprintf(musrpath, "%s/bin", home);
|
||||
snprintf(musrpath, sizeof(musrpath), "%s/bin", home);
|
||||
std::cerr << std::endl << "**WARNING** MUSRFITPATH environment variable not set will try " << musrpath << std::endl;
|
||||
sprintf(startup_path_name, "%s/musrfit_startup.xml", musrpath);
|
||||
snprintf(startup_path_name, sizeof(startup_path_name), "%s/musrfit_startup.xml", musrpath);
|
||||
if (StartupFileExists(startup_path_name)) {
|
||||
fStartupFilePath = TString(startup_path_name);
|
||||
fStartupFileFound = true;
|
||||
@@ -151,7 +153,7 @@ PStartupHandler::PStartupHandler()
|
||||
} else {
|
||||
home = getenv("HOME");
|
||||
if (home != nullptr) {
|
||||
sprintf(startup_path_name, "%s/.musrfit/musrfit_startup.xml", home);
|
||||
snprintf(startup_path_name, sizeof(startup_path_name), "%s/.musrfit/musrfit_startup.xml", home);
|
||||
if (StartupFileExists(startup_path_name)) {
|
||||
fStartupFilePath = TString(startup_path_name);
|
||||
fStartupFileFound = true;
|
||||
@@ -173,6 +175,7 @@ PStartupHandler::~PStartupHandler()
|
||||
fDataPathList.clear();
|
||||
fMarkerList.clear();
|
||||
fColorList.clear();
|
||||
fRunNameTemplate.clear();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -224,6 +227,15 @@ void PStartupHandler::OnStartElement(const Char_t *str, const TList *attributes)
|
||||
{
|
||||
if (!strcmp(str, "data_path")) {
|
||||
fKey = eDataPath;
|
||||
} else if (!strcmp(str, "run_name_template")) {
|
||||
fKey = eRunNameTemplate;
|
||||
TXMLAttr *attr;
|
||||
TIter next(attributes);
|
||||
while ((attr = (TXMLAttr*) next())) {
|
||||
if (!strcmp(attr->GetName(), "inst")) {
|
||||
fCurrentInstrumentName = attr->GetValue();
|
||||
}
|
||||
}
|
||||
} else if (!strcmp(str, "marker")) {
|
||||
fKey = eMarker;
|
||||
} else if (!strcmp(str, "color")) {
|
||||
@@ -272,12 +284,19 @@ void PStartupHandler::OnCharacters(const Char_t *str)
|
||||
TString tstr;
|
||||
Int_t color, r, g, b, ival;
|
||||
|
||||
PRunNameTemplate tmpl;
|
||||
switch (fKey) {
|
||||
case eDataPath:
|
||||
// check that str is a valid path
|
||||
// add str to the path list
|
||||
fDataPathList.push_back(str);
|
||||
break;
|
||||
case eRunNameTemplate:
|
||||
tmpl.instrument = fCurrentInstrumentName;
|
||||
tmpl.runNameTemplate = str;
|
||||
fRunNameTemplate.push_back(tmpl);
|
||||
fCurrentInstrumentName="???";
|
||||
break;
|
||||
case eMarker:
|
||||
// check that str is a number
|
||||
tstr = TString(str);
|
||||
@@ -601,7 +620,7 @@ Bool_t PStartupHandler::WriteDefaultStartupFile()
|
||||
// first check that $HOME/.musrfit exists and if NOT create it
|
||||
struct stat info;
|
||||
|
||||
sprintf(startup_path_name, "%s/.musrfit", home);
|
||||
snprintf(startup_path_name, sizeof(startup_path_name), "%s/.musrfit", home);
|
||||
if (!stat(startup_path_name, &info)) {
|
||||
if (!(info.st_mode & S_IFDIR))
|
||||
return false;
|
||||
@@ -613,7 +632,7 @@ Bool_t PStartupHandler::WriteDefaultStartupFile()
|
||||
}
|
||||
|
||||
// set path-name for musrfit_startup.xml
|
||||
sprintf(startup_path_name, "%s/.musrfit/musrfit_startup.xml", home);
|
||||
snprintf(startup_path_name, sizeof(startup_path_name), "%s/.musrfit/musrfit_startup.xml", home);
|
||||
|
||||
std::ofstream fout(startup_path_name, std::ofstream::out);
|
||||
if (!fout.is_open()) {
|
||||
@@ -636,6 +655,54 @@ Bool_t PStartupHandler::WriteDefaultStartupFile()
|
||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/alc</data_path>" << std::endl;
|
||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/hifi</data_path>" << std::endl;
|
||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/lem</data_path>" << std::endl;
|
||||
fout << " <!-- Dolly/PSI -->" << std::endl;
|
||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/pie1/deltat_flc_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/pie3/deltat_flc_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/deltat_flc_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/deltat_pta_dolly_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/pta/deltat_pta_dolly_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/pta/deltat_pta_dolly_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/tdc/deltat_tdc_dolly_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/tdc/root/deltat_tdc_dolly_%rrrr%.root</run_name_template>" << std::endl;
|
||||
fout << " <!-- Flame/PSI -->" << std::endl;
|
||||
fout << " <run_name_template inst=\"flame\">d%yyyy%/tdc/root/deltat_tdc_flame_%yyyy%_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <!-- GPD/PSI -->" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_mue1_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_fq_si_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_strobo_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_hp_ni_ht_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_hp_ni_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_ccr2_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_gpd_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_janis_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_janis_gpd_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_pta_gpd_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/tdc/deltat_tdc_gpd_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/tdc/root/deltat_tdc_gpd_%rrrr%.root</run_name_template>" << std::endl;
|
||||
fout << " <!-- GPS/PSI -->" << std::endl;
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_ccr_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_he3_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_stutt_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_ltf_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_flc_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_flc2_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_oven_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_oven2_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_pta_gps_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/tdc/deltat_tdc_gps_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/tdc/root/deltat_tdc_gps_%yyyy%_%rrrr%.root</run_name_template>" << std::endl;
|
||||
fout << " <!-- HAL-9500/PSI == HIFI/PSI -->" << std::endl;
|
||||
fout << " <run_name_template inst=\"hifi\">d%yyyy%/tdc/deltat_hifi_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"hifi\">d%yyyy%/tdc/tdc_hifi_%yyyy%_%rrrrr%.mdu</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"hifi\">d%yyyy%/tdc/root/deltat_tdc_hifi_%yyyy%_%rrrr%.mdu</run_name_template>" << std::endl;
|
||||
fout << " <!-- LTF/PSI -->" << std::endl;
|
||||
fout << " <run_name_template inst=\"ltf\">d%yyyy%/deltat_ltf_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"ltf\">d%yyyy%/deltat_pta_ltf_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"ltf\">d%yyyy%/pta/deltat_pta_ltf_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"ltf\">d%yyyy%/tdc/deltat_tdc_ltf_%rrrr%.bin</run_name_template>" << std::endl;
|
||||
fout << " <!-- LEM/PSI -->" << std::endl;
|
||||
fout << " <run_name_template inst=\"lem\">%yyyy%/lem%yy%_his_%rrrr%.root</run_name_template>" << std::endl;
|
||||
fout << " <run_name_template inst=\"lem\">d%yyyy%/tdc/lem%yy%_his_%rrrr%.root</run_name_template>" << std::endl;
|
||||
fout << " <fourier_settings>" << std::endl;
|
||||
fout << " <units>Gauss</units>" << std::endl;
|
||||
fout << " <fourier_power>0</fourier_power>" << std::endl;
|
||||
|
||||
@@ -841,12 +841,12 @@ void PTheory::MakeCleanAndTidyTheoryBlock(PMsrLines *fullTheoryBlock)
|
||||
if (static_cast<UInt_t>(tokens->GetEntries()) < fgTheoDataBase[idx].fNoOfParam + 1)
|
||||
return;
|
||||
// make tidy string
|
||||
sprintf(substr, "%-10s", fgTheoDataBase[idx].fName.Data());
|
||||
snprintf(substr, sizeof(substr), "%-10s", fgTheoDataBase[idx].fName.Data());
|
||||
tidy = TString(substr);
|
||||
for (Int_t j=1; j<tokens->GetEntries(); j++) {
|
||||
ostr = dynamic_cast<TObjString*>(tokens->At(j));
|
||||
str = ostr->GetString();
|
||||
sprintf(substr, "%6s", str.Data());
|
||||
snprintf(substr, sizeof(substr), "%6s", str.Data());
|
||||
tidy += TString(substr);
|
||||
}
|
||||
if (fgTheoDataBase[idx].fComment.Length() != 0) {
|
||||
@@ -913,7 +913,7 @@ void PTheory::MakeCleanAndTidyPolynom(UInt_t i, PMsrLines *fullTheoryBlock)
|
||||
for (Int_t j=1; j<max; j++) {
|
||||
ostr = dynamic_cast<TObjString*>(tokens->At(j));
|
||||
str = ostr->GetString();
|
||||
sprintf(substr, "%6s", str.Data());
|
||||
snprintf(substr, sizeof(substr), "%6s", str.Data());
|
||||
tidy += TString(substr);
|
||||
}
|
||||
|
||||
@@ -2160,51 +2160,73 @@ Double_t PTheory::InternalBessel(Double_t t, const PDoubleVector& paramValues, c
|
||||
* \param paramValues parameter values
|
||||
* \param funcValues vector with the functions (i.e. functions of the parameters)
|
||||
*/
|
||||
Double_t PTheory::SkewedGauss(Double_t t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const
|
||||
{
|
||||
// expected parameters: phase frequency sigma- sigma+ [tshift]
|
||||
|
||||
Double_t PTheory::SkewedGauss(Double_t t, const PDoubleVector ¶mValues,
|
||||
const PDoubleVector &funcValues) const {
|
||||
// Expected parameters: phase, frequency, sigma-, sigma+, [tshift].
|
||||
// To be stored in the array "val" as:
|
||||
// val[0] = phase
|
||||
// val[1] = frequency
|
||||
// val[2] = sigma-
|
||||
// val[3] = sigma+
|
||||
// val[4] = tshift [optional]
|
||||
Double_t val[5];
|
||||
Double_t skg;
|
||||
|
||||
// Check that we have the correct number of fit parameters.
|
||||
assert(fParamNo.size() <= 5);
|
||||
|
||||
// check if FUNCTIONS are used
|
||||
for (UInt_t i=0; i<fParamNo.size(); i++) {
|
||||
// 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];
|
||||
val[i] = funcValues[fParamNo[i] - MSR_PARAM_FUN_OFFSET];
|
||||
}
|
||||
}
|
||||
|
||||
// Apply the tshift (if required).
|
||||
Double_t tt = t;
|
||||
if (fParamNo.size() == 5) {
|
||||
tt = t - val[4];
|
||||
}
|
||||
|
||||
Double_t tt;
|
||||
if (fParamNo.size() == 4) // no tshift
|
||||
tt = t;
|
||||
else // tshift present
|
||||
tt = t-val[4];
|
||||
// Evaluate the skewed Gaussian!
|
||||
|
||||
// val[2] = sigma-, val[3] = sigma+
|
||||
Double_t zp = fabs(val[3])*tt/SQRT_TWO; // sigma+
|
||||
Double_t zm = fabs(val[2])*tt/SQRT_TWO; // sigma-
|
||||
Double_t gp = TMath::Exp(-0.5*TMath::Power(tt*val[3], 2.0)); // gauss sigma+
|
||||
Double_t gm = TMath::Exp(-0.5*TMath::Power(tt*val[2], 2.0)); // gauss sigma-
|
||||
Double_t wp = fabs(val[3])/(fabs(val[2])+fabs(val[3])); // sigma+ / (sigma+ + sigma-)
|
||||
Double_t wm = 1.0-wp;
|
||||
Double_t phase = DEG_TO_RAD*val[0];
|
||||
Double_t freq = TWO_PI*val[1];
|
||||
// First, calculate some "helper" terms.
|
||||
Double_t sigma_p = std::abs(val[3]);
|
||||
Double_t sigma_m = std::abs(val[2]);
|
||||
Double_t arg_p = sigma_p * tt;
|
||||
Double_t arg_m = sigma_m * tt;
|
||||
Double_t z_p = arg_p / SQRT_TWO; // sigma+
|
||||
Double_t z_m = arg_m / SQRT_TWO; // sigma-
|
||||
Double_t g_p = TMath::Exp(-0.5 * arg_p * arg_p); // gauss sigma+
|
||||
Double_t g_m = TMath::Exp(-0.5 * arg_m * arg_m); // gauss sigma-
|
||||
Double_t w_p = sigma_p / (sigma_p + sigma_m);
|
||||
Double_t w_m = 1.0 - w_p;
|
||||
Double_t phase = DEG_TO_RAD * val[0];
|
||||
Double_t freq = TWO_PI * val[1];
|
||||
|
||||
if ((zp >= 25.0) || (zm >= 25.0)) // needed to prevent crash of 1F1
|
||||
skg = 2.0e6;
|
||||
else if (fabs(val[2]) == fabs(val[3])) // sigma+ == sigma- -> Gaussian
|
||||
skg = TMath::Cos(phase+freq*tt) * gp;
|
||||
else
|
||||
skg = TMath::Cos(phase+freq*tt) * (wm*gm + wp*gp) +
|
||||
TMath::Sin(phase+freq*tt) * (wm*gm*2.0*zm/SQRT_PI*ROOT::Math::conf_hyperg(0.5,1.5,zm*zm) -
|
||||
wp*gp*2.0*zp/SQRT_PI*ROOT::Math::conf_hyperg(0.5,1.5,zp*zp));
|
||||
// Evalute the EVEN frequency component of the skewed Gaussian.
|
||||
Double_t skg_cos = TMath::Cos(phase + freq * tt) * (w_m * g_m + w_p * g_p);
|
||||
|
||||
return skg;
|
||||
// Evalute the ODD frequency component of the skewed Gaussian.
|
||||
constexpr Double_t z_max = 26.7776;
|
||||
// Note: the check against z_max is needed to prevent floating-point overflow
|
||||
// in the return value of ROOT::Math::conf_hyperg(1/2, 3/2, z * z)
|
||||
// (i.e., confluent hypergeometric function of the first kind, 1F1).
|
||||
// In the case that z > z_max, return zero (otherwise there is some
|
||||
// numeric discontinuity at later times).
|
||||
Double_t skg_sin =
|
||||
TMath::Sin(phase + freq * tt) *
|
||||
((z_m > z_max) or (z_p > z_max)
|
||||
? 0.0
|
||||
: (w_m * g_m * 2.0 * z_m / SQRT_PI) *
|
||||
ROOT::Math::conf_hyperg(0.5, 1.5, z_m * z_m) -
|
||||
(w_p * g_p * 2.0 * z_p / SQRT_PI) *
|
||||
ROOT::Math::conf_hyperg(0.5, 1.5, z_p * z_p));
|
||||
|
||||
// Return the skewed Gaussian: skg = skg_cos + skg_sin.
|
||||
// Also check that skg_sin is finite!
|
||||
return skg_cos + (std::isfinite(skg_sin) ? skg_sin : 0.0);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* Copyright (C) 2007-2022 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@@ -57,6 +57,7 @@
|
||||
#include "git-revision.h"
|
||||
#endif
|
||||
|
||||
#include "PFindRun.h"
|
||||
#include "PStartupHandler.h"
|
||||
#include "TMusrRunHeader.h"
|
||||
#include "TLemRunHeader.h"
|
||||
@@ -72,7 +73,7 @@
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
* <p>dump help to stdout.
|
||||
*/
|
||||
void dump_header_syntax()
|
||||
{
|
||||
@@ -87,16 +88,15 @@ void dump_header_syntax()
|
||||
std::cout << std::endl << " -rn, --runNo <runNo> : run number of the header to be dumped.";
|
||||
std::cout << std::endl << " -fn, --fileName <fileName> : muSR data file name.";
|
||||
std::cout << std::endl << " -ff, --fileFormat <fileFormat> : where <fileFormat> can be:";
|
||||
std::cout << std::endl << " MusrRoot, NeXus, ROOT (old LEM), PSI-BIN, PSI-MDU, MUD, WKM";
|
||||
std::cout << std::endl << " MusrRoot (default), NeXus, ROOT (old LEM), PSI-BIN, PSI-MDU, MUD, WKM";
|
||||
std::cout << std::endl << " NeXus is only supported if enabled.";
|
||||
std::cout << std::endl << " -y, --year <year> : <year> has to be 4 digit, e.g. 2005, if provided it is used to";
|
||||
std::cout << std::endl << " generate the file name for the given <runNo>, otherwise the current";
|
||||
std::cout << std::endl << " year is used. If a file name is given, this option has no effect.";
|
||||
std::cout << std::endl << " -s, --summary : this option is used for LE-uSR data sets only. It will, additionally";
|
||||
std::cout << std::endl << " to the header information, print the summary file content.";
|
||||
std::cout << std::endl << " --psi-bulk <opt> : where <opt> consists of two items: (i) pta or tdc, ";
|
||||
std::cout << std::endl << " (ii) gps | ltf | dolly | gpd | hifi. This is needed in combination with";
|
||||
std::cout << std::endl << " the file formats PSI-BIN and PSI-MDU.";
|
||||
std::cout << std::endl << " -i, --instrument <inst> : where <inst> is the requested instrument:";
|
||||
std::cout << std::endl << " lem (default) | gps | ltf | dolly | gpd | hifi.";
|
||||
std::cout << std::endl << " -h, --help : will show this help";
|
||||
std::cout << std::endl << " -v, --version : will show the current version.";
|
||||
std::cout << std::endl << std::endl;
|
||||
@@ -104,13 +104,21 @@ void dump_header_syntax()
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>dumps header of a ROOT file.
|
||||
*
|
||||
* @param fileName file name of the ROOT file
|
||||
* @param summary bool, if true dump the summary
|
||||
*
|
||||
* @return 0 on success, otherwise 1.
|
||||
*/
|
||||
int dump_header_root(const std::string fileName, const std::string fileFormat, const bool summary)
|
||||
int dump_header_root(const std::string fileName, const bool summary)
|
||||
{
|
||||
TFile f(fileName.c_str());
|
||||
if (f.IsZombie()) {
|
||||
return false;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** couldn't invoke ROOT/MusrRoot file object." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
UInt_t fileType = DH_MUSR_ROOT;
|
||||
@@ -142,7 +150,7 @@ int dump_header_root(const std::string fileName, const std::string fileFormat, c
|
||||
}
|
||||
|
||||
std::cout << std::endl << "-------------------";
|
||||
std::cout << std::endl << "fileName = " << fileName << ", fileFormat = " << fileFormat;
|
||||
std::cout << std::endl << "fileName = " << fileName << ", fileFormat = ROOT (PSI LEM).";
|
||||
std::cout << std::endl << "-------------------";
|
||||
std::cout << std::endl << "Run Title : " << runHeader->GetRunTitle().GetString().Data();
|
||||
std::cout << std::endl << "Run Number : " << runHeader->GetRunNumber();
|
||||
@@ -231,15 +239,31 @@ int dump_header_root(const std::string fileName, const std::string fileFormat, c
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>dumps the header information of a NeXus file.
|
||||
*
|
||||
* @param fileName file name of the NeXus file.
|
||||
*
|
||||
* @return 0 on success, 1 otherwise
|
||||
*/
|
||||
int dump_header_nexus(const std::string fileName) {
|
||||
|
||||
#ifdef PNEXUS_ENABLED
|
||||
PNeXus *nxs_file = new PNeXus(fileName.c_str());
|
||||
|
||||
if (nxs_file == nullptr) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** couldn't invoke NeXus file object." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (nxs_file->IsValid(false)) {
|
||||
nxs_file->Dump();
|
||||
} else {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** found invalid NeXus file." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (nxs_file)
|
||||
@@ -253,7 +277,11 @@ int dump_header_nexus(const std::string fileName) {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>dump the instrument specific info for the PSI-BIN format.
|
||||
*
|
||||
* @param fileName file name of the PSI-BIN.
|
||||
*
|
||||
* @return string vector with the instrument specific info.
|
||||
*/
|
||||
std::vector<std::string> dump_header_instrument_info(std::string fileName)
|
||||
{
|
||||
@@ -312,7 +340,12 @@ std::vector<std::string> dump_header_instrument_info(std::string fileName)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>dump the header information of a PSI-BIN file.
|
||||
*
|
||||
* @param fileName file name of the PSI-BIN
|
||||
* @param fileFormat either PSI-BIN or PSI-MDU
|
||||
*
|
||||
* @return 0 on success, 1 otherwise
|
||||
*/
|
||||
int dump_header_psi_bin(const std::string fileName, const std::string fileFormat)
|
||||
{
|
||||
@@ -321,7 +354,7 @@ int dump_header_psi_bin(const std::string fileName, const std::string fileFormat
|
||||
bool success = false;
|
||||
|
||||
// read psi bin file
|
||||
status = psiBin.read(fileName.c_str());
|
||||
status = psiBin.Read(fileName.c_str());
|
||||
switch (status) {
|
||||
case 0: // everything perfect
|
||||
success = true;
|
||||
@@ -357,15 +390,15 @@ int dump_header_psi_bin(const std::string fileName, const std::string fileFormat
|
||||
std::cout << std::endl << "-------------------";
|
||||
std::cout << std::endl << "fileName = " << fileName << ", fileFormat = " << fileFormat;
|
||||
std::cout << std::endl << "-------------------";
|
||||
std::cout << std::endl << "Run Title : " << psiBin.get_comment();
|
||||
std::cout << std::endl << "Run Number : " << psiBin.get_runNumber_int();
|
||||
vstr = psiBin.get_timeStart_vector();
|
||||
std::cout << std::endl << "Run Title : " << psiBin.GetComment();
|
||||
std::cout << std::endl << "Run Number : " << psiBin.GetRunNumberInt();
|
||||
vstr = psiBin.GetTimeStartVector();
|
||||
if (vstr.size() < 2) {
|
||||
std::cout << std::endl << "**ERROR** couldn't obtain \"Run Start Time\" will quit." << std::endl << std::endl;
|
||||
return 1;
|
||||
}
|
||||
std::cout << std::endl << "Run Start Time : " << vstr[0] << "; " << vstr[1];
|
||||
vstr = psiBin.get_timeStop_vector();
|
||||
vstr = psiBin.GetTimeStopVector();
|
||||
if (vstr.size() < 2) {
|
||||
std::cout << std::endl << "**ERROR** couldn't obtain \"Run Stop Time\" will quit." << std::endl << std::endl;
|
||||
return 1;
|
||||
@@ -382,31 +415,31 @@ int dump_header_psi_bin(const std::string fileName, const std::string fileFormat
|
||||
std::cout << std::endl << "Muon Beam Momentum : " << vstr[2];
|
||||
std::cout << std::endl << "Muon Species : " << vstr[3];
|
||||
std::cout << std::endl << "Muon Source : " << vstr[4];
|
||||
std::cout << std::endl << "Setup : " << psiBin.get_comment();
|
||||
std::cout << std::endl << "Setup : " << psiBin.GetComment();
|
||||
std::cout << std::endl << "Comment : n/a";
|
||||
std::cout << std::endl << "Sample Name : " << psiBin.get_sample();
|
||||
std::cout << std::endl << "Sample Orientation : " << psiBin.get_orient();
|
||||
dVal = psiBin.get_temperatures_vector();
|
||||
dErrVal = psiBin.get_devTemperatures_vector();
|
||||
std::cout << std::endl << "Sample Name : " << psiBin.GetSample();
|
||||
std::cout << std::endl << "Sample Orientation : " << psiBin.GetOrient();
|
||||
dVal = psiBin.GetTemperaturesVector();
|
||||
dErrVal = psiBin.GetDevTemperaturesVector();
|
||||
if (dVal.size() != dErrVal.size()) {
|
||||
std::cout << std::endl << "Sample Temperature : " << psiBin.get_temp();
|
||||
std::cout << std::endl << "Sample Temperature : " << psiBin.GetTemp();
|
||||
} else {
|
||||
for (unsigned int i=0; i<dVal.size(); i++) {
|
||||
std::cout << std::endl << "Sample Temp. " << i+1 << " : " << dVal[i] << " (" << dErrVal[i] << ") K";
|
||||
}
|
||||
}
|
||||
std::cout << std::endl << "Sample Mag. Field : " << psiBin.get_field();
|
||||
std::cout << std::endl << "No of Histos : " << psiBin.get_numberHisto_int();
|
||||
std::cout << std::endl << "Time Resolution : " << psiBin.get_binWidth_ns() << " ns";
|
||||
for (int i=0; i<psiBin.get_numberHisto_int(); i++) {
|
||||
std::cout << std::endl << "Sample Mag. Field : " << psiBin.GetField();
|
||||
std::cout << std::endl << "No of Histos : " << psiBin.GetNumberHistoInt();
|
||||
std::cout << std::endl << "Time Resolution : " << psiBin.GetBinWidthNanoSec() << " ns";
|
||||
for (int i=0; i<psiBin.GetNumberHistoInt(); i++) {
|
||||
std::cout << std::endl << "-------------------";
|
||||
std::cout << std::endl << "Histo No : " << i;
|
||||
std::cout << std::endl << "Histo Name : " << psiBin.get_nameHisto(i);
|
||||
std::cout << std::endl << "Histo Length : " << psiBin.get_histoLength_bin();
|
||||
std::cout << std::endl << "Time Zero Bin : " << psiBin.get_t0_int(i);
|
||||
std::cout << std::endl << "First Good Bin : " << psiBin.get_firstGood_int(i);
|
||||
std::cout << std::endl << "Last Good Bin : " << psiBin.get_lastGood_int(i);
|
||||
std::cout << std::endl << "No of Events : " << psiBin.get_eventsHisto_long(i);
|
||||
std::cout << std::endl << "Histo Name : " << psiBin.GetNameHisto(i);
|
||||
std::cout << std::endl << "Histo Length : " << psiBin.GetHistoLengthBin();
|
||||
std::cout << std::endl << "Time Zero Bin : " << psiBin.GetT0Int(i);
|
||||
std::cout << std::endl << "First Good Bin : " << psiBin.GetFirstGoodInt(i);
|
||||
std::cout << std::endl << "Last Good Bin : " << psiBin.GetLastGoodInt(i);
|
||||
std::cout << std::endl << "No of Events : " << psiBin.GetEventsHistoLong(i);
|
||||
}
|
||||
std::cout << std::endl << "-------------------" << std::endl << std::endl;
|
||||
|
||||
@@ -415,9 +448,12 @@ int dump_header_psi_bin(const std::string fileName, const std::string fileFormat
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>dump the header information of a MUD file.
|
||||
* @param fileName file name of the MUD file
|
||||
*
|
||||
* @return 0 on success, 1 otherwise
|
||||
*/
|
||||
int dump_header_mud(const std::string fileName, const std::string fileFormat)
|
||||
int dump_header_mud(const std::string fileName)
|
||||
{
|
||||
int fh;
|
||||
UINT32 type, val;
|
||||
@@ -433,7 +469,7 @@ int dump_header_mud(const std::string fileName, const std::string fileFormat)
|
||||
}
|
||||
|
||||
std::cout << std::endl << "-------------------";
|
||||
std::cout << std::endl << "fileName = " << fileName << ", fileFormat = " << fileFormat;
|
||||
std::cout << std::endl << "fileName = " << fileName << ", fileFormat = MUD";
|
||||
std::cout << std::endl << "-------------------";
|
||||
// run title
|
||||
success = MUD_getTitle( fh, str, sizeof(str) );
|
||||
@@ -593,9 +629,12 @@ int dump_header_mud(const std::string fileName, const std::string fileFormat)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>dump the header information of a WKM file.
|
||||
* @param fileName file name of the WKM file.
|
||||
*
|
||||
* @return 0 on success, 1 otherwise
|
||||
*/
|
||||
int dump_header_wkm(const std::string fileName, const std::string fileFormat)
|
||||
int dump_header_wkm(const std::string fileName)
|
||||
{
|
||||
std::ifstream fin(fileName.c_str(), std::ifstream::in);
|
||||
if (!fin.is_open()) {
|
||||
@@ -603,7 +642,7 @@ int dump_header_wkm(const std::string fileName, const std::string fileFormat)
|
||||
return 1;
|
||||
}
|
||||
std::cout << std::endl << "-------------------";
|
||||
std::cout << std::endl << "fileName = " << fileName << ", fileFormat = " << fileFormat;
|
||||
std::cout << std::endl << "fileName = " << fileName << ", fileFormat = WKM";
|
||||
std::cout << std::endl << "-------------------";
|
||||
char header[256];
|
||||
while (fin.good()) {
|
||||
@@ -620,9 +659,11 @@ int dump_header_wkm(const std::string fileName, const std::string fileFormat)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief is_number
|
||||
* @param s
|
||||
* @return
|
||||
* <p>checks if a string is a number
|
||||
*
|
||||
* @param s number string to be checked
|
||||
*
|
||||
* @return true if 's' is a number, false otherwise
|
||||
*/
|
||||
bool dump_is_number(const char *s)
|
||||
{
|
||||
@@ -642,8 +683,9 @@ bool dump_is_number(const char *s)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief dump_current_year
|
||||
* @return
|
||||
* <p>reads the current year from the system and converts it to a string.
|
||||
*
|
||||
* @return the current year as a string.
|
||||
*/
|
||||
int dump_current_year()
|
||||
{
|
||||
@@ -660,109 +702,13 @@ int dump_current_year()
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief dump_create_fln
|
||||
* @param runNo
|
||||
* @param year
|
||||
* @param fileFormat
|
||||
* @return
|
||||
*/
|
||||
std::string dump_create_fln(std::string runNo, std::string year, std::string fileFormat, bool pta, std::string instrument)
|
||||
{
|
||||
std::string result = "??";
|
||||
int yearShort=0;
|
||||
int iRunNo=0;
|
||||
|
||||
if (fileFormat.empty())
|
||||
fileFormat = "MusrRoot";
|
||||
|
||||
// make sure that a 'legal' file format has been found
|
||||
if (!boost::iequals(fileFormat, "MusrRoot") &&
|
||||
!boost::iequals(fileFormat, "NeXus") &&
|
||||
!boost::iequals(fileFormat, "ROOT") &&
|
||||
!boost::iequals(fileFormat, "PSI-BIN") &&
|
||||
!boost::iequals(fileFormat, "PSI-MDU") &&
|
||||
!boost::iequals(fileFormat, "MDU") &&
|
||||
!boost::iequals(fileFormat, "WKM")) {
|
||||
return result;
|
||||
}
|
||||
|
||||
// if year is an empty string get the current year
|
||||
int yy=-1;
|
||||
std::stringstream ss;
|
||||
if (year.empty()) {
|
||||
yy = dump_current_year();
|
||||
ss << yy;
|
||||
year = ss.str();
|
||||
}
|
||||
yy = atoi(year.c_str());
|
||||
if (yy > 2000)
|
||||
yearShort = yy - 2000;
|
||||
else
|
||||
yearShort = yy - 1900;
|
||||
|
||||
iRunNo = atoi(runNo.c_str());
|
||||
|
||||
char fln[64];
|
||||
char ptatdc[8];
|
||||
memset(ptatdc, '\0', sizeof(ptatdc));
|
||||
if (pta)
|
||||
strcpy(ptatdc, "pta");
|
||||
else
|
||||
strcpy(ptatdc, "tdc");
|
||||
if (boost::iequals(fileFormat, "MusrRoot") || boost::iequals(fileFormat, "ROOT")) {
|
||||
if (instrument == "") // i.e. LEM
|
||||
snprintf(fln, sizeof(fln), "lem%02d_his_%04d.root", yearShort, iRunNo);
|
||||
else
|
||||
snprintf(fln, sizeof(fln), "deltat_%s_%s_%s_%04d.root", ptatdc, instrument.c_str(), year.c_str(), iRunNo);
|
||||
} else if (boost::iequals(fileFormat, "NeXus")) {
|
||||
snprintf(fln, sizeof(fln), "%s.nxs", runNo.c_str());
|
||||
} else if (boost::iequals(fileFormat, "PSI-BIN")) {
|
||||
snprintf(fln, sizeof(fln), "deltat_%s_%s_%04d.bin", ptatdc, instrument.c_str(), iRunNo);
|
||||
} else if (boost::iequals(fileFormat, "PSI-MDU")) {
|
||||
snprintf(fln, sizeof(fln), "%s_%s_%s_%05d.mdu", ptatdc, instrument.c_str(), year.c_str(), iRunNo);
|
||||
} else if (boost::iequals(fileFormat, "MUD")) {
|
||||
snprintf(fln, sizeof(fln), "%06d.msr", iRunNo);
|
||||
} else if (boost::iequals(fileFormat, "WKM")) {
|
||||
|
||||
}
|
||||
result = fln;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief dump_file_exists
|
||||
* @param pathName
|
||||
* @return
|
||||
*/
|
||||
bool dump_file_exists(const std::string pathName)
|
||||
{
|
||||
bool exists = true;
|
||||
|
||||
int res = access(pathName.c_str(), R_OK);
|
||||
if (res < 0) {
|
||||
if (errno == ENOENT) {
|
||||
// file does not exist
|
||||
exists = false;
|
||||
} else if (errno == EACCES) {
|
||||
// file exists but is not readable
|
||||
exists = false;
|
||||
} else {
|
||||
// FAIL
|
||||
exists = false;
|
||||
}
|
||||
}
|
||||
|
||||
return exists;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief main
|
||||
* @param argc
|
||||
* @param argv
|
||||
* @return
|
||||
* <p>dump_header allows to dump the header (meta) information for various
|
||||
* muSR specific file formats.
|
||||
*
|
||||
* @param argc argument count
|
||||
* @param argv argument list
|
||||
*
|
||||
* @return 0 on success, 1 otherwise
|
||||
*/
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@@ -775,8 +721,7 @@ int main(int argc, char *argv[])
|
||||
std::string fileName("");
|
||||
std::string fileFormat("");
|
||||
std::string year("");
|
||||
bool pta(false);
|
||||
std::string instrument("");
|
||||
std::string instrument("lem");
|
||||
bool summary(false);
|
||||
|
||||
for (int i=1; i<argc; i++) {
|
||||
@@ -867,29 +812,20 @@ int main(int argc, char *argv[])
|
||||
i++;
|
||||
} else if (!strcmp(argv[i], "-s") || !strcmp(argv[i], "--summary")) {
|
||||
summary = true;
|
||||
} else if (!strcmp(argv[i], "--psi-bulk")) {
|
||||
if (i+2 >= argc) {
|
||||
std::cerr << std::endl << "**ERROR** found --psi-bulk with insufficient input!" << std::endl;
|
||||
} else if (!strcmp(argv[i], "-i") || !strcmp(argv[i], "--instrument")) {
|
||||
if (i+1 >= argc) {
|
||||
std::cerr << std::endl << "**ERROR** found option --instrument without <instrument> input!" << std::endl;
|
||||
dump_header_syntax();
|
||||
return 1;
|
||||
}
|
||||
if (!strcmp(argv[i+1], "pta"))
|
||||
pta = true;
|
||||
else if (!strcmp(argv[i+1], "tdc"))
|
||||
pta = false;
|
||||
else {
|
||||
std::cerr << std::endl << "**ERROR** found --psi-bulk with 1st argument '" << argv[i+1] << "'! Allowed is 'pta' or 'tdc'." << std::endl;
|
||||
if (strcmp(argv[i+1], "lem") && strcmp(argv[i+1], "gps") && strcmp(argv[i+1], "ltf") &&
|
||||
strcmp(argv[i+1], "dolly") && strcmp(argv[i+1], "gpd") && strcmp(argv[i+1], "hifi")) {
|
||||
std::cerr << std::endl << "**ERROR** found --instrument with unkown instrument name: '" << argv[i+1] << "'!" << std::endl;
|
||||
dump_header_syntax();
|
||||
return 1;
|
||||
}
|
||||
if (strcmp(argv[i+2], "gps") && strcmp(argv[i+2], "ltf") && strcmp(argv[i+2], "dolly") &&
|
||||
strcmp(argv[i+2], "gpd") && strcmp(argv[i+2], "hifi")) {
|
||||
std::cerr << std::endl << "**ERROR** found --psi-bulk with 2nd argument '" << argv[i+1] << "'! This is an unkown instrument." << std::endl;
|
||||
dump_header_syntax();
|
||||
return 1;
|
||||
}
|
||||
instrument = argv[i+2];
|
||||
i += 2;
|
||||
instrument = argv[i+1];
|
||||
i++;
|
||||
} else {
|
||||
std::cerr << std::endl << "**ERROR** found unkown option '" << argv[i] << "'." << std::endl;
|
||||
dump_header_syntax();
|
||||
@@ -949,70 +885,25 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
// runNo given, hence try to create the necessary file name based on the provided information
|
||||
if (runNo != "") {
|
||||
std::string str = dump_create_fln(runNo, year, fileFormat, pta, instrument);
|
||||
if (str == "??") {
|
||||
std::cerr << std::endl << "**ERROR** couldn't get a proper file name." << std::endl;
|
||||
return 1;
|
||||
}
|
||||
fileName = str;
|
||||
}
|
||||
|
||||
bool found_fln = false;
|
||||
// try to find path-file-name via run name templates
|
||||
std::string pathFln("");
|
||||
// 1st check if the file name is the full path-file name and the file exists
|
||||
pathFln = fileName;
|
||||
if (dump_file_exists(pathFln))
|
||||
found_fln = true;
|
||||
|
||||
// 2nd check if the file name is found in the current directory
|
||||
if (!found_fln) {
|
||||
pathFln = "./" + fileName;
|
||||
if (dump_file_exists(pathFln))
|
||||
found_fln = true;
|
||||
}
|
||||
|
||||
// 3rd check if file name is found in any default search paths if not already found in the current directory
|
||||
if (!found_fln) {
|
||||
PStringVector pathList = startupHandler->GetDataPathList();
|
||||
for (unsigned int i=0; i<pathList.size(); i++) {
|
||||
if (boost::iequals(fileFormat, "MusrRoot") || boost::iequals(fileFormat, "ROOT") ||
|
||||
boost::iequals(fileFormat, "WKM")) {
|
||||
if (instrument == "") // i.e. LEM
|
||||
pathFln = pathList[i] + "/" + year + "/" + fileName;
|
||||
else
|
||||
pathFln = pathList[i] + "/d" + year + "/tdc/root/" + fileName;
|
||||
} else {
|
||||
if (pta)
|
||||
pathFln = pathList[i] + "/d" + year + "/pta/" + fileName;
|
||||
else
|
||||
pathFln = pathList[i] + "/d" + year + "/tdc/" + fileName;
|
||||
}
|
||||
if (dump_file_exists(pathFln)) {
|
||||
found_fln = true;
|
||||
break;
|
||||
}
|
||||
if (fileName == "") { // only look for runs if the file name is not explicitly given
|
||||
int yy = static_cast<int>(strtod(year.c_str(), static_cast<char**>(nullptr)));
|
||||
int run = static_cast<int>(strtod(runNo.c_str(), static_cast<char**>(nullptr)));
|
||||
PFindRun findRun(startupHandler->GetDataPathList(), startupHandler->GetRunNameTemplateList(), instrument, yy, run);
|
||||
if (findRun.FoundPathName()) {
|
||||
pathFln = findRun.GetPathName().Data();
|
||||
} else {
|
||||
std::cout << "debug> Couldn't find run: " << run << " for instrument " << instrument << ", and year: " << year << std::endl;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found_fln) {
|
||||
std::cerr << "**ERROR** couldn't find any appropriate file." << std::endl;
|
||||
// cleanup
|
||||
if (saxParser) {
|
||||
delete saxParser;
|
||||
saxParser = 0;
|
||||
}
|
||||
if (startupHandler) {
|
||||
delete startupHandler;
|
||||
startupHandler = nullptr;
|
||||
}
|
||||
return 1;
|
||||
} else { // file name explicitly provided, hence use this as pathFln
|
||||
pathFln = fileName;
|
||||
}
|
||||
|
||||
// if file format is not given explicitly try to guess it based on the file name extension
|
||||
if ((fileFormat == "") && (fileName != "")) {
|
||||
std::string fln(fileName);
|
||||
if (fileFormat == "") {
|
||||
std::string fln(pathFln);
|
||||
boost::to_lower(fln);
|
||||
if (fln.find(".root") != std::string::npos)
|
||||
fileFormat = "MusrRoot"; // could be old ROOT (LEM) as well
|
||||
@@ -1038,7 +929,7 @@ int main(int argc, char *argv[])
|
||||
boost::to_lower(fileFormat);
|
||||
|
||||
if (boost::iequals(fileFormat, "MusrRoot") || boost::iequals(fileFormat, "ROOT")) {
|
||||
dump_header_root(pathFln, fileFormat, summary);
|
||||
dump_header_root(pathFln, summary);
|
||||
} else if (boost::iequals(fileFormat, "NeXus")) {
|
||||
#ifdef PNEXUS_ENABLED
|
||||
dump_header_nexus(pathFln);
|
||||
@@ -1048,9 +939,9 @@ int main(int argc, char *argv[])
|
||||
} else if (boost::iequals(fileFormat, "PSI-BIN") || boost::iequals(fileFormat, "PSI-MDU")) {
|
||||
dump_header_psi_bin(pathFln, fileFormat);
|
||||
} else if (boost::iequals(fileFormat, "MUD")) {
|
||||
dump_header_mud(pathFln, fileFormat);
|
||||
dump_header_mud(pathFln);
|
||||
} else if (boost::iequals(fileFormat, "WKM")) {
|
||||
dump_header_wkm(pathFln, fileFormat);
|
||||
dump_header_wkm(pathFln);
|
||||
}
|
||||
|
||||
// cleanup
|
||||
|
||||
2
src/external/BMWtools/BMWStartupHandler.cpp
vendored
@@ -403,7 +403,7 @@ void BMWStartupHandler::CheckLists()
|
||||
<< "BMWStartupHandler::CheckLists: Most probably this will go wrong and should therefore be fixed in the xml-file!" << std::endl;
|
||||
char eChar[5];
|
||||
for(unsigned int i(0); i<fEnergyList.size(); i++) {
|
||||
sprintf(eChar, "%02.1f", fEnergyList[i]);
|
||||
snprintf(eChar, sizeof(eChar), "%02.1f", fEnergyList[i]);
|
||||
fEnergyLabelList.push_back(std::string(eChar));
|
||||
}
|
||||
}
|
||||
|
||||
1
src/external/BMWtools/CMakeLists.txt
vendored
@@ -47,7 +47,6 @@ set_target_properties(BMWtools
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
BMWtools BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${CUBA_INC}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
||||
4
src/external/DummyUserFcn/src/CMakeLists.txt
vendored
@@ -12,7 +12,6 @@ root_generate_dictionary(
|
||||
PDummyUserFcnDict
|
||||
PDummyUserFcn.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${DUMMY_USER_FUNC_INC}
|
||||
-inlineInputHeader
|
||||
@@ -44,13 +43,12 @@ set_target_properties(PDummyUserFcn
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PDummyUserFcn BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../inc>
|
||||
)
|
||||
|
||||
#--- add library dependencies -------------------------------------------------
|
||||
target_link_libraries(PDummyUserFcn ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PUserFcnBase)
|
||||
target_link_libraries(PDummyUserFcn ${ROOT_LIBRARIES} PUserFcnBase)
|
||||
|
||||
#--- install PDummyUserFcn solib -------------------------------------------------
|
||||
install(TARGETS PDummyUserFcn DESTINATION lib)
|
||||
|
||||
6
src/external/MagProximity/CMakeLists.txt
vendored
@@ -7,7 +7,7 @@ root_generate_dictionary(
|
||||
PMagProximityFitterDict
|
||||
PMagProximityFitter.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${FFTW3_INCLUDE}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-inlineInputHeader
|
||||
@@ -44,7 +44,7 @@ add_library(PMagProximityFitter SHARED
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PMagProximityFitter BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
)
|
||||
@@ -56,7 +56,7 @@ set_target_properties(PMagProximityFitter
|
||||
)
|
||||
|
||||
#--- add library dependencies -------------------------------------------------
|
||||
target_link_libraries(PMagProximityFitter ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PRgeHandler PUserFcnBase)
|
||||
target_link_libraries(PMagProximityFitter FFTW3::FFTW3 ${ROOT_LIBRARIES} PRgeHandler PUserFcnBase)
|
||||
|
||||
#--- install PMagProximityFitter solib ----------------------------------------
|
||||
install(TARGETS PMagProximityFitter DESTINATION lib)
|
||||
|
||||
4
src/external/MagProximity/PMagProximity.h
vendored
@@ -50,11 +50,11 @@ typedef std::vector<Double_t> PDoubleVector;
|
||||
/**
|
||||
* <p>
|
||||
*/
|
||||
typedef struct {
|
||||
struct PMPRgeData {
|
||||
Double_t energy;
|
||||
PDoubleVector stoppingDistance;
|
||||
PDoubleVector stoppingAmplitude;
|
||||
} PMPRgeData;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,7 @@ set(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
set(exec_prefix "\$\{prefix\}")
|
||||
set(libdir "\$\{exec_prefix\}/lib")
|
||||
set(includedir "\$\{prefix\}/include")
|
||||
set(PSIBIN_VERSION "0.1.0")
|
||||
set(PSIBIN_VERSION "0.2.0")
|
||||
set(PSIBIN_LIBRARY_NAME "Class_MuSR_PSI")
|
||||
configure_file("Class_MuSR_PSI.pc.in" "Class_MuSR_PSI.pc" @ONLY)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
begin : Alex Amato, October 2005
|
||||
modified : Andrea Raselli, October 2009
|
||||
: Andreas Suter, April 2019
|
||||
: Andreas Suter, April 2019, May 2020
|
||||
copyright : (C) 2005 by
|
||||
email : alex.amato@psi.ch
|
||||
|
||||
@@ -56,57 +56,55 @@ class MuSR_td_PSI_bin {
|
||||
~MuSR_td_PSI_bin();
|
||||
|
||||
private:
|
||||
// ------------------------------------start of the variables
|
||||
std::string fFilename;
|
||||
std::string fReadStatus;
|
||||
std::string fWriteStatus;
|
||||
std::string fConsistencyStatus;
|
||||
bool fReadingOk;
|
||||
bool fWritingOk;
|
||||
bool fConsistencyOk;
|
||||
|
||||
std::string filename;
|
||||
std::string readstatus;
|
||||
std::string writestatus;
|
||||
std::string consistencyStatus;
|
||||
bool readingok;
|
||||
bool writingok;
|
||||
bool consistencyOk;
|
||||
char fFormatId[3];
|
||||
|
||||
char format_id[3];
|
||||
int fNumRun;
|
||||
|
||||
int num_run;
|
||||
char fSample[11];
|
||||
char fTemp[11];
|
||||
char fField[11];
|
||||
char fOrient[11];
|
||||
char fSetup[11];
|
||||
char fComment[63];
|
||||
|
||||
char sample[11];
|
||||
char temp[11];
|
||||
char field[11];
|
||||
char orient[11];
|
||||
char setup[11];
|
||||
char comment[63];
|
||||
char fDateStart[10];
|
||||
char fDateStop[10];
|
||||
char fTimeStart[9];
|
||||
char fTimeStop[9];
|
||||
|
||||
char date_start[10];
|
||||
char date_stop[10];
|
||||
char time_start[9];
|
||||
char time_stop[9];
|
||||
double fBinWidth;
|
||||
|
||||
double bin_width;
|
||||
int fNumberHisto;
|
||||
int fLengthHisto;
|
||||
char fLabelsHisto[MAXHISTO][MAXLABELSIZE];
|
||||
|
||||
int number_histo;
|
||||
int length_histo;
|
||||
char labels_histo[MAXHISTO][MAXLABELSIZE];
|
||||
int fTotalEvents;
|
||||
int fEventsPerHisto[MAXHISTO];
|
||||
|
||||
int total_events;
|
||||
int events_per_histo[MAXHISTO];
|
||||
int fDefaultBinning;
|
||||
|
||||
int default_binning;
|
||||
float fRealT0[MAXHISTO];
|
||||
int fIntegerT0[MAXHISTO];
|
||||
int fFirstGood[MAXHISTO];
|
||||
int fLastGood[MAXHISTO];
|
||||
|
||||
float real_t0[MAXHISTO];
|
||||
int integer_t0[MAXHISTO];
|
||||
int first_good[MAXHISTO];
|
||||
int last_good[MAXHISTO];
|
||||
int fNumberScaler;
|
||||
int fScalers[MAXSCALER];
|
||||
char fLabelsScalers[MAXSCALER][MAXLABELSIZE];
|
||||
|
||||
int number_scaler;
|
||||
int scalers[MAXSCALER];
|
||||
char labels_scalers[MAXSCALER][MAXLABELSIZE];
|
||||
int fNumberTemper;
|
||||
float fTemper[MAXTEMPER];
|
||||
float fTempDeviation[MAXTEMPER];
|
||||
|
||||
int number_temper;
|
||||
float temper[MAXTEMPER];
|
||||
float temp_deviation[MAXTEMPER];
|
||||
|
||||
int **histo;
|
||||
std::vector< std::vector<int> > fHisto;
|
||||
|
||||
public:
|
||||
|
||||
@@ -118,22 +116,22 @@ class MuSR_td_PSI_bin {
|
||||
NOTE: Histogram information returned by \<pointer_to_array\> = ..._array() methods
|
||||
should be freed by delete [] \<pointer_to_array\>;
|
||||
*/
|
||||
std::vector< std::vector<double> > histos_vector ;
|
||||
std::vector< std::vector<double> > fHistosVector ;
|
||||
|
||||
// ------------------------------------end of the variables
|
||||
|
||||
public:
|
||||
|
||||
int read(const char* fileName); // generic read
|
||||
int write(const char *fileName); // generic write
|
||||
int Read(const char* fileName); // generic read
|
||||
int Write(const char *fileName); // generic write
|
||||
|
||||
int readbin(const char* fileName); // read MuSR PSI bin format
|
||||
int writebin(const char *fileName); // write MuSR PSI bin format
|
||||
int readmdu(const char* fileName); // read MuSR mdu format
|
||||
int writemdu(const char* fileName); // write MuSR mdu format
|
||||
int ReadBin(const char* fileName); // read MuSR PSI bin format
|
||||
int WriteBin(const char *fileName); // write MuSR PSI bin format
|
||||
int ReadMdu(const char* fileName); // read MuSR mdu format
|
||||
int WriteMdu(const char* fileName); // write MuSR mdu format
|
||||
|
||||
bool readingOK() const;
|
||||
bool writingOK() const;
|
||||
bool ReadingOK() const;
|
||||
bool WritingOK() const;
|
||||
bool CheckDataConsistency(int tag=0); // tag: 0=reasonable, 1=strict
|
||||
std::string ReadStatus() const;
|
||||
std::string WriteStatus() const;
|
||||
@@ -143,57 +141,46 @@ class MuSR_td_PSI_bin {
|
||||
int Show() const;
|
||||
int Clear();
|
||||
|
||||
int get_histo_int(int histo_num, int j);
|
||||
double get_histo(int histo_num, int j);
|
||||
int GetHistoInt(int histo_num, int j);
|
||||
double GetHisto(int histo_num, int j);
|
||||
|
||||
int *get_histo_array_int(int histo_num);
|
||||
double *get_histo_array(int histo_num, int binning);
|
||||
int put_histo_array_int(std::vector< std::vector<int> > histo, int tag = 0);
|
||||
std::vector<double> get_histo_vector(int histo_num, int binning);
|
||||
std::vector<double> get_histo_vector_no0(int histo_num, int binning);
|
||||
std::vector<int> GetHistoArrayInt(int histo_num);
|
||||
std::vector<double> GetHistoArray(int histo_num, int binning);
|
||||
int PutHistoArrayInt(std::vector< std::vector<int> > &histo, int tag = 0);
|
||||
std::vector<double> GetHistoVector(int histo_num, int binning);
|
||||
std::vector<double> GetHistoVectorNo0(int histo_num, int binning);
|
||||
|
||||
double *get_histo_fromt0_array(int histo_num, int binning, int offset = 0);
|
||||
double *GetHistoFromT0Array(int histo_num, int binning, int offset = 0);
|
||||
|
||||
std::vector<double> get_histo_fromt0_vector(int histo_num, int binning, int offset = 0);
|
||||
std::vector<double> GetHistoFromT0Vector(int histo_num, int binning, int offset = 0);
|
||||
|
||||
double *get_histo_goodBins_array(int histo_num, int binning);
|
||||
double *GetHistoGoodBinsArray(int histo_num, int binning);
|
||||
|
||||
std::vector<double> get_histo_goodBins_vector(int histo_num, int binning);
|
||||
std::vector<double> GetHistoGoodBinsVector(int histo_num, int binning);
|
||||
|
||||
double *get_histo_fromt0_minus_bckgrd_array(int histo_num,
|
||||
int lower_bckgdr,
|
||||
int higher_bckgdr,
|
||||
int binning,
|
||||
int offset = 0);
|
||||
double *GetHistoFromT0MinusBkgArray(int histo_num,
|
||||
int lower_bckgdr,
|
||||
int higher_bckgdr,
|
||||
int binning,
|
||||
int offset = 0);
|
||||
|
||||
std::vector<double> get_histo_fromt0_minus_bckgrd_vector(int histo_num,
|
||||
int lower_bckgdr,
|
||||
int higher_bckgdr,
|
||||
int binning,
|
||||
int offset = 0);
|
||||
std::vector<double> GetHistoFromT0MinusBkgVector(int histo_num,
|
||||
int lower_bckgdr,
|
||||
int higher_bckgdr,
|
||||
int binning,
|
||||
int offset = 0);
|
||||
|
||||
double *get_histo_goodBins_minus_bckgrd_array(int histo_num,
|
||||
int lower_bckgrd,
|
||||
int higher_bckgrd,
|
||||
int binning);
|
||||
double *GetHistoGoodBinsMinusBkgArray(int histo_num,
|
||||
int lower_bckgrd,
|
||||
int higher_bckgrd,
|
||||
int binning);
|
||||
|
||||
std::vector<double> get_histo_goodBins_minus_bckgrd_vector(int histo_num,
|
||||
int lower_bckgrd,
|
||||
int higher_bckgrd,
|
||||
int binning);
|
||||
std::vector<double> GetHistoGoodBinsMinusBkgVector(int histo_num,
|
||||
int lower_bckgrd,
|
||||
int higher_bckgrd,
|
||||
int binning);
|
||||
|
||||
double *get_asymmetry_array(int histo_num_plus,
|
||||
int histo_num_minus,
|
||||
double alpha_param,
|
||||
int binning,
|
||||
int lower_bckgrd_plus,
|
||||
int higher_bckgrd_plus,
|
||||
int lower_bckgrd_minus,
|
||||
int higher_bckgrd_minus,
|
||||
int offset = 0,
|
||||
double y_offset = 0.);
|
||||
|
||||
std::vector<double> get_asymmetry_vector(int histo_num_plus,
|
||||
double *GetAsymmetryArray(int histo_num_plus,
|
||||
int histo_num_minus,
|
||||
double alpha_param,
|
||||
int binning,
|
||||
@@ -204,7 +191,28 @@ class MuSR_td_PSI_bin {
|
||||
int offset = 0,
|
||||
double y_offset = 0.);
|
||||
|
||||
double *get_error_asymmetry_array(int histo_num_plus,
|
||||
std::vector<double> GetAsymmetryVector(int histo_num_plus,
|
||||
int histo_num_minus,
|
||||
double alpha_param,
|
||||
int binning,
|
||||
int lower_bckgrd_plus,
|
||||
int higher_bckgrd_plus,
|
||||
int lower_bckgrd_minus,
|
||||
int higher_bckgrd_minus,
|
||||
int offset = 0,
|
||||
double y_offset = 0.);
|
||||
|
||||
double *GetErrorAsymmetryArray(int histo_num_plus,
|
||||
int histo_num_minus,
|
||||
double alpha_param,
|
||||
int binning,
|
||||
int lower_bckgrd_plus,
|
||||
int higher_bckgrd_plus,
|
||||
int lower_bckgrd_minus,
|
||||
int higher_bckgrd_minus,
|
||||
int offset = 0);
|
||||
|
||||
std::vector<double> GetErrorAsymmetryVector(int histo_num_plus,
|
||||
int histo_num_minus,
|
||||
double alpha_param,
|
||||
int binning,
|
||||
@@ -214,17 +222,7 @@ class MuSR_td_PSI_bin {
|
||||
int higher_bckgrd_minus,
|
||||
int offset = 0);
|
||||
|
||||
std::vector<double> get_error_asymmetry_vector(int histo_num_plus,
|
||||
int histo_num_minus,
|
||||
double alpha_param,
|
||||
int binning,
|
||||
int lower_bckgrd_plus,
|
||||
int higher_bckgrd_plus,
|
||||
int lower_bckgrd_minus,
|
||||
int higher_bckgrd_minus,
|
||||
int offset = 0);
|
||||
|
||||
double *get_asymmetry_goodBins_array(int histo_num_plus,
|
||||
double *GetAsymmetryGoodBinsArray(int histo_num_plus,
|
||||
int histo_num_minus,
|
||||
double alpha_param,
|
||||
int binning,
|
||||
@@ -233,16 +231,16 @@ class MuSR_td_PSI_bin {
|
||||
int lower_bckgrd_minus,
|
||||
int higher_bckgrd_minus);
|
||||
|
||||
std::vector<double> get_asymmetry_goodBins_vector(int histo_num_plus,
|
||||
int histo_num_minus,
|
||||
double alpha_param,
|
||||
int binning,
|
||||
int lower_bckgrd_plus,
|
||||
int higher_bckgrd_plus,
|
||||
int lower_bckgrd_minus,
|
||||
int higher_bckgrd_minus);
|
||||
std::vector<double> GetAsymmetryGoodBinsVector(int histo_num_plus,
|
||||
int histo_num_minus,
|
||||
double alpha_param,
|
||||
int binning,
|
||||
int lower_bckgrd_plus,
|
||||
int higher_bckgrd_plus,
|
||||
int lower_bckgrd_minus,
|
||||
int higher_bckgrd_minus);
|
||||
|
||||
double *get_error_asymmetry_goodBins_array(int histo_num_plus,
|
||||
double *GetErrorAsymmetryGoodBinsArray(int histo_num_plus,
|
||||
int histo_num_minus,
|
||||
double alpha_param,
|
||||
int binning,
|
||||
@@ -251,103 +249,103 @@ class MuSR_td_PSI_bin {
|
||||
int lower_bckgrd_minus,
|
||||
int higher_bckgrd_minus);
|
||||
|
||||
std::vector<double> get_error_asymmetry_goodBins_vector(int histo_num_plus,
|
||||
int histo_num_minus,
|
||||
double alpha_param,
|
||||
int binning,
|
||||
int lower_bckgrd_plus,
|
||||
int higher_bckgrd_plus,
|
||||
int lower_bckgrd_minus,
|
||||
int higher_bckgrd_minus);
|
||||
std::vector<double> GetErrorAsymmetryGoodBinsVector(int histo_num_plus,
|
||||
int histo_num_minus,
|
||||
double alpha_param,
|
||||
int binning,
|
||||
int lower_bckgrd_plus,
|
||||
int higher_bckgrd_plus,
|
||||
int lower_bckgrd_minus,
|
||||
int higher_bckgrd_minus);
|
||||
|
||||
|
||||
double get_binWidth_ps();
|
||||
void put_binWidth_ps(double binWidth);
|
||||
double get_binWidth_ns();
|
||||
void put_binWidth_ns(double binWidth);
|
||||
double get_binWidth_us();
|
||||
void put_binWidth_us(double binWidth);
|
||||
double GetBinWidthPicoSec();
|
||||
void PutBinWidthPicoSec(double binWidth);
|
||||
double GetBinWidthNanoSec();
|
||||
void PutBinWidthNanoSec(double binWidth);
|
||||
double GetBinWidthMicroSec();
|
||||
void PutBinWidthMicroSec(double binWidth);
|
||||
|
||||
int get_histoLength_bin();
|
||||
void put_histoLength_bin(int val) { length_histo = val; }
|
||||
int GetHistoLengthBin() { return fLengthHisto; }
|
||||
void PutHistoLengthBin(int val) { fLengthHisto = val; }
|
||||
|
||||
int get_numberHisto_int();
|
||||
void put_numberHisto_int(int val) { number_histo = val; }
|
||||
int GetNumberHistoInt() { return fNumberHisto; }
|
||||
void PutNumberHistoInt(int val) { fNumberHisto = val; }
|
||||
|
||||
std::string get_nameHisto(int i);
|
||||
int put_nameHisto(std::string histoName, int i);
|
||||
std::vector<std::string> get_histoNames_vector();
|
||||
int put_histoNames_vector(std::vector<std::string> &histoNames);
|
||||
std::string GetNameHisto(int i);
|
||||
int PutNameHisto(std::string histoName, int i);
|
||||
std::vector<std::string> GetHistoNamesVector();
|
||||
int PutHistoNamesVector(std::vector<std::string> &histoNames);
|
||||
|
||||
long get_eventsHisto_long(int i);
|
||||
std::vector<long> get_eventsHisto_vector();
|
||||
long GetEventsHistoLong(int i);
|
||||
std::vector<long> GetEventsHistoVector();
|
||||
|
||||
long get_totalEvents_long();
|
||||
long GetTotalEventsLong() { return long(fTotalEvents); }
|
||||
|
||||
int get_numberScaler_int();
|
||||
int put_numberScaler_int(int val);
|
||||
std::vector<long> get_scalers_vector();
|
||||
int put_scalers_vector(std::vector<int> scalerData);
|
||||
std::vector<std::string> get_scalersNames_vector();
|
||||
int put_scalersNames_vector(std::vector<std::string> scalersName);
|
||||
int GetNumberScalerInt();
|
||||
int PutNumberScalerInt(int val);
|
||||
std::vector<long> GetScalersVector();
|
||||
int PutScalersVector(std::vector<int> scalerData);
|
||||
std::vector<std::string> GetScalersNamesVector();
|
||||
int PutScalersNamesVector(std::vector<std::string> scalersName);
|
||||
|
||||
int get_default_binning();
|
||||
int get_t0_int(int i);
|
||||
int put_t0_int(int histoNo, int t0);
|
||||
std::vector<int> get_t0_vector();
|
||||
int put_t0_vector(std::vector<int> &t0Data);
|
||||
double get_t0_double(int i);
|
||||
int GetDefaultBinning();
|
||||
int GetT0Int(int i);
|
||||
int PutT0Int(int histoNo, int t0);
|
||||
std::vector<int> GetT0Vector();
|
||||
int PutT0Vector(std::vector<int> &t0Data);
|
||||
double GetT0Double(int i);
|
||||
|
||||
int get_max_t0_int ();
|
||||
int get_max_2_t0_int (int k, int j);
|
||||
int get_min_t0_int ();
|
||||
int get_min_2_t0_int (int k, int j);
|
||||
int GetMaxT0Int();
|
||||
int GetMax2T0Int (int k, int j);
|
||||
int GetMinT0Int();
|
||||
int GetMin2T0Int (int k, int j);
|
||||
|
||||
int get_firstGood_int(int i);
|
||||
std::vector<int> get_firstGood_vector();
|
||||
int put_firstGood_int(int i, int j);
|
||||
int GetFirstGoodInt(int i);
|
||||
std::vector<int> GetFirstGoodVector();
|
||||
int PutFirstGoodInt(int i, int j);
|
||||
|
||||
int get_lastGood_int(int i);
|
||||
std::vector<int> get_lastGood_vector();
|
||||
int put_lastGood_int(int i, int j);
|
||||
int GetLastGoodInt(int i);
|
||||
std::vector<int> GetLastGoodVector();
|
||||
int PutLastGoodInt(int i, int j);
|
||||
|
||||
int get_max_lastGood_int ();
|
||||
int get_max_2_lastGood_int (int k, int j);
|
||||
int get_min_lastGood_int ();
|
||||
int get_min_2_lastGood_int (int k, int j);
|
||||
int GetMaxLastGoodInt();
|
||||
int GetMax2LastGoodInt (int k, int j);
|
||||
int GetMinLastGoodInt();
|
||||
int GetMin2LastGoodInt (int k, int j);
|
||||
|
||||
int get_runNumber_int();
|
||||
int put_runNumber_int(int i);
|
||||
int GetRunNumberInt() { return fNumRun; }
|
||||
int PutRunNumberInt(int i);
|
||||
|
||||
std::string get_sample();
|
||||
int put_sample(std::string sample);
|
||||
std::string get_field();
|
||||
int put_field(std::string field);
|
||||
std::string get_orient();
|
||||
int put_orient(std::string orientation);
|
||||
std::string get_temp();
|
||||
int put_temp(std::string temp);
|
||||
std::string get_setup();
|
||||
int put_setup(std::string setup);
|
||||
std::string get_comment();
|
||||
int put_comment(std::string comment);
|
||||
std::string GetSample();
|
||||
int PutSample(std::string sample);
|
||||
std::string GetField();
|
||||
int PutField(std::string field);
|
||||
std::string GetOrient();
|
||||
int PutOrient(std::string orientation);
|
||||
std::string GetTemp();
|
||||
int PutTemp(std::string temp);
|
||||
std::string GetSetup();
|
||||
int PutSetup(std::string setup);
|
||||
std::string GetComment();
|
||||
int PutComment(std::string comment);
|
||||
|
||||
std::vector<std::string> get_timeStart_vector();
|
||||
int put_timeStart_vector(std::vector<std::string> timeStart);
|
||||
std::vector<std::string> get_timeStop_vector();
|
||||
int put_timeStop_vector(std::vector<std::string> timeStop);
|
||||
std::vector<std::string> GetTimeStartVector();
|
||||
int PutTimeStartVector(std::vector<std::string> timeStart);
|
||||
std::vector<std::string> GetTimeStopVector();
|
||||
int PutTimeStopVector(std::vector<std::string> timeStop);
|
||||
|
||||
int get_numberTemperature_int();
|
||||
int put_numberTemperature_int(int noOfTemps);
|
||||
std::vector<double> get_temperatures_vector();
|
||||
int put_temperatures_vector(std::vector<double> &temps);
|
||||
std::vector<double> get_devTemperatures_vector();
|
||||
int put_devTemperatures_vector(std::vector<double> &devTemps);
|
||||
int GetNumberTemperatureInt() { return fNumberTemper; }
|
||||
int PutNumberTemperatureInt(int noOfTemps);
|
||||
std::vector<double> GetTemperaturesVector();
|
||||
int PutTemperaturesVector(std::vector<double> &temps);
|
||||
std::vector<double> GetDevTemperaturesVector();
|
||||
int PutDevTemperaturesVector(std::vector<double> &devTemps);
|
||||
|
||||
private:
|
||||
|
||||
int tmax(int x, int y);
|
||||
int tmin(int x, int y);
|
||||
int Tmax(int x, int y);
|
||||
int Tmin(int x, int y);
|
||||
|
||||
} ;
|
||||
#endif
|
||||
|
||||
6
src/external/Nonlocal/CMakeLists.txt
vendored
@@ -14,7 +14,7 @@ root_generate_dictionary(
|
||||
PNL_PippardFitterDict
|
||||
PNL_PippardFitter.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${FFTW3_INCLUDE}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${NONLOCAL_INC}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}
|
||||
@@ -52,7 +52,7 @@ add_library(PNL_PippardFitter SHARED
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PNL_PippardFitter BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
|
||||
)
|
||||
@@ -64,7 +64,7 @@ set_target_properties(PNL_PippardFitter
|
||||
)
|
||||
|
||||
#--- add library dependencies -------------------------------------------------
|
||||
target_link_libraries(PNL_PippardFitter ${Boost_LIBRARIES} ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PRgeHandler PUserFcnBase)
|
||||
target_link_libraries(PNL_PippardFitter ${Boost_LIBRARIES} FFTW3::FFTW3 ${ROOT_LIBRARIES} PRgeHandler PUserFcnBase)
|
||||
|
||||
#--- install PNL_PippardFitter solib ------------------------------------------
|
||||
install(TARGETS PNL_PippardFitter DESTINATION lib)
|
||||
|
||||
40
src/external/TLemRunHeader/TLemRunHeader.cxx
vendored
@@ -91,7 +91,7 @@ void TLemRunHeader::SetStopTimeString(const Char_t *stop){
|
||||
void TLemRunHeader::SetModeratorHV(Float_t modHV, Float_t error){
|
||||
TString str;
|
||||
char s[80];
|
||||
sprintf(s, "05 Moderator HV: %8.2f(%5.2f)", modHV, error);
|
||||
snprintf(s, sizeof(s), "05 Moderator HV: %8.2f(%5.2f)", modHV, error);
|
||||
str = s;
|
||||
fModeratorHVString.SetString(str);
|
||||
fModeratorHV = modHV;
|
||||
@@ -101,7 +101,7 @@ void TLemRunHeader::SetModeratorHV(Float_t modHV, Float_t error){
|
||||
void TLemRunHeader::SetSampleHV(Float_t value, Float_t error){
|
||||
TString str;
|
||||
char s[80];
|
||||
sprintf(s,"06 Sample HV: %8.2f(%5.2f)", value, error);
|
||||
snprintf(s, sizeof(s), "06 Sample HV: %8.2f(%5.2f)", value, error);
|
||||
str = s;
|
||||
fSampleHVString.SetString(str);
|
||||
fSampleHV = value;
|
||||
@@ -111,7 +111,7 @@ void TLemRunHeader::SetSampleHV(Float_t value, Float_t error){
|
||||
void TLemRunHeader::SetImpEnergy(Float_t value){
|
||||
TString str;
|
||||
char s[80];
|
||||
sprintf(s,"07 Impl. Energy: %8.2f", value);
|
||||
snprintf(s, sizeof(s), "07 Impl. Energy: %8.2f", value);
|
||||
str = s;
|
||||
fImpEnergyString.SetString(str);
|
||||
fImpEnergy = value;
|
||||
@@ -120,7 +120,7 @@ void TLemRunHeader::SetImpEnergy(Float_t value){
|
||||
void TLemRunHeader::SetSampleTemperature(Float_t value, Float_t error){
|
||||
TString str;
|
||||
char s[80];
|
||||
sprintf(s,"08 Sample T: %8.2f(%5.2f)", value, error);
|
||||
snprintf(s, sizeof(s), "08 Sample T: %8.2f(%5.2f)", value, error);
|
||||
str = s;
|
||||
fSampleTemperatureString.SetString(str);
|
||||
fSampleTemperature = value;
|
||||
@@ -130,7 +130,7 @@ void TLemRunHeader::SetSampleTemperature(Float_t value, Float_t error){
|
||||
void TLemRunHeader::SetSampleBField(Float_t value, Float_t error){
|
||||
TString str;
|
||||
char s[80];
|
||||
sprintf(s,"09 Sample B: %8.2f(%5.2f)", value, error);
|
||||
snprintf(s, sizeof(s), "09 Sample B: %8.2f(%5.2f)", value, error);
|
||||
str = s;
|
||||
fSampleBFieldString.SetString(str);
|
||||
fSampleBField = value;
|
||||
@@ -140,7 +140,7 @@ void TLemRunHeader::SetSampleBField(Float_t value, Float_t error){
|
||||
void TLemRunHeader::SetTimeResolution(Float_t value){
|
||||
TString str;
|
||||
char s[80];
|
||||
sprintf(s,"10 Time Res.: %10.7f", value);
|
||||
snprintf(s, sizeof(s), "10 Time Res.: %10.7f", value);
|
||||
str = s;
|
||||
fTimeResolutionString.SetString(str);
|
||||
fTimeResolution = value;
|
||||
@@ -149,7 +149,7 @@ void TLemRunHeader::SetTimeResolution(Float_t value){
|
||||
void TLemRunHeader::SetNChannels(Int_t value){
|
||||
TString str;
|
||||
char s[80];
|
||||
sprintf(s,"11 N Channels: %8d", value);
|
||||
snprintf(s, sizeof(s), "11 N Channels: %8d", value);
|
||||
str = s;
|
||||
fNChannelsString.SetString(str);
|
||||
fNChannels = value;
|
||||
@@ -158,7 +158,7 @@ void TLemRunHeader::SetNChannels(Int_t value){
|
||||
void TLemRunHeader::SetNHist(Int_t value){
|
||||
TString str;
|
||||
char s[80];
|
||||
sprintf(s,"12 N Histograms: %6d", value);
|
||||
snprintf(s, sizeof(s), "12 N Histograms: %6d", value);
|
||||
str = s;
|
||||
fNHistString.SetString(str);
|
||||
fNHist = value;
|
||||
@@ -168,7 +168,7 @@ void TLemRunHeader::SetNHist(Int_t value){
|
||||
void TLemRunHeader::SetOffsetPPCHistograms(UInt_t value){
|
||||
TString str;
|
||||
char s[80];
|
||||
sprintf(s,"13 Offset PPC Histograms: %6d", value);
|
||||
snprintf(s, sizeof(s), "13 Offset PPC Histograms: %6d", value);
|
||||
str = s;
|
||||
fOffsetPPCHistogramsString.SetString(str);
|
||||
fOffsetPPCHistograms = value;
|
||||
@@ -364,25 +364,25 @@ void TLemRunHeader::DrawHeader() const {
|
||||
strcpy(str, "Run Stop: ");
|
||||
strcat(str, runStop);
|
||||
text = pt->AddText(str);
|
||||
sprintf(str, "Run Number: %10d", GetRunNumber());
|
||||
snprintf(str, sizeof(str), "Run Number: %10d", GetRunNumber());
|
||||
text = pt->AddText(str);
|
||||
sprintf(str, "Moderator HV: %10.2f kV", fModeratorHV);
|
||||
snprintf(str, sizeof(str), "Moderator HV: %10.2f kV", fModeratorHV);
|
||||
text = pt->AddText(str);
|
||||
sprintf(str, "Sample HV: %10.2f kV", fSampleHV);
|
||||
snprintf(str, sizeof(str), "Sample HV: %10.2f kV", fSampleHV);
|
||||
text = pt->AddText(str);
|
||||
sprintf(str, "Impl. Energy: %10.2f keV", fImpEnergy);
|
||||
snprintf(str, sizeof(str), "Impl. Energy: %10.2f keV", fImpEnergy);
|
||||
text = pt->AddText(str);
|
||||
sprintf(str, "Sample T: %10.2f K", fSampleTemperature);
|
||||
snprintf(str, sizeof(str), "Sample T: %10.2f K", fSampleTemperature);
|
||||
text = pt->AddText(str);
|
||||
sprintf(str, "Sample B: %10.2f G", fSampleBField);
|
||||
snprintf(str, sizeof(str), "Sample B: %10.2f G", fSampleBField);
|
||||
text = pt->AddText(str);
|
||||
sprintf(str, "Time Res.: %10.7f ns", fTimeResolution);
|
||||
snprintf(str, sizeof(str), "Time Res.: %10.7f ns", fTimeResolution);
|
||||
text = pt->AddText(str);
|
||||
sprintf(str, "N Channels: %10d", fNChannels);
|
||||
snprintf(str, sizeof(str), "N Channels: %10d", fNChannels);
|
||||
text = pt->AddText(str);
|
||||
sprintf(str, "N Histograms: %10d", fNHist);
|
||||
snprintf(str, sizeof(str), "N Histograms: %10d", fNHist);
|
||||
text = pt->AddText(str);
|
||||
sprintf(str, "Offset PPC Histograms: %10d", fOffsetPPCHistograms);
|
||||
snprintf(str, sizeof(str), "Offset PPC Histograms: %10d", fOffsetPPCHistograms);
|
||||
text = pt->AddText(str);
|
||||
strcpy(str, "Cuts: ");
|
||||
strcat(str, cuts);
|
||||
@@ -393,7 +393,7 @@ void TLemRunHeader::DrawHeader() const {
|
||||
|
||||
strcpy(str,"t0: ");
|
||||
for (Int_t i=0; i<fNHist; i++){
|
||||
sprintf(helpstr, " %7.2f ", fTimeZero[i]);
|
||||
snprintf(helpstr, sizeof(helpstr), " %7.2f ", fTimeZero[i]);
|
||||
strcat(str, helpstr);
|
||||
}
|
||||
text = pt->AddText(str);
|
||||
|
||||
1
src/external/libBNMR/CMakeLists.txt
vendored
@@ -14,7 +14,6 @@ root_generate_dictionary(
|
||||
TBNMRDict
|
||||
TBNMR.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${MUSRFIT_INC}
|
||||
-inlineInputHeader
|
||||
LINKDEF TBNMRLinkDef.h
|
||||
|
||||
@@ -11,7 +11,7 @@ root_generate_dictionary(
|
||||
LineProfileDict
|
||||
LineProfile.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${FFTW3_INCLUDE}
|
||||
-I${MUSRFIT_INC}
|
||||
LINKDEF LineProfileLinkDef.h
|
||||
MODULE LineProfile
|
||||
|
||||
@@ -13,7 +13,7 @@ root_generate_dictionary(
|
||||
TCalcMeanFieldsLEMDict
|
||||
TCalcMeanFieldsLEM.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${FFTW3_INCLUDE}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
-I${POFB_INC}
|
||||
@@ -48,7 +48,7 @@ set_target_properties(CalcMeanFieldsLEM
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
CalcMeanFieldsLEM BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${BMW_TOOLS_INC}>
|
||||
$<BUILD_INTERFACE:${POFB_INC}>
|
||||
@@ -57,7 +57,7 @@ target_include_directories(
|
||||
|
||||
#--- add library dependencies -------------------------------------------------
|
||||
target_link_libraries(CalcMeanFieldsLEM
|
||||
${FFTW3_LIBRARY} ${ROOT_LIBRARIES} BMWtools FitPofB PUserFcnBase
|
||||
FFTW3::FFTW3 ${ROOT_LIBRARIES} BMWtools FitPofB PUserFcnBase
|
||||
)
|
||||
|
||||
#--- install CalcMeanFieldsLEM solib ------------------------------------------
|
||||
|
||||
@@ -101,7 +101,7 @@ double TMeanFieldsForScHalfSpace::operator()(double E, const std::vector<double>
|
||||
if (E > energies.back())
|
||||
return CalcMeanB(energies.back(), BofZ);
|
||||
|
||||
energyIter = find_if(energies.begin(), energies.end(), bind2nd( greater<double>(), E));
|
||||
energyIter = find_if(energies.begin(), energies.end(), [E](const double ee){ return E < ee; }); //as35: bind2nd( greater<double>(), E));
|
||||
// cout << *(energyIter - 1) << " " << *(energyIter) << endl;
|
||||
|
||||
double E1(*(energyIter - 1));
|
||||
@@ -201,7 +201,7 @@ double TMeanFieldsForScSingleLayer::operator()(double E, const std::vector<doubl
|
||||
if (E > energies.back())
|
||||
return CalcMeanB(energies.back(), interfaces, weights, BofZ);
|
||||
|
||||
energyIter = find_if(energies.begin(), energies.end(), bind2nd( greater<double>(), E));
|
||||
energyIter = find_if(energies.begin(), energies.end(), [E](const double ee){ return E < ee; }); //as35: bind2nd( greater<double>(), E));
|
||||
// cout << *(energyIter - 1) << " " << *(energyIter) << endl;
|
||||
|
||||
double E1(*(energyIter - 1));
|
||||
@@ -310,7 +310,7 @@ double TMeanFieldsForScBilayer::operator()(double E, const std::vector<double> &
|
||||
if (E > energies.back())
|
||||
return CalcMeanB(energies.back(), interfaces, weights, BofZ, width);
|
||||
|
||||
energyIter = find_if(energies.begin(), energies.end(), bind2nd( greater<double>(), E));
|
||||
energyIter = find_if(energies.begin(), energies.end(), [E](const double ee){ return E < ee; }); //as35: bind2nd( greater<double>(), E));
|
||||
// cout << *(energyIter - 1) << " " << *(energyIter) << endl;
|
||||
|
||||
double E1(*(energyIter - 1));
|
||||
@@ -425,7 +425,7 @@ double TMeanFieldsForScTrilayer::operator()(double E, const std::vector<double>
|
||||
if (E > energies.back())
|
||||
return CalcMeanB(energies.back(), interfaces, weights, BofZ);
|
||||
|
||||
energyIter = find_if(energies.begin(), energies.end(), bind2nd( greater<double>(), E));
|
||||
energyIter = find_if(energies.begin(), energies.end(), [E](const double ee){ return E < ee; }); //as35: bind2nd( greater<double>(), E));
|
||||
// cout << *(energyIter - 1) << " " << *(energyIter) << endl;
|
||||
|
||||
double E1(*(energyIter - 1));
|
||||
@@ -530,7 +530,7 @@ double TMeanFieldsForScTrilayerWithInsulator::operator()(double E, const std::ve
|
||||
if (E > energies.back())
|
||||
return CalcMeanB(energies.back(), interfaces, weights, BofZ);
|
||||
|
||||
energyIter = find_if(energies.begin(), energies.end(), bind2nd( greater<double>(), E));
|
||||
energyIter = find_if(energies.begin(), energies.end(), [E](const double ee){ return E < ee; }); //as35: bind2nd( greater<double>(), E));
|
||||
// cout << *(energyIter - 1) << " " << *(energyIter) << endl;
|
||||
|
||||
double E1(*(energyIter - 1));
|
||||
|
||||
2
src/external/libCuba/src/common/Fork.c
vendored
@@ -75,7 +75,7 @@ Extern void SUFFIX(cubafork)(Spin **pspin)
|
||||
}
|
||||
|
||||
if( cubaverb_ ) {
|
||||
sprintf(out, "using %d cores %d accelerators via "
|
||||
snprintf(out, sizeof(out), "using %d cores %d accelerators via "
|
||||
#ifdef HAVE_SHMGET
|
||||
"shared memory",
|
||||
#else
|
||||
|
||||
2
src/external/libCuba/src/common/Parallel.c
vendored
@@ -47,7 +47,7 @@ static inline void DoSampleParallel(This *t, number n, creal *x, real *f
|
||||
t->neval += n;
|
||||
|
||||
if( VERBOSE > 2 ) {
|
||||
sprintf(out, "sampling " NUMBER " points each on %d cores",
|
||||
snprintf(out, sizeof(out), "sampling " NUMBER " points each on %d cores",
|
||||
pcores, ncores);
|
||||
Print(out);
|
||||
}
|
||||
|
||||
6
src/external/libCuba/src/common/stddecl.h
vendored
@@ -94,7 +94,7 @@ enum { uninitialized = 0x61627563 };
|
||||
var = atoi(env); \
|
||||
if( cubaverb_ ) { \
|
||||
char out[64]; \
|
||||
sprintf(out, "env " name " = %d", (int)var); \
|
||||
snprintf(out, sizeof(out), "env " name " = %d", (int)var); \
|
||||
Print(out); \
|
||||
} \
|
||||
} \
|
||||
@@ -280,7 +280,7 @@ enum { signature = 0x41425543 };
|
||||
} \
|
||||
if( ini | statemsg ) { \
|
||||
char s[512]; \
|
||||
sprintf(s, ini ? \
|
||||
snprintf(s, sizeof(s), ini ? \
|
||||
"\nError restoring state from %s, starting from scratch." : \
|
||||
"\nRestored state from %s.", (t)->statefile); \
|
||||
Print(s); \
|
||||
@@ -307,7 +307,7 @@ enum { signature = 0x41425543 };
|
||||
} \
|
||||
if( fail | statemsg ) { \
|
||||
char s[512]; \
|
||||
sprintf(s, fail ? \
|
||||
snprintf(s, sizeof(s), fail ? \
|
||||
"\nError saving state to %s." : \
|
||||
"\nSaved state to %s.", (t)->statefile); \
|
||||
Print(s); \
|
||||
|
||||
22
src/external/libCuba/src/divonne/Integrate.c
vendored
@@ -36,7 +36,7 @@ static int Integrate(This *t, real *integral, real *error, real *prob)
|
||||
int fail;
|
||||
|
||||
if( VERBOSE > 1 ) {
|
||||
sprintf(out, "Divonne input parameters:\n"
|
||||
snprintf(out, sizeof(out), "Divonne input parameters:\n"
|
||||
" ndim " COUNT "\n ncomp " COUNT "\n"
|
||||
ML_NOT(" nvec " NUMBER "\n")
|
||||
" epsrel " REAL "\n epsabs " REAL "\n"
|
||||
@@ -189,7 +189,7 @@ if( StateWriteTest(t) ) { \
|
||||
WriteState(t);
|
||||
|
||||
if( VERBOSE ) {
|
||||
char *oe = out + sprintf(out, "\n"
|
||||
char *oe = out + snprintf(out, sizeof(out), "\n"
|
||||
"Iteration " COUNT " (pass " COUNT "): " COUNT " regions\n"
|
||||
NUMBER7 " integrand evaluations so far,\n"
|
||||
NUMBER7 " in optimizing regions,\n"
|
||||
@@ -197,7 +197,7 @@ if( StateWriteTest(t) ) { \
|
||||
state->iter, state->pass, t->nregions,
|
||||
t->neval, t->neval_opt, t->neval_cut);
|
||||
for( comp = 0; comp < t->ncomp; ++comp )
|
||||
oe += sprintf(oe, "\n[" COUNT "] "
|
||||
oe += snprintf(oe, sizeof(out), "\n[" COUNT "] "
|
||||
REAL " +- " REAL,
|
||||
comp + 1, SHOW(integral[comp]), SHOW(error[comp]));
|
||||
Print(out);
|
||||
@@ -255,7 +255,7 @@ if( StateWriteTest(t) ) { \
|
||||
SamplesAlloc(t, &t->samples[1]);
|
||||
|
||||
if( VERBOSE ) {
|
||||
sprintf(out, "\nMain integration on " COUNT
|
||||
snprintf(out, sizeof(out), "\nMain integration on " COUNT
|
||||
" regions with " NUMBER " samples per region.",
|
||||
t->nregions, t->samples[1].neff);
|
||||
Print(out);
|
||||
@@ -325,7 +325,7 @@ refine:
|
||||
can_adjust = false;
|
||||
|
||||
if( VERBOSE > 2 ) {
|
||||
sprintf(out, "Sampling remaining " COUNT
|
||||
snprintf(out, sizeof(out), "Sampling remaining " COUNT
|
||||
" regions with " NUMBER " points per region.",
|
||||
t->nregions, t->samples[1].neff);
|
||||
Print(out);
|
||||
@@ -369,7 +369,7 @@ refine:
|
||||
if( VERBOSE > 2 ) {
|
||||
cchar *msg = "\nRegion (" REALF ") - (" REALF ")";
|
||||
for( B = (b = region->bounds) + t->ndim; b < B; ++b ) {
|
||||
oe += sprintf(oe, msg, b->lower, b->upper);
|
||||
oe += snprintf(oe, sizeof(out), msg, b->lower, b->upper);
|
||||
msg = "\n (" REALF ") - (" REALF ")";
|
||||
}
|
||||
}
|
||||
@@ -408,12 +408,12 @@ refine:
|
||||
if( VERBOSE > 2 ) {
|
||||
#define Out2(f, r) SHOW((r)->avg), SHOW(res->spread/t->samples[f].neff), SHOW((r)->err)
|
||||
#define Out(f) Out2(f, &tot->phase[f])
|
||||
oe += sprintf(oe, "\n[" COUNT "] "
|
||||
oe += snprintf(oe, sizeof(out), "\n[" COUNT "] "
|
||||
REAL " +- " REAL "(" REAL ")\n "
|
||||
REAL " +- " REAL "(" REAL ")", ++comp, Out(0), Out(1));
|
||||
if( todo == 3 ) oe += sprintf(oe, "\n "
|
||||
if( todo == 3 ) oe += snprintf(oe, sizeof(out), "\n "
|
||||
REAL " +- " REAL "(" REAL ")", Out2(2, res));
|
||||
oe += sprintf(oe, " \tchisq " REAL, SHOW(chisq));
|
||||
oe += snprintf(oe, sizeof(out), " \tchisq " REAL, SHOW(chisq));
|
||||
}
|
||||
|
||||
tot->integral += avg;
|
||||
@@ -440,9 +440,9 @@ refine:
|
||||
}
|
||||
|
||||
if( VERBOSE > 2 ) {
|
||||
char *oe = out + sprintf(out, "\nTotals:");
|
||||
char *oe = out + snprintf(out, sizeof(out), "\nTotals:");
|
||||
for( tot = state->totals, comp = 0; tot < Tot; ++tot, ++comp )
|
||||
oe += sprintf(oe, "\n[" COUNT "] "
|
||||
oe += snprintf(oe, sizeof(out), "\n[" COUNT "] "
|
||||
REAL " +- " REAL " \tchisq " REAL " (" COUNT " df)",
|
||||
comp + 1, SHOW(integral[comp]), SHOW(error[comp]),
|
||||
SHOW(tot->chisq), df);
|
||||
|
||||
10
src/external/libFitPofB/classes/CMakeLists.txt
vendored
@@ -13,7 +13,7 @@ root_generate_dictionary(
|
||||
TLondon1DDict
|
||||
TLondon1D.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${FFTW3_INCLUDE}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
-I${FIT_P_OF_B_INC}
|
||||
@@ -25,7 +25,7 @@ root_generate_dictionary(
|
||||
TVortexDict
|
||||
TVortex.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${FFTW3_INCLUDE}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
-I${FIT_P_OF_B_INC}
|
||||
@@ -37,7 +37,7 @@ root_generate_dictionary(
|
||||
TSkewedGssDict
|
||||
TSkewedGss.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${FFTW3_INCLUDE}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
-I${POFB_INC}
|
||||
@@ -82,7 +82,7 @@ set_target_properties(FitPofB
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
FitPofB BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/external/TLemRunHeader>
|
||||
$<BUILD_INTERFACE:${BMW_TOOLS_INC}>
|
||||
@@ -101,7 +101,7 @@ if (OpenMP_FOUND AND (${CMAKE_HOST_SYSTEM_NAME} STREQUAL Linux))
|
||||
endif (OpenMP_FOUND AND (${CMAKE_HOST_SYSTEM_NAME} STREQUAL Linux))
|
||||
target_link_libraries(FitPofB
|
||||
${gomp}
|
||||
${FFTW3_LIBRARY} ${FFTW3F_LIBRARY} ${ROOT_LIBRARIES}
|
||||
FFTW3::FFTW3 FFTW3::FFTW3F ${ROOT_LIBRARIES}
|
||||
TLemRunHeader PUserFcnBase BMWtools
|
||||
)
|
||||
|
||||
|
||||
@@ -317,7 +317,7 @@ void TPofBCalc::Calculate(const TBofZCalc *BofZ, const TTrimSPData *dataTrimSP,
|
||||
seconds = time (NULL);
|
||||
|
||||
char debugfile[50];
|
||||
int n = sprintf (debugfile, "test_Bz_%ld_%f.dat", seconds, fBmin);
|
||||
int n = snprintf (debugfile, sizeof(debugfile), "test_Bz_%ld_%f.dat", seconds, fBmin);
|
||||
|
||||
if (n > 0) {
|
||||
ofstream of(debugfile);
|
||||
@@ -330,10 +330,10 @@ void TPofBCalc::Calculate(const TBofZCalc *BofZ, const TTrimSPData *dataTrimSP,
|
||||
}
|
||||
|
||||
char debugfile1[50];
|
||||
int n1 = sprintf (debugfile1, "test_NZ_%ld_%f.dat", seconds, para[2]);
|
||||
int n1 = snprintf (debugfile1, sizeof(debugfile1), "test_NZ_%ld_%f.dat", seconds, para[2]);
|
||||
|
||||
char debugfile2[50];
|
||||
int n2 = sprintf (debugfile2, "test_NZgss_%ld_%f.dat", seconds, para[2]);
|
||||
int n2 = snprintf (debugfile2, sizeof(debugfile2), "test_NZgss_%ld_%f.dat", seconds, para[2]);
|
||||
|
||||
if (n1 > 0) {
|
||||
ofstream of1(debugfile1);
|
||||
|
||||
@@ -357,7 +357,7 @@ void TPofTCalc::FakeData(const string &rootOutputFileName, const std::vector<dou
|
||||
// create run info folder and content
|
||||
TFolder *runInfoFolder = new TFolder("RunInfo", "Run Info");
|
||||
TLemRunHeader *runHeader = new TLemRunHeader();
|
||||
//sprintf(str, "Fake Data generated from %s", pBFileName.Data());
|
||||
//snprintf(str, sizeof(str), "Fake Data generated from %s", pBFileName.Data());
|
||||
runHeader->SetRunTitle("Fake Data");
|
||||
if (optPar && (optPar->size() > 1)) { // set energy and field if they were specified
|
||||
runHeader->SetImpEnergy((*optPar)[1]);
|
||||
|
||||
6
src/external/libGapIntegrals/CMakeLists.txt
vendored
@@ -12,7 +12,7 @@ root_generate_dictionary(
|
||||
TGapIntegralsDict
|
||||
TGapIntegrals.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${FFTW3_INCLUDE}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}
|
||||
@@ -47,7 +47,7 @@ set_target_properties(GapIntegrals
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
GapIntegrals BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${BMW_TOOLS_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
@@ -55,7 +55,7 @@ target_include_directories(
|
||||
|
||||
#--- add library dependencies -------------------------------------------------
|
||||
target_link_libraries(GapIntegrals
|
||||
${GSL_LIBRARIES} ${FFTW3F_LIBRARY} ${ROOT_LIBRARIES}
|
||||
${GSL_LIBRARIES} FFTW3::FFTW3F ${ROOT_LIBRARIES}
|
||||
PUserFcnBase cuba BMWtools
|
||||
)
|
||||
|
||||
|
||||
4
src/external/libGbGLF/CMakeLists.txt
vendored
@@ -31,7 +31,7 @@ add_library(PGbGLF SHARED
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PGbGLF BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
|
||||
)
|
||||
@@ -43,7 +43,7 @@ set_target_properties(PGbGLF
|
||||
)
|
||||
|
||||
#--- add library dependencies -------------------------------------------------
|
||||
target_link_libraries(PGbGLF ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PUserFcnBase)
|
||||
target_link_libraries(PGbGLF FFTW3::FFTW3 ${ROOT_LIBRARIES} PUserFcnBase)
|
||||
|
||||
#--- install PGbGLF solib -----------------------------------------------------
|
||||
install(TARGETS PGbGLF DESTINATION lib)
|
||||
|
||||
6
src/external/libLFRelaxation/CMakeLists.txt
vendored
@@ -12,7 +12,7 @@ root_generate_dictionary(
|
||||
TLFRelaxationDict
|
||||
TLFRelaxation.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${FFTW3_INCLUDE}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
-inlineInputHeader
|
||||
@@ -46,7 +46,7 @@ set_target_properties(LFRelaxation
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
LFRelaxation BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${BMW_TOOLS_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
@@ -63,7 +63,7 @@ if (OpenMP_FOUND AND (${CMAKE_HOST_SYSTEM_NAME} STREQUAL Linux))
|
||||
endif (OpenMP_FOUND AND (${CMAKE_HOST_SYSTEM_NAME} STREQUAL Linux))
|
||||
target_link_libraries(LFRelaxation
|
||||
${gomp}
|
||||
${GSL_LIBRARIES} ${FFTW3F_LIBRARY}
|
||||
${GSL_LIBRARIES} FFTW3::FFTW3F
|
||||
${ROOT_LIBRARIES} PUserFcnBase cuba BMWtools
|
||||
)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ root_generate_dictionary(
|
||||
PPhotoMeissnerDict
|
||||
PPhotoMeissner.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${FFTW3_INCLUDE}
|
||||
-I${GSL_INCLUDE_DIRS}
|
||||
-I${ROOT_INCLUDE_DIRS}
|
||||
-I${MUSRFIT_INC}
|
||||
@@ -46,7 +46,7 @@ set_target_properties(PPhotoMeissner
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PPhotoMeissner BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${GSL_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${ROOT_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
@@ -55,7 +55,7 @@ target_include_directories(
|
||||
|
||||
#--- add library dependencies -------------------------------------------------
|
||||
target_link_libraries(PPhotoMeissner
|
||||
${FFTW3_LIBRARY} ${GSL_LIBRARY} ${ROOT_LIBRARIES} PRgeHandler PUserFcnBase
|
||||
FFTW3::FFTW3 ${GSL_LIBRARY} ${ROOT_LIBRARIES} PRgeHandler PUserFcnBase
|
||||
)
|
||||
|
||||
#--- install PPhotoMeissner solib ---------------------------------------------
|
||||
|
||||
@@ -163,7 +163,7 @@ int generateRgeFln(const string prefix, const string elist, vector<string> &rgeF
|
||||
}
|
||||
ival = start;
|
||||
do {
|
||||
sprintf(istr, "%d", ival);
|
||||
snprintf(istr, sizeof(istr), "%d", ival);
|
||||
str = prefix + istr + ".rge";
|
||||
rgeFln.push_back(str);
|
||||
ival += step;
|
||||
|
||||
@@ -12,7 +12,7 @@ root_generate_dictionary(
|
||||
PSkewedLorentzianDict
|
||||
PSkewedLorentzian.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${FFTW3_INCLUDE}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${SPIN_VALVE_INC}
|
||||
-inlineInputHeader
|
||||
@@ -55,13 +55,13 @@ set_target_properties(PSpinValve
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PSpinValve BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
|
||||
)
|
||||
|
||||
#--- add library dependencies -------------------------------------------------
|
||||
target_link_libraries(PSpinValve ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PUserFcnBase)
|
||||
target_link_libraries(PSpinValve FFTW3::FFTW3 ${ROOT_LIBRARIES} PUserFcnBase)
|
||||
|
||||
#--- install PSpinValve solib -------------------------------------------------
|
||||
install(TARGETS PSpinValve DESTINATION lib)
|
||||
|
||||
6
src/external/libZFRelaxation/CMakeLists.txt
vendored
@@ -12,7 +12,7 @@ root_generate_dictionary(
|
||||
ZFRelaxationDict
|
||||
ZFRelaxation.h
|
||||
OPTIONS
|
||||
-I${FFTW3_INCLUDE_DIR}
|
||||
-I${FFTW3_INCLUDE}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${BMW_TOOLS_INC}
|
||||
-inlineInputHeader
|
||||
@@ -46,7 +46,7 @@ set_target_properties(ZFRelaxation
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
ZFRelaxation BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${BMW_TOOLS_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
@@ -62,7 +62,7 @@ if (OpenMP_FOUND AND (${CMAKE_HOST_SYSTEM_NAME} STREQUAL Linux))
|
||||
set(gomp gomp)
|
||||
endif (OpenMP_FOUND AND (${CMAKE_HOST_SYSTEM_NAME} STREQUAL Linux))
|
||||
target_link_libraries(ZFRelaxation
|
||||
${gomp} ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PUserFcnBase cuba BMWtools
|
||||
${gomp} FFTW3::FFTW3 ${ROOT_LIBRARIES} PUserFcnBase cuba BMWtools
|
||||
)
|
||||
|
||||
#--- install ZFRelaxation solib -----------------------------------------------
|
||||
|
||||
16
src/external/nexus/PNeXus.cpp
vendored
@@ -2761,7 +2761,7 @@ int PNeXus::ReadFileIdf1()
|
||||
char cstr[128];
|
||||
int ival;
|
||||
float fval;
|
||||
int attlen, atttype;
|
||||
int attlen, atttype, rank, dims[32];
|
||||
NXname data_value, nxAttrName;
|
||||
|
||||
// open file
|
||||
@@ -2775,7 +2775,7 @@ int PNeXus::ReadFileIdf1()
|
||||
|
||||
// collect the NXroot attribute information
|
||||
do {
|
||||
status = NXgetnextattr(fFileHandle, nxAttrName, &attlen, &atttype);
|
||||
status = NXgetnextattra(fFileHandle, nxAttrName, &rank, dims, &atttype);
|
||||
if (status == NX_OK) {
|
||||
if (!strcmp(nxAttrName, "HDF_version")) {
|
||||
attlen = VGNAMELENMAX - 1;
|
||||
@@ -3153,7 +3153,7 @@ int PNeXus::ReadFileIdf1()
|
||||
// get data
|
||||
|
||||
// get information of the current nexus entity
|
||||
int rank, type, dims[32], size, noOfElements;
|
||||
int type, size, noOfElements;
|
||||
if (!ErrorHandler(NXgetinfo(fFileHandle, &rank, dims, &type), PNEXUS_GET_META_INFO_ERROR, "couldn't get data info!")) return NX_ERROR;
|
||||
|
||||
// calculate the needed size
|
||||
@@ -3354,7 +3354,7 @@ int PNeXus::ReadFileIdf2()
|
||||
|
||||
// collect the NXroot attribute information
|
||||
do {
|
||||
status = NXgetnextattr(fFileHandle, nxAttrName, &attlen, &atttype);
|
||||
status = NXgetnextattra(fFileHandle, nxAttrName, &rank, dims, &atttype);
|
||||
if (status == NX_OK) {
|
||||
if (!strcmp(nxAttrName, "HDF_version")) {
|
||||
attlen = VGNAMELENMAX - 1;
|
||||
@@ -5432,21 +5432,23 @@ bool PNeXus::SearchInGroup(std::string str, std::string tag, NXname &nxname, NXn
|
||||
* - false otherwise
|
||||
*
|
||||
* \param str label of the attribute to be looked for
|
||||
* \param length of the attribute data it entry is found
|
||||
* \param length of the attribute data if entry is found
|
||||
* \param dataType of the entry if entry is found
|
||||
*/
|
||||
bool PNeXus::SearchAttrInData(std::string str, int &length, int &dataType)
|
||||
{
|
||||
bool found = false;
|
||||
int status;
|
||||
int status, rank, dims[32];
|
||||
char name[128];
|
||||
|
||||
memset(name, 0, sizeof(name));
|
||||
|
||||
NXinitattrdir(fFileHandle);
|
||||
do {
|
||||
status = NXgetnextattr(fFileHandle, name, &length, &dataType);
|
||||
status = NXgetnextattra(fFileHandle, name, &rank, dims, &dataType);
|
||||
if (!str.compare(name)) {
|
||||
if (rank == 1)
|
||||
length = dims[0];
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/****************************************************************************
|
||||
/***************************************************************************
|
||||
|
||||
PGetDefaultDialog.h
|
||||
PFindRun.h
|
||||
|
||||
Author: Andreas Suter
|
||||
e-mail: andreas.suter@psi.ch
|
||||
|
||||
*****************************************************************************/
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2010-2021 by Andreas Suter *
|
||||
* Copyright (C) 2007-2022 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@@ -27,43 +27,30 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _PGETDEFAULTDIALOG_H_
|
||||
#define _PGETDEFAULTDIALOG_H_
|
||||
#ifndef _PFINDRUN_H_
|
||||
#define _PFINDRUN_H_
|
||||
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <QLineEdit>
|
||||
#include <QComboBox>
|
||||
|
||||
#include "ui_PGetDefaultDialog.h"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Handels the default dialog which is used to generate a default asymmetry or
|
||||
* single histogram msr input file.
|
||||
*/
|
||||
class PGetDefaultDialog : public QDialog, private Ui::PGetDefaultDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
#include "PMusr.h"
|
||||
|
||||
class PFindRun {
|
||||
public:
|
||||
PGetDefaultDialog(const QString helpUrl = "");
|
||||
virtual ~PGetDefaultDialog() {}
|
||||
PFindRun(const PStringVector path, const PRunNameTemplateList runNameTemplateList);
|
||||
PFindRun(const PStringVector path, const PRunNameTemplateList runNameTemplateList,
|
||||
const TString &instrument, const UInt_t year, const UInt_t run);
|
||||
|
||||
virtual const QString getRunFileName() const { return fRunFileName_lineEdit->text(); }
|
||||
virtual const QString getBeamline() const { return fBeamline_lineEdit->text(); }
|
||||
virtual const QString getInstitute() const { return fInstitute_comboBox->currentText(); }
|
||||
virtual const QString getFileFormat() const { return fFileFormat_comboBox->currentText(); }
|
||||
|
||||
virtual void setBeamline(const QString &str) { fBeamline_lineEdit->setText(str); }
|
||||
virtual void setInstitute(const QString &str);
|
||||
virtual void setFileFormat(const QString &str);
|
||||
|
||||
protected slots:
|
||||
virtual void helpContent();
|
||||
Bool_t FoundPathName();
|
||||
TString GetPathName() { return fPathName; }
|
||||
void DumpTemplateList();
|
||||
|
||||
private:
|
||||
QString fHelpUrl; ///< help url for the default dialog
|
||||
const PStringVector fPath;
|
||||
const PRunNameTemplateList fRunNameTemplateList;
|
||||
TString fInstrument{""};
|
||||
Int_t fYear{-1};
|
||||
Int_t fRun{-1};
|
||||
TString fPathName{""};
|
||||
|
||||
TString CreatePathName(const TString path, const TString runNameTemplate);
|
||||
};
|
||||
|
||||
#endif // _PGETDEFAULTDIALOG_H_
|
||||
#endif // _PFINDRUN_H_
|
||||
@@ -67,14 +67,14 @@
|
||||
/**
|
||||
* <p>Structure holding all necessary Fourier histograms.
|
||||
*/
|
||||
typedef struct {
|
||||
struct PFourierCanvasDataSet {
|
||||
TH1F *dataFourierRe; ///< real part of the Fourier transform of the data histogram
|
||||
TH1F *dataFourierIm; ///< imaginary part of the Fourier transform of the data histogram
|
||||
TH1F *dataFourierPwr; ///< power spectrum of the Fourier transform of the data histogram
|
||||
TH1F *dataFourierPhase; ///< phase spectrum of the Fourier transform of the data histogram
|
||||
TH1F *dataFourierPhaseOptReal; ///< phase otpimized real Fourier transform of the data histogram
|
||||
std::vector<Double_t> optPhase; ///< optimal phase which maximizes the real Fourier
|
||||
} PFourierCanvasDataSet;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/**
|
||||
|
||||
@@ -61,14 +61,21 @@
|
||||
#define PRUN_ASYMMETRY_BNMR 5
|
||||
#define PRUN_NON_MUSR 8
|
||||
|
||||
// muon life time in (us), see PRL99, 032001 (2007)
|
||||
#define PMUON_LIFETIME 2.197019
|
||||
// muon lifetime in (us) - see e.g.:
|
||||
// P. A. Zyla et al. (Particle Data Group), Prog. Theor. Exp. Phys. 2020, 083C01 (2020).
|
||||
// https://doi.org/10.1093/ptep/ptaa104
|
||||
// https://pdg.lbl.gov/2021/
|
||||
#define PMUON_LIFETIME 2.1969811
|
||||
|
||||
// muon gyromagnetic ratio, see gamma_mu = 2.0 mu_mu / hbar
|
||||
// mu_mu = -4.49044807(15) 1e-26 J/T (see http://physics.nist.gov/cgi-bin/cuu/Results?search_for=muon)
|
||||
// hbar = 1.054571726(47) 1e-34 Js (see http://physics.nist.gov/cgi-bin/cuu/Value?hbar|search_for=universal_in!)
|
||||
// gamma_muon / (2 pi) = 1.355342e-2 (MHz/G)
|
||||
#define GAMMA_BAR_MUON 1.35538817e-2
|
||||
// muon gyromagnetic ratio: gamma_mu = 2.0 * mu_mu / hbar - see e.g.:
|
||||
// E. Tiesinga et al., Rev. Mod. Phys. 93, 025010 (2021).
|
||||
// https://doi.org/10.1103/RevModPhys.93.025010
|
||||
// https://physics.nist.gov/cuu/Constants/index.html
|
||||
// mu_mu = -4.490 448 30(10) * 1e-26 J/T
|
||||
// hbar = 1.054 571 817... * 1e-34 J*s
|
||||
// gamma_muon / (2 pi) = 135.538 809 4(30) MHz/T
|
||||
// = 0.013 553 880 94(30) MHz/G
|
||||
#define GAMMA_BAR_MUON 1.355388094e-2
|
||||
|
||||
// accelerator cycles in (us), needed to determine proper background
|
||||
#define ACCEL_PERIOD_PSI 0.01975
|
||||
@@ -519,10 +526,10 @@ typedef std::vector<PRawRunData> PRawRunDataList;
|
||||
/**
|
||||
* <p>Helper structure for parsing. Keeps a msr-file line string and the corresponding line number.
|
||||
*/
|
||||
typedef struct {
|
||||
struct PMsrLineStructure {
|
||||
Int_t fLineNo; ///< original line number of the msr-file
|
||||
TString fLine; ///< msr-file line
|
||||
} PMsrLineStructure;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------
|
||||
/**
|
||||
@@ -534,7 +541,7 @@ typedef std::vector<PMsrLineStructure> PMsrLines;
|
||||
/**
|
||||
* <p>Handles the information of a parameter.
|
||||
*/
|
||||
typedef struct {
|
||||
struct PMsrParamStructure{
|
||||
Int_t fNoOfParams; ///< how many parameters are given
|
||||
Int_t fNo; ///< parameter number
|
||||
TString fName; ///< name
|
||||
@@ -547,7 +554,7 @@ typedef struct {
|
||||
Bool_t fUpperBoundaryPresent; ///< flag showing if an upper boundary is present
|
||||
Double_t fUpperBoundary; ///< upper boundary for the fit parameter
|
||||
Bool_t fIsGlobal; ///< flag showing if the parameter is a global one (used for msr2data global)
|
||||
} PMsrParamStructure;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------
|
||||
/**
|
||||
@@ -749,7 +756,7 @@ typedef std::vector<PMsrRunBlock> PMsrRunList;
|
||||
/**
|
||||
* <p>Holds the information of the Fourier block
|
||||
*/
|
||||
typedef struct {
|
||||
struct PMsrFourierStructure {
|
||||
Bool_t fFourierBlockPresent; ///< flag indicating if a Fourier block is present in the msr-file
|
||||
Int_t fUnits; ///< flag used to indicate the units. 1=field units (G); 2=field units (T); 3=frequency units (MHz); 4=Mc/s
|
||||
Bool_t fDCCorrected; ///< if set true, the dc offset of the signal/theory will be removed before the FFT is made.
|
||||
@@ -762,13 +769,13 @@ typedef struct {
|
||||
Double_t fRangeForPhaseCorrection[2]; ///< field/frequency range for automatic phase correction
|
||||
Double_t fPlotRange[2]; ///< field/frequency plot range
|
||||
Double_t fPhaseIncrement; ///< phase increment for manual phase optimization
|
||||
} PMsrFourierStructure;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------
|
||||
/**
|
||||
* <p>Holds the information of a single plot block
|
||||
*/
|
||||
typedef struct {
|
||||
struct PMsrPlotStructure{
|
||||
Int_t fPlotType; ///< plot type
|
||||
Bool_t fLifeTimeCorrection; ///< needed for single histo. If yes, only the asymmetry is shown, otherweise the positron spectrum
|
||||
Bool_t fUseFitRanges; ///< yes -> use the fit ranges to plot the data, no (default) -> use range information if present
|
||||
@@ -785,7 +792,7 @@ typedef struct {
|
||||
UInt_t fRRFUnit; ///< RRF frequency unit. 0=kHz, 1=MHz, 2=Mc/s, 3=Gauss, 4=Tesla
|
||||
Int_t fRRFPhaseParamNo; ///< parameter number if used instead of a RRF phase value
|
||||
Double_t fRRFPhase; ///< RRF phase
|
||||
} PMsrPlotStructure;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------
|
||||
/**
|
||||
@@ -797,7 +804,7 @@ typedef std::vector<PMsrPlotStructure> PMsrPlotList;
|
||||
/**
|
||||
* <p>Holds the informations for the statistics block.
|
||||
*/
|
||||
typedef struct {
|
||||
struct PMsrStatisticStructure {
|
||||
Bool_t fValid; ///< flag showing if the statistics block is valid, i.e. a fit took place which converged
|
||||
PMsrLines fStatLines; ///< statistics block in msr-file clear text
|
||||
TString fDate; ///< string holding fitting date and time
|
||||
@@ -808,39 +815,39 @@ typedef struct {
|
||||
Double_t fMinExpected; ///< expected total chi2 or max. likelihood
|
||||
PDoubleVector fMinExpectedPerHisto; ///< expected pre histo chi2 or max. likelihood
|
||||
PUIntVector fNdfPerHisto; ///< number of degrees of freedom per histo
|
||||
} PMsrStatisticStructure;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------
|
||||
/**
|
||||
* <p>Holds the informations for the any2many converter program
|
||||
*/
|
||||
typedef struct {
|
||||
Bool_t useStandardOutput; ///< flag showing if the converted shall be sent to the standard output
|
||||
TString inFormat; ///< holds the information about the input data file format
|
||||
TString outFormat; ///< holds the information about the output data file format
|
||||
TString inTemplate; ///< holds the input file template
|
||||
TString outTemplate; ///< holds the output file template
|
||||
TString year; ///< holds the information about the year to be used
|
||||
PIntVector runList; ///< holds the run number list to be converted
|
||||
PIntVector groupHistoList; ///< holds the histo group list offset (used to define for MusrRoot files, what to be exported)
|
||||
PStringVector inFileName; ///< holds the file name of the input data file
|
||||
TString outFileName; ///< holds the output file name
|
||||
PStringVector outPathFileName; ///< holds the out path/file name
|
||||
TString outPath; ///< holds the output path
|
||||
UInt_t rebin; ///< holds the number of bins to be packed
|
||||
UInt_t compressionTag; ///< 0=no compression, 1=gzip compression, 2=bzip2 compression
|
||||
TString compressFileName; ///< holds the name of the outputfile name in case of compression is used
|
||||
UInt_t idf; ///< IDF version for NeXus files.
|
||||
} PAny2ManyInfo;
|
||||
struct PAny2ManyInfo {
|
||||
Bool_t useStandardOutput{false}; ///< flag showing if the converted shall be sent to the standard output
|
||||
TString inFormat{""}; ///< holds the information about the input data file format
|
||||
TString outFormat{""}; ///< holds the information about the output data file format
|
||||
TString inTemplate{""}; ///< holds the input file template
|
||||
TString outTemplate{""}; ///< holds the output file template
|
||||
TString year{""}; ///< holds the information about the year to be used
|
||||
PUIntVector runList; ///< holds the run number list to be converted
|
||||
PIntVector groupHistoList; ///< holds the histo group list offset (used to define for MusrRoot files, what to be exported)
|
||||
PStringVector inFileName; ///< holds the file name of the input data file
|
||||
TString outFileName{""}; ///< holds the output file name
|
||||
PStringVector outPathFileName; ///< holds the out path/file name
|
||||
TString outPath{""}; ///< holds the output path
|
||||
UInt_t rebin{1}; ///< holds the number of bins to be packed
|
||||
UInt_t compressionTag{0}; ///< 0=no compression, 1=gzip compression, 2=bzip2 compression
|
||||
TString compressFileName{""}; ///< holds the name of the outputfile name in case of compression is used
|
||||
UInt_t idf{0}; ///< IDF version for NeXus files.
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------
|
||||
/**
|
||||
* <p>Holds information given at startup
|
||||
*/
|
||||
typedef struct {
|
||||
struct PStartupOptions {
|
||||
Bool_t writeExpectedChisq; ///< if set to true, expected chisq and chisq per block will be written
|
||||
Bool_t estimateN0; ///< if set to true, for single histogram fits N0 will be estimated
|
||||
} PStartupOptions;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------
|
||||
/**
|
||||
@@ -867,4 +874,19 @@ class PStringNumberList {
|
||||
virtual void StripSpaces();
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------
|
||||
/**
|
||||
* <p> Run name template structure.
|
||||
*/
|
||||
struct PRunNameTemplate {
|
||||
TString instrument{""};
|
||||
TString runNameTemplate{""};
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------
|
||||
/**
|
||||
* <p>typedef to make to code more readable: list of run name templates.
|
||||
*/
|
||||
typedef std::vector<PRunNameTemplate> PRunNameTemplateList;
|
||||
|
||||
#endif // _PMUSR_H_
|
||||
|
||||
@@ -118,7 +118,7 @@ class PMusrCanvasPlotRange : public TObject
|
||||
* <p>Structure holding all necessary histograms for a single plot block entry for
|
||||
* fit types: asymmetry fit and single histogram fit.
|
||||
*/
|
||||
typedef struct {
|
||||
struct PMusrCanvasDataSet {
|
||||
TH1F *data; ///< data histogram
|
||||
TH1F *dataFourierRe; ///< real part of the Fourier transform of the data histogram
|
||||
TH1F *dataFourierIm; ///< imaginary part of the Fourier transform of the data histogram
|
||||
@@ -139,7 +139,7 @@ typedef struct {
|
||||
TH1F *diffFourierPhaseOptReal; ///< phase optimized real part spectrum Fourier transform of the diff histogram
|
||||
PMusrCanvasPlotRange *dataRange; ///< keep the msr-file plot data range
|
||||
UInt_t diffFourierTag; ///< 0=not relevant, 1=d-f (Fourier of difference time spectra), 2=f-d (difference of Fourier spectra)
|
||||
} PMusrCanvasDataSet;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/**
|
||||
@@ -152,7 +152,7 @@ typedef std::vector<PMusrCanvasDataSet> PMusrCanvasDataList;
|
||||
* <p>Structure holding all necessary error graphs for a single plot block entry for
|
||||
* fit types: non-muSR fit.
|
||||
*/
|
||||
typedef struct {
|
||||
struct PMusrCanvasNonMusrDataSet {
|
||||
TGraphErrors *data; ///< data error graph
|
||||
TGraphErrors *dataFourierRe; ///< real part of the Fourier transform of the data error graph
|
||||
TGraphErrors *dataFourierIm; ///< imaginary part of the Fourier transform of the data error graph
|
||||
@@ -170,7 +170,7 @@ typedef struct {
|
||||
TGraphErrors *diffFourierPhase; ///< phase spectrum of the Fourier transform of the diff error graph
|
||||
PMusrCanvasPlotRange *dataRange; ///< keep the msr-file plot data range
|
||||
UInt_t diffFourierTag; ///< 0=not relevant, 1=d-f (Fourier of difference time spectra), 2=f-d (difference of Fourier spectra)
|
||||
} PMusrCanvasNonMusrDataSet;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/**
|
||||
@@ -182,11 +182,11 @@ typedef std::vector<PMusrCanvasNonMusrDataSet> PMusrCanvasNonMusrDataList;
|
||||
/**
|
||||
* <p> data structure needed for ascii dump within musrview.
|
||||
*/
|
||||
typedef struct {
|
||||
struct PMusrCanvasAsciiDump {
|
||||
PDoubleVector dataX; ///< x-axis data set
|
||||
PDoubleVector data; ///< y-axis data set
|
||||
PDoubleVector dataErr; ///< error of the y-axis data set
|
||||
} PMusrCanvasAsciiDump;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/**
|
||||
|
||||
@@ -43,14 +43,14 @@
|
||||
* <p>Data structure holding raw time domain uSR data together with some
|
||||
* necessary meta information.
|
||||
*/
|
||||
typedef struct {
|
||||
struct musrFT_data {
|
||||
Int_t dataSetTag; ///< tag to label the data set. Needed for average-per-data-set
|
||||
TString info; ///< keeps all the meta information
|
||||
Double_t timeResolution; ///< time resolution in (usec)
|
||||
Int_t t0; ///< keep the t0 bin
|
||||
Double_t timeRange[2]; ///< time range to be used, given in (usec).
|
||||
PDoubleVector rawData; ///< a single time domain data vector
|
||||
} musrFT_data;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
/**
|
||||
|
||||
@@ -43,13 +43,13 @@
|
||||
/**
|
||||
* <p>Keep a single rge table from TrimSP for a given energy.
|
||||
*/
|
||||
typedef struct {
|
||||
struct PRgeData {
|
||||
Double_t energy;
|
||||
PDoubleVector depth;
|
||||
PDoubleVector amplitude;
|
||||
PDoubleVector nn; // normalized int n(z) dz = 1 amplitudes
|
||||
Double_t noOfParticles;
|
||||
} PRgeData;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
|
||||
@@ -53,13 +53,15 @@ class PRunDataHandler
|
||||
|
||||
virtual void ReadData();
|
||||
virtual void ConvertData();
|
||||
virtual void WriteData();
|
||||
virtual Bool_t WriteData(TString fileName="");
|
||||
|
||||
virtual Bool_t IsAllDataAvailable() const { return fAllDataAvailable; }
|
||||
virtual PRawRunData* GetRunData(const TString &runName);
|
||||
virtual PRawRunData* GetRunData(const UInt_t idx=0);
|
||||
virtual Int_t GetNoOfRunData() {return fData.size(); }
|
||||
|
||||
virtual Bool_t SetRunData(PRawRunData *data, UInt_t idx=0);
|
||||
|
||||
private:
|
||||
PMsrHandler *fMsrInfo; ///< pointer to the msr-file handler
|
||||
PAny2ManyInfo *fAny2ManyInfo; ///< pointer to the any2many data structure
|
||||
|
||||
@@ -74,12 +74,13 @@ class PStartupHandler : public TObject, public TQObject
|
||||
virtual void CheckLists();
|
||||
|
||||
virtual PMsrFourierStructure GetFourierDefaults() { return fFourierDefaults; } ///< returns the Fourier defaults
|
||||
virtual const PRunNameTemplateList GetRunNameTemplateList() { return fRunNameTemplate; }
|
||||
virtual const PStringVector GetDataPathList() const { return fDataPathList; } ///< returns the search data path list
|
||||
virtual const PIntVector GetMarkerList() const { return fMarkerList; } ///< returns the marker list
|
||||
virtual const PIntVector GetColorList() const { return fColorList; } ///< returns the color list
|
||||
|
||||
private:
|
||||
enum EKeyWords {eEmpty, eComment, eDataPath, eOptions,
|
||||
enum EKeyWords {eEmpty, eComment, eDataPath, eRunNameTemplate, eOptions,
|
||||
eFourierSettings, eUnits, eFourierPower,
|
||||
eApodization, ePlot, ePhase, ePhaseIncrement,
|
||||
eRootSettings, eMarkerList, eMarker,
|
||||
@@ -88,8 +89,10 @@ class PStartupHandler : public TObject, public TQObject
|
||||
|
||||
Bool_t fStartupFileFound; ///< startup file found flag
|
||||
TString fStartupFilePath; ///< full musrfit_startup.xml startup file paths
|
||||
TString fCurrentInstrumentName; ///< current instrument name
|
||||
PMsrFourierStructure fFourierDefaults; ///< Fourier defaults
|
||||
PStringVector fDataPathList; ///< search data path list
|
||||
PRunNameTemplateList fRunNameTemplate; ///< run name template vector
|
||||
PIntVector fMarkerList; ///< marker list
|
||||
PIntVector fColorList; ///< color list
|
||||
|
||||
|
||||
@@ -893,7 +893,9 @@ int main(int argc, char *argv[])
|
||||
std::ostringstream oss;
|
||||
oss << path << "musrfit" << " " << strInfile.str() << " " << musrfitOptions;
|
||||
std::cout << std::endl << ">> msr2data: **INFO** Calling " << oss.str() << std::endl;
|
||||
system(oss.str().c_str());
|
||||
if (system(oss.str().c_str()) == -1) {
|
||||
std::cerr << "**ERROR** cmd: " << oss.str().c_str() << " failed." << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -982,7 +984,9 @@ int main(int argc, char *argv[])
|
||||
std::ostringstream oss;
|
||||
oss << path << "musrfit" << " " << strInfile.str() << " " << musrfitOptions;
|
||||
std::cout << std::endl << ">> msr2data: **INFO** Calling " << oss.str() << std::endl;
|
||||
system(oss.str().c_str());
|
||||
if (system(oss.str().c_str()) == -1) {
|
||||
std::cerr << "**ERROR** cmd: " << oss.str().c_str() << " failed." << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -78,8 +78,9 @@ void msr2msr_syntax()
|
||||
* - false otherwise
|
||||
*
|
||||
* \param str msr-file line
|
||||
* \param size size of str
|
||||
*/
|
||||
bool msr2msr_run(char *str)
|
||||
bool msr2msr_run(char *str, const std::size_t size)
|
||||
{
|
||||
// not the RUN line itself, hence nothing to be done
|
||||
if (!strstr(str, "RUN"))
|
||||
@@ -109,27 +110,27 @@ bool msr2msr_run(char *str)
|
||||
}
|
||||
|
||||
if (tokens->GetEntries() == 5) { // already a new msr file, do only add the proper run comment
|
||||
sprintf(str, "%s (name beamline institute data-file-format)", line.Data());
|
||||
snprintf(str, size, "%s (name beamline institute data-file-format)", line.Data());
|
||||
return true;
|
||||
}
|
||||
|
||||
if (run.Contains("NEMU")) {
|
||||
ostr[0] = dynamic_cast<TObjString*>(tokens->At(1)); // file name
|
||||
sprintf(str, "RUN %s MUE4 PSI WKM (name beamline institute data-file-format)", ostr[0]->GetString().Data());
|
||||
snprintf(str, size, "RUN %s MUE4 PSI WKM (name beamline institute data-file-format)", ostr[0]->GetString().Data());
|
||||
} else if (run.Contains("PSI")) {
|
||||
ostr[0] = dynamic_cast<TObjString*>(tokens->At(1)); // file name
|
||||
ostr[1] = dynamic_cast<TObjString*>(tokens->At(2)); // beamline
|
||||
sprintf(str, "RUN %s %s PSI PSI-BIN (name beamline institute data-file-format)",
|
||||
snprintf(str, size, "RUN %s %s PSI PSI-BIN (name beamline institute data-file-format)",
|
||||
ostr[0]->GetString().Data(), ostr[1]->GetString().Data());
|
||||
} else if (run.Contains("TRIUMF")) {
|
||||
ostr[0] = dynamic_cast<TObjString*>(tokens->At(1)); // file name
|
||||
ostr[1] = dynamic_cast<TObjString*>(tokens->At(2)); // beamline
|
||||
sprintf(str, "RUN %s %s TRIUMF MUD (name beamline institute data-file-format)",
|
||||
snprintf(str, size, "RUN %s %s TRIUMF MUD (name beamline institute data-file-format)",
|
||||
ostr[0]->GetString().Data(), ostr[1]->GetString().Data());
|
||||
} else if (run.Contains("RAL")) {
|
||||
ostr[0] = dynamic_cast<TObjString*>(tokens->At(1)); // file name
|
||||
ostr[1] = dynamic_cast<TObjString*>(tokens->At(2)); // beamline
|
||||
sprintf(str, "RUN %s %s RAL NEXUS (name beamline institute data-file-format)",
|
||||
snprintf(str, size, "RUN %s %s RAL NEXUS (name beamline institute data-file-format)",
|
||||
ostr[0]->GetString().Data(), ostr[1]->GetString().Data());
|
||||
}
|
||||
|
||||
@@ -175,7 +176,7 @@ bool msr2msr_param(char *str)
|
||||
for (unsigned int i=0; i<4; i++)
|
||||
ostr[i] = dynamic_cast<TObjString*>(tokens->At(i));
|
||||
// number
|
||||
sprintf(sstr, "%10s", ostr[0]->GetString().Data());
|
||||
snprintf(sstr, sizeof(sstr), "%10s", ostr[0]->GetString().Data());
|
||||
// name
|
||||
strcat(sstr, " ");
|
||||
strcat(sstr, ostr[1]->GetString().Data());
|
||||
@@ -206,7 +207,7 @@ bool msr2msr_param(char *str)
|
||||
for (unsigned int i=0; i<6; i++)
|
||||
ostr[i] = dynamic_cast<TObjString*>(tokens->At(i));
|
||||
// number
|
||||
sprintf(sstr, "%10s", ostr[0]->GetString().Data());
|
||||
snprintf(sstr, sizeof(sstr), "%10s", ostr[0]->GetString().Data());
|
||||
// name
|
||||
strcat(sstr, " ");
|
||||
strcat(sstr, ostr[1]->GetString().Data());
|
||||
@@ -480,7 +481,7 @@ void msr2msr_replace(char *str, int paramNo)
|
||||
|
||||
memset(temp, 0, sizeof(temp));
|
||||
|
||||
sprintf(no, "%d", paramNo);
|
||||
snprintf(no, sizeof(no), "%d", paramNo);
|
||||
|
||||
int j=0;
|
||||
for (unsigned int i=0; i<strlen(str); i++) {
|
||||
@@ -573,11 +574,17 @@ bool msr2msr_finalize_theory(char *fln, int theoryTag, int noOfAddionalParams)
|
||||
|
||||
|
||||
// cp __temp.msr fln
|
||||
sprintf(str, "cp __temp.msr %s", fln);
|
||||
system(str);
|
||||
snprintf(str, sizeof(str), "cp __temp.msr %s", fln);
|
||||
if (system(str) == -1) {
|
||||
std::cerr << "**ERROR** cmd: " << str << " failed." << std::endl;
|
||||
return false;
|
||||
}
|
||||
// rm __temp.msr
|
||||
strcpy(str, "rm __temp.msr");
|
||||
system(str);
|
||||
if (system(str) == -1) {
|
||||
std::cerr << "**ERROR** cmd: " << str << " failed." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -592,8 +599,9 @@ bool msr2msr_finalize_theory(char *fln, int theoryTag, int noOfAddionalParams)
|
||||
* - false otherwise
|
||||
*
|
||||
* \param str msr-file statistic block line
|
||||
* \param size size of str
|
||||
*/
|
||||
bool msr2msr_statistic(char *str) {
|
||||
bool msr2msr_statistic(char *str, const std::size_t size) {
|
||||
bool success = true;
|
||||
|
||||
char *pstr;
|
||||
@@ -615,7 +623,7 @@ bool msr2msr_statistic(char *str) {
|
||||
}
|
||||
}
|
||||
if (success) {
|
||||
sprintf(str, " chisq = %lf, NDF = %d, chisq/NDF = %lf", chisq, static_cast<int>(chisq/chisqred), chisqred);
|
||||
snprintf(str, size, " chisq = %lf, NDF = %d, chisq/NDF = %lf", chisq, static_cast<int>(chisq/chisqred), chisqred);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -685,10 +693,10 @@ int main(int argc, char *argv[])
|
||||
success = msr2msr_theory(str, theoryTag, noOfAddionalParams);
|
||||
break;
|
||||
case MSR_TAG_RUN:
|
||||
success = msr2msr_run(str);
|
||||
success = msr2msr_run(str, sizeof(str));
|
||||
break;
|
||||
case MSR_TAG_STATISTIC:
|
||||
success = msr2msr_statistic(str);
|
||||
success = msr2msr_statistic(str, sizeof(str));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -703,8 +711,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
// check if conversion seems to be OK
|
||||
if (!success) {
|
||||
sprintf(str, "rm -rf %s", argv[2]);
|
||||
system(str);
|
||||
snprintf(str, sizeof(str), "rm -rf %s", argv[2]);
|
||||
if (system(str) == -1) {
|
||||
std::cerr << "**ERROR** cmd: " << str << " failed." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (theoryTag != -1) {
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#--- mupp for Qt > 5.0 --------------------------------------------------------
|
||||
#--- mupp for Qt = 5.x --------------------------------------------------------
|
||||
|
||||
#--- Find includes in corresponding build directories -------------------------
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
#--- instruct CMake to run moc automatically when needed ----------------------
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
#--- deal with the resources --------------------------------------------------
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
#--- define mupp version ------------------------------------------------------
|
||||
set(mupp_VERSION 1.0.0)
|
||||
@@ -34,9 +36,6 @@ add_custom_target(
|
||||
|
||||
add_subdirectory(plotter)
|
||||
|
||||
qt5_add_resources(qrc_mupp.cpp mupp.qrc)
|
||||
set_property(SOURCE qrc_mupp.cpp PROPERTY SKIP_AUTOMOC ON) # needed for cmake 3.x
|
||||
|
||||
set(GENERATED_HEADER_FILES
|
||||
mupp_version.h
|
||||
)
|
||||
@@ -55,10 +54,10 @@ if (APPLE)
|
||||
set(RESOURCE_FILES icons/mupp.icns)
|
||||
add_executable(mupp
|
||||
MACOSX_BUNDLE ${GENERATED_HEADER_FILES} ${MUPP_SOURCE_FILES}
|
||||
qrc_mupp.cpp ${RESOURCE_FILES}
|
||||
mupp.qrc ${RESOURCE_FILES}
|
||||
)
|
||||
else (APPLE)
|
||||
add_executable(mupp ${GENERATED_HEADER_FILES} ${MUPP_SOURCE_FILES} qrc_mupp.cpp)
|
||||
add_executable(mupp ${GENERATED_HEADER_FILES} ${MUPP_SOURCE_FILES} mupp.qrc)
|
||||
endif (APPLE)
|
||||
|
||||
#--- check if project source is repo ------------------------------------------
|
||||
@@ -89,7 +88,7 @@ target_include_directories(mupp
|
||||
)
|
||||
|
||||
#--- use the Widgets and XML modules from Qt5 ---------------------------------
|
||||
target_link_libraries(mupp Qt5::Widgets Qt5::Xml)
|
||||
target_link_libraries(mupp PRIVATE Qt5::Widgets Qt5::Xml)
|
||||
|
||||
#--- if macOS make an app rather than just a command line executable ----------
|
||||
set_target_properties(mupp PROPERTIES
|
||||
|
||||