diff --git a/doc/man/logo_n.eps b/doc/man/logo_n.eps deleted file mode 100755 index 343f735d..00000000 --- a/doc/man/logo_n.eps +++ /dev/null @@ -1,239 +0,0 @@ -%!PS-Adobe-2.0 EPSF-1.2 -%%Creator: Adobe Illustrator(TM) for Windows, version 4.0 -%%For: (VK84 ) (PSI ) -%%Title: (LOGO_N.EPS) -%%CreationDate: (6/9/93) (3:23 PM) -%%DocumentProcessColors: Black -%%DocumentFonts: Helvetica -%%DocumentProcSets: Adobe_Illustrator_1.1 0 0 -%%DocumentSuppliedProcSets: Adobe_Illustrator_1.1 0 0 -%%BoundingBox:44 718 180 763 -%%ColorUsage: Black&White -%%TemplateBox:328.5 399 328.5 399 -%%TileBox: 17 2 813 561 -%%DocumentPreview: PC_TIFF -%%Template: -%%PageOrigin:17 2 -%%AI3_PaperRect:-23 577 819 -18 -%%AI3_Margin:23 -18 -23 18 -%%EndComments -% $Header: N:/pvcs/ninjamus/nmnew/res/prolog.1_v 3.0 20 Apr 1992 17:03:54 epperson $ -%%BeginProcSet:Adobe_Illustrator_1.1 0 0 -% Copyright (C) 1987-1990 Adobe Systems Incorporated. -% All Rights Reserved. -% Adobe Illustrator is a trademark of Adobe Systems Incorporated. -/Adobe_Illustrator_1.1 dup 100 dict def load begin -/Version 0 def -/Revision 0 def -% definition operators -/bdef {bind def} bind def -/ldef {load def} bdef -/xdef {exch def} bdef -% graphic state operators -/_K {3 index add neg dup 0 lt {pop 0} if 3 1 roll} bdef -/_k /setcmybcolor where -{/setcmybcolor get} {{1 sub 4 1 roll _K _K _K setrgbcolor pop} bind} ifelse def -/g {/_b xdef /p {_b setgray} def} bdef -/G {/_B xdef /P {_B setgray} def} bdef -/k {/_b xdef /_y xdef /_m xdef /_c xdef /p {_c _m _y _b _k} def} bdef -/K {/_B xdef /_Y xdef /_M xdef /_C xdef /P {_C _M _Y _B _k} def} bdef -/d /setdash ldef -/_i currentflat def -/i {dup 0 eq {pop _i} if setflat} bdef -/j /setlinejoin ldef -/J /setlinecap ldef -/M /setmiterlimit ldef -/w /setlinewidth ldef -% path construction operators -/_R {.25 sub round .25 add} bdef -/_r {transform _R exch _R exch itransform} bdef -/c {_r curveto} bdef -/C /c ldef -/v {currentpoint 6 2 roll _r curveto} bdef -/V /v ldef -/y {_r 2 copy curveto} bdef -/Y /y ldef -/l {_r lineto} bdef -/L /l ldef -/m {_r moveto} bdef -% error operators -/_e [] def -/_E {_e length 0 ne {gsave 0 g 0 G 0 i 0 J 0 j 1 w 10 M [] 0 d -/Courier 20 0 0 1 z [0.966 0.259 -0.259 0.966 -_e 0 get _e 2 get add 2 div _e 1 get _e 3 get add 2 div] e _f t T grestore} if} bdef -/_fill {{fill} stopped -{/_e [pathbbox] def /_f (ERROR: can't fill, increase flatness) def n _E} if} bdef -/_stroke {{stroke} stopped -{/_e [pathbbox] def /_f (ERROR: can't stroke, increase flatness) def n _E} if} bdef -% path painting operators -/n /newpath ldef -/N /n ldef -/F {p _fill} bdef -/f {closepath F} bdef -/S {P _stroke} bdef -/s {closepath S} bdef -/B {gsave F grestore S} bdef -/b {closepath B} bdef -% text block construction and painting operators -/_s /ashow ldef -/_S {(?) exch {2 copy 0 exch put pop dup false charpath currentpoint _g setmatrix -_stroke _G setmatrix moveto 3 copy pop rmoveto} forall pop pop pop n} bdef -/_A {_a moveto _t exch 0 exch} bdef -/_L {0 _l neg translate _G currentmatrix pop} bdef -/_w {dup stringwidth exch 3 -1 roll length 1 sub _t mul add exch} bdef -/_z [{0 0} bind {dup _w exch neg 2 div exch neg 2 div} bind {dup _w exch neg exch neg} bind] def -/z {_z exch get /_a xdef /_t xdef /_l xdef exch findfont exch scalefont setfont} bdef -/_g matrix def -/_G matrix def -/_D {_g currentmatrix pop gsave concat _G currentmatrix pop} bdef -/e {_D p /t {_A _s _L} def} bdef -/r {_D P /t {_A _S _L} def} bdef -/a {_D /t {dup p _A _s P _A _S _L} def} bdef -/o {_D /t {pop _L} def} bdef -/T {grestore} bdef -% group construction operators -/u {} bdef -/U {} bdef -% font construction operators -/Z {findfont begin currentdict dup length dict begin -{1 index /FID ne {def} {pop pop} ifelse} forall /FontName exch def dup length 0 ne -{/Encoding Encoding 256 array copy def 0 exch {dup type /nametype eq -{Encoding 2 index 2 index put pop 1 add} {exch pop} ifelse} forall} if pop -currentdict dup end end /FontName get exch definefont pop} bdef -end -%%EndProcSet -%AI3-Grid.0 1.417 14.1733 7 0.833333 0.833333 0.833333 1 -%%EndProlog -%%BeginSetup -% $Header: N:/pvcs/ninjamus/nmnew/res/setup.1_v 3.0 20 Apr 1992 17:04:24 epperson $ -Adobe_Illustrator_1.1 begin -n -%%BeginEncoding: _Helvetica Helvetica -[39/quotesingle 96/grave 130/quotesinglbase 131/florin 132/quotedblbase -133/ellipsis 134/dagger 135/daggerdbl 136/circumflex 137/perthousand -138/Scaron 139/guilsinglleft 140/OE 145/quoteleft 146/quoteright -147/quotedblleft 148/quotedblright 149/bullet 150/endash 151/emdash -152/tilde 153/trademark 154/scaron 155/guilsinglright 156/oe 157/dotlessi -159/Ydieresis 164/currency 166/brokenbar 168/dieresis 169/copyright -170/ordfeminine 172/logicalnot 174/registered 175/macron 176/ring -177/plusminus 178/twosuperior 179/threesuperior 180/acute 181/mu -183/periodcentered 184/cedilla 185/onesuperior 186/ordmasculine -188/onequarter 189/onehalf 190/threequarters 192/Agrave 193/Aacute -194/Acircumflex 195/Atilde 196/Adieresis 197/Aring 198/AE 199/Ccedilla -200/Egrave 201/Eacute 202/Ecircumflex 203/Edieresis 204/Igrave 205/Iacute -206/Icircumflex 207/Idieresis 208/Eth 209/Ntilde 210/Ograve 211/Oacute -212/Ocircumflex 213/Otilde 214/Odieresis 215/multiply 216/Oslash -217/Ugrave 218/Uacute 219/Ucircumflex 220/Udieresis 221/Yacute 222/Thorn -223/germandbls 224/agrave 225/aacute 226/acircumflex 227/atilde 228/adieresis -229/aring 230/ae 231/ccedilla 232/egrave 233/eacute 234/ecircumflex -235/edieresis 236/igrave 237/iacute 238/icircumflex 239/idieresis -240/eth 241/ntilde 242/ograve 243/oacute 244/ocircumflex 245/otilde -246/odieresis 247/divide 248/oslash 249/ugrave 250/uacute 251/ucircumflex -252/udieresis 253/yacute 254/thorn 255/ydieresis -]/_Helvetica/Helvetica Z -%%EndEncoding -%%EndSetup -u -u -u -u -u -0 g -0 i 0 J 0 j 1 w 4 M []0 d -%%Note: -/_Helvetica 10 12 0 1 z -[0.8822 0 0 1 112.1086 753.9832]e -(PAUL SCHERRER INSTITUT)t -T -U -U -U -U -U -u -0.7 g -171.2185 726.0363 m -171.2185 722.892 168.3513 722.892 v -57.9719 722.892 l -55.1049 722.892 55.1049 726.0363 v -55.1049 733.8967 l -55.1049 737.0409 57.9719 737.0409 v -168.3513 737.0409 l -171.2185 737.0409 171.2185 733.8967 v -171.2185 726.0363 l -F -u -1 g -0 G -1.5 w -129.6609 738.3986 m -132.5149 738.3986 132.5149 741.4486 y -132.5149 744.4985 l -132.5149 747.5484 129.6609 747.5484 y -109.6833 747.5484 l -106.8293 747.5484 106.8293 744.4985 y -106.8293 732.2989 l -106.8293 729.2489 109.6833 729.2489 y -B -u -115.3912 738.3986 m -129.6609 738.3986 l -132.5149 738.3986 132.5149 735.3486 v -132.5149 723.1491 l -132.5149 720.0991 129.6609 720.0991 v -109.6833 720.0991 l -106.8293 720.0991 106.8293 723.1491 v -106.8293 726.199 l -106.8293 729.2489 109.6833 729.2489 v -B -U -123.953 729.2489 m -109.6833 729.2489 l -B -U -u -u -u -u -u -103.9754 747.5485 m -83.9977 747.5484 l -81.1437 747.5484 81.1437 744.4985 y -81.1437 723.1491 l -81.1437 720.0991 83.9977 720.0991 y -86.8516 720.0991 l -89.7056 720.0991 89.7056 723.1491 y -89.7056 729.2489 l -103.9753 729.2489 l -106.8293 729.2489 106.8293 732.2989 y -106.8293 744.4985 l -B -U -106.8293 744.4985 m -106.8293 747.5484 103.9753 747.5484 y -B -U -U -89.7056 738.3986 m -98.2675 738.3986 l -B -U -U -u -132.5149 744.4985 m -132.5149 747.5484 135.3688 747.5484 v -142.5037 747.5484 l -145.3577 747.5484 145.3577 744.4985 v -145.3577 723.1491 l -145.3577 720.0991 142.5037 720.0991 v -135.3688 720.0991 l -132.5149 720.0991 132.5149 723.1491 v -132.5149 744.4985 l -b -U -U -%%PageTrailer -%%Trailer -% $Header: N:/pvcs/ninjamus/nmnew/res/trailer.1_v 3.0 20 Apr 1992 17:03:32 epperson $ -_E end -%%EOF diff --git a/doc/man/musrfit.tex b/doc/man/musrfit.tex deleted file mode 100755 index efbc7420..00000000 --- a/doc/man/musrfit.tex +++ /dev/null @@ -1,351 +0,0 @@ -\documentclass[twoside]{article} - -\usepackage[english]{babel} -\usepackage{a4} -\usepackage{amssymb} -\usepackage{graphicx} -\usepackage{fancyhdr} -\usepackage{array} -\usepackage{float} -\usepackage{hyperref} -\usepackage{xspace} -\usepackage{rotating} - -\setlength{\topmargin}{10mm} -\setlength{\topmargin}{-13mm} -% \setlength{\oddsidemargin}{0.5cm} -% \setlength{\evensidemargin}{0cm} -\setlength{\oddsidemargin}{0.7cm} -\setlength{\evensidemargin}{0.7cm} -\setlength{\textwidth}{14.5cm} -\setlength{\textheight}{23.8cm} - -\pagestyle{fancyplain} -\addtolength{\headwidth}{0.6cm} -\fancyhead{}% -\fancyhead[RE,LO]{musrfit}% -\fancyhead[LE,RO]{\thepage} -%\cfoot{--- Andreas Suter -- \today ---} -\cfoot{LE-$\mu$SR -- \includegraphics[width=2cm]{logo_n.eps}~~~~ -- \today} - -\DeclareMathAlphabet{\bi}{OML}{cmm}{b}{it} - -\newcommand{\musr}{$\mu$SR\xspace} - -\begin{document} - -\tableofcontents - -\section{Introduction}\label{sec:introduction}% - -\section{Available Executables}\label{sec:available-executables}% - -\subsection{musrfit}\label{subsec:musrfit}% -\subsection{musrview}\label{subsec:musrview}% -\fbox{q} \textbf{Quit}: is terminating \texttt{musrview}. - -\subsection{musrt0}\label{subsec:musrt0}% -\subsection{musrpara}\label{subsec:musrpara}% - -\section{Users Guide}\label{sec:user-guide}% - -\section{Description of the msr-File Format}\label{sec:msr-file}% - -The programs are using an input file to control their action. This input file has the extension \texttt{.msr} (msr-file). the msr-file is built up from different blocks. Each block starts with a keyword, and is terminated by an empty line\footnote{The title is an exception from this rule.}. Comments are starting with the character `\#'. The various input blocks will be described now. - -\subsection{The Title}\label{subsec:msr-file-title}% - -The first line of the msr-file is the title line. Different than all the other input blocks, it doesn't start with a block keyword. It is just an simple text line, in which any information can be placed. The title text will be used in the graphical representation of the data as a headline. - -\subsection{The \texttt{FITPARAMETER}-Block}\label{subsec:msr-file-fitparameter-block}% - -The \texttt{FITPARAMETER}-block is used to define the fitparameters in a \textsc{Minuit} typical style. -There are various possible parameter definitions possible which are listed here: - -\begin{enumerate} - \item \verb! ! - \item \verb! ! - \item \verb! ! -\end{enumerate} - -\noindent where \verb!! is the parameter number, \verb!! is the parameter name\footnote{The parameter name is limited to 10 characters, and furthermore no spaces are allowed!}, \verb!! is the initial guess of the parameter, \verb!! the inital step width, \verb!! is the lower/upper boundary for the parameter\footnote{According to the \textsc{Minuit} manual this should be avoided whenever possible.}. - -In the output \texttt{mlog}-file, \verb!! will be the \textsc{Minuit} fit value, \verb!! will contain the error estimate (or the negative error estimate if \textsc{Minos} was successfully used), \verb!! will have the value \texttt{none} if no \textsc{Minos} was used, otherwise it will show the positive error estimate. A typical example will look like this: - -\begin{verbatim} -FITPARAMETER -# Nr. Name Value Step Pos_Error Bounderies - 1 alpha 1 0.02 none 0 1.8 - 2 asy 0.1042 0.004713 none 0 0.33 - 3 phase 15 1.0 none - 4 freq 0.9 0.0379 none - 5 rate 0.03 0.00579 none -\end{verbatim} - - -\subsection{The \texttt{THEORY}-Block}\label{subsec:msr-file-theory-block}% - -The \texttt{THEORY}-block is used to define the fit function. There is a set of predefined functions available (see table \ref{tab:predefined-theory-functions}). It is also possible to use externally defined functions. How to use them will be explained afterwards, first the predefined functions will be described. - -\begin{table}[h] - \centering - \begin{tabular}{|l|l|l|l|l|} - \hline - % title ------------------------------------------------------------------- - \rule[-3mm]{0mm}{8mm} - \textbf{name} & \textbf{abbriviation} & \textbf{parameters} & - \textbf{mathematical expression} & \textbf{refs.} \\ \hline\hline - % asymmetry --------------------------------------------------------------- - \rule[-3mm]{0mm}{8mm} - \texttt{asymmetry} & \texttt{a} & $A$ (1) & $A$ & \\ \hline - % simple exponential ------------------------------------------------------ - \rule[-3mm]{0mm}{8mm} - \texttt{simplExpo} & \texttt{se} & $\lambda$ ($\mu\mathrm{s}^{-1}$) & $\exp(-\lambda t)$ & \\ \hline - % general exponential ----------------------------------------------------- - \rule[-3mm]{0mm}{8mm} - \texttt{generExpo} & \texttt{ge} & $\lambda$ ($\mu\mathrm{s}^{-1}$), $\beta$ (1) - & $\exp\left[-\left(\lambda t\right)^\beta \right]$ & \\ \hline - % simple gauss ------------------------------------------------------------ - \rule[-3mm]{0mm}{8mm} - \texttt{simpleGss} & \texttt{sg} & $\sigma$ ($\mu\mathrm{s}^{-1}$) - & $\exp\left[-\frac{1}{2}\left(\sigma t\right)^2\right]$ & \\ \hline - % static Kubo-Toyabe ZF --------------------------------------------------- - \rule[-3mm]{0mm}{8mm} - \texttt{statGssKT} & \texttt{stg} & $\sigma$ ($\mu\mathrm{s}^{-1}$) - & $\frac{1}{3} + \frac{2}{3} [1-(\sigma t)^2] - \exp\left[-\frac{1}{2}\left(\sigma t\right)^2\right] $ & ?? \\ \hline - % static Kubo-Toyabe LF --------------------------------------------------- - \rule[-3mm]{0mm}{8mm} - \texttt{statKTTab} & \texttt{sktt} & $\nu$ (MHz), $\sigma$ ($\mu\mathrm{s}^{-1}$) - & static Kubo-Toyabe (ZF and LF, tabulated) & ?? \\ - & & table & & \\ \hline - % dynamic Kubo-Toyabe LF -------------------------------------------------- - \rule[-3mm]{0mm}{8mm} - \texttt{dynmKTTab} & \texttt{dktt} & $\nu$ (MHz), $\sigma$ ($\mu\mathrm{s}^{-1}$) - & dynamic Kubo-Toyabe (ZF and LF, tabulated) & ?? \\ - & & $\gamma$ ($\mu\mathrm{s}^{-1}$), table & & \\ \hline - % combined Lorentz-Gauss-Kubo-Toyabe -------------------------------------- - \rule[-3mm]{0mm}{8mm} - \texttt{combiLGKT} & \texttt{lgkt} & $\lambda_{\rm L}$ ($\mu\mathrm{s}^{-1}$), - $\lambda_{\rm G}$ ($\mu\mathrm{s}^{-1}$) & - $\frac{1}{3}+\frac{2}{3}\left[1-(\lambda_{\rm G}t)^2-\lambda_{\rm L}t - \right]\exp\left[-\frac{1}{2}(\lambda_{\rm G}t)^2-\lambda_{\rm L}t\right]$ - & ?? \\ \hline - % abragam ----------------------------------------------------------------- - \rule[-3mm]{0mm}{8mm} - \texttt{abragam} & \texttt{ab} & $\sigma$ ($\mu\mathrm{s}^{-1}$), - $\gamma$ ($\mu\mathrm{s}^{-1}$) & - $\exp\left[-\left(\frac{\displaystyle\sigma}{\displaystyle\gamma}\right)^2 - (e^{-\gamma t}-1-\gamma t)\right]$ & ?? \\ \hline - % spin glass -------------------------------------------------------------- - \rule[-3mm]{0mm}{8mm} - \texttt{spinGlas} & \texttt{sg} & $\lambda$ ($\mu\mathrm{s}^{-1}$), - $\gamma$ ($\mu\mathrm{s}^{-1}$) & $\alpha := \frac{4\lambda^2 (1-q)}{\gamma}$, - \qquad $\beta := \sqrt{q} \lambda$ & ?? \\ - \rule[-3mm]{0mm}{8mm} - & & & $\frac{1}{3} e^{-\sqrt{\alpha t}} + \frac{2}{3} \left( 1 - - \frac{(\beta t)^2}{\sqrt{\alpha t + (\beta t)^2}} \right) - e^{-\sqrt{\alpha t + (\beta t)^2}} $ & \\ \hline - % TF cos ------------------------------------------------------------------ - \rule[-3mm]{0mm}{8mm} - \texttt{TFieldCos} & \texttt{tf} & $\varphi$ ($^\circ$), $\nu$ (MHz) - & $\cos(2\pi\nu t + \frac{\displaystyle \pi}{180} \varphi) $ & ?? \\ \hline - % bessel ------------------------------------------------------------------ - \rule[-3mm]{0mm}{8mm} - \texttt{bessel} & \texttt{be} & $\varphi$ ($^\circ$), $\nu$ (MHz) - & $J_0(2\pi\nu t + \frac{\displaystyle \pi}{180} \varphi)$ & ?? \\ \hline - % internal bessel --------------------------------------------------------- - \rule[-3mm]{0mm}{8mm} - \texttt{internBsl} & \texttt{ib} & $\varphi$ ($^\circ$), $\nu$ (MHz) - & $\frac{2}{3} J_0(2\pi\nu t + \frac{\displaystyle \pi}{180} \varphi) - e^{-\lambda_{\rm T} t} + \frac{1}{3} e^{-\lambda_{\rm L} t}$ & ?? \\ - & & $\lambda_{\rm T}$ ($\mu\mathrm{s}^{-1}$), $\lambda_{\rm L}$ ($\mu\mathrm{s}^{-1}$) & & \\ \hline - % random anisotropy hyperfine field --------------------------------------- - \rule[-3mm]{0mm}{8mm} - \texttt{rdAnisoHf} & \texttt{rahf} & $\nu$ (MHz), $\lambda$ ($\mu\mathrm{s}^{-1}$) - & $\frac{1}{6} \left( 1 - \frac{\nu t}{2} \right) e^{-\frac{\nu t}{2}} + - \frac{1}{3} \left( 1 - \frac{\nu t}{4} \right) e^{-\frac{\nu t + 2.44949 \lambda t}{4}}$ & ?? \\ \hline - % internal field ---------------------------------------------------------- - \rule[-3mm]{0mm}{8mm} - \texttt{internFld} & \texttt{if} & $\varphi$ ($^\circ$), $\nu$ (MHz) - & $\frac{2}{3} \cos(2\pi\nu t + \frac{\displaystyle \pi}{180} \varphi) - e^{-\lambda_{\rm T} t} + \frac{1}{3} e^{-\lambda_{\rm L} t}$ & ?? \\ - & & $\lambda_{\rm T}$ ($\mu\mathrm{s}^{-1}$), $\lambda_{\rm L}$ ($\mu\mathrm{s}^{-1}$) & & \\ \hline - \end{tabular} - \caption{\textsl{List of the predefined theory functions.}}\label{tab:predefined-theory-functions} -\end{table} - -Every theory function has to be written on a single line. It starts with the theory function name or its abbriviation followed by the parameters. Consecutive lines of theory functions will be multiplied. If theory functions need to be added, a line with a `$+$' has to separte them. The parameters are given as the number assigned to them in the \texttt{FITPARAMETER}-block. The order of the parameters is given in table \ref{tab:predefined-theory-functions}. As an example - -\begin{verbatim} -simplExpo 4 -\end{verbatim} - -\noindent defines an exponential function with a depolarization rate $\lambda$ given by the parameter 4 of the \texttt{FITPARAMETER}-block. A full fetched \texttt{THEORY}-block could be - -\begin{verbatim} -THEORY -asymmetry 2 -simplExpo 3 -TFieldCos 4 5 -+ -asymmetry 6 -simplExpo 7 -\end{verbatim} - -\noindent which means - -\begin{math} - A(t) = P_2 \cdot e^{-t\cdot P_3} \cdot \cos(2\pi P_5 t + \frac{\displaystyle\pi}{180} P_4) + - P_6 \cdot e^{-t\cdot P_7} -\end{math} - -\noindent where $P_\alpha$ is the parameter $\alpha$. - -\subsubsection{Maps}\label{subsubsec:maps}% - -In case different runs are fitted simultaniously, it is very often necessary that for a given theory function, some parameters are run dependend. An example would be a temperature scan, where the parameters (asymmetry, depolarization rates, etc.\xspace) will depend on the temperature. In order to handle such situations, the mapping of parameters in the \texttt{THEORY}-block is possible. Instead of a parameter number, the mapping of the parameter is given. The definition of the mapping block is part of the \texttt{RUN}-block (see Sec.\ref{subsec:msr-file-run-block}) and will be described there. For example - -\begin{verbatim} -THEORY -asymmetry 2 -simplExpo 3 -TFieldCos 4 5 -+ -asymmetry map1 -simplExpo map2 -\end{verbatim} - -\noindent means that the first part of this theory function is run independ, as for instance the background, and the second part is changing from run to run, i.e.\xspace \texttt{map1/2} will point to different parameters depending on the run. - -\subsubsection{Functions}\label{subsubsec:functions}% - -Yet another useful feature is the possibilty to define functions (see Sec.\ref{subsec:msr-file-functions-block}). Within the \texttt{THEORY}-block functions can be address as \texttt{fun$\alpha$}, where $\alpha$ is the function number, e.g.\xspace \texttt{fun2}. - -\subsubsection{User Functions}\label{subsubsec:user-functions}% - -\subsection{The \texttt{FUNCTIONS}-Block}\label{subsec:msr-file-functions-block}% - -\subsection{The \texttt{RUN}-Block}\label{subsec:msr-file-run-block}% - -The \texttt{RUN}-Block is used to collect the data needed for a particular run to be fitted. This is including run name, fit type, data format, etc.\xspace The \texttt{RUN}-Block is slightly different organized than the other blocks. The information are collected via labels followed by the information. -Each run to be fitted has its own \texttt{RUN}-Block. A \texttt{RUN}-Block starts with run-file line which has the structure - -\begin{verbatim} -RUN -\end{verbatim} - -\noindent The tokens following the \texttt{RUN} statement are used to identifiy the run, the potential location where the run might be found, and the file format in which the run was saved. In order to understand the meaning of all the above tokens, a short digression is needed. Where is \texttt{musrfit} looking for data files? There is a specifc order how this is done: - -\begin{enumerate} - \item Check if the file is found in the current directory - \item Check if there is a system variable \texttt{WKMFULLDATAPATH}. This system variable can - contain multiple search paths separated by columns, e.g.\xspace \\ - \texttt{export WKMFULLDATAPATH=/mnt/home/nemu/analysis:/afs/psi.ch/.../analysis}. - \item Check if the path (or multiple paths) was (were) given in the XML startup file. - \item Construct the search path from the \texttt{RUN}-block information the following way: \\ - \texttt{??? NEEDS TO BE CHECKED ???} -\end{enumerate} - -\noindent Here some valid examples: - -\begin{verbatim} -RUN 2007/lem07_his_2018 MUE4 PSI ROOT-PPC -\end{verbatim} - -\begin{verbatim} -RUN 2007/lem07_2018_rb1_npp MUE4 PSI NEMU -\end{verbatim} - -\begin{verbatim} -RUN 2007/???? PIE3 PSI PSI-BIN -\end{verbatim} - -\noindent After this short digression back to the \texttt{RUN}-block description. - -\begin{table}[h] - \centering - \begin{tabular}{|l|l|} \hline - \textbf{\texttt{RUN}-block tag} & \textbf{comment} \\ \hline\hline - \texttt{} & sub path and filename without extension \\ \hline - \texttt{} & \begin{minipage}{12cm} - name of the beamline where the data where taken, - e.g.\xspace \texttt{MUE4}. Used to generate a - default path. - \end{minipage} \\ \hline - \texttt{} & \begin{minipage}{12cm} - name of the institute where the data where taken, - e.g.\xspace \texttt{PSI}. Used to generate a - default path. - \end{minipage} \\ \hline - \texttt{} & file format, e.g.\xspace \texttt{NEXUS} (for details - see Sec.\ref{subsec:supported-data-formats})\\ \hline - \end{tabular} - \caption{}\label{tab:run-block} -\end{table} - -\noindent In order to describe the operations needed for fitting and ploting, quite a few information are needed. These information are following the \texttt{RUN}-statement and will be listed below. Depending on the fit-type these information will vary and hence it will be indicated for which fit/plot-type the information is applicable. - -\begin{description} - \item[\texttt{fittype}] \textsl{(required)}, this tag is used to indicate which type of fit - is whished. The supported fit-types are: - \begin{description} - \item[0] Single Histogram Fit - \item[2] Asymmetry Fit - \item[4] Asymmetry Fit in a Rotating Reference Frame - \item[8] Non-\musr Fit - \end{description} - The description of these fit-types can be found in Sec.\ref{sec:fit-types} - \item[\texttt{alpha, beta}] \textsl{(fit-type 2, 4)} -\end{description} - - -\subsection{The \texttt{FOURIER}-Block}\label{subsec:msr-file-fourier-block}% - -\subsection{The \texttt{COMMANDS}-Block}\label{subsec:msr-file-commands-block}% - -\subsection{The \texttt{PLOT}-Block}\label{subsec:msr-file-plot-block}% - -\subsection{The \texttt{STATISTICS}-Block}\label{subsec:msr-file-statistics-block}% - -\subsection{Supported Data Formats}\label{subsec:supported-data-formats}% -\subsubsection{\texttt{NEMU} File Format}\label{subsubsec:nemu-format}% -\subsubsection{\texttt{ROOT} File Format}\label{subsubsec:root-format}% -\subsubsection{\texttt{NEXUS} File Format}\label{subsubsec:nexus-format}% -\subsubsection{\texttt{PSI-BIN} File Format}\label{subsubsec:psibin-format}% -\subsubsection{\texttt{MUD} File Format}\label{subsubsec:mud-format}% -\subsubsection{\texttt{NON-MUSR} File Format}\label{subsubsec:non-musr-format}% - -\section{Fit Types}\label{sec:fit-types}% - -\subsection{Single Histogram Fit}\label{subsec:single-histogram-fit}% -\subsection{Asymmetry Fit}\label{subsec:asymmetry-fit}% -\subsection{Rotating Reference Fit}\label{subsec:rrf}% -\subsection{Non-Musr Fit}\label{subsec:non-musr-fit}% - -\section{Data Preparation for Fitting and Plotting}\label{sec:data-preparation}% - -\subsection{Single Histogram Fit / Plot (\texttt{fittype/plottype 0})}\label{subsec:single-histo-fit-plot}% -\subsubsection{\texttt{fittype 0}}\label{subsubsec:single-histo-fit}% -\subsubsection{\texttt{plottype 0}}\label{subsubsec:single-histo-plot}% - -\subsection{Asymmetry Fit / Plot (\texttt{fittype/plottype 2})}\label{subsec:asymmetry-fit-plot}% -\subsubsection{\texttt{fittype 2}}\label{subsubsec:asymmetry-fit}% -\subsubsection{\texttt{plottype 2}}\label{subsubsec:asymmetry-plot}% - -\subsection{Rotating Reference Fit / Plot (\texttt{fittype/plottype 4})}\label{subsec:rrf-fit-plot}% -\subsubsection{\texttt{fittype 2}}\label{subsubsec:rrf-fit}% -\subsubsection{\texttt{plottype 2}}\label{subsubsec:rrf-plot}% - -\subsection{Non-Musr Fit / Plot (\texttt{fittype/plottype 8})}\label{subsec:non-musr-fit-plot}% -\subsubsection{\texttt{fittype 2}}\label{subsubsec:non-musr-fit}% -\subsubsection{\texttt{plottype 2}}\label{subsubsec:non-musr-plot}% - -\appendix - -\section{Installation}\label{sec:installation}% - -\begin{thebibliography}{99} -\end{thebibliography} - -\end{document} diff --git a/doc/musrfit.dox b/doc/musrfit.dox index 63a7070a..036499af 100644 --- a/doc/musrfit.dox +++ b/doc/musrfit.dox @@ -73,38 +73,56 @@ This two points are somewhat contradictory, and currently it is not clear which \section bugs How to report bugs +

