gaussfit: fit gauss function to data¶
-
tesfdmtools.methods.gaussfit.
gauss
(p, x)[source]¶ Compute Gauss function
- Args:
- p = Gauss parameters a*exp(-(x-b)**2/(2*c**2))
p[0] = a - scaling
p[1] = b - position
p[2] = c - sigma width
x = x-axis values
- Returns:
y = function values
-
tesfdmtools.methods.gaussfit.
gaussfit
(x, y)[source]¶ Fit Gauss function to data. use Chi-square statistics fit
- Args:
x = x-axis values
y = data values to be fitted
- Returns:
- p = list of fitted gauss parameters
p[0] = a - scaling
p[1] = b - position
p[2] = c - sigma width
- perr = list of error values for the fitted parameters
perr[0] = a - scaling error
perr[1] = b - position error
perr[2] = c - sigma width error
fit = fitted function values