PyDDM.ddm_calc.execute_ScipyCurveFit_fit
PyDDM.ddm_calc.execute_ScipyCurveFit_fit¶
-
execute_ScipyCurveFit_fit
(dData, times, param_dict, sigma=None, debug=True, method=None)¶ Performs curve_fit fit.
Using the scipy.optimize.curve_fit function, the data is fit to model specified within the parameter param_dict. 1
- Parameters
dData (array) – Array containing the DDM data to fit for. This will be either the DDM matrix or the ISF. This should be a 2D array; the first dimension corresponds to the lag times, the second dimension corresponds to the wavevectors.
times (array_like) – 1D array of the lagtimes
param_dict (dict) – Dictionary corresponding to the model we will fit to. This dictionary contains the parameters, the initial guess for their values, their bounds, and the function of the model to fit to. See the module
PyDDM.fit_parameters_dictionaries
sigma ({None}, optional) – Passed as sigma parameter to scipy.optimize.curve_fit
debug ({True}, optional) – If True, will print out values of initial guesses and bounds (and other info).
method ({None}, optional) – Passed as method to scipy.optimize.curve_fit. Can be lm, trf, or dogbox.
- Returns
lsqr_params (array) – Values found for the parameters.
theory (array) – Model evaluated using values of the best fit parameters.
error (array) – Error of parameters
References