fit_polynomial_with_scatter¶
- ell1fit.spin_stats.fit_polynomial_with_scatter(x, y, err, degree=1)[source]¶
Weighted polynomial fit with an intrinsic scatter
sadded toerrin quadrature.sis the smallest value that makes chi-squared equal the number of degrees of freedom, or 0 if the data already scatter less than their errors. A degree-0 fit is a weighted mean.- Parameters:
- x, y, errarray-like
Abscissae, values and 1-sigma errors.
xshould be centred near 0 for a well-conditioned fit at higher degree.- degreeint
- Returns:
- ScatterFit