diff --git a/CMakeLists.txt b/CMakeLists.txt index 8925072c..498f91e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ if (CMAKE_VERSION GREATER_EQUAL 3.12) cmake_policy(SET CMP0075 NEW) endif (CMAKE_VERSION GREATER_EQUAL 3.12) -project(musrfit VERSION 1.6.4 LANGUAGES C CXX) +project(musrfit VERSION 1.6.5 LANGUAGES C CXX) #--- musrfit specific options ------------------------------------------------- option(dks "build musrfit with DKS (GPU/MIC) support" ON) @@ -150,49 +150,60 @@ endif (DKS_FOUND) if (qt_based_tools) # check for any Qt, i.e. AUTO if (qt_version STREQUAL AUTO) - # first try Qt5 - # Find the QtCore library - find_package(Qt5Core) - if (Qt5Core_FOUND) - # Find the QtWidgets library - find_package(Qt5Widgets CONFIG REQUIRED) - # Find the QtXml library - find_package(Qt5Xml CONFIG REQUIRED) - # Find the QtNetwork library - find_package(Qt5Network CONFIG REQUIRED) - # Find the QtSvg library - find_package(Qt5Svg CONFIG REQUIRED) - # Fing the QtPrintSupport - find_package(Qt5PrintSupport CONFIG REQUIRED) - endif (Qt5Core_FOUND) + # try Qt6 + find_package(Qt6Core) + if (Qt6Core_FOUND) + find_package(Qt6Widgets CONFIG REQUIRED) + find_package(Qt6Xml CONFIG REQUIRED) + find_package(Qt6Network CONFIG REQUIRED) + find_package(Qt6Svg CONFIG REQUIRED) + find_package(Qt6PrintSupport CONFIG REQUIRED) + endif (Qt6Core_FOUND) + # try Qt5 + if (NOT Qt6Core_FOUND) + find_package(Qt5Core) + if (Qt5Core_FOUND) + find_package(Qt5Widgets CONFIG REQUIRED) + find_package(Qt5Xml CONFIG REQUIRED) + find_package(Qt5Network CONFIG REQUIRED) + find_package(Qt5Svg CONFIG REQUIRED) + find_package(Qt5PrintSupport CONFIG REQUIRED) + endif (Qt5Core_FOUND) + endif (NOT Qt6Core_FOUND) - # if Qt5 is not found, try Qt4 - if (NOT Qt5Core_FOUND) + # if Qt6 and Qt5 is not found, try Qt4 + if (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND) find_package(Qt4 COMPONENTS QtGui QtWebKit QtXml) - endif (NOT Qt5Core_FOUND) + endif (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND) - # if Qt5 and Qt4 is not found try Qt3. Hopefully you never reach this point - if (NOT Qt5Core_FOUND) - if (NOT Qt4_FOUND) - find_package(Qt3) - endif (NOT Qt4_FOUND) - endif (NOT Qt5Core_FOUND) + # if Qt6, Qt5 and Qt4 is not found try Qt3. Hopefully you never reach this point + if (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND AND Qt4_FOUND) + find_package(Qt3) + endif (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND AND Qt4_FOUND) endif (qt_version STREQUAL AUTO) - # check specifically for Qt5 + # check specifically for Qt6 + if (qt_version STREQUAL 6) + find_package(Qt6Core) + if (Qt6Core_FOUND) + find_package(Qt6Widgets CONFIG REQUIRED) + find_package(Qt6Xml CONFIG REQUIRED) + find_package(Qt6Network CONFIG REQUIRED) + find_package(Qt6Svg CONFIG REQUIRED) + find_package(Qt6PrintSupport CONFIG REQUIRED) + else (Qt6Core_FOUND) + message(FATAL_ERROR "Couldn't find the specifically requested Qt6 version.") + endif (Qt6Core_FOUND) + endif (qt_version STREQUAL 6) + + # check specifically for Qt5 if (qt_version STREQUAL 5) - # Find the QtCore library find_package(Qt5Core) if (Qt5Core_FOUND) - # Find the QtWidgets library find_package(Qt5Widgets CONFIG REQUIRED) - # Find the QtXml library find_package(Qt5Xml CONFIG REQUIRED) - # Find the QtNetwork library find_package(Qt5Network CONFIG REQUIRED) - # Find the QtSvg library find_package(Qt5Svg CONFIG REQUIRED) - # Fing the QtPrintSupport find_package(Qt5PrintSupport CONFIG REQUIRED) else (Qt5Core_FOUND) message(FATAL_ERROR "Couldn't find the specifically requested Qt5 version.") @@ -288,17 +299,21 @@ endif (nexus) message("") if (qt_based_tools) - if (Qt5Core_FOUND) - message(" Qt found in ${Qt5Core_INCLUDE_DIRS} (Version: ${Qt5Core_VERSION})") - else (Qt5Core_FOUND) - if (Qt4_FOUND) - message(" Qt found (Version: ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH})") - else (Qt4_FOUND) - if (QT_FOUND) - message(" Qt found (Version: ${QT_VERSION})") - endif (QT_FOUND) - endif (Qt4_FOUND) - endif (Qt5Core_FOUND) + if (Qt6Core_FOUND) + message(" Qt found in ${Qt6Core_INCLUDE_DIRS} (Version: ${Qt6Core_VERSION})") + else (Qt6Core_FOUND) + if (Qt5Core_FOUND) + message(" Qt found in ${Qt5Core_INCLUDE_DIRS} (Version: ${Qt5Core_VERSION})") + else (Qt5Core_FOUND) + if (Qt4_FOUND) + message(" Qt found (Version: ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH})") + else (Qt4_FOUND) + if (QT_FOUND) + message(" Qt found (Version: ${QT_VERSION})") + endif (QT_FOUND) + endif (Qt4_FOUND) + endif (Qt5Core_FOUND) + endif (Qt6Core_FOUND) endif (qt_based_tools) message("") message(" Features:") @@ -336,25 +351,27 @@ else (BNMRlibs) endif (BNMRlibs) if (qt_based_tools) -if (Qt5Core_FOUND) +if (Qt6Core_FOUND) + message("") + message(" Qt6 based tools:") + message(" musredit, musrStep, musrWiz, mupp : yes") +elseif (Qt5Core_FOUND) message("") message(" Qt5 based tools:") message(" musredit, musrStep, musrWiz, mupp : yes") -endif (Qt5Core_FOUND) -if (Qt4_FOUND) +elseif (Qt4_FOUND) message("") message(" Qt4 based tools (deprecated):") message(" musredit : yes") -endif (Qt4_FOUND) -if (QT_FOUND) +else () message("") message(" Qt3 based tools (outdated):") message(" musrgui : yes") -endif (QT_FOUND) -if (NOT Qt5Core_FOUND AND NOT Qt4_FOUND AND NOT QT_FOUND) +endif () +if (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND AND NOT Qt4_FOUND AND NOT QT_FOUND) message("") message(" NO Qt based tools will be installed since Qt is not found or not installed on the system") -endif (NOT Qt5Core_FOUND AND NOT Qt4_FOUND AND NOT QT_FOUND) +endif (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND AND NOT Qt4_FOUND AND NOT QT_FOUND) else (qt_based_tools) message("") message(" Qt based tools (musredit, musrStep, musrWiz, mupp) have been disabled") diff --git a/ChangeLog b/ChangeLog index 97be543f..41be0adc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,11 @@ or https://bitbucket.org/muonspin/musrfit/commits/all +Release of V1.6.5, 2021/01/22 +============================= + +Add Qt6 version of musredit, mupp, etc. + Release of V1.6.4, 2020/08/29 ============================= diff --git a/cmake/CPackOptions.cmake.in b/cmake/CPackOptions.cmake.in index 8ca0a012..4858f338 100644 --- a/cmake/CPackOptions.cmake.in +++ b/cmake/CPackOptions.cmake.in @@ -24,12 +24,12 @@ set (CPACK_SET_DESTDIR "OFF") set (CPACK_PACKAGE_RELOCATABLE "true") if (${CPACK_GENERATOR} STREQUAL "RPM") - set (CPACK_RPM_PACKAGE_REQUIRES "root >= 6.16.00") + set (CPACK_RPM_PACKAGE_REQUIRES "root >= 6.22.00") set (CPACK_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@") set (CPACK_PACKAGING_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@") set (CPACK_RPM_FILE_NAME "RPM-DEFAULT") set (CPACK_RPM_PACKAGE_RELEASE "1") - # next variable for RHEL, CentOS, Fedfora + # next variable for RHEL, CentOS, Fedora set (CPACK_RPM_PACKAGE_RELEASE_DIST "") set (CPACK_RPM_PACKAGE_LICENSE "GPLv2") set (CPACK_RPM_PACKAGE_VENDOR "Paul Scherrer Institute - LMU - LEM") diff --git a/doc/html/.buildinfo b/doc/html/.buildinfo index c607e418..335c2894 100644 --- a/doc/html/.buildinfo +++ b/doc/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 0b93e4185566cd2a81b86f199313e66e +config: eec60d1156b3ecdeb8b69fcbd6a0b13b tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/doc/html/_downloads/Makefile.TMyLibrary b/doc/html/_downloads/Makefile.TMyLibrary new file mode 100644 index 00000000..73a85c8e --- /dev/null +++ b/doc/html/_downloads/Makefile.TMyLibrary @@ -0,0 +1,60 @@ +#--------------------------------------------------- +# get compilation flags from root-config + +ROOTCFLAGS = $(shell $(ROOTSYS)/bin/root-config --cflags) + +#--------------------------------------------------- + +OS = LINUX +CXX = g++ +CXXFLAGS = -O3 -Wall -Wno-trigraphs -fPIC +LOCALINCLUDE = . +ROOTINCLUDE = $(ROOTSYS)/include +INCLUDES = -I$(LOCALINCLUDE) -I$(ROOTINCLUDE) +LD = g++ +LDFLAGS = +SOFLAGS = -O -shared + +# the output from the root-config script: +CXXFLAGS += $(ROOTCFLAGS) +LDFLAGS += + +# some definitions: headers (used to generate *Dict* stuff), sources, objects,... +OBJS = +OBJS += TMyFunction.o TMyLibraryDict.o + +SHLIB = libTMyLibrary.so + +# make the shared lib: +# +all: $(SHLIB) + +$(SHLIB): $(OBJS) + @echo "---> Building shared library $(SHLIB) ..." + /bin/rm -f $(SHLIB) + $(LD) $(OBJS) $(SOFLAGS) -o $(SHLIB) + @echo "done" + +# clean up: remove all object file (and core files) +# semicolon needed to tell make there is no source +# for this target! +# +clean:; @rm -f $(OBJS) *Dict* core* + @echo "---> removing $(OBJS)" + +# +$(OBJS): %.o: %.cpp + $(CXX) $(INCLUDES) $(CXXFLAGS) -c $< + +# Generate the ROOT CINT dictionary + +TMyLibraryDict.cpp: TMyFunction.h TMyLibraryLinkDef.h + @echo "Generating dictionary $@..." + rootcint -f $@ -c -p -I$(ROOTINCLUDE) $^ + +install: all + @echo "Installing shared lib: libTApproximation.so" +ifeq ($(OS),LINUX) + cp -pv $(SHLIB) $(ROOTSYS)/lib + cp -pv $(LOCALINCLUDE)/*.h $(ROOTSYS)/include +endif diff --git a/doc/html/_sources/acknowledgement.txt b/doc/html/_sources/acknowledgement.txt new file mode 100644 index 00000000..7e8c47fa --- /dev/null +++ b/doc/html/_sources/acknowledgement.txt @@ -0,0 +1,22 @@ +.. include:: +.. index:: acknowledgment + +.. _acknowledgment: + +Acknowledgements +================ + + +**Bastian M. Wojek** + I am very much indebted to BMW for his rigorous testing of ``musrfit``, his many useful suggestions, contributions, and for the + largest part of the user manual of ``musrfit`` which makes it accessible to a broader audience! Many thanks Bastian! + +**Uldis Locans** + I am very much indebted to Uldis work on :ref:`DKS ` enabling the GPU support for ``musrfit``. His kind, calm, and + extremely competent way to deal with his projects as well as to deal with the chaos of physicists way to think is admirable. Many thanks Uldis! + +**Zaher Salman** + Thanks for his beta-NMR and web-interface contributions to ``musrfit``! + +**Robert Scheuermann** + Thanks for his constant contructive input on ``musrfit``! diff --git a/doc/html/_sources/any2many.txt b/doc/html/_sources/any2many.txt new file mode 100644 index 00000000..6b5fd201 --- /dev/null +++ b/doc/html/_sources/any2many.txt @@ -0,0 +1,8 @@ +.. include:: +.. index:: any2many + +any2many - a Universal |mgr|\SR-file-format converter +===================================================== + +``any2many`` allows to convert most |mgr|\SR-file-formats from one to the other. +For a detailed description see :ref:`here `. \ No newline at end of file diff --git a/doc/html/_sources/bugtracking.txt b/doc/html/_sources/bugtracking.txt new file mode 100644 index 00000000..55a5ff54 --- /dev/null +++ b/doc/html/_sources/bugtracking.txt @@ -0,0 +1,9 @@ +.. index:: bugtracking +.. _bugtracking: + +Bugtracking +=========== + +For reporting bugs or requesting new features and improvements please use +the `bitbucket-repo `_ (preferred) +or send an e-mail to A. Suter at PSI. diff --git a/doc/html/_sources/cite.txt b/doc/html/_sources/cite.txt new file mode 100644 index 00000000..5a71e6f1 --- /dev/null +++ b/doc/html/_sources/cite.txt @@ -0,0 +1,18 @@ +.. include:: +.. index:: cite +.. _cite: + +How to Cite ``musrfit``? +======================== + +Since quite some effort is going into the development and maintenance of the ``musrfit`` 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 + + * A.\ Suter, B.M. Wojek, "Musrfit: A Free Platform-Independent Framework for |mgr|\SR Data Analysis", Physics Procedia **30**, 69 (2012). ``_ + +The GPU high speed ``musrfit`` version is utilizing ``DKS``. In case you are using this version, please also add the following citations + + * A.\ Adelmann, U. Locans, A. Suter, "The Dynamic Kernel Scheduler—Part 1", Computer Physics Communications **207**, 83 (2016). ``_ + * U.\ Locans, *et al.*, "Real-time computation of parameter fitting and image reconstruction using graphical processing units", Computer Physics Communications **215**, 71 (2017). ``_ + * U.\ Locans and A.\ Suter, "Musrfit – Real Time Parameter Fitting Using GPUs", JPS Conf. Proc. *21*, 011051 (2018). ``_ + + diff --git a/doc/html/_sources/index.txt b/doc/html/_sources/index.txt new file mode 100644 index 00000000..b4ed7d2f --- /dev/null +++ b/doc/html/_sources/index.txt @@ -0,0 +1,31 @@ +.. musrfit docu documentation master file, created by + sphinx-quickstart on Sun Jun 17 11:00:32 2018. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to the musrfit documentation! +===================================== + +.. toctree:: + :maxdepth: 2 + + cite + tutorial + user-manual + user-libs + setup-standard + setup-dks + musredit + mupp + msr2data + any2many + musr-root + acknowledgement + bugtracking + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`search` diff --git a/doc/html/_sources/msr2data.txt b/doc/html/_sources/msr2data.txt new file mode 100644 index 00000000..8e77bbca --- /dev/null +++ b/doc/html/_sources/msr2data.txt @@ -0,0 +1,374 @@ +.. include:: +.. index:: msr2data + +.. _msr2data: + +msr2data - A Program for Automatically Processing Multiple ``musrfit`` msr Files +================================================================================ + +``msr2data`` (originally written by B. M. Wojek) is a program implemented in ``C++``. Its purpose is +to process multiple msr files (input files for ``musrfit``) with the same parameters and summarize the fitting +results either in a *TRIUMF DB* [#f1]_ or a *column ASCII* file. This allows essentially to + +#. Collect the fit parameters. +#. Generate *new* input msr files based on old ones. + +.. [#f1] For an abridged description of this format see `here `_. The DB files + produced by ``msr2data`` can be viewed for instance with :ref:`mupp ` or |mgr|\View `see here `_, however, + they are not completely backward-compatible to the original ``db language`` since the parameter names can be longer than five or + six characters! In order to establish this backward compatibility (if needed) the user has to ensure the correct length of the + parameter names in the msr files! + +.. _msr2data-basic-usage: + +Basic Types of Usage +-------------------- + +Apart from numerous :ref:`optional parameters ` that might be set, in principle there are four different ways of calling ``msr2data``. +These differ in how the list of runs which should be processed is supplied: + +**msr2data [optional parameters]** + A single run number. +**msr2data [optional parameters]** + An interval of run numbers is specified through the first and the last run number. The condition ```` < ```` is not necessary. +**msr2data \[ \] [optional parameters]** + Where ```` is one or a combination of the following: + + #. ``, , , ... `` : run numbers, *e.g.* 123 124, + #. ``-`` : a range, *e.g.* 123-125 -> 123 124 125, + #. ``::`` : a sequence, *e.g.* 123:127:2 -> 123 125 127. ```` has to be a positive integer. + #. A ```` can also combine (1)-(3), *e.g.* 123 128-130 133, etc. + +**msr2data [optional parameters]** + An ASCII file containing a list of run numbers and optional external parameters is passed to ``msr2data``. For the structure of the ASCII file + see :ref:`below `. + +All four basic types of calling ``msr2data`` contain the *mandatory* file-name ```` passed right after the list of runs. The meaning of +this ```` should become clear after giving examples for all four cases: + +.. code-block:: bash + + $ msr2data 8472 _tf_h13 + +generates the DB file ``out.db`` (can be changed by using the -o option) from ``8472_tf_h13.msr``. + +.. code-block:: bash + + $ msr2data 8472 8474 _tf_h13 + +generates the DB file ``out.db`` (can be changed by using the -o option) from ``8472_tf_h13.msr``, ``8473_tf_h13.msr``, and ``8474_tf_h13.msr``. + +.. code-block:: bash + + $ msr2data [8472 8470] _tf_h13 + +generates the DB file ``out.db`` (can be changed by using the -o option) from ``8472_tf_h13.msr`` and ``8470_tf_h13.msr``. + +.. code-block:: bash + + $ msr2data [8470:8474:2] _tf_h13 + +generates the DB file ``out.db`` (can be changed by using the -o option) from ``8470_tf_h13.msr``, ``8472_tf_h13.msr``, and ``8474_tf_h13.msr``. + +.. _run-list-file_structure: + +Run List File Structure ++++++++++++++++++++++++ + +.. code-block:: bash + + $ msr2data run.list _tf_h13 + +generates the DB file ``out.db`` (can be changed by using the -o option) from all runs listed in the ASCII file ``run.list`` in the working directory. +In this file it is also possible to include *external* parameters which should be put in the resulting DB file. The structure of the ``run.list`` is the following: + +:: + + RUN VAR1 VAR2 VAR3 ... + 8460 200 27.1 46.2 ... + 8472 205 27.1 46.3 ... + 8453 210 27.2 45.9 ... + · · · · + · · · · + · · · · + +*The first not commented and not empty line determines the parameter names and labels and has to be present!* + +It is allowed to add comments (with a preceding '#') or empty lines to the run-list file. + +The following should be mentioned together with the above examples: + +* The output files in the examples above are only newly created if they did *not* exist before invoking ``msr2data``. + If the files were already present the msr file data would be appended! +* If the files have been newly created, also the DB file header is written. If the files were present before, only + the data blocks are appended. The output of the header can either be forced or completely suppressed with the ``header`` + and ``noheader`` options as shall be seen later. +* If the ``musrfit`` output files do not have an ```` as specified above like ``8472.msr`` one has to call ``msr2data`` like in the following example: + + .. code-block:: bash + + $ msr2data 8472 8460 "" + +.. _msr2data-opt-param: + +Optional Parameters +------------------- + +As mentioned already above there are some optional parameters which change the behavior of ``msr2data`` and can be passed in any order. Here is a complete list: + +**data** + The output file format is changed to a simple column ASCII file (default output file name: out.dat). +**new** + An existing output file is deleted before new information is written to it. +**header** + Force the output of the file header even if the output file was present before. +**noheader** + The output of the file header is suppressed—also if the output file is newly created. + If either both or none of the header options are given, ``msr2data`` writes the file header only to new files + and it solely appends the data blocks to an existing output file assuming that the header is present already. +**nosummary** + There will be no attempt to read additional information like the temperature or the applied magnetic field from + the data files even if these information were present there. +**paramList ** + option used to select the parameters which shall be exported. ```` is a list of parameter numbers to be exported. + Allowed lists are: ``-``, *e.g.* ``1-16`` will export parameters 1 to 16. Space separated numbers, *e.g.:* ``1 3 5``. + A combination of both is possible, *e.g.* ``1-16 19 31 62``, and so on. +**-o, -o ** + The processed data will be written to the file ```` instead of the default ``out.db`` or ``out.dat``. + If ```` is equal to none (case-insensitive) the parameter data are not appended to any output file. +**fit** + Additionally to the final data collection ``msr2data`` will invoke ``musrfit`` to fit the specified runs. + All msr files are assumed to be present, none is newly generated! +**fit-