Lorentzian1D
From MantidProject
Contents |
Deprecation notice
Instead of using this algorithm to fit a Lorentzian please use the Fit algorithm where the Function parameter of this algorithm is used to specified the fitting function, including selecting a Lorentzian.
Summary
Takes a histogram in a 2D workspace and fit it to a Lorentzian function, i.e. to the function:
where
- BG0 - constant background value
- BG1 - constant background value
- Height - height of peak (at maximum)
- PeakCentre - centre of peak
- HWHM - half-width at half-maximum
Note that the FWHM (Full Width Half Maximum) equals two times HWHM, and the integral over the Lorentzian equals Height * π * HWHM (ignoring the linear background). In the literature you may also often see the notation γ = HWHM.
The figure below illustrate this symmetric peakshape function fitted to a TOF peak:
Properties
| Order | Name | Direction | Type | Default | Description |
|---|---|---|---|---|---|
| 1 | InputWorkspace | Input | Workspace | Mandatory | The name of the input Workspace |
| 2 | SpectrumIndex | Input | integer | 0 | The spectrum to fit, using the workspace numbering of the spectra (default 0) |
| 3 | StartX | Input | double | Lowest value of x data array | X value to start fitting from |
| 4 | EndX | Input | double | Highest value of x data array | last X value to include in fitting range |
| 5 | BG0 | InOut | double | 0.0 | constant background value |
| 6 | BG1 | InOut | double | 0.0 | linear background modelling parameter |
| 7 | Height | InOut | double | 0.0 | height of peak (not the height may be refined to a negative value to fit a dipped curve) |
| 8 | PeakCentre | InOut | double | 0.0 | Centre of peak |
| 9 | HWHM | InOut | double | 1.0 | half-width at half-maximum |
| 10 | MaxIterations | Input | Integer | 500 | Max iterations |
| 11 | Output Status | Output | String | "" | whether the fit was successful |
| 12 | Output Chi^2/DoF | Output | double | 0.0 | returns how good the fit was |
Source Code
Header Lorentzian1D.h
Source Lorentzian1D.cpp

