294 lines
19 KiB
HTML
294 lines
19 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html lang="en_US">
|
|
|
|
<!-- Mirrored from intranet.psi.ch/MUSR/QuickStart?cover=print by HTTrack Website Copier/3.x [XR&CO'2010], Thu, 31 May 2012 10:51:19 GMT -->
|
|
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=iso-8859-1"><!-- /Added by HTTrack -->
|
|
<head>
|
|
<link rel="stylesheet" href="../pub/System/HeadlinesPlugin/style.css" type="text/css" media="all" />
|
|
<title> MUSR :: QuickStart</title>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="robots" content="noindex" /> <link rel="alternate" type="application/rss+xml" title="RSS Feed" href="WebRsshtml.html" />
|
|
<meta name="scripturl" content="https://intranet.psi.ch/wiki/bin" />
|
|
<meta name="scriptsuffix" content="" />
|
|
|
|
<meta name="WEBTOPIC" content="QuickStart" />
|
|
<meta name="WEB" content="MUSR" />
|
|
<meta name="SCRIPTURLPATH" content="/wiki/bin" />
|
|
<meta name="SCRIPTSUFFIX" content="" />
|
|
<meta name="TEXT_JUMP" content="Jump" />
|
|
<meta name="TEXT_SEARCH" content="Search" />
|
|
<meta name="TEXT_NUM_TOPICS" content="Number of topics:" />
|
|
<meta name="TEXT_MODIFY_SEARCH" content="Modify search" />
|
|
|
|
<link rel="icon" href="../pub/Main/WebPreferences/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="../pub/Main/WebPreferences/favicon.ico" type="image/x-icon" />
|
|
<link rel="alternate" href="https://intranet.psi.ch/wiki/bin/edit/MUSR/QuickStart?t=1338461458" type="application/x-wiki" title="edit QuickStart" />
|
|
<meta name="description" content="QuickStart" />
|
|
<base /><!--[if IE]></base><![endif]-->
|
|
|
|
<style type="text/css" media="all">
|
|
@import url('../pub/System/SkinTemplates/base.css');
|
|
</style>
|
|
<style type="text/css" media="all">
|
|
@import url('../pub/System/PatternSkinTheme2009/layout.css');
|
|
@import url('../pub/System/PatternSkinTheme2009/style.css');
|
|
@import url('../pub/System/PatternSkinTheme2009/colors.css');
|
|
</style>
|
|
<style type="text/css" media="all">
|
|
@import url('../pub/System/PatternSkinTheme2009/column_left.css');
|
|
@import url('../pub/System/PatternSkinTheme2009/variant_twiki.css');
|
|
</style><style type="text/css" media="all">
|
|
/* Styles that are set using variables */
|
|
.patternBookView .foswikiTopRow,
|
|
.patternWebIndicator a img,
|
|
.patternWebIndicator a:hover img {
|
|
background-color:#D0D0D0;
|
|
}
|
|
#patternTopBarContents { background-image:url(../pub/System/PatternSkin/header5.gif); background-repeat:repeat-x;}
|
|
#patternTopBarContents { background-color:#ffffff;}
|
|
.patternBookView {
|
|
border-color:#D0D0D0;
|
|
}
|
|
.patternPreviewPage #patternMain {
|
|
/* uncomment to set the preview image */
|
|
/*background-image:url("/pub/System/PreviewBackground/preview2bg.gif");*/
|
|
}
|
|
</style>
|
|
<style type="text/css" media="all">
|
|
@import url("../pub/System/PsiSkin/psicolors.css");
|
|
@import url("../pub/System/PsiSkin/psistyle.css");
|
|
.foswikiTopic {overflow: hidden;}
|
|
</style>
|
|
|
|
|
|
|
|
<style type="text/css" media="all">
|
|
@import url("../pub/System/PatternSkin/print.css");
|
|
</style>
|
|
<!--[if IE]><style type="text/css" media="screen">
|
|
pre {
|
|
height:1%;
|
|
overflow-x:auto;
|
|
}
|
|
.foswikiAttachments,
|
|
.foswikiForm,
|
|
.foswikiHelp,
|
|
.foswikiPreviewArea,
|
|
.patternPreviewPage .foswikiForm,
|
|
.patternSigLine,
|
|
.patternToolBar,
|
|
.patternTop,
|
|
.patternTopicAction,
|
|
#patternSideBarContents .patternLeftBarPersonal,
|
|
#patternSideBarContents h2,
|
|
#patternSideBarContents li,
|
|
#patternTopBarButtons ul {
|
|
height:1%;
|
|
}
|
|
#patternSideBarContents .patternLeftBarPersonal {
|
|
width:100%;
|
|
}
|
|
.foswikiFormStep {
|
|
height:100%;
|
|
}
|
|
#foswikiLogin,
|
|
.patternShadow {
|
|
border:10px solid #fff;
|
|
margin-top:10px;
|
|
margin-bottom:10px;
|
|
border:2px solid #ccc;
|
|
}
|
|
</style><![endif]-->
|
|
<!--[if gt IE 8 ]><style type="text/css" media="screen">
|
|
#foswikiLogin,
|
|
.patternShadow {
|
|
border:10px solid #fff;
|
|
margin-top:10px;
|
|
margin-bottom:10px;
|
|
box-shadow: 0 0 10px #ccc;
|
|
}
|
|
</style><![endif]-->
|
|
|
|
|
|
<link rel="stylesheet" href="../pub/System/FootNotePlugin/styles.css" type="text/css" media="all" /><!--FOOTNOTEPLUGIN_LINKCSS-->
|
|
</head>
|
|
<body class="foswikiNoJs patternViewPage patternPrintPage">
|
|
<a name="PageTop"></a><div class="foswikiPage"><div id="patternScreen">
|
|
<div id="patternPageShadow">
|
|
<div id="patternPage">
|
|
<div id="patternOuter">
|
|
<div id="patternFloatWrap">
|
|
<div id="patternMain">
|
|
<div id="patternMainContents">
|
|
<p></p>
|
|
<p></p>
|
|
<div class="patternContent"><div class="foswikiTopic"><h1><a name="Quickstart_for_61_61WKM_61_61_users"></a> Quickstart for <code><b>WKM</b></code> users </h1>
|
|
<a name="foswikiTOC"></a><div class="foswikiToc"> <ul>
|
|
<li> <a href="QuickStart.html#Quickstart_for_61_61WKM_61_61_users"> Quickstart for WKM users </a> <ul>
|
|
<li> <a href="QuickStart.html#Introduction"> Introduction </a>
|
|
</li> <li> <a href="QuickStart.html#Differences_between_61WKM_61_and_61musrfit_61_msr_files"> Differences between WKM and musrfit msr files </a>
|
|
</li> <li> <a href="QuickStart.html#Selected_new_features_in_61musrfit_61"> Selected new features in musrfit </a>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<h2><a name="Introduction"></a> Introduction </h2>
|
|
<p></p>
|
|
<code>musrfit</code> is a program suite for analyzing μSR data. It is implemented in <code>C++/<a href="http://root.cern.ch/" target="_top">ROOT</a></code> and uses the <a href="http://www.cern.ch/minuit/" target="_top">MINUIT2</a> libraries developed at <a href="http://www.cern.ch/" target="_top">CERN</a> for fitting data.
|
|
Installation instructions for Linux, MS Windows, and Mac OS X can be found <a href="MusrFitSetup.html">here</a>. The full user manual is available <a href="MusrFit.html">here</a>.<br>
|
|
In principle the programs can be used in the same fashion as <code>WKM</code> (<code>wkmfit, wkmview</code>).
|
|
E.g., for fitting data as defined in the input file <code><b>8472.msr</b></code> one types:<pre>musrfit 8472.msr</pre> for plotting data and the corresponding
|
|
fit one calls:<pre>musrview 8472.msr</pre>
|
|
Additionally, there are editors called <code><a href="MusrGui.html">musrgui/musredit</a></code> available which can do everything the <code>emacs</code> plug-in for <code>WKM</code> is capable of and even more. <strong><span class='foswikiRedFG'>However, before going to use only <code>musrgui</code> / <code>musredit</code> it is strongly recommended to read at least this "Quickstart" since there are a few differences between the programs as well as new features which are partially described in the following.</span></strong>
|
|
<p></p>
|
|
<h2><a name="Differences_between_61WKM_61_and_61musrfit_61_msr_files"></a> Differences between <code>WKM</code> and <code>musrfit</code> msr files </h2>
|
|
<p></p>
|
|
The msr file format of <code>WKM</code> has some weaknesses and has therefore been extended for the use with <code>musrfit</code>. Existing <code>WKM</code> files can be converted using the <a href="MusrFit.html#Msr2Msr">small utility</a> <code>msr2msr</code>. The changes are: <ul>
|
|
<li> The <code>musrfit</code> msr and mlog files contain an additional column in the FITPARAMETER block for the representation of positive uncertainties if <code>MINOS</code> was called during fitting. In that case the <strong>Step</strong> column holds the negative uncertainties. If there has not been performed an error analysis using <code>MINOS</code>, the symmetric error can be found in the <strong>Step</strong> column, whereas the <strong>Pos_Error</strong> column contains only <strong>none</strong> entries. The beginning of the FITPARAMETER block then might look like this <pre>
|
|
FITPARAMETER
|
|
# No Name Value Step Pos_Error Boundaries
|
|
1 Phase 35.8359 -3.94496 3.93749
|
|
2 Asy 0.04501 -0.00208 0.00211 0 0.33
|
|
3 Field 143.212 -0.27960 0.27885 100 200
|
|
4 Rate 0.14245 -0.02501 0.02279 0 1
|
|
</pre> or that <pre>
|
|
FITPARAMETER
|
|
# No Name Value Step Pos_Error Boundaries
|
|
1 Phase 35.8359 3.94496 none
|
|
2 Asy 0.04501 0.00208 none 0 0.33
|
|
3 Field 143.212 0.27960 none 100 200
|
|
4 Rate 0.14245 0.02501 none 0 1
|
|
</pre>
|
|
</li> <li> Blank lines and lines beginning with <strong>#</strong> are handled as comments. Therefore this works: <pre>
|
|
# Signal 1, first field, ...
|
|
|
|
2 Asy1 0.04501 -0.00208 0.00211 0 0.33
|
|
3 Field1 143.212 -0.27960 0.27885 100 200
|
|
4 Rate1 0.14245 -0.02501 0.02279 0 1
|
|
|
|
# Signal 2, second field, ...
|
|
|
|
5 Asy2 0.14501 -0.00208 0.00211 0 0.33
|
|
6 Field2 343.212 -2.27960 2.27885 0 1000
|
|
7 Rate2 0.42045 -0.02501 0.02279 0 1
|
|
</pre>
|
|
</li> <li> In the RUN block, the first line of each run has the format: <pre>
|
|
RUN 2008/lem08_his_8472 MUE4 PSI ROOT-NPP (name beamline institute data-file-format)
|
|
</pre> where the supported μSR-data file formats are: <strong>ROOT-NPP</strong>, <strong>ROOT-PPC</strong>, <strong>WKM</strong>, <strong>PSI-BIN</strong>, <strong>PSI-MDU</strong>, <strong>MDU-ASCII</strong>, <strong>MUD</strong>, and <strong>NEXUS</strong>
|
|
</li> <li> The commands <strong>SET BATCH</strong> and <strong>END RETURN</strong> may be omitted in the COMMANDS block.
|
|
</li></ul>
|
|
<p></p>
|
|
<h2><a name="Selected_new_features_in_61musrfit_61"></a> Selected new features in <code>musrfit</code> </h2> <ul>
|
|
<li> If single-histogram fits are done, the normalization and background constants are given either "per nanosecond" or "per rebinned bin". The nanosecond normalization allows to change the binning without the need of re-doing the fit to the data.
|
|
</li> <li> The use of functions in the RUN block is now possible for the normalization parameter, e.g. for the definition of an α parameter in simultaneous single-histogram fits of two histograms.
|
|
</li> <li> Apart from the default χ<sup>2</sup> minimization, when doing single-histogram fits (fit type <strong>0</strong>) in <code>musrfit</code> there is also the possibility to do a log-likelihood maximization instead. For switching, just put <strong>MAX_LIKELIHOOD</strong> in the COMMANDS block.
|
|
</li> <li> Since <code>musrfit</code> invokes <code>MINUIT2</code> instead of <code>MINUIT</code> there are the following advantages compared to <code>WKM</code>: <ul>
|
|
<li> No ten character restriction on parameter names
|
|
</li> <li> No restriction on the number of parameters used for a fit (apart from the computer memory)
|
|
</li> <li> Possibility to constrain the parameters to semi-defined intervals (like par > a or par < b). The FITPARAMETER-block syntax in the msr input file is: <pre>
|
|
FITPARAMETER
|
|
# No Name Value Step Pos_Error Boundaries
|
|
# Specify only a lower boundary for the parameter
|
|
1 Asy1 0.04501 -0.00208 0.00211 0 none
|
|
|
|
# Specify only an upper boundary for the parameter
|
|
2 Rate1 0.14245 -0.02501 0.02279 none 10
|
|
|
|
# Specify lower and upper boundaries for the parameter
|
|
3 Asy2 0.14501 -0.00208 0.00211 0 0.33
|
|
|
|
# Do not specify boundaries at all
|
|
4 Field2 343.212 -2.27960 2.27885
|
|
5 Rate2 0.42045 -0.02501 0.02279 none none
|
|
</pre>
|
|
</li></ul>
|
|
</li> <li> The restriction of only ten mapped parameters is lifted!
|
|
</li> <li> The supported table functions in <code>WKM</code> have been replaced by direct integrations in <code>musrfit</code>.
|
|
</li> <li> Some constants for use in the FUNCTIONS block are predefined: <ul>
|
|
<li> <strong>gamma_mu</strong> = γ<sub>μ</sub>/2π = 0.0135538817 MHz/G
|
|
</li> <li> <strong>pi</strong> = π = 3.14159265358979323846
|
|
</li></ul>
|
|
</li> <li> As theory function also the so called skewed Gaussian can be chosen. The properties of this function are summarized in <a href="http://nemu.web.psi.ch/doc/LEM_Memo/skewedGaussian/skewedGaussian.pdf" target="_top">a memo</a> <span class="foswikiIcon"><img src="../pub/System/DocumentGraphics/pdf.png" width="16" height="16" alt="pdf" /></span>. The function is called in the THEORY block as follows: <pre>
|
|
skewedGss 1 2 3 4 (phase frequency rate_m rate_p)
|
|
</pre>
|
|
</li> <li> After fitting it is possible to keep the <code>MINUIT2</code> output including the correlation matrix of the parameters. Calling <code>musrfit</code> with the <strong>--keep-mn2-ouput</strong> or <strong>-k</strong> option will provide you an ASCII and a ROOT file with the complete output, e.g. <pre>musrfit 8472.msr --keep-mn2-ouput</pre> generates <code><b>8472-mn2.output</b></code> and <code><b>8472-mn2.root</b></code> (and of course <code><b>8472.mlog</b></code>).
|
|
</li> <li> The PLOT block has been extended. Additionally to the old range options for instance it is possible to specify individual plot ranges for each run, change the binning used for the data presentation with a global packing parameter for all runs or present the data on (semi-)logarithmic scales. For details on this options refer to the <a href="MusrFit.html#ThePlotBlock">manual</a>.
|
|
</li> <li> It is possible to have multiple PLOT blocks within a single msr file. Each PLOT block generates an individual <code>ROOT</code> canvas.
|
|
</li> <li> For passing options to the Fourier transformation a new FOURIER block has been created. Here it is possible to specify parameters like the number of points used for the discrete transform or the apodization that should be used. For details on the FOURIER block refer to the <a href="MusrFit.html#TheFourierBlock">manual</a>.
|
|
</li> <li> For checking the initial values of the given fit parameters one might use the <strong>--chisq-only</strong> or <strong>-c</strong> option of <code>musrfit</code>. Instead of fitting the data <code>musrfit</code> calculates χ<sup>2</sup> only once and sends the result to the standard output if called with this option.
|
|
</li> <li> There is the possibility to define a few external parameters in the XML file <code><b>musrfit_startup.xml</b></code> located in the binary directory. At the moment one can set various paths to the data files or the colors and markers as well as the default settings for the built-in Fourier transform which should be used in <code>musrview</code>. For details refer to the <a href="MusrFit.html#MusrfitStartupXml">manual</a>.
|
|
</li> <li> Through the ROOT-dictionary mechanism <code>musrfit</code> supports the definition of external fit functions. For details, refer to the <a href="MusrFit.html#UserFunctions">manual</a>.
|
|
</li> <li> Yet another useful feature implemented in <code>musrfit</code> is the addition of several μSR runs into one "combined run" with increased statistics. In order to do so an ADDRUN line has to be added to the RUN block after the line containing the RUN statement, e.g.: <pre>
|
|
RUN 2007/lem07_his_2018 MUE4 PSI ROOT-NPP
|
|
ADDRUN 2007/lem07_2019_rb1_npp MUE4 PSI WKM
|
|
ADDRUN 2007/lem07_2020 MUE4 PSI PSI-BIN
|
|
</pre> It is possible to add more than one ADDRUN line which might even be stored in files with different formats. The remaining RUN-block statements (with the exception of t0) then refer to the "combined run". For further details refer to the <a href="MusrFit.html#TheRunBlock">manual</a>.
|
|
</li> <li> <code>musrfit</code> also supports one-dimensional fitting of non-μSR data stored in ASCII files or in the <strong>DB</strong> format. For this purpose the new fit and plot type <strong>8 (non-muSR fit/plot)</strong> has been introduced. Theory functions like <strong>simplExpo</strong> or <strong>simpleGss</strong> accept a second argument, the so called "time shift <i>t</i><sub>1</sub>": e<sup>-λ<i>t</i></sup> → e<sup>-λ(<i>t</i>-<i>t</i><sub>1</sub>)</sup><br> <br> The further syntax of the msr input file can be seen in the following full example for fitting the exponential decay of a magnetic field into a local superconductor: <img alt="B(z)=B_0 \mathrm{e}^{-\left(z-z_0\right)/\lambda_{\mathrm{L}}}" class="mmpImage" src="../pub/MUSR/QuickStart/_MathModePlugin_616b0638293d1e0ff42a44f8ea7895ff.png" /> <pre>
|
|
superconductor.msr
|
|
###############################################################
|
|
FITPARAMETER
|
|
# Nr. Name Value Step Pos_Error Boundaries
|
|
1 B0 50.056 0 none
|
|
2 z0 10.9405 -2.68635 2.37574
|
|
3 lambdaL 206.121 -6.21524 7.02819
|
|
|
|
###############################################################
|
|
THEORY
|
|
asymmetry 1
|
|
simplExpo fun1 2 (rate tshift)
|
|
|
|
###############################################################
|
|
FUNCTIONS
|
|
fun1 = 1.0 / par3
|
|
|
|
###############################################################
|
|
RUN superconductor-data MUE4 PSI DB (name beamline institute data-file-format)
|
|
fittype 8 (non muSR fit)
|
|
map 0 0 0 0 0 0 0 0 0 0
|
|
xy-data range field
|
|
fit 0.00 150.00
|
|
packing 1
|
|
|
|
###############################################################
|
|
COMMANDS
|
|
MINIMIZE
|
|
MINOS
|
|
SAVE
|
|
|
|
###############################################################
|
|
PLOT 8 (non muSR plot)
|
|
runs 1
|
|
range 0.00 140.00
|
|
|
|
###############################################################
|
|
STATISTIC --- 2008-10-10 14:02:32
|
|
chisq = 10.0, NDF = 10, chisq/NDF = 1.0
|
|
</pre> In the above example <code>musrfit</code> reads the data from the file <code><b>superconductor-data.db</b></code>; the <i>x</i> and <i>y</i> data are specified by the <strong>DB</strong> parameter names <code><b>range</b></code> and <code><b>field</b></code>. An alternative specification of the <i>x</i> and <i>y</i> data by the parameter number in the <strong>DB</strong> file is also possible!
|
|
</li></ul>
|
|
<p></p>
|
|
-- <a href="http://www.fsf.org/register_form?referrer=8369" target="_top">BMW</a> & <a href="http://lmu.web.psi.ch/lem/group.html" target="_top">AS</a></div><!-- /foswikiTopic-->
|
|
<p></p>
|
|
<div id="attachment_list" style="display:none"></div>
|
|
<p></p>
|
|
</div><!-- /patternContent vom pattern template-->
|
|
<p></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="clear"> </div>
|
|
</div><div id="patternBottomBar"><div id="patternBottomBarContents"><div id="patternWebBottomBar">Ideas, requests, problems regarding <a href="https://intranet.psi.ch/Main/WebHome">PSI Wiki</a>? <a href="mailto:psi.intranet@psi.ch?subject=PSI Wiki%20Feedback%20on%20MUSR.QuickStart">Send feedback</a></div></div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div></div><!-- /endWrap -->
|
|
<p></p>
|
|
<p></p>
|
|
<p></p>
|
|
<p></p>
|
|
<p></p>
|
|
<p></p>
|
|
</body>
|
|
|
|
<!-- Mirrored from intranet.psi.ch/MUSR/QuickStart?cover=print by HTTrack Website Copier/3.x [XR&CO'2010], Thu, 31 May 2012 10:51:21 GMT -->
|
|
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=iso-8859-1"><!-- /Added by HTTrack -->
|
|
</html>
|
|
<p></p>
|
|
<p></p> |