| Home | Trees | Indices | Help |
|
|---|
|
|
Peaks and backgrounds.
Available peaks and backgrounds:
gauss, lorentz, voigt, quadratic constant, linear
The functions are standardized to unit height at zero, but can be adjusted with center, scale and width parameters.
Models corresponding to these use uppercase names. E.g.:
gauss(x, sigma=3, center=2, scale=4)
corresponds to:
m = Gauss(sigma=3, center=2, scale=4) m(x)
The models define derivatives with respect to the parameters for the individual evaluation points x. E.g.:
m.dsigma(x)
| Classes | |
|
Gauss Gauss peak: scale exp ( -0.5 (x-center)**2 / sigma**2 ) |
|
|
Lorentz Lorentz peak (HWHM): scale/pi gamma/((x-center)**2 + gamma**2) |
|
|
Voigt Voigt peak (HWHM,sigma): A [G(sigma) * L(gamma)](x-center) |
|
|
Quadratic Quadratic peak (HWHM): 1 - 1/2 ((x-c)/w)**2 |
|
|
Linear Linear background: scale (x - center + 1) |
|
|
Constant Constant background: scale |
|
| Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| Function Details |
Gauss peak. The formula used to calculate this is: G(x) = exp( -0.5 (x-center)**2 / sigma**2 )
|
Lorentz peak. The formula used to calculate this is: L(x) = scale/pi gamma/((x-center)**2 + gamma**2)
|
Voigt peak. The voigt peak is the convolution of a Lorentz peak with a Gaussian peak. The formula used to calculate this is: z(x) = (x + 1j gamma) / (sqrt(2) sigma) w(z) = exp(-z**2) erfc(-1j z) / (sqrt(2 pi) sigma) V(x) = scale Re(w(z(x-center))) Ref: W.I.F. David, J. Appl. Cryst. (1986). 19, 63-64 Note: adjusted to use stddev and HWHM rather than FWHM parameters
|
Quadratic peak. The formula used to calculate this is: Q(x) = A ( 1 - ( (x - c)/w )**2 / 2 ) if |x-c| < w sqrt(2) Q(x) = 0 otherwise
|
Sloping background. The background has unit height at zero. The formula used to calculate this is: S(x) = scale ( x - center + 1)
|
Constant background. The formula used to calculate this is: C(x) = scale
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Mar 16 15:03:12 2009 | http://epydoc.sourceforge.net |