This module provides fit functions.
- sum_gauss()
 - sum_agauss()
 - sum_splitgauss()
 - sum_fastagauss()
 - sum_apvoigt()
 - sum_pvoigt()
 - sum_splitpvoigt()
 - sum_lorentz()
 - sum_alorentz()
 - sum_splitlorentz()
 - sum_stepdown()
 - sum_stepup()
 - sum_slit()
 - sum_ahypermet()
 - sum_fastahypermet()
 
Step up function using an inverse tangent.
| Parameters: | 
  | 
|---|---|
| Returns: | a * (0.5 + (arctan((x - b) / c) / pi))  | 
| Return type: | numpy array  | 
Return a sum of gaussian functions defined by (npeaks, delta, height, centroid, fwhm), where:
| Parameters: | 
  | 
|---|---|
| Returns: | Sum of npeaks gaussians  | 
Return a sum of gaussian functions defined by (area, centroid, fwhm), where:
- area is the area underneath the peak
 - centroid is the peak x-coordinate
 - fwhm is the full-width at half maximum
 
| Parameters: | 
  | 
|---|---|
| Returns: | Array of sum of gaussian functions at each x coordinate.  | 
Return a sum of ahypermet functions. defined by (area, position, fwhm, st_area_r, st_slope_r, lt_area_r, lt_slope_r, step_height_r).
- area is the area underneath the gaussian peak
 - position is the center of the various peaks and the position of the step down
 - fwhm is the full-width at half maximum of the terms
 - st_area_r is factor between the gaussian area and the area of the short tail term
 - st_slope_r is a ratio related to the slope of the short tail in the low x values (the lower, the steeper)
 - lt_area_r is ratio between the gaussian area and the area of the long tail term
 - lt_slope_r is a ratio related to the slope of the long tail in the low x values (the lower, the steeper)
 - step_height_r is the ratio between the height of the step down and the gaussian height
 
A hypermet function is a sum of four functions (terms):
- a gaussian term
 - a long tail term
 - a short tail term
 - a step down term
 
| Parameters: | 
  | 
|---|---|
| Returns: | Array of sum of hypermet functions at each x coordinate  | 
Return a sum of Lorentz distributions, also known as Cauchy distribution, defined by (area, centroid, fwhm).
- area is the area underneath the peak
 - centroid is the peak x-coordinate for both functions
 - fwhm is the full-width at half maximum
 
| Parameters: | 
  | 
|---|---|
| Returns: | Array of sum of Lorentz functions at each x coordinate  | 
Return a sum of pseudo-Voigt functions, defined by (area, centroid, fwhm, eta).
The pseudo-Voigt profile PV(x) is an approximation of the Voigt profile using a linear combination of a Gaussian curve G(x) and a Lorentzian curve L(x) instead of their convolution.
- area is the area underneath both G(x) and L(x)
 - centroid is the peak x-coordinate for both functions
 - fwhm is the full-width at half maximum of both functions
 - eta is the Lorentz factor: PV(x) = eta * L(x) + (1 - eta) * G(x)
 
| Parameters: | 
  | 
|---|---|
| Returns: | Array of sum of pseudo-Voigt functions at each x coordinate  | 
Return a sum of gaussian functions defined by (area, centroid, fwhm), where:
- area is the area underneath the peak
 - centroid is the peak x-coordinate
 - fwhm is the full-width at half maximum
 
This implementation differs from sum_agauss() by the usage of a lookup table with precalculated exponential values. This might speed up the computation for large numbers of individual gaussian functions.
| Parameters: | 
  | 
|---|---|
| Returns: | Array of sum of gaussian functions at each x coordinate.  | 
Return a sum of hypermet functions defined by (area, position, fwhm, st_area_r, st_slope_r, lt_area_r, lt_slope_r, step_height_r).
- area is the area underneath the gaussian peak
 - position is the center of the various peaks and the position of the step down
 - fwhm is the full-width at half maximum of the terms
 - st_area_r is factor between the gaussian area and the area of the short tail term
 - st_slope_r is a parameter related to the slope of the short tail in the low x values (the lower, the steeper)
 - lt_area_r is factor between the gaussian area and the area of the long tail term
 - lt_slope_r is a parameter related to the slope of the long tail in the low x values (the lower, the steeper)
 - step_height_r is the factor between the height of the step down and the gaussian height
 
A hypermet function is a sum of four functions (terms):
- a gaussian term
 - a long tail term
 - a short tail term
 - a step down term
 
