-
Notifications
You must be signed in to change notification settings - Fork 8
Scans_fitting
Wiki > General Scripts > Scans > Fitting
There is a generalised fitting module in the scans library which can be applied to scans. Adding to the module is described for general in the user manual the following information is to help when augmenting the fitting library. At the time of written all fitting was coded in the fit module.
The fitting action is performed using the function returned by fit_plot_action
, the function has the x and y values, a plotting object and the last fit parameters handed to it; it should return the fit parameters if a fit was made.
The module uses inheritance to make more and more specific fitting. The current tree is:
-
Fit
PolyFit
ExactFit
PeakFit
CentreOfMassFit
-
CurveFit
GaussianFit
DampedOscillatorFit
ErfFit
TopHatFit
SlitScanFit
Curve fit uses the scipy
curve_fit
function for non-linear least squares to fit the _model
method of the current fit. To help it a guess of the initial parameters is supplied using the guess
function.