update of the docu.

This commit is contained in:
2022-05-29 12:52:13 +02:00
parent c0e43a46e4
commit 357e5d6069
24 changed files with 12599 additions and 557 deletions

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Setting up musrfit on Different Platforms &mdash; musrfit 1.7.6 documentation</title>
<title>Setting up musrfit on Different Platforms &mdash; musrfit 1.8.0 documentation</title>
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.7.6',
VERSION: '1.8.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -24,13 +24,13 @@
<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.6 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 GPUs" href="setup-dks.html" />
<link rel="prev" title="Documentation of user libs (user functions)" href="user-libs.html" />
</head>
<body>
<div class="header"><h1 class="heading"><a href="index.html">
<span>musrfit 1.7.6 documentation</span></a></h1>
<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">
@ -120,9 +120,8 @@ and <cite>manjaro &lt;https://de.manjaro.org/&gt;</cite>.</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>
@ -405,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&#8217;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>
@ -420,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 &#8220;Programs&#8221; 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 &#8220;/&#8221; instead of &#8220;&#8221; 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 &#8220;cygwin root&#8221; during the installation: this is the equivalent to &#8220;/&#8221; 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 &#8216;complete source tree for all systems&#8217; 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=&lt;prefix-path&gt;</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=&lt;value&gt;</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).
&lt;value&gt;=1 enables <tt class="docutils literal"><span class="pre">NeXus</span></tt>, &lt;value&gt;=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=&lt;value&gt;</strong></dt>
<dd>enable/disable the <tt class="docutils literal"><span class="pre">ASlibs</span></tt>. &lt;value&gt;=1 enables the <tt class="docutils literal"><span class="pre">ASlibs</span></tt>, &lt;value&gt;=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=&lt;value&gt;</strong></dt>
<dd>enable/disable the <tt class="docutils literal"><span class="pre">BMWlibs</span></tt>. &lt;value&gt;=1 enables the <tt class="docutils literal"><span class="pre">BMWlibs</span></tt>, &lt;value&gt;=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=&lt;value&gt;</strong></dt>
<dd>enable/disable the <tt class="docutils literal"><span class="pre">BNMRlibs</span></tt>. &lt;value&gt;=1 enables the <tt class="docutils literal"><span class="pre">BNMRlibs</span></tt>, &lt;value&gt;=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=&lt;value&gt;</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 &lt;value&gt;=0 means disabled, &lt;value&gt;=1 enabled.</dd>
<dt><strong>-Dqt_version=&lt;value&gt;</strong></dt>
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. &lt;value&gt; 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=&lt;value&gt;</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">&amp;</span>
</pre></div>
</div>
</div>
<div class="section" id="musrgui-depreciated">
<h3>musrgui (depreciated)<a class="headerlink" href="#musrgui-depreciated" 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="id12">
<h3>Check the installation<a class="headerlink" href="#id12" 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
&#8220;STATUS_ACCESS_VIOLATION&#8221;. 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.3 alias <strong>Big Sur</strong>: <tt class="docutils literal"><span class="pre">musrfit</span></tt> is ready for <strong>Big Sur</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>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>
@ -691,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>
@ -748,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="id13"></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>
@ -770,8 +523,8 @@ $ sudo make install
</pre></div>
</div>
</div>
<div class="section" id="index-29">
<span id="id14"></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>
@ -848,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 &#8220;execute&#8221; <tt class="docutils literal"><span class="pre">.profile</span></tt> before proceeding:</p>
<p>After this you will need to &#8220;execute&#8221; <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>
@ -883,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>
@ -940,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="id16"></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
@ -963,11 +716,11 @@ $ sudo make install
</pre></div>
</div>
</div>
<div class="section" id="index-32">
<span id="id17"></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="id18">
<h5>ROOT installed via package installer<a class="headerlink" href="#id18" 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)
@ -981,8 +734,8 @@ $ sudo ln -s root_v6.16.00 root
</pre></div>
</div>
</div>
<div class="section" id="id20">
<h5>ROOT installed from source<a class="headerlink" href="#id20" 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>
@ -1012,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="id22">
<h5>Setting up Environment Variables for ROOT and musrfit<a class="headerlink" href="#id22" 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 &lt; 10.8:</strong></p>
@ -1056,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="id23"></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>
@ -1079,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="id24"></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=&lt;prefix-path&gt;</strong></dt>
@ -1120,8 +873,8 @@ $ /sbin/ldconfig <span class="c1"># (as superus
</pre></div>
</div>
</div>
<div class="section" id="id25">
<h4>musrfit last step of the installation<a class="headerlink" href="#id25" 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.
@ -1137,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="id26"></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>
@ -1174,8 +927,8 @@ accomplish that, add the following lines to <tt class="docutils literal"><span c
</pre></div>
</div>
</div>
<div class="section" id="id27">
<h3>Check the installation<a class="headerlink" href="#id27" 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>
@ -1203,8 +956,8 @@ $ musrview test-histo-ROOT-NPP.msr
</div>
<div class="footer">
&copy; Copyright 2021, Andreas Suter.
Last updated on Oct 06, 2021.
&copy; 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>