13 Commits

Author SHA1 Message Date
64d3b6192b added the option to write the content of the MINUIT2.OUTPUT ascii file as yaml. This extends the previous commit from Ryan M.L. McFadden. 2024-06-18 11:16:15 +02:00
6bcb26f9d5 Merge branch 'root6' of https://bitbucket.org/muonspin/musrfit into root6 2024-06-18 08:19:01 +02:00
6b865efd3b Merged in ignore (pull request #17)
ignore all files generated from an in-repo build

Approved-by: Andreas Suter
2024-06-18 06:18:56 +00:00
caccfb175a Merged in yaml (pull request #16)
write the fit results to an easy-to-read/parse yaml file

Approved-by: Andreas Suter
2024-06-18 06:18:31 +00:00
1845b5c176 Merged in segfault (pull request #15)
fix segfault

Approved-by: Andreas Suter
2024-06-18 06:18:14 +00:00
8821112927 ignore all files generated from an in-repo build 2024-06-17 13:07:06 -03:00
833171c712 write the fit results to an easy-to-read/parse yaml file
This patch adds routines for writing a comprehensive set of fit results (i.e., parameter values, parabolic errors, asymmetric errors, covariances, correlation coefficients, etc.) for an individual `.msr` file to an easy-to-read/parse `.yaml` file.

The main motivation for the code addition is to provide users with easy access to the fit's covariance matrix without the need for "extra" manual effort (e.g., parsing the contents of `MINUIT2.OUTPUT` or `MINUIT2.root`). The other fit quantities are also included for completeness.

Reading/accessing the output is trivial using, for example, the PyYAML Python library (https://github.com/yaml/pyyaml):

```python
import yaml

with open("2125_tf_histo.yaml", "r") as fh:
	results = yaml.load(fh, Loader=yaml.SafeLoader)

cov = results["covariance"]["Field_1"]["Sigma_1"]
```

Note: the naming conventions chosen for the blocks in the `.yaml` output closely follow those used by the iminuit Python library (https://github.com/scikit-hep/iminuit).
2024-06-17 12:51:04 -03:00
61749b91c4 fix segfault
This patch provides a memory-safe alternative to the changes introduced in commit 418adfde67, which causes a segfault when the "batch mode" flag is required (i.e., for ascii/graphic export).

Note: the program name (i.e., argv[0]) has been added the list arguments passed to ROOT's TApplication. This ensures that the TApplication name matches that of the program (see 542b98b2cc/core/base/src/TApplication.cxx (L179-L180)).
2024-06-17 10:52:14 -03:00
3d92e2eefb add CPU info to the configure process. 2024-06-09 17:45:02 +02:00
b71dce9291 remove more accidently added file. 2024-06-08 16:39:57 +02:00
1aa4ce0a99 remove accidentely added file. 2024-06-08 16:36:54 +02:00
425ed02e22 update of the docu. 2024-06-08 09:23:36 +02:00
a36abfc461 updated version info, due to the macOS OpenMP support. 2024-06-08 09:17:05 +02:00
52 changed files with 397 additions and 117 deletions

BIN
.DS_Store vendored

Binary file not shown.

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# ignore all files generated from an in-repo build
build/

View File

@ -1,7 +1,7 @@
# - musrfit
cmake_minimum_required(VERSION 3.17)
project(musrfit VERSION 1.9.3 LANGUAGES C CXX)
project(musrfit VERSION 1.9.5 LANGUAGES C CXX)
#--- musrfit specific options -------------------------------------------------
option(nexus "build optional NeXus support. Needed for ISIS" OFF)
@ -249,6 +249,8 @@ set(CMAKE_INSTALL_RPATH "${rpath}")
add_subdirectory(src)
#--- write summary of the installation
cmake_host_system_information(RESULT PROCESSOR QUERY PROCESSOR_DESCRIPTION)
message("")
message("|-----------------------------------------------------------------------|")
message("| |")
@ -256,8 +258,9 @@ message("| Summary
message("| |")
message("|-----------------------------------------------------------------------|")
message("")
message(" System: ${CMAKE_HOST_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR} - ${CMAKE_HOST_SYSTEM_VERSION}")
message(" -------")
message(" System: ${CMAKE_HOST_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR} - ${CMAKE_HOST_SYSTEM_VERSION}")
message(" Processor: ${PROCESSOR} (${CMAKE_SYSTEM_PROCESSOR})")
message(" ----------")
message("")
message(" musrfit Version: ${musrfit_VERSION}")
message(" ----------------")

BIN
doc/.DS_Store vendored

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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: 28c8d31b3d0d7429fcebb7bd0074bdd3
config: 81576a0588e1a44f70c715e85985d5a5
tags: 645f666f9bcd5a90fca523b33c5a78b7

View File

@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '1.9.3',
VERSION: '1.9.4',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Acknowledgements &mdash; musrfit 1.9.3 documentation</title>
<title>Acknowledgements &mdash; musrfit 1.9.4 documentation</title>
@ -201,7 +201,7 @@ extremely competent way to deal with his projects as well as to deal with the ch
<div role="contentinfo">
<p>
&copy; Copyright 2023, Andreas Suter.
Last updated on Apr 23, 2024.
Last updated on Jun 08, 2024.
</p>
</div>
@ -223,7 +223,7 @@ extremely competent way to deal with his projects as well as to deal with the ch
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.9.3',
VERSION:'1.9.4',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>any2many - a Universal μSR-file-format converter &mdash; musrfit 1.9.3 documentation</title>
<title>any2many - a Universal μSR-file-format converter &mdash; musrfit 1.9.4 documentation</title>
@ -191,7 +191,7 @@ For a detailed description see <a class="reference internal" href="user-manual.h
<div role="contentinfo">
<p>
&copy; Copyright 2023, Andreas Suter.
Last updated on Apr 23, 2024.
Last updated on Jun 08, 2024.
</p>
</div>
@ -213,7 +213,7 @@ For a detailed description see <a class="reference internal" href="user-manual.h
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.9.3',
VERSION:'1.9.4',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bugtracking &mdash; musrfit 1.9.3 documentation</title>
<title>Bugtracking &mdash; musrfit 1.9.4 documentation</title>
@ -189,7 +189,7 @@ or send an e-mail to A. Suter at PSI.</p>
<div role="contentinfo">
<p>
&copy; Copyright 2023, Andreas Suter.
Last updated on Apr 23, 2024.
Last updated on Jun 08, 2024.
</p>
</div>
@ -211,7 +211,7 @@ or send an e-mail to A. Suter at PSI.</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.9.3',
VERSION:'1.9.4',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>How to Cite musrfit? &mdash; musrfit 1.9.3 documentation</title>
<title>How to Cite musrfit? &mdash; musrfit 1.9.4 documentation</title>
@ -203,7 +203,7 @@
<div role="contentinfo">
<p>
&copy; Copyright 2023, Andreas Suter.
Last updated on Apr 23, 2024.
Last updated on Jun 08, 2024.
</p>
</div>
@ -225,7 +225,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.9.3',
VERSION:'1.9.4',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Short description and references to the supported file-formats &mdash; musrfit 1.9.3 documentation</title>
<title>Short description and references to the supported file-formats &mdash; musrfit 1.9.4 documentation</title>
@ -503,7 +503,7 @@ Between detectors, there will be an empty line.</p>
<div role="contentinfo">
<p>
&copy; Copyright 2023, Andreas Suter.
Last updated on Apr 23, 2024.
Last updated on Jun 08, 2024.
</p>
</div>
@ -525,7 +525,7 @@ Between detectors, there will be an empty line.</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.9.3',
VERSION:'1.9.4',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',

View File

@ -9,7 +9,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Index &mdash; musrfit 1.9.3 documentation</title>
<title>Index &mdash; musrfit 1.9.4 documentation</title>
@ -753,7 +753,7 @@
<div role="contentinfo">
<p>
&copy; Copyright 2023, Andreas Suter.
Last updated on Apr 23, 2024.
Last updated on Jun 08, 2024.
</p>
</div>
@ -775,7 +775,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.9.3',
VERSION:'1.9.4',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome to the musrfit documentation! &mdash; musrfit 1.9.3 documentation</title>
<title>Welcome to the musrfit documentation! &mdash; musrfit 1.9.4 documentation</title>
@ -285,7 +285,7 @@
<div role="contentinfo">
<p>
&copy; Copyright 2023, Andreas Suter.
Last updated on Apr 23, 2024.
Last updated on Jun 08, 2024.
</p>
</div>
@ -307,7 +307,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.9.3',
VERSION:'1.9.4',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>msr2data - A Program for Automatically Processing Multiple musrfit msr Files &mdash; musrfit 1.9.3 documentation</title>
<title>msr2data - A Program for Automatically Processing Multiple musrfit msr Files &mdash; musrfit 1.9.4 documentation</title>
@ -518,7 +518,7 @@ fit serves as template for the second and so on. The template field stays empty
<div role="contentinfo">
<p>
&copy; Copyright 2023, Andreas Suter.
Last updated on Apr 23, 2024.
Last updated on Jun 08, 2024.
</p>
</div>
@ -540,7 +540,7 @@ fit serves as template for the second and so on. The template field stays empty
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.9.3',
VERSION:'1.9.4',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>mupp - μSR Parameter Plotter &mdash; musrfit 1.9.3 documentation</title>
<title>mupp - μSR Parameter Plotter &mdash; musrfit 1.9.4 documentation</title>
@ -408,7 +408,7 @@ SCRIPT COMMANDS:
<div role="contentinfo">
<p>
&copy; Copyright 2023, Andreas Suter.
Last updated on Apr 23, 2024.
Last updated on Jun 08, 2024.
</p>
</div>
@ -430,7 +430,7 @@ SCRIPT COMMANDS:
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.9.3',
VERSION:'1.9.4',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MusrRoot - an Extensible Open File Format for μSR &mdash; musrfit 1.9.3 documentation</title>
<title>MusrRoot - an Extensible Open File Format for μSR &mdash; musrfit 1.9.4 documentation</title>
@ -1007,7 +1007,7 @@ the entry has been added. The last token, <code class="docutils literal notransl
<div role="contentinfo">
<p>
&copy; Copyright 2023, Andreas Suter.
Last updated on Apr 23, 2024.
Last updated on Jun 08, 2024.
</p>
</div>
@ -1029,7 +1029,7 @@ the entry has been added. The last token, <code class="docutils literal notransl
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.9.3',
VERSION:'1.9.4',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>musredit: the GUI Based Interface to musrfit &mdash; musrfit 1.9.3 documentation</title>
<title>musredit: the GUI Based Interface to musrfit &mdash; musrfit 1.9.4 documentation</title>
@ -634,7 +634,7 @@ the corresponding fit parameter value, except the phases where the step will be
<div role="contentinfo">
<p>
&copy; Copyright 2023, Andreas Suter.
Last updated on Apr 23, 2024.
Last updated on Jun 08, 2024.
</p>
</div>
@ -656,7 +656,7 @@ the corresponding fit parameter value, except the phases where the step will be
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.9.3',
VERSION:'1.9.4',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Search &mdash; musrfit 1.9.3 documentation</title>
<title>Search &mdash; musrfit 1.9.4 documentation</title>
@ -185,7 +185,7 @@
<div role="contentinfo">
<p>
&copy; Copyright 2023, Andreas Suter.
Last updated on Apr 23, 2024.
Last updated on Jun 08, 2024.
</p>
</div>
@ -207,7 +207,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.9.3',
VERSION:'1.9.4',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Setting up musrfit / DKS: High Speed Fitting with GPUs &mdash; musrfit 1.9.3 documentation</title>
<title>Setting up musrfit / DKS: High Speed Fitting with GPUs &mdash; musrfit 1.9.4 documentation</title>
@ -408,7 +408,7 @@ The only thing you need <code class="docutils literal notranslate"><span class="
<div role="contentinfo">
<p>
&copy; Copyright 2023, Andreas Suter.
Last updated on Apr 23, 2024.
Last updated on Jun 08, 2024.
</p>
</div>
@ -430,7 +430,7 @@ The only thing you need <code class="docutils literal notranslate"><span class="
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.9.3',
VERSION:'1.9.4',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Setting up musrfit on Different Platforms &mdash; musrfit 1.9.3 documentation</title>
<title>Setting up musrfit on Different Platforms &mdash; musrfit 1.9.4 documentation</title>
@ -264,7 +264,7 @@ Currently the <code class="docutils literal notranslate"><span class="pre">MXML<
<p>If <em>optionally</em> the editor and graphical user interface <code class="docutils literal notranslate"><span class="pre">musrgui</span></code> / <code class="docutils literal notranslate"><span class="pre">musredit</span></code> is going to be installed there is one further requirement:</p>
<dl class="docutils" id="index-11">
<dt><strong>Qt</strong></dt>
<dd>A cross-platform application and user interface framework. <em>Required version ≥ 4.6</em> (musredit) (see <a class="reference external" href="http://qt.io/">Qt</a>). Currently the <strong>Qt5</strong> is the main development part. Qt6 just kicked in, but is not widely available yet.</dd>
<dd>A cross-platform application and user interface framework. <em>Required version ≥ 4.6</em> (musredit) (see <a class="reference external" href="http://qt.io/">Qt</a>). Currently the <strong>Qt5</strong> is still supported since some older distributions are not yet supporting Qt6. <strong>Qt6</strong> is the <em>main</em> development part. Should be available on all new major distributions.</dd>
</dl>
<p>Each of the following sections focusing on the installation of <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> on the different operating systems will also give a brief introduction on the installation of the requirements before the actual musrfit installation is described.</p>
</div>
@ -273,9 +273,8 @@ Currently the <code class="docutils literal notranslate"><span class="pre">MXML<
<p>Before the installation procedure will be described, please note the following restrictions:</p>
<dl class="docutils">
<dt><strong>GNU/Linux</strong></dt>
<dd>No serious problems are currently known. Tested distributions: <a class="reference external" href="https://www.redhat.com/de/technologies/linux-platforms/enterprise-linux">RHEL</a>, <a class="reference external" href="https://getfedora.org/">Fedora</a>,
<a class="reference external" href="https://www.debian.org/">Debian</a>, <a class="reference external" href="https://www.ubuntu.com/">Ubuntu</a>, <a class="reference external" href="https://linuxmint.com/">Mint</a>, <a class="reference external" href="https://en.opensuse.org/Main_Page">openSUSE</a>,
and <cite>manjaro &lt;https://de.manjaro.org/&gt;</cite>.</dd>
<dd>No serious problems are currently known. Tested distributions: <a class="reference external" href="https://www.redhat.com/de/technologies/linux-platforms/enterprise-linux">RHEL</a> (also <a class="reference external" href="https://almalinux.org/">Alma</a>, <a class="reference external" href="https://rockylinux.org/">Rocky</a>), <a class="reference external" href="https://getfedora.org/">Fedora</a>,
<a class="reference external" href="https://www.debian.org/">Debian</a>, <a class="reference external" href="https://www.ubuntu.com/">Ubuntu</a>, <a class="reference external" href="https://linuxmint.com/">Mint</a>, <a class="reference external" href="https://en.opensuse.org/Main_Page">openSUSE</a>, and <a class="reference external" href="https://de.manjaro.org/">Manjaro</a>.</dd>
<dt><strong>Mac OS X/macOS</strong></dt>
<dd>No serious problems are currently known for macOS ≥ 10.6. <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> is ARM M1 ready.</dd>
<dt><strong>MS Windows</strong></dt>
@ -307,11 +306,11 @@ from the shell will do the trick (never type the $ it is the shell prompt
<p>For <strong>Qt5/Qt6</strong>:</p>
<blockquote>
<div><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ yum install epel-release
$ yum install git cmake boost-devel gsl-devel fftw-devel libxml2-devel qt5-qtbase-devel qt5-qtsvg-devel
$ yum install git cmake boost-devel gsl-devel fftw-devel libxml2-devel qt6-qtbase-devel qt6-qtsvg-devel
</pre></div>
</div>
</div></blockquote>
<p>If using <code class="docutils literal notranslate"><span class="pre">Qt6</span></code> replace <code class="docutils literal notranslate"><span class="pre">qt5-qtbase-devel</span> <span class="pre">qt5-qtsvg-devel</span></code> by <code class="docutils literal notranslate"><span class="pre">qt6-qtbase-devel</span> <span class="pre">qt6-qtsvg-devel</span></code></p>
<p>If using <code class="docutils literal notranslate"><span class="pre">Qt5</span></code>, since e.g. Qt6 is not available, replace <code class="docutils literal notranslate"><span class="pre">qt6-qtbase-devel</span> <span class="pre">qt6-qtsvg-devel</span></code> by <code class="docutils literal notranslate"><span class="pre">qt5-qtbase-devel</span> <span class="pre">qt5-qtsvg-devel</span></code></p>
<p>When dealing with a distribution that uses the dpkg/apt package manager like <a class="reference external" href="https://www.debian.org/">Debian</a> or <a class="reference external" href="https://www.ubuntu.com/">Ubuntu</a>
the installation would look like:</p>
<p>For <strong>Qt4</strong> (deprecated):</p>
@ -322,11 +321,11 @@ the installation would look like:</p>
</div></blockquote>
<p>For <strong>Qt5/Qt6</strong>:</p>
<blockquote>
<div><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ apt-get install git cmake libboost-dev libboost-filesystem-dev libboost-system-dev libgsl-dev libfftw3-dev libxml2-dev qt5-default qtbase5-dev libqt5svg5-dev
<div><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ apt-get install git cmake libboost-dev libboost-filesystem-dev libboost-system-dev libgsl-dev libfftw3-dev libxml2-dev qt6-base-dev qt6-svg-dev
</pre></div>
</div>
</div></blockquote>
<p>If using <code class="docutils literal notranslate"><span class="pre">Qt6</span></code> replace <code class="docutils literal notranslate"><span class="pre">qt5-default</span> <span class="pre">qtbase5-dev</span> <span class="pre">libqt5svg5-dev</span></code> by <code class="docutils literal notranslate"><span class="pre">qt6-default</span> <span class="pre">qtbase6-dev</span> <span class="pre">libqt6svg6-dev</span></code></p>
<p>If using <code class="docutils literal notranslate"><span class="pre">Qt5</span></code>, since e.g. Qt6 is not available, replace <code class="docutils literal notranslate"><span class="pre">qt6-base-dev</span> <span class="pre">qt6-svg-dev</span></code> by <code class="docutils literal notranslate"><span class="pre">qtbase5-dev</span> <span class="pre">libqt5svg5-dev</span></code></p>
<p>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>
@ -366,8 +365,8 @@ $ mkdir build
$ <span class="nb">cd</span> build
$ cmake -DENABLE_HDF5<span class="o">=</span><span class="m">1</span> -DENABLE_HDF4<span class="o">=</span><span class="m">1</span> -DENABLE_MXML<span class="o">=</span><span class="m">0</span> ../code
$ cmake --build ./ --clean-first
$ <span class="c1"># make install needs either to be carried out as root or sudo depending on your linux flavour.</span>
$ sudo make install
$ <span class="c1"># install needs either to be carried out as root or sudo depending on your linux flavour.</span>
$ sudo cmake --install ./
</pre></div>
</div>
</div>
@ -412,7 +411,7 @@ $ <span class="c1"># calling it with the option -j &lt;number&gt;, where &lt;num
$ <span class="c1"># e.g. cmake --build ./ --clean-first -- -j8</span>
$ cmake --build ./ --clean-first
$ <span class="c1"># as a last step of the ROOT build process we need to install it</span>
$ make install
$ cmake --install ./
</pre></div>
</div>
<p>What is still missing is that the system should be told where to find the <code class="docutils literal notranslate"><span class="pre">ROOT</span></code> installation, therefore the following is suggested:</p>
@ -471,7 +470,7 @@ $ git pull
$ <span class="nb">cd</span> build
$ xargs rm &lt; install_manifest.txt
$ cmake --build ./ --clean-first
$ make install
$ cmake --install ./
</pre></div>
</div>
<p>As an alternative (if git is not available), the source code can also be downloaded from the following web-page: <a class="reference external" href="https://bitbucket.org/muonspin/musrfit/downloads">musrfit at bitbucket</a></p>
@ -511,7 +510,7 @@ $ <span class="nb">cd</span> build
$ cmake ../ -DCMAKE_INSTALL_PREFIX<span class="o">=</span><span class="nv">$ROOTSYS</span> -Dnexus<span class="o">=</span><span class="m">1</span>
<span class="c1"># below it is assumed that multiple cores are present, hence the -j8 option</span>
$ cmake --build ./ --clean-first -- -j8
$ make install
$ cmake --install ./
$ /sbin/ldconfig <span class="c1"># (as superuser)</span>
</pre></div>
</div>
@ -657,7 +656,7 @@ add a new line pointing to your local copy, <em>e.g.</em></p>
</ol>
<p>Then the MacPorts system should be set up and can be used to install additional software.</p>
<p>The installation of the software mentioned above is then done in the terminal:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ sudo port -v install pkgconfig autoconf automake libtool cmake fftw-3 fftw-3-single gsl boost libxml2 qt6 qt6-qtsvg
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ sudo port -v install pkgconfig autoconf automake libtool cmake libomp fftw-3 fftw-3-single gsl boost libxml2 qt6 qt6-qtsvg
</pre></div>
</div>
<p>With <code class="docutils literal notranslate"><span class="pre">Qt6</span></code>, <code class="docutils literal notranslate"><span class="pre">musredit</span></code> will be installed. If it happens that you used <code class="docutils literal notranslate"><span class="pre">musrgui</span></code> in the past,
@ -668,6 +667,7 @@ please change over to <code class="docutils literal notranslate"><span class="pr
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ sudo port -v install hdf4 hdf5
</pre></div>
</div>
<p><em>hdf4</em> is likely not available anymore.</p>
<p><strong>Only NeXus Version ≥ 4.4 is support!</strong></p>
<p>To get things compiled do:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ <span class="c1"># get and install NeXus</span>
@ -678,9 +678,12 @@ $ <span class="c1"># next we will build NeXus out-of-source</span>
$ <span class="nb">cd</span> nexus
$ mkdir build
$ <span class="nb">cd</span> build
$ <span class="c1"># in case hdf4 is present</span>
$ cmake -DENABLE_HDF5<span class="o">=</span><span class="m">1</span> -DENABLE_HDF4<span class="o">=</span><span class="m">1</span> -DENABLE_MXML<span class="o">=</span><span class="m">0</span> ../code
$ make
$ sudo make install
$ <span class="c1"># in case hdf4 is **not** present</span>
$ cmake -DENABLE_HDF5<span class="o">=</span><span class="m">1</span> -DENABLE_HDF4<span class="o">=</span><span class="m">0</span> -DENABLE_MXML<span class="o">=</span><span class="m">0</span> ../code
$ cmake --build ./
$ sudo cmake --install ./
</pre></div>
</div>
</div>
@ -728,7 +731,7 @@ $ <span class="c1"># make with the option -j &lt;number&gt;, where &lt;number&gt
$ <span class="c1"># e.g. make -j8</span>
$ cmake --build ./ --clean-first -- -j8
$ <span class="c1"># make will take quite a while</span>
$ make install
$ cmake --install ./
</pre></div>
</div>
<p>For further details see <a class="reference external" href="https://root.cern.ch/building-root">Installing ROOT from Source</a>.</p>
@ -816,10 +819,11 @@ install it.</dd>
</dl>
<p>After installing the <code class="docutils literal notranslate"><span class="pre">Xcode</span></code> tools go to the <a class="reference external" href="https://brew.sh/">Homebrew</a> page, and follow the installation instructions there.</p>
<p>The essential packages (called formulae) which you will need to install are</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cmake</span> <span class="n">boost</span> <span class="n">gsl</span> <span class="n">fftw</span> <span class="n">qt6</span> <span class="n">root</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cmake</span> <span class="n">libomp</span> <span class="n">boost</span> <span class="n">gsl</span> <span class="n">fftw</span> <span class="n">qt6</span> <span class="p">(</span><span class="n">root</span><span class="p">)</span>
</pre></div>
</div>
<p>For example to install <code class="docutils literal notranslate"><span class="pre">cmake</span></code> this is done the following way:</p>
<p>The preferred installation of root would be from source (see below), hence it is set here in parenthesis.
For example to install <code class="docutils literal notranslate"><span class="pre">cmake</span></code> this is done the following way:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ brew install cmake
</pre></div>
</div>
@ -842,7 +846,7 @@ $ mkdir build
$ <span class="nb">cd</span> build
$ cmake ../code -DENABLE_HDF5<span class="o">=</span><span class="m">1</span> -DENABLE_HDF4<span class="o">=</span><span class="m">0</span> -DENABLE_MXML<span class="o">=</span><span class="m">0</span>
$ cmake --build ./ --clean-first -- -j8
$ sudo make install
$ sudo cmake --install ./
</pre></div>
</div>
</div>
@ -880,7 +884,7 @@ $ <span class="c1"># make with the option -j &lt;number&gt;, where &lt;number&gt
$ <span class="c1"># e.g. make -j8</span>
$ cmake --build ./ --clean-first -- -j8
$ <span class="c1"># make will take quite a while</span>
$ make install
$ cmake --install ./
</pre></div>
</div>
<p>For further details see <a class="reference external" href="https://root.cern.ch/building-root">Installing ROOT from Source</a>.</p>
@ -993,7 +997,16 @@ If the value is set to <code class="docutils literal notranslate"><span class="p
<dd>Will check if <code class="docutils literal notranslate"><span class="pre">OpenMP</span></code> support is possible, and if yes use it. The default is enabled</dd>
</dl>
<p>Normally it should not be necessary to make use of any of the options except for specifying the installation path with <code class="docutils literal notranslate"><span class="pre">-DCMAKE_INSTALL_PREFIX</span></code>.
<code class="docutils literal notranslate"><span class="pre">musrfit</span></code> build with <code class="docutils literal notranslate"><span class="pre">cmake</span></code> takes the <code class="docutils literal notranslate"><span class="pre">out-of-source</span></code> approach. Therefore a typical configuration / make / install process including
<code class="docutils literal notranslate"><span class="pre">musrfit</span></code> build with <code class="docutils literal notranslate"><span class="pre">cmake</span></code> takes the <code class="docutils literal notranslate"><span class="pre">out-of-source</span></code> approach.</p>
<p>In order to have <strong>OpenMP</strong> available, which allows parallel processing of the fitter, you will need to guide <code class="docutils literal notranslate"><span class="pre">cmake</span></code> to where it can find it. For a <code class="docutils literal notranslate"><span class="pre">Homebrew</span></code> installation, this would be</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">export</span> <span class="nv">OpenMP_ROOT</span><span class="o">=</span><span class="k">$(</span>brew --prefix<span class="k">)</span>/opt/libomp
</pre></div>
</div>
<p>and for a <code class="docutils literal notranslate"><span class="pre">MacPorts</span></code> installation, something like</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">export</span> <span class="nv">OpenMP_ROOT</span><span class="o">=</span>/opt/local/include/libomp
</pre></div>
</div>
<p>Therefore a typical configuration / make / install process including
<code class="docutils literal notranslate"><span class="pre">NeXus</span></code> support would look like</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> <span class="nv">$HOME</span>/Apps/musrfit
$ mkdir build
@ -1001,7 +1014,24 @@ $ <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
$ cmake --install ./
$ /sbin/ldconfig <span class="c1"># (as superuser)</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If you use <code class="docutils literal notranslate"><span class="pre">MacPorts</span></code> you will likely need to guide cmake where to find <code class="docutils literal notranslate"><span class="pre">qt6</span></code>.
You will need to provide the path to the necessary <code class="docutils literal notranslate"><span class="pre">cmake</span></code> files. This is done
from the command line via the switch <code class="docutils literal notranslate"><span class="pre">CMAKE_PREFIX_PATH</span></code>.
The configuration, build, and install process might look like this:</p>
</div>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> <span class="nv">$HOME</span>/Apps/musrfit
$ mkdir build
$ <span class="nb">cd</span> build
$ cmake ../ -DCMAKE_INSTALL_PREFIX<span class="o">=</span><span class="nv">$ROOTSYS</span> -Dnexus<span class="o">=</span><span class="m">1</span> -DCMAKE_PREFIX_PATH<span class="o">=</span>/opt/local/libexec/qt6/lib/cmake
<span class="c1"># below it is assumed that multiple cores are present, hence the -j8 option</span>
$ cmake --build ./ --clean-first -- -j8
$ cmake --install ./
$ /sbin/ldconfig <span class="c1"># (as superuser)</span>
</pre></div>
</div>
@ -1095,7 +1125,7 @@ $ musrview test-histo-ROOT-NPP.msr
<div role="contentinfo">
<p>
&copy; Copyright 2023, Andreas Suter.
Last updated on Apr 23, 2024.
Last updated on Jun 08, 2024.
</p>
</div>
@ -1117,7 +1147,7 @@ $ musrview test-histo-ROOT-NPP.msr
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.9.3',
VERSION:'1.9.4',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tutorial for musrfit &mdash; musrfit 1.9.3 documentation</title>
<title>Tutorial for musrfit &mdash; musrfit 1.9.4 documentation</title>
@ -527,7 +527,7 @@ For a complete description please refer to the manuals of <a class="reference in
<div role="contentinfo">
<p>
&copy; Copyright 2023, Andreas Suter.
Last updated on Apr 23, 2024.
Last updated on Jun 08, 2024.
</p>
</div>
@ -549,7 +549,7 @@ For a complete description please refer to the manuals of <a class="reference in
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.9.3',
VERSION:'1.9.4',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Documentation of user libs (user functions) &mdash; musrfit 1.9.3 documentation</title>
<title>Documentation of user libs (user functions) &mdash; musrfit 1.9.4 documentation</title>
@ -875,7 +875,7 @@ K(m)&amp;=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
<div role="contentinfo">
<p>
&copy; Copyright 2023, Andreas Suter.
Last updated on Apr 23, 2024.
Last updated on Jun 08, 2024.
</p>
</div>
@ -897,7 +897,7 @@ K(m)&amp;=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.9.3',
VERSION:'1.9.4',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User manual &mdash; musrfit 1.9.3 documentation</title>
<title>User manual &mdash; musrfit 1.9.4 documentation</title>
@ -2874,7 +2874,7 @@ The syntax here is attribute driven</li>
<div role="contentinfo">
<p>
&copy; Copyright 2023, Andreas Suter.
Last updated on Apr 23, 2024.
Last updated on Jun 08, 2024.
</p>
</div>
@ -2896,7 +2896,7 @@ The syntax here is attribute driven</li>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.9.3',
VERSION:'1.9.4',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',

View File

@ -39,9 +39,10 @@
#include <iomanip>
#include <fstream>
#include <limits>
#include <cmath>
#include <boost/variant/variant.hpp>
#include <sys/time.h>
#include "Minuit2/FunctionMinimum.h"
@ -264,8 +265,8 @@ UInt_t PSectorChisq::GetNDF(UInt_t idx)
* \param runListCollection pointer of the run list collection (pre-processed historgrams)
* \param chisq_only flag: true=calculate chisq only (no fitting)
*/
PFitter::PFitter(PMsrHandler *runInfo, PRunListCollection *runListCollection, Bool_t chisq_only) :
fChisqOnly(chisq_only), fRunInfo(runInfo), fRunListCollection(runListCollection)
PFitter::PFitter(PMsrHandler *runInfo, PRunListCollection *runListCollection, Bool_t chisq_only, Bool_t yaml_out) :
fChisqOnly(chisq_only), fYamlOut(yaml_out), fRunInfo(runInfo), fRunListCollection(runListCollection)
{
// initialize variables
fIsScanOnly = true;
@ -2473,6 +2474,122 @@ Bool_t PFitter::ExecuteSave(Bool_t firstSave)
ccorr->Write("ccorr", TObject::kOverwrite, sizeof(ccorr));
hcorr->Write("hcorr", TObject::kOverwrite, sizeof(hcorr));
ff.Close();
if (fYamlOut) {
// write the fit results to an easy-to-read/parse yaml file
// note: the block names follow those used by Python library iminuit
// https://github.com/scikit-hep/iminuit
// dynamically name the yaml output file
// https://stackoverflow.com/a/25389052
std::string yaml_filename(fRunInfo->GetFileName().Data());
const std::string msr_ext(".msr");
yaml_filename.replace(yaml_filename.find(msr_ext), msr_ext.length(),
".yaml");
// define yaml's 2-space indentation
const std::string yaml_indent(" ");
// open the yaml file for writing
std::ofstream yaml_file(yaml_filename);
// number formatting of the output
yaml_file << std::scientific << std::setprecision(16);
// write the parameter values
yaml_file << "values:\n";
for (unsigned int i = 0; i < fParams.size(); ++i) {
yaml_file << yaml_indent << fParams[i].fName.Data() << ": "
<< fParams[i].fValue << "\n";
}
// write the parabolic errors
yaml_file << "errors:\n";
for (unsigned int i = 0; i < fParams.size(); ++i) {
yaml_file << yaml_indent << fParams[i].fName.Data() << ": "
<< fMnUserParams.Error(i) << "\n";
}
// write the minos errors
yaml_file << "mnerrors:\n";
for (unsigned int i = 0; i < fParams.size(); ++i) {
// use boost's implementation of a variant, which can be streamed by
// default - see: https://stackoverflow.com/q/47168477
boost::variant<double, std::string> positive_error, negative_error;
if (fParams[i].fPosErrorPresent) {
positive_error = fParams[i].fPosError;
negative_error = fParams[i].fStep;
} else {
positive_error = "null";
negative_error = "null";
}
yaml_file << yaml_indent << fParams[i].fName.Data() << ":\n";
yaml_file << yaml_indent << yaml_indent
<< "positive: " << positive_error << "\n";
yaml_file << yaml_indent << yaml_indent
<< "negative: " << negative_error << "\n";
}
// write the parameter limits
yaml_file << "limits:\n";
for (unsigned int i = 0; i < fParams.size(); ++i) {
// use boost's implementation of a variant, which can be streamed by
// default - see: https://stackoverflow.com/q/47168477
boost::variant<double, std::string> upper_limit, lower_limit;
if (fParams[i].fLowerBoundaryPresent) {
lower_limit = fParams[i].fLowerBoundary;
} else {
lower_limit = "null";
}
if (fParams[i].fUpperBoundaryPresent) {
upper_limit = fParams[i].fUpperBoundary;
} else {
upper_limit = "null";
}
yaml_file << yaml_indent << fParams[i].fName.Data() << ":\n";
yaml_file << yaml_indent << yaml_indent << "lower: " << lower_limit
<< "\n";
yaml_file << yaml_indent << yaml_indent << "upper: " << upper_limit
<< "\n";
}
// write if the parameter is fixed
yaml_file << "fixed:\n";
for (unsigned int i = 0; i < fParams.size(); ++i) {
std::string is_fixed = fParams[i].fStep == 0.0 ? "true" : "false";
yaml_file << yaml_indent << fParams[i].fName.Data() << ": " << is_fixed
<< "\n";
}
// write the covariance matrix (omitting fixed parameters)
yaml_file << "covariance:\n";
for (unsigned int i = 0; i < cov.Nrow(); ++i) {
yaml_file << yaml_indent << mnState.Name(parNo[i]) << ":\n";
for (unsigned int j = 0; j < cov.Nrow(); ++j) {
yaml_file << yaml_indent << yaml_indent << mnState.Name(parNo[j])
<< ": " << cov(i, j) << "\n";
}
}
// write the correlation matrix (omitting fixed parameters)
yaml_file << "correlation:\n";
for (unsigned int i = 0; i < cov.Nrow(); ++i) {
yaml_file << yaml_indent << mnState.Name(parNo[i]) << ":\n";
for (unsigned int j = 0; j < cov.Nrow(); ++j) {
double correlation =
i == j ? 1.0
: cov(i, j) / (fMnUserParams.Error(parNo[i]) *
fMnUserParams.Error(parNo[j]));
yaml_file << yaml_indent << yaml_indent << mnState.Name(parNo[j])
<< ": " << correlation << "\n";
}
}
// close the yaml file
yaml_file.close();
}
}
parNo.clear(); // clean up
} else {

View File

@ -111,7 +111,7 @@ class PSectorChisq
class PFitter
{
public:
PFitter(PMsrHandler *runInfo, PRunListCollection *runListCollection, Bool_t chisq_only = false);
PFitter(PMsrHandler *runInfo, PRunListCollection *runListCollection, Bool_t chisq_only = false, Bool_t yaml_out = false);
virtual ~PFitter();
Bool_t IsValid() { return fIsValid; }
@ -124,6 +124,7 @@ class PFitter
Bool_t fIsScanOnly; ///< flag. true: scan along some parameters (no fitting).
Bool_t fConverged; ///< flag. true: the fit has converged.
Bool_t fChisqOnly; ///< flag. true: calculate chi^2 only (no fitting).
Bool_t fYamlOut; ///< flag. true: generate yaml output file of the fit results (MINUIT2.OUTPUT -> yaml)
Bool_t fUseChi2; ///< flag. true: chi^2 fit. false: log-max-likelihood
UInt_t fPrintLevel; ///< tag, showing the level of messages whished. 0=minimum, 1=standard, 2=maximum

View File

@ -127,6 +127,7 @@ void msr2data_syntax()
std::cout << std::endl << " -k, --keep-mn2-output : if fitting is used, pass the option --keep-mn2-output to musrfit";
std::cout << std::endl << " -t, --title-from-data-file : if fitting is used, pass the option --title-from-data-file to musrfit";
std::cout << std::endl << " -e, --estimateN0: estimate N0 for single histogram fits.";
std::cout << std::endl << " -y, --yaml: write fit results (MINUIT2.OUTPUT) into a yaml-file. Output <msr-file>.yaml";
std::cout << std::endl << " -p, --per-run-block-chisq: will per run block chisq to the msr-file.";
std::cout << std::endl;
std::cout << std::endl << " global : switch on the global-fit mode";
@ -187,6 +188,7 @@ std::string msr2data_validArguments(const std::vector<std::string> &arg)
|| (!iter->substr(0,3).compare("fit")) || (!iter->compare("-k")) || (!iter->compare("--keep-mn2-output")) \
|| (!iter->compare("-t")) || (!iter->compare("--title-from-data-file")) \
|| (!iter->compare("-e")) || (!iter->compare("--estimateN0")) \
|| (!iter->compare("-y") || (!iter->compare("--yaml"))) \
|| (!iter->compare("-p")) || (!iter->compare("--per-run-block-chisq")) \
|| (!iter->compare("data")) || (!iter->substr(0,4).compare("msr-")) || (!iter->compare("global")) \
|| (!iter->compare("global+")) || (!iter->compare("global+!")) || (!iter->compare("new")) \
@ -716,6 +718,8 @@ int main(int argc, char *argv[])
musrfitOptions.append("-t ");
if (!msr2data_useOption(arg, "-e") || !msr2data_useOption(arg, "--estimateN0"))
musrfitOptions.append("-e ");
if (!msr2data_useOption(arg, "-y") || !msr2data_useOption(arg, "--yaml"))
musrfitOptions.append("-y ");
if (!msr2data_useOption(arg, "-p") || !msr2data_useOption(arg, "--per-run-block-chisq"))
musrfitOptions.append("-p ");
}

View File

@ -1437,19 +1437,18 @@ Int_t main(Int_t argc, Char_t *argv[])
musrFT_dumpData(startupParam.dumpFln, fourier, startupParam.fourierRange[0], startupParam.fourierRange[1]);
} else { // do Canvas
// if Fourier graphical export is whished, switch to batch mode
// if Fourier graphical export is wished, switch to batch mode
Bool_t batch = false;
int cc=0;
char **arg;
// create list of essential arguments to pass to the ROOT application
std::vector<char*> args;
args.push_back(argv[0]); // program name
if (startupParam.graphicFormat.Length() != 0) {
batch = true;
arg[cc] = (Char_t*)malloc(16*sizeof(Char_t));
strcpy(arg[cc], "-b");
cc++;
args.push_back((char*)"-b"); // batch mode flag
}
int cc = args.size();
// plot the Fourier transform
TApplication app("App", &cc, arg);
TApplication app("App", &cc, args.data());
if (startupHandler) {
fourierCanvas = std::unique_ptr<PFourierCanvas>(new PFourierCanvas(fourier, dataSetTag, startupParam.title.Data(),

View File

@ -160,6 +160,8 @@ bool PAdminXMLParser::startElement()
fKeyWord = eDumpRoot;
} else if (qName == "estimate_n0") {
fKeyWord = eEstimateN0;
} else if (qName == "yaml_out") {
fKeyWord = eYamlOut;
} else if (qName == "chisq_per_run_block") {
fKeyWord = eChisqPreRunBlock;
} else if (qName == "path_file_name") {
@ -389,6 +391,14 @@ bool PAdminXMLParser::characters()
fAdmin->fMsr2DataParam.estimateN0 = flag;
fAdmin->setEstimateN0Flag(flag);
break;
case eYamlOut:
if (str == "y")
flag = true;
else
flag = false;
fAdmin->fMsr2DataParam.yamlOut = flag;
fAdmin->setYamlOutFlag(flag);
break;
case eChisqPreRunBlock:
if (str == "y")
flag = true;
@ -608,6 +618,7 @@ void PAdminXMLParser::dump()
std::cout << "debug> title_from_data_file : " << fAdmin->getTitleFromDataFileFlag() << std::endl;
std::cout << "debug> chisq_per_run_block : " << fAdmin->getChisqPerRunBlockFlag() << std::endl;
std::cout << "debug> estimate_n0 : " << fAdmin->getEstimateN0Flag() << std::endl;
std::cout << "debug> yaml_out : " << fAdmin->getYamlOutFlag() << std::endl;
std::cout << "debug> musrview_show_fourier : " << fAdmin->getMusrviewShowFourierFlag() << std::endl;
std::cout << "debug> musrview_show_avg : " << fAdmin->getMusrviewShowAvgFlag() << std::endl;
std::cout << "debug> enable_musrt0 : " << fAdmin->getEnableMusrT0Flag() << std::endl;
@ -746,6 +757,7 @@ PAdmin::PAdmin() : QObject()
fEnableMusrT0 = false;
fLifetimeCorrection = true;
fEstimateN0 = true;
fYamlOut = false;
fChisqPreRunBlock = false;
fEditWidth = 900;
@ -760,6 +772,7 @@ PAdmin::PAdmin() : QObject()
fMsr2DataParam.ignoreDataHeaderInfo = false;
fMsr2DataParam.keepMinuit2Output = false;
fMsr2DataParam.estimateN0 = fEstimateN0;
fMsr2DataParam.yamlOut = false;
fMsr2DataParam.writeColumnData = false;
fMsr2DataParam.recreateDbFile = false;
fMsr2DataParam.chainFit = true;
@ -991,6 +1004,12 @@ int PAdmin::savePrefs(QString pref_fln)
else
data[i] = " <estimate_n0>n</estimate_n0>";
}
if (data[i].contains("<yaml_out>") && data[i].contains("</yaml_out>")) {
if (fYamlOut)
data[i] = " <yaml_out>y</yaml_out>";
else
data[i] = " <yaml_out>n</yaml_out>";
}
if (data[i].contains("<musrview_show_fourier>") && data[i].contains("</musrview_show_fourier>")) {
if (fMusrviewShowFourier)
data[i] = " <musrview_show_fourier>y</musrview_show_fourier>";

View File

@ -71,7 +71,7 @@ class PAdminXMLParser
private:
enum EAdminKeyWords {eEmpty, eTimeout, eKeepMinuit2Output, eDumpAscii, eDumpRoot,
eTitleFromDataFile, eChisqPreRunBlock, eEstimateN0,
eTitleFromDataFile, eChisqPreRunBlock, eEstimateN0, eYamlOut,
eMusrviewShowFourier, eMusrviewShowAvg, eMusrviewShowOneToOne, eEnableMusrT0,
eDarkThemeIconsMenu, eDarkThemeIconsToolbar, eEditW, eEditH,
eFontName, eFontSize, eExecPath, eDefaultSavePath,
@ -129,6 +129,7 @@ class PAdmin : public QObject
bool getDumpAsciiFlag() { return fDumpAscii; }
bool getDumpRootFlag() { return fDumpRoot; }
bool getEstimateN0Flag() { return fEstimateN0; }
bool getYamlOutFlag() { return fYamlOut; }
bool getChisqPerRunBlockFlag() { return fChisqPreRunBlock; }
bool getDarkThemeIconsMenuFlag() { return fDarkThemeIconsMenu; }
bool getDarkThemeIconsToolbarFlag() { return fDarkThemeIconsToolbar; }
@ -157,6 +158,7 @@ class PAdmin : public QObject
void setDumpAsciiFlag(const bool flag) { fDumpAscii = flag; }
void setDumpRootFlag(const bool flag) { fDumpRoot = flag; }
void setEstimateN0Flag(const bool flag) { fEstimateN0 = flag; }
void setYamlOutFlag(const bool flag) { fYamlOut = flag; }
void setChisqPerRunBlockFlag(const bool flag) { fChisqPreRunBlock = flag; }
void setDarkThemeIconsMenuFlag(const bool flag) { fDarkThemeIconsMenu = flag; }
void setDarkThemeIconsToolbarFlag(const bool flag) { fDarkThemeIconsToolbar = flag; }
@ -205,6 +207,7 @@ class PAdmin : public QObject
bool fTitleFromDataFile; ///< flag indicating if the title should be extracted from the data file (default: yes).
bool fChisqPreRunBlock; ///< flag indicating if musrfit shall write 'per run block' chisq to the msr-file (default: no).
bool fEstimateN0; ///< flag indicating if musrfit shall estimate N0 for single histogram fits (default: yes).
bool fYamlOut; ///< flag indicating if the MINUIT2.OUTPUT file should also be written as <msr-file>.yaml output. (default: no).
bool fEnableMusrT0; ///< flag indicating if musrT0 shall be enabled at startup from within musredit (default: yes).
bool fDarkThemeIconsMenu; ///< flag indicating if dark theme icons shall be used in the menu (default: no)
bool fDarkThemeIconsToolbar; ///< flag indicating if dark theme icons shall be used in the toolbar (default: no)

View File

@ -84,6 +84,7 @@ PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString he
fIgnoreDataHeaderInfo_checkBox->setChecked(fMsr2DataParam->ignoreDataHeaderInfo);
fKeepMinuit2Output_checkBox->setChecked(fMsr2DataParam->keepMinuit2Output);
fEstimateN0_checkBox->setChecked(fMsr2DataParam->estimateN0);
fYamlOut_checkBox->setChecked(fMsr2DataParam->yamlOut);
fWriteColumnData_checkBox->setChecked(fMsr2DataParam->writeColumnData);
fRecreateDataFile_checkBox->setChecked(fMsr2DataParam->recreateDbFile);
fChainFit_checkBox->setChecked(fMsr2DataParam->chainFit);
@ -121,6 +122,7 @@ PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
fMsr2DataParam->ignoreDataHeaderInfo = fIgnoreDataHeaderInfo_checkBox->isChecked();
fMsr2DataParam->keepMinuit2Output = fKeepMinuit2Output_checkBox->isChecked();
fMsr2DataParam->estimateN0 = fEstimateN0_checkBox->isChecked();
fMsr2DataParam->yamlOut = fYamlOut_checkBox->isChecked();
fMsr2DataParam->writeColumnData = fWriteColumnData_checkBox->isChecked();
fMsr2DataParam->recreateDbFile = fRecreateDataFile_checkBox->isChecked();
fMsr2DataParam->chainFit = fChainFit_checkBox->isChecked();

View File

@ -76,6 +76,7 @@ PPrefsDialog::PPrefsDialog(PAdmin *admin) : fAdmin(admin)
fEnableMusrT0_checkBox->setChecked(fAdmin->getEnableMusrT0Flag());
fPerRunBlockChisq_checkBox->setChecked(fAdmin->getChisqPerRunBlockFlag());
fEstimateN0_checkBox->setChecked(fAdmin->getEstimateN0Flag());
fYamlOut_checkBox->setChecked(fAdmin->getYamlOutFlag());
fFourier_checkBox->setChecked(fAdmin->getMusrviewShowFourierFlag());
fAvg_checkBox->setChecked(fAdmin->getMusrviewShowAvgFlag());
fOneToOne_checkBox->setChecked(fAdmin->getMusrviewShowOneToOneFlag());

View File

@ -54,6 +54,7 @@ class PPrefsDialog : public QDialog, private Ui::PPrefsDialog
bool getEnableMusrT0Flag() { return fEnableMusrT0_checkBox->isChecked(); }
bool getKeepRunPerBlockChisqFlag() { return fPerRunBlockChisq_checkBox->isChecked(); }
bool getEstimateN0Flag() { return fEstimateN0_checkBox->isChecked(); }
bool getYamlOutFlag() { return fYamlOut_checkBox->isChecked(); }
bool getDarkThemeIconsMenuFlag() { return fDarkThemeIconsMenu_checkBox->isChecked(); }
bool getDarkThemeIconsToolbarFlag() { return fDarkThemeIconsToolbar_checkBox->isChecked(); }
bool getOneToOneFlag() { return fOneToOne_checkBox->isChecked(); }

View File

@ -2104,6 +2104,11 @@ void PTextEdit::musrFit()
cmd.append("--estimateN0");
}
// check yamlOut flag
if (fAdmin->getYamlOutFlag()) {
cmd.append("--yaml");
}
// check per-run-block-chisq flag
if (fAdmin->getChisqPerRunBlockFlag()) {
cmd.append("--per-run-block-chisq");
@ -2336,6 +2341,11 @@ void PTextEdit::musrMsr2Data()
cmd.append("-e");
}
// yaml out. Add flag only if a fit is done
if (fMsr2DataParam->yamlOut && (fMsr2DataParam->fitOnly || fMsr2DataParam->templateRunNo != -1)) {
cmd.append("-y");
}
// write per-run-block chisq. Add flag only if a fit is done
if (fMsr2DataParam->perRunBlockChisq && (fMsr2DataParam->fitOnly || fMsr2DataParam->templateRunNo != -1)) {
cmd.append("-p");
@ -2719,6 +2729,7 @@ void PTextEdit::musrPrefs()
fAdmin->setTimeout(dlg->getTimeout());
fAdmin->setChisqPerRunBlockFlag(dlg->getKeepRunPerBlockChisqFlag());
fAdmin->setEstimateN0Flag(dlg->getEstimateN0Flag());
fAdmin->setYamlOutFlag(dlg->getYamlOutFlag());
}
delete dlg;

View File

@ -338,7 +338,7 @@
<x>6</x>
<y>20</y>
<width>560</width>
<height>131</height>
<height>135</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_9">
@ -456,6 +456,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="fYamlOut_checkBox">
<property name="text">
<string>yaml out</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>

View File

@ -33,7 +33,7 @@
<item>
<widget class="QTabWidget" name="fTabWidget">
<property name="currentIndex">
<number>2</number>
<number>1</number>
</property>
<widget class="QWidget" name="fGeneral_tab">
<attribute name="title">
@ -152,9 +152,9 @@
<widget class="QCheckBox" name="fTitleFromData_checkBox">
<property name="geometry">
<rect>
<x>190</x>
<x>170</x>
<y>10</y>
<width>241</width>
<width>161</width>
<height>23</height>
</rect>
</property>
@ -165,9 +165,9 @@
<widget class="QCheckBox" name="fPerRunBlockChisq_checkBox">
<property name="geometry">
<rect>
<x>190</x>
<x>170</x>
<y>35</y>
<width>241</width>
<width>181</width>
<height>22</height>
</rect>
</property>
@ -178,9 +178,9 @@
<widget class="QCheckBox" name="fEstimateN0_checkBox">
<property name="geometry">
<rect>
<x>190</x>
<x>170</x>
<y>60</y>
<width>241</width>
<width>171</width>
<height>22</height>
</rect>
</property>
@ -188,6 +188,19 @@
<string>estimate N0</string>
</property>
</widget>
<widget class="QCheckBox" name="fYamlOut_checkBox">
<property name="geometry">
<rect>
<x>350</x>
<y>10</y>
<width>85</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>yaml out</string>
</property>
</widget>
</widget>
<widget class="QWidget" name="fMusrview_tab">
<attribute name="title">

View File

@ -56,6 +56,7 @@ struct PMsr2DataParam {
bool openFilesAfterFitting; ///< flag: true = open msr-file after fit in musredit. false = do not open msr-file after fit.
bool titleFromDataFile; ///< flag indicating if the title for the msr-file shall be extracted from the data-file ('-t' in msr2data)
bool estimateN0; ///< flag indicating if the N0 shall be estimated for single histogram fitting
bool yamlOut; ///< flag indicating if the MINUIT2.OUTPUT content should be written to <msr-file>.yaml
bool perRunBlockChisq; ///< flag indicating if per-run-block-chisq shall be dumped into the msr-file
bool createMsrFileOnly; ///< flag: true = just create the msr-files without any fitting ('msr-<template>' in msr2data)
bool fitOnly; ///< flag: true = just perform the fits wihtout generating any msr-files ('fit' in msr2data).

View File

@ -14,6 +14,7 @@
<title_from_data_file>y</title_from_data_file>
<chisq_per_run_block>n</chisq_per_run_block>
<estimate_n0>y</estimate_n0>
<yaml_out>n</yaml_out>
<musrview_show_fourier>n</musrview_show_fourier>
<musrview_show_avg>n</musrview_show_avg>
<musrview_show_one_to_one>n</musrview_show_one_to_one>

View File

@ -166,6 +166,8 @@ bool PAdminXMLParser::startElement()
fKeyWord = eDumpRoot;
} else if (qName == "estimate_n0") {
fKeyWord = eEstimateN0;
} else if (qName == "yaml_out") {
fKeyWord = eYamlOut;
} else if (qName == "chisq_per_run_block") {
fKeyWord = eChisqPreRunBlock;
} else if (qName == "path_file_name") {
@ -396,6 +398,13 @@ bool PAdminXMLParser::characters()
fAdmin->fMsr2DataParam.estimateN0 = flag;
fAdmin->setEstimateN0Flag(flag);
break;
case eYamlOut:
if (str == "y")
flag = true;
else
flag = false;
fAdmin->fMsr2DataParam.yamlOut = flag;
fAdmin->setYamlOutFlag(flag);
case eChisqPreRunBlock:
if (str == "y")
flag = true;
@ -615,6 +624,7 @@ void PAdminXMLParser::dump()
std::cout << "debug> title_from_data_file : " << fAdmin->getTitleFromDataFileFlag() << std::endl;
std::cout << "debug> chisq_per_run_block : " << fAdmin->getChisqPerRunBlockFlag() << std::endl;
std::cout << "debug> estimate_n0 : " << fAdmin->getEstimateN0Flag() << std::endl;
std::cout << "debug> yaml_out : " << fAdmin->getYamlOutFlag() << std::endl;
std::cout << "debug> musrview_show_fourier : " << fAdmin->getMusrviewShowFourierFlag() << std::endl;
std::cout << "debug> musrview_show_avg : " << fAdmin->getMusrviewShowAvgFlag() << std::endl;
std::cout << "debug> enable_musrt0 : " << fAdmin->getEnableMusrT0Flag() << std::endl;
@ -753,6 +763,7 @@ PAdmin::PAdmin() : QObject()
fEnableMusrT0 = false;
fLifetimeCorrection = true;
fEstimateN0 = true;
fYamlOut = false;
fChisqPreRunBlock = false;
fMsr2DataParam.runList = QString("");
@ -764,6 +775,7 @@ PAdmin::PAdmin() : QObject()
fMsr2DataParam.ignoreDataHeaderInfo = false;
fMsr2DataParam.keepMinuit2Output = false;
fMsr2DataParam.estimateN0 = fEstimateN0;
fMsr2DataParam.yamlOut = false;
fMsr2DataParam.writeColumnData = false;
fMsr2DataParam.recreateDbFile = false;
fMsr2DataParam.chainFit = true;
@ -995,6 +1007,12 @@ int PAdmin::savePrefs(QString pref_fln)
else
data[i] = " <estimate_n0>n</estimate_n0>";
}
if (data[i].contains("<yaml_out>") && data[i].contains("</yaml_out>")) {
if (fYamlOut)
data[i] = " <yaml_out>y</yaml_out>";
else
data[i] = " <yaml_out>n</yaml_out>";
}
if (data[i].contains("<musrview_show_fourier>") && data[i].contains("</musrview_show_fourier>")) {
if (fMusrviewShowFourier)
data[i] = " <musrview_show_fourier>y</musrview_show_fourier>";

View File

@ -71,7 +71,7 @@ class PAdminXMLParser
private:
enum EAdminKeyWords {eEmpty, eTimeout, eKeepMinuit2Output, eDumpAscii, eDumpRoot,
eTitleFromDataFile, eChisqPreRunBlock, eEstimateN0,
eTitleFromDataFile, eChisqPreRunBlock, eEstimateN0, eYamlOut,
eMusrviewShowFourier, eMusrviewShowAvg, eMusrviewShowOneToOne, eEnableMusrT0,
eDarkThemeIconsMenu, eDarkThemeIconsToolbar, eEditW, eEditH,
eFontName, eFontSize, eExecPath, eDefaultSavePath,
@ -125,6 +125,7 @@ class PAdmin : public QObject
bool getMusrviewShowAvgFlag() { return fMusrviewShowAvg; }
bool getMusrviewShowOneToOneFlag() { return fMusrviewShowOneToOne; }
bool getEnableMusrT0Flag() { return fEnableMusrT0; }
bool getYamlOutFlag() { return fYamlOut; }
bool getKeepMinuit2OutputFlag() { return fKeepMinuit2Output; }
bool getDumpAsciiFlag() { return fDumpAscii; }
bool getDumpRootFlag() { return fDumpRoot; }
@ -157,6 +158,7 @@ class PAdmin : public QObject
void setDumpAsciiFlag(const bool flag) { fDumpAscii = flag; }
void setDumpRootFlag(const bool flag) { fDumpRoot = flag; }
void setEstimateN0Flag(const bool flag) { fEstimateN0 = flag; }
void setYamlOutFlag(const bool flag) { fYamlOut = flag; }
void setChisqPerRunBlockFlag(const bool flag) { fChisqPreRunBlock = flag; }
void setDarkThemeIconsMenuFlag(const bool flag) { fDarkThemeIconsMenu = flag; }
void setDarkThemeIconsToolbarFlag(const bool flag) { fDarkThemeIconsToolbar = flag; }
@ -205,6 +207,7 @@ class PAdmin : public QObject
bool fTitleFromDataFile; ///< flag indicating if the title should be extracted from the data file (default: yes).
bool fChisqPreRunBlock; ///< flag indicating if musrfit shall write 'per run block' chisq to the msr-file (default: no).
bool fEstimateN0; ///< flag indicating if musrfit shall estimate N0 for single histogram fits (default: yes).
bool fYamlOut; ///< flag indicating if the MINUIT2.OUTPUT file should also be written as <msr-file>.yaml output. (default: no).
bool fEnableMusrT0; ///< flag indicating if musrT0 shall be enabled at startup from within musredit (default: yes).
bool fDarkThemeIconsMenu; ///< flag indicating if dark theme icons shall be used in the menu (default: no)
bool fDarkThemeIconsToolbar; ///< flag indicating if dark theme icons shall be used in the toolbar (default: no)

View File

@ -84,6 +84,7 @@ PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString he
fIgnoreDataHeaderInfo_checkBox->setChecked(fMsr2DataParam->ignoreDataHeaderInfo);
fKeepMinuit2Output_checkBox->setChecked(fMsr2DataParam->keepMinuit2Output);
fEstimateN0_checkBox->setChecked(fMsr2DataParam->estimateN0);
fYamlOut_checkBox->setChecked(fMsr2DataParam->yamlOut);
fWriteColumnData_checkBox->setChecked(fMsr2DataParam->writeColumnData);
fRecreateDataFile_checkBox->setChecked(fMsr2DataParam->recreateDbFile);
fChainFit_checkBox->setChecked(fMsr2DataParam->chainFit);
@ -121,6 +122,7 @@ PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
fMsr2DataParam->ignoreDataHeaderInfo = fIgnoreDataHeaderInfo_checkBox->isChecked();
fMsr2DataParam->keepMinuit2Output = fKeepMinuit2Output_checkBox->isChecked();
fMsr2DataParam->estimateN0 = fEstimateN0_checkBox->isChecked();
fMsr2DataParam->yamlOut = fYamlOut_checkBox->isChecked();
fMsr2DataParam->writeColumnData = fWriteColumnData_checkBox->isChecked();
fMsr2DataParam->recreateDbFile = fRecreateDataFile_checkBox->isChecked();
fMsr2DataParam->chainFit = fChainFit_checkBox->isChecked();

View File

@ -76,6 +76,7 @@ PPrefsDialog::PPrefsDialog(PAdmin *admin) : fAdmin(admin)
fEnableMusrT0_checkBox->setChecked(fAdmin->getEnableMusrT0Flag());
fPerRunBlockChisq_checkBox->setChecked(fAdmin->getChisqPerRunBlockFlag());
fEstimateN0_checkBox->setChecked(fAdmin->getEstimateN0Flag());
fYamlOut_checkBox->setChecked(fAdmin->getYamlOutFlag());
fFourier_checkBox->setChecked(fAdmin->getMusrviewShowFourierFlag());
fAvg_checkBox->setChecked(fAdmin->getMusrviewShowAvgFlag());
fOneToOne_checkBox->setChecked(fAdmin->getMusrviewShowOneToOneFlag());

View File

@ -54,6 +54,7 @@ class PPrefsDialog : public QDialog, private Ui::PPrefsDialog
bool getEnableMusrT0Flag() { return fEnableMusrT0_checkBox->isChecked(); }
bool getKeepRunPerBlockChisqFlag() { return fPerRunBlockChisq_checkBox->isChecked(); }
bool getEstimateN0Flag() { return fEstimateN0_checkBox->isChecked(); }
bool getYamlOutFlag() { return fYamlOut_checkBox->isChecked(); }
bool getDarkThemeIconsMenuFlag() { return fDarkThemeIconsMenu_checkBox->isChecked(); }
bool getDarkThemeIconsToolbarFlag() { return fDarkThemeIconsToolbar_checkBox->isChecked(); }
bool getOneToOneFlag() { return fOneToOne_checkBox->isChecked(); }

View File

@ -2108,6 +2108,11 @@ void PTextEdit::musrFit()
cmd.append("--estimateN0");
}
// check yamlOut flag
if (fAdmin->getYamlOutFlag()) {
cmd.append("--yaml");
}
// check per-run-block-chisq flag
if (fAdmin->getChisqPerRunBlockFlag()) {
cmd.append("--per-run-block-chisq");
@ -2184,6 +2189,7 @@ void PTextEdit::musrMsr2Data()
fMsr2DataParam->keepMinuit2Output = fAdmin->getKeepMinuit2OutputFlag();
fMsr2DataParam->titleFromDataFile = fAdmin->getTitleFromDataFileFlag();
fMsr2DataParam->estimateN0 = fAdmin->getEstimateN0Flag();
fMsr2DataParam->yamlOut = fAdmin->getYamlOutFlag();
fMsr2DataParam->perRunBlockChisq = fAdmin->getChisqPerRunBlockFlag();
PMsr2DataDialog *dlg = new PMsr2DataDialog(fMsr2DataParam, fAdmin->getHelpUrl("msr2data"));
@ -2206,6 +2212,7 @@ void PTextEdit::musrMsr2Data()
fAdmin->setKeepMinuit2OutputFlag(fMsr2DataParam->keepMinuit2Output);
fAdmin->setTitleFromDataFileFlag(fMsr2DataParam->titleFromDataFile);
fAdmin->setEstimateN0Flag(fMsr2DataParam->estimateN0);
fAdmin->setYamlOutFlag(fMsr2DataParam->yamlOut);
fAdmin->setChisqPerRunBlockFlag(fMsr2DataParam->perRunBlockChisq);
// analyze parameters
@ -2336,6 +2343,11 @@ void PTextEdit::musrMsr2Data()
cmd.append("-e");
}
// yaml out. Add flag only if a fit is done
if (fMsr2DataParam->yamlOut && (fMsr2DataParam->fitOnly || fMsr2DataParam->templateRunNo != -1)) {
cmd.append("-y");
}
// write per-run-block chisq. Add flag only if a fit is done
if (fMsr2DataParam->perRunBlockChisq && (fMsr2DataParam->fitOnly || fMsr2DataParam->templateRunNo != -1)) {
cmd.append("-p");
@ -2713,6 +2725,7 @@ void PTextEdit::musrPrefs()
fAdmin->setTimeout(dlg->getTimeout());
fAdmin->setChisqPerRunBlockFlag(dlg->getKeepRunPerBlockChisqFlag());
fAdmin->setEstimateN0Flag(dlg->getEstimateN0Flag());
fAdmin->setYamlOutFlag(dlg->getYamlOutFlag());
}
delete dlg;

View File

@ -338,7 +338,7 @@
<x>6</x>
<y>20</y>
<width>560</width>
<height>131</height>
<height>135</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_9">
@ -456,6 +456,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="fYamlOut_checkBox">
<property name="text">
<string>yaml out</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>

View File

@ -33,7 +33,7 @@
<item>
<widget class="QTabWidget" name="fTabWidget">
<property name="currentIndex">
<number>2</number>
<number>1</number>
</property>
<widget class="QWidget" name="fGeneral_tab">
<attribute name="title">
@ -152,9 +152,9 @@
<widget class="QCheckBox" name="fTitleFromData_checkBox">
<property name="geometry">
<rect>
<x>190</x>
<x>170</x>
<y>10</y>
<width>241</width>
<width>171</width>
<height>23</height>
</rect>
</property>
@ -165,7 +165,7 @@
<widget class="QCheckBox" name="fPerRunBlockChisq_checkBox">
<property name="geometry">
<rect>
<x>190</x>
<x>170</x>
<y>35</y>
<width>241</width>
<height>22</height>
@ -178,9 +178,9 @@
<widget class="QCheckBox" name="fEstimateN0_checkBox">
<property name="geometry">
<rect>
<x>190</x>
<x>170</x>
<y>60</y>
<width>241</width>
<width>101</width>
<height>22</height>
</rect>
</property>
@ -188,6 +188,19 @@
<string>estimate N0</string>
</property>
</widget>
<widget class="QCheckBox" name="fYamlOut_checkBox">
<property name="geometry">
<rect>
<x>360</x>
<y>10</y>
<width>85</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>yaml out</string>
</property>
</widget>
</widget>
<widget class="QWidget" name="fMusrview_tab">
<attribute name="title">

View File

@ -56,6 +56,7 @@ struct PMsr2DataParam {
bool openFilesAfterFitting; ///< flag: true = open msr-file after fit in musredit. false = do not open msr-file after fit.
bool titleFromDataFile; ///< flag indicating if the title for the msr-file shall be extracted from the data-file ('-t' in msr2data)
bool estimateN0; ///< flag indicating if the N0 shall be estimated for single histogram fitting
bool yamlOut; ///< flag indicating if the MINUIT2.OUTPUT content should be written to <msr-file>.yaml
bool perRunBlockChisq; ///< flag indicating if per-run-block-chisq shall be dumped into the msr-file
bool createMsrFileOnly; ///< flag: true = just create the msr-files without any fitting ('msr-<template>' in msr2data)
bool fitOnly; ///< flag: true = just perform the fits wihtout generating any msr-files ('fit' in msr2data).

View File

@ -14,6 +14,7 @@
<title_from_data_file>y</title_from_data_file>
<chisq_per_run_block>n</chisq_per_run_block>
<estimate_n0>y</estimate_n0>
<yaml_out>n</yaml_out>
<musrview_show_fourier>n</musrview_show_fourier>
<musrview_show_avg>n</musrview_show_avg>
<musrview_show_one_to_one>n</musrview_show_one_to_one>

View File

@ -127,6 +127,7 @@ void musrfit_syntax()
std::cout << std::endl << " (ii) if present under $HOME/.musrfit/";
std::cout << std::endl << " (iii) if present under $MUSRFITPATH/";
std::cout << std::endl << " (iv) if present under $ROOTSYS/";
std::cout << std::endl << " -y, --yaml: write fit results (MINUIT2.OUTPUT) into a yaml-file. Output <msr-file>.yaml";
std::cout << std::endl << " --dump <type> is writing a data file with the fit data and the theory";
std::cout << std::endl << " <type> can be 'ascii', 'root'";
std::cout << std::endl << " --timeout <timeout_tag>: overwrites to predefined timeout of " << timeout << " (sec).";
@ -446,6 +447,7 @@ int main(int argc, char *argv[])
int status;
bool keep_mn2_output = false;
bool chisq_only = false;
bool yaml_out = false;
bool title_from_data_file = false;
bool timeout_enabled = true;
bool reset_startup_file = false;
@ -532,6 +534,8 @@ int main(int argc, char *argv[])
startup_options.estimateN0 = true;
} else if (!strcmp(argv[i], "-p") || !strcmp(argv[i], "--per-run-block-chisq")) {
startup_options.writeExpectedChisq = true;
} else if (!strcmp(argv[i], "-y") || !strcmp(argv[i], "--yaml")) {
yaml_out = true;
} else if (!strcmp(argv[i], "-n") || !strcmp(argv[i], "--no-of-cores-avail")) {
#ifdef HAVE_GOMP
std::cout << std::endl;
@ -724,7 +728,7 @@ int main(int argc, char *argv[])
// do fitting
std::unique_ptr<PFitter> fitter;
if (success) {
fitter = std::make_unique<PFitter>(msrHandler.get(), runListCollection.get(), chisq_only);
fitter = std::make_unique<PFitter>(msrHandler.get(), runListCollection.get(), chisq_only, yaml_out);
if (fitter->IsValid()) {
fitter->DoFit();
if (!fitter->IsScanOnly())

View File

@ -37,6 +37,7 @@
#include <iostream>
#include <memory>
#include <vector>
#include <TApplication.h>
#include <TSAXParser.h>
@ -301,15 +302,15 @@ int main(int argc, char *argv[])
}
if (result == PMUSR_SUCCESS) {
// generate Root application needed for PMusrCanvas
int cc=0;
char **arg;
// create the ROOT application needed for PMusrCanvas
// and pass it only essential arguments
std::vector<char*> args;
args.push_back(argv[0]); // program name
if (graphicsOutput || asciiOutput) {
arg[cc] = (char*)malloc(16*sizeof(char));
strcpy(arg[cc], "-b");
cc++;
args.push_back((char*)"-b"); // batch mode flag
}
TApplication app("App", &cc, arg);
int cc = args.size();
TApplication app("App", &cc, args.data());
std::vector<PMusrCanvas*> canvasVector;
PMusrCanvas *musrCanvas;