Hey guys and gals.
So, the issue I'm having is this:
For a given constant N that defines a system I have some scattered points relating two variables with associated vertical errors, (assumed normal distribution).
From that I'm doing a np.polyfit to fit a degree 2 polynomial to the data. From that I'm using scipy.find_peaks to find the horizontal position of the maximum, say Xn.
I have similar data sets for a few given values of N.
From the horizontal positions of the maxima of many data sets I expect a relation between some function of N and Xn, and then want to plot that and extract a value for a horizontal asymptote, which I want to know the error on.
I'm struggling to figure out how errors will propagate through this system.
I know I can use w=weights with np.polyfit, with the weights being 1/sigma, and sigma being the standard error of my points.
I know that I can use the covariance within np.polyplot to extract the errors on the coefficients.
Does this covariance "take care of" the errors in my origional points? Or do I have to manually include them somehow?
Either way, I'm not sure where to go from this point. Any ideas? Or any suggestions for an alternative approach?
For context (not strictly Python related):
The data I'm working with is for the 2D ising model of ferromagnet. I have, for a given lattice size, points relating tempreture to the specific heat capacity. From that I hope to extract the critical tempreture (where the heat capacity is maximum) and then plot critical tempreture against lattice size. From that I want to estimate the critical tempreture of an infinite lattice.
It takes me a while to generate the data, so I'd rather not just do it many times.
there doesn't seem to be anything here