BGlib.be.analysis.utils.be_loop.fit_loop

BGlib.be.analysis.utils.be_loop.fit_loop(vdc_shifted, pr_shifted, guess)[source]

Given a single unfolded loop returns the results of the least squares fitting

Parameters:
  • vdc_shifted (1D numpy array) – DC voltage values shifted by one quarter, as this is requirement for the fit

  • pr_shifted (1D numpy array) – unfolded loop shifted by one quarter, as this is requirement for the fit

  • guess (1D numpy array) – 9 parameters for the fit guess

Returns:

  • plsq (least squares fit structure) – Contains fit results, fit parameters, covariance, etc.

  • criterion_values (tuple) – (AIC (loop fit), BIC(loop fit), AIC(line fit), BIC(line fit)) AIC and BIC values for loop and line fits

  • pr_fit_vec (1D list or numpy array) – fit result values, ie. evaluation of f(V).