Bugs, unexpected features, can be reported directly to me: \verbatim andreas.suter@psi.ch, \endverbatim or entered in the bug-tracking tool at PSI \verbatim https://tracker.intranet.psi.ch/ \endverbatim. + //**************************************************************************************************** \page musrfitPage \section musrfit musrfit +

Here will eventually follow a more technical description of musrfit. If you looking for a user-manual like description, please check \htmlonlymusrfit user manual\endhtmlonly \latexonly musrfit user manual: \texttt{https://intranet.psi.ch/MUSR/MusrFit} \endlatexonly + //**************************************************************************************************** \page musrviewPage \section musrview musrview +

Here will eventually follow a more technical description of musrview. If you looking for a user-manual like description, please check \htmlonlymusrfit user manual\endhtmlonly \latexonly musrfit user manual: \texttt{https://intranet.psi.ch/MUSR/MusrFit} \endlatexonly + //**************************************************************************************************** \page musrt0Page \section musrt0 musrt0 +

Here will eventually follow a more technical description of musrt0. If you looking for a user-manual like description, please check \htmlonlymusrfit user manual\endhtmlonly \latexonly musrfit user manual: \texttt{https://intranet.psi.ch/MUSR/MusrFit} \endlatexonly + //**************************************************************************************************** \page musrparamPage \section musrparam musrparam +

Here will eventually follow a more technical description of musrparam. If you looking for a user-manual like description, please check \htmlonlymusrfit user manual\endhtmlonly \latexonly musrfit user manual: \texttt{https://intranet.psi.ch/MUSR/MusrFit} \endlatexonly + //**************************************************************************************************** \page msr2dataPage \section msr2data msr2data +

Here will eventually follow a more technical description of musr2data. If you looking for a user-manual like description, please check \htmlonlymusrfit user manual\endhtmlonly \latexonly musrfit user manual: \texttt{https://intranet.psi.ch/MUSR/MusrFit} \endlatexonly + //**************************************************************************************************** \page msr2msrPage \section msr2msr msr2msr +

Here will eventually follow a more technical description of msr2msr. If you looking for a user-manual like description, please check \htmlonlymusrfit user manual\endhtmlonly \latexonly musrfit user manual: \texttt{https://intranet.psi.ch/MUSR/MusrFit} \endlatexonly + //**************************************************************************************************** \page musrguiPage \section musrgui musrgui +

Here will eventually follow a more technical description of musrgui. If you looking for a user-manual like description, please check \htmlonlymusrfit user manual\endhtmlonly \latexonly musrfit user manual: \texttt{https://intranet.psi.ch/MUSR/MusrFit} \endlatexonly + //**************************************************************************************************** \page musreditPage \section musredit musredit +

Here will eventually follow a more technical description of musredit. If you looking for a user-manual like description, please check \htmlonlymusrfit user manual\endhtmlonly \latexonly musrfit user manual: \texttt{https://intranet.psi.ch/MUSR/MusrFit} \endlatexonly + //**************************************************************************************************** \page MuSRFitPage \section MuSRFit MuSRFit diff --git a/doc/musrfit_dox.cfg b/doc/musrfit_dox.cfg index 190b86d1..9c039ed9 100644 --- a/doc/musrfit_dox.cfg +++ b/doc/musrfit_dox.cfg @@ -23,7 +23,7 @@ PROJECT_NAME = musrfit # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 0.1 +PROJECT_NUMBER = 0.99 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/src/classes/PFitterFcn.cpp b/src/classes/PFitterFcn.cpp index 67276851..8eff5bc2 100644 --- a/src/classes/PFitterFcn.cpp +++ b/src/classes/PFitterFcn.cpp @@ -41,7 +41,7 @@ using namespace std; *

Constructor. * * \param runList run list collection - * \param fitType if true, a chisq fit will be performed, otherwise a log max-likelihood fit will be carried out. + * \param useChi2 if true, a chisq fit will be performed, otherwise a log max-likelihood fit will be carried out. */ PFitterFcn::PFitterFcn(PRunListCollection *runList, Bool_t useChi2) { diff --git a/src/classes/PFunctionHandler.cpp b/src/classes/PFunctionHandler.cpp index 358bb92f..e5a88383 100644 --- a/src/classes/PFunctionHandler.cpp +++ b/src/classes/PFunctionHandler.cpp @@ -144,7 +144,7 @@ Bool_t PFunctionHandler::CheckMapAndParamRange(UInt_t mapSize, UInt_t paramSize) * \param map map vector * \param param fit parameter vector */ -Double_t PFunctionHandler::Eval(Int_t funNo, vector map, vector param) +Double_t PFunctionHandler::Eval(Int_t funNo, vector map, vector param) { if (GetFuncIndex(funNo) == -1) { cerr << endl << "**ERROR**: Couldn't find FUN" << funNo << " for evaluation"; diff --git a/src/classes/PMusrCanvas.cpp b/src/classes/PMusrCanvas.cpp index 5bb6e6e3..a6cae882 100644 --- a/src/classes/PMusrCanvas.cpp +++ b/src/classes/PMusrCanvas.cpp @@ -1154,7 +1154,6 @@ void PMusrCanvas::InitFourier() /** *

Initialize the class, and sets up the necessary objects. * - * \param number The plot number of the msr-file PLOT block * \param title Title to be displayed * \param wtopx top x coordinate (in pixels) to place the canvas. * \param wtopy top y coordinate (in pixels) to place the canvas. @@ -2352,7 +2351,7 @@ void PMusrCanvas::CleanupFourierDifference() * \param y y-value of the data * \param theo theory histogram */ -double PMusrCanvas::CalculateDiff(const double x, const double y, TH1F *theo) +double PMusrCanvas::CalculateDiff(const Double_t x, const Double_t y, TH1F *theo) { Int_t bin = theo->FindBin(x); @@ -2372,7 +2371,7 @@ double PMusrCanvas::CalculateDiff(const double x, const double y, TH1F *theo) * \param y y-value of the data * \param theo theory error graphs */ -double PMusrCanvas::CalculateDiff(const double x, const double y, TGraphErrors *theo) +double PMusrCanvas::CalculateDiff(const Double_t x, const Double_t y, TGraphErrors *theo) { Int_t bin = 0; Double_t xVal, yVal; @@ -2396,7 +2395,7 @@ double PMusrCanvas::CalculateDiff(const double x, const double y, TGraphErrors * * \param x x-value of the data * \param graph TGraphErrors which should be searched */ -Int_t PMusrCanvas::FindBin(const double x, TGraphErrors *graph) +Int_t PMusrCanvas::FindBin(const Double_t x, TGraphErrors *graph) { Int_t i, bin = 0; Double_t *xTheo = graph->GetX(); diff --git a/src/classes/PMusrT0.cpp b/src/classes/PMusrT0.cpp index 1c917e2c..711f1c53 100644 --- a/src/classes/PMusrT0.cpp +++ b/src/classes/PMusrT0.cpp @@ -628,7 +628,7 @@ void PMusrT0::Done(Int_t status) * * \param event event type * \param x keyboard event: character key; mouse event: x-position - * \param mouse event: y-position + * \param y mouse event: y-position * \param selected not used */ void PMusrT0::HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected) diff --git a/src/classes/PStartupHandler.cpp b/src/classes/PStartupHandler.cpp index 0d4eb1f3..9e00dfd1 100644 --- a/src/classes/PStartupHandler.cpp +++ b/src/classes/PStartupHandler.cpp @@ -412,6 +412,7 @@ void PStartupHandler::OnFatalError(const Char_t *str) *

Not used. * * \param str not used + * \param len not used */ void PStartupHandler::OnCdataBlock(const Char_t *str, Int_t len) { diff --git a/src/classes/PUserFcn.cpp b/src/classes/PUserFcn.cpp index 0b8717ce..5bbcc037 100644 --- a/src/classes/PUserFcn.cpp +++ b/src/classes/PUserFcn.cpp @@ -56,10 +56,15 @@ PUserFcn::~PUserFcn() //------------------------------------------------------ /** - *

+ *

user function example: polynome of 3rd order * - * return: + * \f[ = \sum_{k=0}^3 c_k t^k \f] * + * meaning of paramValues: \f$c_0\f$, \f$c_1\f$, \f$c_2\f$, \f$c_3\f$ + * + * return: function value + * + * \param t time in \f$(\mu\mathrm{s})\f$, or x-axis value for non-muSR fit * \param param parameter vector */ Double_t PUserFcn::operator()(Double_t t, const std::vector ¶m) const diff --git a/src/include/PRunDataHandler.h b/src/include/PRunDataHandler.h index 19a68ad3..9963985f 100644 --- a/src/include/PRunDataHandler.h +++ b/src/include/PRunDataHandler.h @@ -75,7 +75,7 @@ class PRunDataHandler virtual Bool_t ReadDBFile(); virtual Bool_t StripWhitespace(TString &str); - virtual Bool_t IsWhitespace(const char *str); + virtual Bool_t IsWhitespace(const Char_t *str); virtual Double_t ToDouble(TString &str, Bool_t &ok); virtual Int_t ToInt(TString &str, Bool_t &ok); virtual Int_t GetDataTagIndex(TString &str, const PStringVector* fLabels); diff --git a/src/msr2data.cpp b/src/msr2data.cpp index 42979013..58b1affc 100644 --- a/src/msr2data.cpp +++ b/src/msr2data.cpp @@ -41,8 +41,13 @@ using namespace boost::algorithm; //-------------------------------------------------------------------------- /** - *

- * std::string + *

Checks is a string is a number + * + * return: + * - true if s is a number string + * - false otherwise + * + * \param s */ bool isNumber(const string &s) { @@ -59,7 +64,7 @@ bool isNumber(const string &s) //-------------------------------------------------------------------------- /** - *

+ *

Sends the usage description to the standard output. */ void msr2data_syntax() { @@ -97,9 +102,14 @@ void msr2data_syntax() //-------------------------------------------------------------------------- /** - *

- * std::vector of std::string - * bool (DB file ore not) + *

filters out the output file name from at argument string + * + * return: + * - output file name is present in the argument list + * - otherwise 'out.db' (db==true), 'out.dat' (db==false) + * + * \param arg argument string list from the msr2data call + * \param db true if output file is a db-file */ string msr2data_outputfile(vector &arg, bool db = true) { @@ -140,9 +150,14 @@ string msr2data_outputfile(vector &arg, bool db = true) //-------------------------------------------------------------------------- /** - *

- * std::vector of std::string - * string + *

Checks if option string is present in the argument input list + * + * return: + * - true if option is not present + * - false otherwise + * + * \param arg list of arguments + * \param s option string */ bool msr2data_useOption(vector &arg, const string &s) { @@ -160,9 +175,16 @@ bool msr2data_useOption(vector &arg, const string &s) //-------------------------------------------------------------------------- /** - *

- * std::vector of std::string - * bool + *

Filters out the template run number (if present) and check at the + * same time if only already existing msr-files shall be fitted (no template). + * + * return: + * - template runNo if everything is OK + * - -1 : tag: fit only, do not prepare input files + * - -2 : fatal error - another fit-<temp> option is specified + * + * \param arg list of arguments + * \param chainfit if true */ int msr2data_doFitting(vector &arg, bool &chainfit) { @@ -172,15 +194,15 @@ int msr2data_doFitting(vector &arg, bool &chainfit) istringstream iss; vector::iterator iter(arg.begin()); while (iter != arg.end()) { - if (!iter->compare("fit")) { - if (temp) { + if (!iter->compare("fit")) { // fit found + if (temp) { // temp already found previously return -2; // fatal error - another fit- option is specified } - temp = -1; + temp = -1; // fit only, do not prepare input files chainfit = false; iter = arg.erase(iter); } - else if (!iter->substr(0,4).compare("fit-")) { + else if (!iter->substr(0,4).compare("fit-")) { // 'fit-' found if (temp) { return -2; // fatal error - another fit option is specified } @@ -203,9 +225,14 @@ int msr2data_doFitting(vector &arg, bool &chainfit) //-------------------------------------------------------------------------- /** - *

- * std::vector of std::string - * bool + *

Filters out the template run number from which the new msr-files should be created. + * + * return: + * - template run number, or + * - 0 if the string after 'msr-' is not a number + * + * \param arg list of arguments + * \param inputOnly flag, if true create msr-files only (no fitting) */ unsigned int msr2data_doInputCreation(vector &arg, bool &inputOnly) { @@ -229,10 +256,15 @@ unsigned int msr2data_doInputCreation(vector &arg, bool &inputOnly) //-------------------------------------------------------------------------- /** - *

+ *

msr2data is used to generate msr-files based on template msr-files, automatically fitting these new msr-files, + * collection fitting parameters, etc. For a detailed description see + * \htmlonly musr2data online help + * \endhtmlonly + * \latexonly msr2data online help: \texttt{https://intranet.psi.ch/MUSR/Msr2Data} + * \endlatexonly * - * \param argc - * \param argv + * \param argc number of arguments + * \param argv list of arguments */ int main(int argc, char *argv[]) { diff --git a/src/msr2msr.cpp b/src/msr2msr.cpp index 9586dbf6..cf4ab961 100644 --- a/src/msr2msr.cpp +++ b/src/msr2msr.cpp @@ -60,7 +60,7 @@ using namespace std; //-------------------------------------------------------------------------- /** - *

+ *

Sends the usage description to the standard output. */ void msr2msr_syntax() { @@ -74,9 +74,13 @@ void msr2msr_syntax() //-------------------------------------------------------------------------- /** - *

+ *

If the msr-file line is the RUN line, change it to the new format. * - * \param str + * return: + * - true if everything went smooth + * - false otherwise + * + * \param str msr-file line */ bool msr2msr_run(char *str) { @@ -143,11 +147,16 @@ bool msr2msr_run(char *str) //-------------------------------------------------------------------------- /** - *

+ *

Changes the fit parameter lines to the new msr-file format. In the new msr-file + * format there is an additional column "Pos_Error". Before a fit takes place the value + * is set to "none". * - * \param str + * return: + * - true if everything went smooth + * - false otherwise + * + * \param str msr-file fit parameter line */ -//void msr2msr_param(char *str, int &tag) bool msr2msr_param(char *str) { // check for comment header which needs to be replaced @@ -247,26 +256,21 @@ bool msr2msr_param(char *str) tokens = 0; } -/* - // check if the end of the parameter block is reached - unsigned int i; - for (i=0; i + *

In the theory the table functions needs to be replaced by the numerical ones, and some + * functions have new a different parameterization. * - * \param str - * \param tag - * \param noOfAddionalParams + * return: + * - true if everything went smooth + * - false otherwise + * + * \param str msr-file theory line + * \param tag if a function has new some additional parameters, this flag will be set, such that these new parameters can be added to the fit parameter block + * \param noOfAddionalParams counts the number of additional parameters needed. */ bool msr2msr_theory(char *str, int &tag, int &noOfAddionalParams) { @@ -412,9 +416,13 @@ bool msr2msr_theory(char *str, int &tag, int &noOfAddionalParams) //-------------------------------------------------------------------------- /** - *

+ *

Checks if a msr-line is a comment line * - * \param str + * return: + * - true if line is a comment line + * - false otherwise + * + * \param str msr-file line */ bool msr2msr_is_comment(char *str) { @@ -437,9 +445,13 @@ bool msr2msr_is_comment(char *str) //-------------------------------------------------------------------------- /** - *

+ *

Checks if a msr-line consists only out of whitespaces. * - * \param str + * return: + * - true if line is a whitespace + * - false otherwise + * + * \param str msr-file line */ bool msr2msr_is_whitespace(char *str) { @@ -459,10 +471,10 @@ bool msr2msr_is_whitespace(char *str) //-------------------------------------------------------------------------- /** - *

+ *

Replaces temporarily set labels by the proper parameter number. * - * \param str - * \param paramNo + * \param str msr-file line + * \param paramNo parameter number */ void msr2msr_replace(char *str, int paramNo) { @@ -491,11 +503,12 @@ void msr2msr_replace(char *str, int paramNo) //-------------------------------------------------------------------------- /** - *

+ *

If a theory function was found which has newly a different number of parameters, + * this function will finalize the msr-file, i.e. replacing all temporarily set tags. * - * \param fln in/out file name - * \param tag - * \param noOfAddionalParams + * \param fln file name + * \param theoryTag theory tag if the changed function + * \param noOfAddionalParams number of additional fit parameters */ bool msr2msr_finalize_theory(char *fln, int theoryTag, int noOfAddionalParams) { @@ -574,10 +587,11 @@ bool msr2msr_finalize_theory(char *fln, int theoryTag, int noOfAddionalParams) //-------------------------------------------------------------------------- /** - *

+ *

msr2msr is needed to convert old WKM msr-files to musrfit msr-files. Eventhough the syntax is very + * close, there are some shortcomings in the WKM msr-files, which forced me to slightly change the file format. * - * \param argc - * \param argv + * \param argc number of arguments + * \param argv list of arguments */ int main(int argc, char *argv[]) { diff --git a/src/musrfit.cpp b/src/musrfit.cpp index bfd8e078..6ece48c1 100644 --- a/src/musrfit.cpp +++ b/src/musrfit.cpp @@ -52,8 +52,7 @@ using namespace std; //-------------------------------------------------------------------------- /** - *

- * + *

Sends the usage description to the standard output. */ void musrfit_syntax() { @@ -83,21 +82,19 @@ void musrfit_syntax() //-------------------------------------------------------------------------- /** - *

+ *

Writes the fitted data- and theory-set in ascii format to disc. * - * \param fln - * \param data - * \param runCounter + * \param fln output file name + * \param data processed-data handler + * \param runCounter msr-file run counter needed to form the output file name */ void musrfit_write_ascii(TString fln, PRunData *data, int runCounter) { // generate dump file name - TString fileName = fln.Copy(); TString count("_"); count += runCounter; Ssiz_t index = fln.Index("."); fln.Insert(index, count); -//cout << endl << "fln = " << fln.Data(); ofstream f; @@ -124,9 +121,12 @@ void musrfit_write_ascii(TString fln, PRunData *data, int runCounter) //-------------------------------------------------------------------------- /** - *

+ *

Go through all msr-file runs and write each of them in ascii-format to disc + * (used for diagnostics). Be aware that this output is different to what + * you will get when using musrview! * - * \param fileName + * \param fileName file name + * \param runList run list collection handler */ void musrfit_dump_ascii(char *fileName, PRunListCollection *runList) { @@ -193,12 +193,12 @@ void musrfit_dump_ascii(char *fileName, PRunListCollection *runList) //-------------------------------------------------------------------------- /** - *

+ *

Writes the fitted data- and theory-set in root format to disc. * - * \param f - * \param fln - * \param data - * \param runCounter + * \param f root file object + * \param fln file name + * \param data processed-data handler + * \param runCounter msr-file run counter needed to form the output file name */ void musrfit_write_root(TFile &f, TString fln, PRunData *data, int runCounter) { @@ -252,9 +252,12 @@ void musrfit_write_root(TFile &f, TString fln, PRunData *data, int runCounter) //-------------------------------------------------------------------------- /** - *

+ *

Go through all msr-file runs and write each of them in root format to disc + * (used for diagnostics). Be aware that this output is different to what + * you will get when using musrview! * - * \param fileName + * \param fileName file name + * \param runList run list connection handler */ void musrfit_dump_root(char *fileName, PRunListCollection *runList) { @@ -324,6 +327,22 @@ void musrfit_dump_root(char *fileName, PRunListCollection *runList) } //-------------------------------------------------------------------------- +/** + *

The musrfit program is used to fit muSR data. + * For a detailed description/usage of the program, please see + * \htmlonly musrfit online help + * \endhtmlonly + * \latexonly musrfit online help: \texttt{https://intranet.psi.ch/MUSR/MusrFit} + * \endlatexonly + * + * return: + * - PMUSR_SUCCESS if everthing went smooth + * - PMUSR_WRONG_STARTUP_SYNTAX if syntax error is encountered + * - line number if an error in the msr-file was encountered which cannot be handled. + * + * \param argc number of input arguments + * \param argv list of input arguments + */ int main(int argc, char *argv[]) { bool show_syntax = false; diff --git a/src/musrparam.cpp b/src/musrparam.cpp index 3f7355d2..847f88f2 100644 --- a/src/musrparam.cpp +++ b/src/musrparam.cpp @@ -38,6 +38,10 @@ using namespace std; #include #include +//-------------------------------------------------------------------------- +/** + *

Sends the usage description to the standard output. + */ void musrparam_syntax() { cout << endl << "usage: musrparam "; @@ -57,6 +61,18 @@ void musrparam_syntax() cout << endl << endl; } +//-------------------------------------------------------------------------- +/** + *

Used to extract fit parameters from msr-files. msr2data is much more flexible and not much effort + * will go into supporting musrparam anymore (only bug fixing). + * + * return: + * - 0 if everything went smooth + * - negative number otherwise + * + * \param argc number of arguments + * \param argv list of arguments + */ int main(int argc, char *argv[]) { if (argc != 3) { diff --git a/src/musrt0.cpp b/src/musrt0.cpp index 22accabc..d952922e 100644 --- a/src/musrt0.cpp +++ b/src/musrt0.cpp @@ -49,8 +49,7 @@ using namespace std; //-------------------------------------------------------------------------- /** - *

- * + *

Sends the usage description to the standard output. */ void musrt0_syntax() { @@ -64,18 +63,23 @@ void musrt0_syntax() //-------------------------------------------------------------------------- /** - *

+ *

This routine sets up a raw single histogram canvas to graphically enter t0, data- and background-range + * (depending on some given input flags). * - * \param app - * \param msrHandler - * \param data + * return: + * - true, if everthing went smooth + * - false, otherwise + * + * \param app main root application handler + * \param msrHandler msr-file handler + * \param data musrT0 data set handler + * \param idx index to filter out the proper msr-file run */ Bool_t musrt0_item(TApplication &app, PMsrHandler *msrHandler, PMusrT0Data &data, UInt_t idx) { -//cout << endl << "debug> &app=" << &app << ", msrHandler=" << msrHandler << ", &data=" << &data << endl; - PMusrT0 *musrT0 = new PMusrT0(data); + // check if the musrT0 object could be invoked if (musrT0 == 0) { cerr << endl << ">> **ERROR** Couldn't invoke musrT0 ..."; cerr << endl << ">> run name " << data.GetRawRunData(idx)->GetRunName()->Data(); @@ -83,20 +87,26 @@ Bool_t musrt0_item(TApplication &app, PMsrHandler *msrHandler, PMusrT0Data &data return false; } + // check if the musrT0 object is valid if (!musrT0->IsValid()) { cerr << endl << ">> **ERROR** invalid item found! (idx=" << idx << ")"; cerr << endl; return false; } + // set the msr-file handler. The handler cannot be transfered at construction time since rootcint is not able to handle the PMsrHandler class musrT0->SetMsrHandler(msrHandler); + // check if only t0, data-, and bkg-range is wished, if not, only initialize t0 at this point if (data.GetCmdTag() != PMUSRT0_GET_DATA_AND_BKG_RANGE) musrT0->InitT0(); + // check if only t0 is wished, if not, initialize data- and bkg-ranges if (data.GetCmdTag() != PMUSRT0_GET_T0) musrT0->InitDataAndBkg(); + // connect SIGNAL 'Done' of musrT0 with the SLOT 'Terminate' of app. This will terminate the main application if + // the local musrT0 object emits 'Done' musrT0->Connect("Done(Int_t)", "TApplication", &app, "Terminate(Int_t)"); app.Run(true); // true needed that Run will return after quit @@ -106,8 +116,10 @@ Bool_t musrt0_item(TApplication &app, PMsrHandler *msrHandler, PMusrT0Data &data else result = true; + // disconnect all SIGNALS and SLOTS connected t0 musrT0 musrT0->Disconnect(musrT0); + // cleanup delete musrT0; musrT0 = 0; @@ -116,8 +128,12 @@ Bool_t musrt0_item(TApplication &app, PMsrHandler *msrHandler, PMusrT0Data &data //-------------------------------------------------------------------------- /** - *

+ *

This routine cleans up the handlers. * + * \param saxParser XML SAX parser + * \param startupHandler startup handler + * \param msrHandler msr-file handler + * \param dataHandler raw run data handler */ void musrt0_cleanup(TSAXParser *saxParser, PStartupHandler *startupHandler, PMsrHandler *msrHandler, PRunDataHandler *dataHandler) { @@ -140,6 +156,22 @@ void musrt0_cleanup(TSAXParser *saxParser, PStartupHandler *startupHandler, PMsr } //-------------------------------------------------------------------------- +/** + *

The musrt0 program is used to set graphically t0's, data- and background-ranges. + * For a detailed description/usage of the program, please see + * \htmlonly musrt0 online help + * \endhtmlonly + * \latexonly musrt0 online help: \texttt{https://intranet.psi.ch/MUSR/MusrFit} + * \endlatexonly + * + * return: + * - PMUSR_SUCCESS if everthing went smooth + * - PMUSR_WRONG_STARTUP_SYNTAX if syntax error is encountered + * - line number if an error in the msr-file was encountered which cannot be handled. + * + * \param argc number of input arguments + * \param argv list of input arguments + */ Int_t main(Int_t argc, Char_t *argv[]) { Bool_t show_syntax = false; @@ -622,5 +654,5 @@ Int_t main(Int_t argc, Char_t *argv[]) // clean up musrt0_cleanup(saxParser, startupHandler, msrHandler, dataHandler); - return 0; + return PMUSR_SUCCESS; } diff --git a/src/musrview.cpp b/src/musrview.cpp index aa4951dd..677e684f 100644 --- a/src/musrview.cpp +++ b/src/musrview.cpp @@ -50,8 +50,7 @@ using namespace std; //-------------------------------------------------------------------------- /** - *

- * + *

Sends the usage description to the standard output. */ void musrview_syntax() { @@ -71,6 +70,23 @@ void musrview_syntax() } //-------------------------------------------------------------------------- +/** + *

The musrview program is used to show muSR fit results in graphical form. + * From it also Fourier transforms, difference between data an theory can be formed. + * For a detailed description/usage of the program, please see + * \htmlonly musrview online help + * \endhtmlonly + * \latexonly musrview online help: \texttt{https://intranet.psi.ch/MUSR/MusrFit} + * \endlatexonly + * + * return: + * - PMUSR_SUCCESS if everthing went smooth + * - PMUSR_WRONG_STARTUP_SYNTAX if syntax error is encountered + * - line number if an error in the msr-file was encountered which cannot be handled. + * + * \param argc number of input arguments + * \param argv list of input arguments + */ int main(int argc, char *argv[]) { bool show_syntax = false; @@ -214,13 +230,6 @@ int main(int argc, char *argv[]) } } } -/* -cout << endl << ">> plotList:" << endl; -for(unsigned int i=0; i> Will add run " << i << endl; success = runListCollection->Add(i, kView); if (!success) { cout << endl << "**ERROR** Couldn't handle run no " << i << " "; @@ -358,5 +366,5 @@ cout << endl; runListCollection = 0; } - return 0; + return PMUSR_SUCCESS; }