specparam.modes.funcs.skewed_gaussian_function

specparam.modes.funcs.skewed_gaussian_function(xs, *params)[source]

Skewed gaussian fitting function.

Parameters:
xs1d array

Input x-axis values.

*paramsfloat

Parameters that define the skewed normal distribution function. Each skewed normal peak has 4 parameters: ctr, hgt, wid, skew.

Returns:
ys1d array

Output values for skewed normal distribution function.

Notes

Defines a skewed Gaussian fit function as:

\[P(F)_n = a * \frac{2}{w\sqrt{2\pi}} e^{-\frac{(F - c)^2} {2w^2}} * 0.5 * (1 + erf(s + \frac{F - c}{w\sqrt{2}})\]

where s is the skew factor, and erf is the error function.

This maps to conventional parameter definitions of a skewed normal distribution as:

  • \(\epsilon\) (location) is mapped to ctr (c)

  • \(\omega\) (scale) is mapped to wid (w)

  • \(\alpha\) (shape) is mapped to skew (s)