Linearity of quadratic fits.

When !335 (merged) is merged the quadratic curve fit is a nonlinear fit using scipy.optimise.curvefit. Switching to np.polyfit and np.polyval would be linear and more numerically stable.