expfit: fit exponential function to data

tesfdmtools.methods.expfit.expfit(x, y, yerr=None, debug=False)[source]

fit exponential function y=a*exp(b*x)+c

Args:
  • x = x values

  • y = y values to be fitted

Kwargs:
  • yerr = sigma errors of the y-values

  • debug = when True, print/plot debug information when fit does not converge

Returns:
  • p = fitted parameter values for the function y=p[0]*exp(p[1]*x)+p[2]

  • yfit = fitted function values