Spot Analyse
A collection of useful functions for spot analysis.
- fredtools.fitSpotProfile(pos, vec, cutLevel=0, fixAmplitude=False, fixCentreToZero=False, method='singleGauss')
Fit a gaussian-like function to profile.
The function fits a gaussian-like function defined by method to a profile defined as pos and vec parameters, where they are vectors of positions and values, respectively.
- Parameters:
pos (array_like 1xN) – An iterable with the positions of the values.
vec (array_like 1xN) – An iterable with the values correcponding to pos.
cutLevel (scalar, optional) – Fraction of the maximum value of vec for which the fit will be performed.
fixAmplitude (bool, optional) – Fix the amplitude to the maximum value of vec and do not use it in the fitting. (def. False)
fixCentreToZero (bool, optional) – Fix the centre to zero and do not use it in the fitting. (def. False)
method ({"singleGauss"}, optional) – Method of the fitting. Only single gaussian fitting is implemented now. (def. “singleGauss”)
- Returns:
An instance of lmfit.model.ModelResult class.
- Return type:
lmfit.model.ModelResult