Mantid contains a constantly increasing catalog of predefined fitting function which can be used to create a model. Some of these will be demonstrated here. In addition, it is possible to create new fitting functions using the Fit Function toolbox, or by extending Mantid using a plugin mechanism. The former will be covered here.
Mantid provides the ability to fit overlapping peaks on a common background. Just follow the steps described earlier to add more peaks to the model. The peaks don’t have to be of the same type.
The Mantid fitting tool isn’t limited to peaks and backgrounds. You can select any other function from a list offered by the “Add other function..” option.
Mantid provides a user defined function called UserFunction. It has an attribute called “Formula” which accepts a text string with a mathematical formula. All variables in the formula are treated as parameters except for “x” which is the argument.
The formula can either be entered in the text editor in the Fit Function browser or constructed with the help of the User Function Dialog.
Edit your function in the text field, browse and add () to your formula any built-in or saved function. The fitting parameters are extracted automatically and displayed in the Parameters read-only field. If the field is empty then your formula contains errors.
When finished click the Use button to insert the formula into the Fit Function browser.
The constructed formula can be saved permanently for future use. Click the Save button to see the dialog:
Now your function appears in the list of available functions:
Any unwanted function can be removed from the list using button.