\(\renewcommand\AA{\unicode{x212B}}\)
Table of Contents
The Fitting tab allows the user to:
Mantid comes with a number of fitting functions. Additional functions may be added or a user may define their own function. A number of fit functions have been programmed which are specific to the analysis of muon spectra.
Some of the muon specific functions in Mantid include:
ExpDecayOsc | \({f(t)=A\exp(-\lambda t)\cos(\omega t + \phi)}\) |
GausOsc | \({f(t)=A\exp(-\frac{(\sigma t)^2}{2})\cos(\omega t + \phi)}\) |
Abragam | \({f(t)=A\exp(-(\sigma t)^2 \times (\exp(-\frac{t}{\tau_c})-1+\frac{t}{\tau_c}))\cos(\omega t + \phi)}\) |
StaticKuboToyabe | \({f(t)=A(\frac{1}{3}+\frac{2}{3}\exp(-\frac{(\sigma t)^2}{2})(1-(\sigma t)^2))}\) |
StretchExpMuon | \({f(t)=A\exp(-(\lambda t)^\beta)}\) |
GausDecay | \({f(t)=A\exp(-(\sigma t)^2)}\) |
ExpDecayMuon | \({f(t)=A\exp(-\lambda t)}\) |
MuonFInteraction | Implements equation number (3) from Brewer et al, Physical Review B 33(11) 7813-7816, to model the muon response under the formation of the F \({\mu}\) F species. |
DynamicKuboToyabe | Fitting for the parameters \(A\), \({\sigma}\) and \({\nu}\) (the initial asymmetry, relaxation rate and hop rate, respectively) using numerical integration techniques. |
Where:
The compilation of custom functions is possible using C++ or Python, however this is beyond the scope of this tutorial. Detailed instructions for completing this for a 64-bit Windows platform can be found at writing a fit function and introduction to python fit functions, for fit functions in C++ and Python respectively.
To select a function right click in the box beneath where Fit Status is written and select Add Function.
A new window will appear with several drop-down titles; Background, Calibrate etc.; this is the Mantid-Fit dialog box.
Follow the following instructions for an example of fitting:
NB: To remove the function, right click on the function name and select Remove.
Once a function has been selected its name will appear in the Property column. To examine a function’s fit parameters, click on the small arrow beside the function name to expand the entry. Generic properties for performing the fit itself - such as start and end times, what minimizer to use etc. are located in the table below the functions table.
The parameters of a function can be adjusted in order to give the user maximum control over the fitting result of the data. These parameters can be adjusted before or after fitting initially, however it will require re-fitting for the changes to apply. Factors such as the time range fitted and fixing constraint boundaries can be adjusted.
Once the user is happy with the initial fit parameters, clicking Fit will perform chosen fit to the data. The fit parameters will then be updated.
To illustrate this:
Each fit parameter can also be bound by certain fit limits (+/- 10% of its starting value, +/- 50% or a custom value), fixed at a specific user determined value, or tied together using some functional form.
To demonstrate setting bound limits:
Data will sometimes require a function which is made up of multiple other functions, these combinations can be through addition or multiplication. To create a fit function involving adding and multiplying functions, follow the examples below.
Figure 29: A plot of the ExpDecayMuon and StaticKuboToyabe functions added together and fitted to EMU19631.
Multiple workspaces can be selected in different combinations. Selecting many workspaces is useful for when using the sequential option, which allows Mantid to fit one function with a consistent set of parameters to a range of data sets. You need to use the separate Sequential Fitting tab to do this.
Follow the instructions below in order to sequentially fit a function to a range of data.
For more specifics on each option in the Fitting tab, see the Fitting section of Muon Analysis (old)