This function differs from sum_ahypermet() by the use of a lookup table for calculating exponentials. This offers better performance when calculating many functions for large x arrays.
| Parameters: | 
  | 
|---|---|
| Returns: | Array of sum of hypermet functions at each x coordinate  | 
Return a sum of gaussian functions defined by (height, centroid, fwhm), where:
- height is the peak amplitude
 - centroid is the peak x-coordinate
 - fwhm is the full-width at half maximum
 
| Parameters: | 
  | 
|---|---|
| Returns: | Array of sum of gaussian functions at each x coordinate.  | 
Return a sum of Lorentz distributions, also known as Cauchy distribution, defined by (height, centroid, fwhm).
- height is the peak amplitude
 - centroid is the peak x-coordinate
 - fwhm is the full-width at half maximum
 
| Parameters: | 
  | 
|---|---|
| Returns: | Array of sum Lorentz functions at each x coordinate  | 
Return a sum of pseudo-Voigt functions, defined by (height, centroid, fwhm, eta).
The pseudo-Voigt profile PV(x) is an approximation of the Voigt profile using a linear combination of a Gaussian curve G(x) and a Lorentzian curve L(x) instead of their convolution.
- height is the peak amplitude of G(x) and L(x)
 - centroid is the peak x-coordinate for both functions
 - fwhm is the full-width at half maximum of both functions
 - eta is the Lorentz factor: PV(x) = eta * L(x) + (1 - eta) * G(x)
 
| Parameters: | 
  | 
|---|---|
| Returns: | Array of sum of pseudo-Voigt functions at each x coordinate  | 
Return a sum of slit functions. defined by (height, position, fwhm, beamfwhm).
- height is the slit’s amplitude
 - position is the center of the slit’s x-coordinate
 - fwhm is the full-width at half maximum of the slit
 - beamfwhm is the full-width at half maximum of the derivative, which is a measure of the sharpness of the edges of the slit
 
| Parameters: | 
  | 
|---|---|
| Returns: | Array of sum of slit functions at each x coordinate  | 
Return a sum of gaussian functions defined by (area, centroid, fwhm1, fwhm2), where:
- height is the peak amplitude
 - centroid is the peak x-coordinate
 - fwhm1 is the full-width at half maximum for the distribution when x < centroid
 - fwhm2 is the full-width at half maximum for the distribution when x > centroid
 
| Parameters: | 
  | 
|---|---|
| Returns: | Array of sum of split gaussian functions at each x coordinate  | 
Return a sum of split Lorentz distributions, defined by (height, centroid, fwhm1, fwhm2).
- height is the peak amplitude
 - centroid is the peak x-coordinate for both functions
 - fwhm1 is the full-width at half maximum for x < centroid
 - fwhm2 is the full-width at half maximum for x > centroid
 
| Parameters: | 
  | 
|---|---|
| Returns: | Array of sum of Lorentz functions at each x coordinate  | 
Return a sum of split pseudo-Voigt functions, defined by (height, centroid, fwhm1, fwhm2, eta).
The pseudo-Voigt profile PV(x) is an approximation of the Voigt profile using a linear combination of a Gaussian curve G(x) and a Lorentzian curve L(x) instead of their convolution.
- height is the peak amplitudefor G(x) and L(x)
 - centroid is the peak x-coordinate for both functions
 - fwhm1 is the full-width at half maximum of both functions when x < centroid
 - fwhm2 is the full-width at half maximum of both functions when x > centroid
 - eta is the Lorentz factor: PV(x) = eta * L(x) + (1 - eta) * G(x)
 
| Parameters: | 
  | 
|---|---|
| Returns: | Array of sum of split pseudo-Voigt functions at each x coordinate  | 
Return a sum of stepdown functions. defined by (height, centroid, fwhm).
- height is the step’s amplitude
 - centroid is the step’s x-coordinate
 - fwhm is the full-width at half maximum for the derivative, which is a measure of the sharpness of the step-down’s edge
 
| Parameters: | 
  | 
|---|---|
| Returns: | Array of sum of stepdown functions at each x coordinate  | 
Return a sum of stepup functions. defined by (height, centroid, fwhm).
- height is the step’s amplitude
 - centroid is the step’s x-coordinate
 - fwhm is the full-width at half maximum for the derivative, which is a measure of the sharpness of the step-up’s edge
 
| Parameters: | 
  | 
|---|---|
| Returns: | Array of sum of stepup functions at each x coordinate  |