slmsuite.misc.fitfunctions.gaussian
- gaussian(x, x0, a, c, w)[source]
For fitting a 1D Gaussian.
\[y(x) = c + a \exp \left[\frac{(x-x_0)^2}{2w^2}\right].\]- Parameters
x (numpy.ndarray) – Points to fit upon.
x0 (float) – Positional offset.
a (float) – Amplitude.
c (float) – constant offset.
w (float) – The standard deviation of the normal distribution. Equivalent to the \(1/e\) radius. This is related to the full width at half maximum (FWHM) by a factor of \(2\sqrt{2\ln{2}}\).
- Returns
y – Gaussian fit evaluated at all
x
.- Return type
numpy.ndarray