1

Beginning with noisy data vectors $\mathbf{x}$ and $\mathbf{y}$, I have binned the data to vectors $\mathbf{x}_b$ and $\mathbf{y}_b$ of length $N_b$ with fixed linear ($\mathbf{x}_b^i - \mathbf{x}_b^{i-1} = \delta$) or logarithmic spacing ($\mathbf{x}_b^i/ \mathbf{x}_b^{i-1} = \rho$). I would now like to calculate a fit using, eg scipy.optimize.curve_fit.

Prior to binning, the least-squares algorithm would look at all the points and values and would thus get decent weighting. However, now that I've destroyed that information, how can I produce good weighting/error factors for my data points?

I saw a very thorough answer for a one-dimensional problem on this site but I don't know how to derive the two dimensional versions of the formulas. The difference is that the spread of points on the x-axis and the y-axis both need to be combined into one error parameter.

mmdanziger
  • 111
  • 2

0 Answers0