0

I need to use scipy.optimize.curve_fit to fit a curve to experimental data and extract the parameters. My data has both x and y uncertainties.

The documentation explains how to include the y-uncertainties as follows:

sigma : None or M-length sequence, optional If not None, the uncertainties in the ydata array. These are used as weights in the least-squares problem i.e. minimising np.sum( ((f(xdata, *popt) - ydata) / sigma)**2 ) If None, the uncertainties are assumed to be 1.

However it is not clear how I should include the x uncertainties. Please explain how I could do this?

Anna
  • 53
  • 1
  • 5

0 Answers0