BackToBackExponential1D

From MantidProject

Jump to: navigation, search

Contents

Deprecation notice

Instead of using this algorithm to fit a BackToBackExponential please use the Fit algorithm where the Function parameter of this algorithm is used to specified the fitting function, including selecting a BackToBackExponential.

Summary

Takes a histogram in a 2D workspace and fit it to a back-to-back exponential peakshape function, i.e. to the function:

  I\left[ \exp \left( \frac{A*[A*S^2+2*(x-X0)]}{2}\right) \mbox{erfc}\left( \frac{A*S^2+(x-X0)}{S*\sqrt{2}} \right) + \exp \left( \frac{B*[B*S^2-2*(x-X0)]}{2} \right) \mbox{erfc} \left( \frac{[B*S^2-(x-X0)]}{S*\sqrt{2}} \right) \right] + BK.

This peakshape function represent the convolution of back-to-back exponentials and a gaussian function and is designed to be used for the data analysis of time-of-flight neutron powder diffraction data, see Ref. 1.

The parameters A and B represent the absolute value of the exponential rise and decay constants (modelling the neutron pulse coming from the moderator) and S represent the standard deviation of the gaussian. The parameter X0 is the location of the peak; more specifically it represent the point where the exponentially modelled neutron pulse goes from being exponentially rising to exponentially decaying.

References

1. R.B. Von Dreele, J.D. Jorgensen & C.G. Windsor, J. Appl. Cryst., 15, 581-589, 1982

The figure below illustrate this peakshape function fitted to a TOF peak:

Image:BackToBackExponentialWithConstBackground.png

Properties

Note the initial default guesses for in particular A and B are only based on fitting a couple of peaks in a dataset collected on the ISIS's HRPD instrument.

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 I InOut double 0.0 height of peak
6 A InOut double 1.0 exponential constant of rising part of neutron pulse
7 B InOut double 0.05 exponential constant of decaying part of neutron pulse
8 X0 InOut double 0.0 peak position
8 S InOut double 1.0 standard deviation of gaussian part of peakshape function
8 BK InOut double 0.0 constant background
9 MaxIterations Input Integer 500 Max iterations
10 Output Status Output String "" whether the fit was successful
11 Output Chi^2/DoF Output double 0.0 returns how good the fit was

Source Code

Header BackToBackExponential1D.h

Source BackToBackExponential1D.cpp

Personal tools
Create a book