ewoksndreg.math.fit1d.linfit#

ewoksndreg.math.fit1d.linfit(x, y, errors=False, vare=None)[source]#

Linear fit

\[ \begin{align}\begin{aligned}y = m.x + b + e\\E(e) = 0\end{aligned}\end{align} \]
Args:

x(array): (m) y(array): (m) errors(Optional(bool)): return solution with estimated error vare(array): variance on e (m)

Returns:

sol(array): solution (m,b) stdsol(array): optional errors (2-tuple)