\(\renewcommand\AA{\unicode{x212B}}\)
Mantid contains an increasing catalog of predefined fitting function, which can be used to create a model. Some are demonstrated here.
In addition, it is possible to create new fitting functions using the User Function toolbox.
It is possible to fit overlapping peaks on a common background. Just follow the steps described earlier and add more peaks to the model. The peaks don’t have to be of the same type.
Fitting is not limited to peaks. You can select any other function from our list via right-click “Add other function”.
You may have spotted “UserFunction”. It can be chosen by right-clicking on a plot and selecting “Add other function”. It accepts a “Formula” as text string of a mathematical formula. All variables in the formula are treated as parameters, except for “x” which is the argument.
The formula can simply be entered into Fit Property Browser or with the help of the User Function Dialog:
Type your function in the large lower text field. Browse the built-in functions above and add () them to your formula. The fitting parameters are displayed in the Parameters field (read-only). If the field is empty then your formula contains errors.
You can save the function you have defined, 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.
When finished click the Use button to insert the formula into the Fit Function browser.