linear_equation

sofia_redux.toolkit.fitting.polynomial.linear_equation(design_matrix, values, error=None, mask=None)[source]

Create a system of linear equations

Parameters:
design_matrixnumpy.ndarray

(n_equations, n_sets, n_samples) or (n_sets, n_samples) of float.

valuesnumpy.ndarray

(n_parameters, n_samples) of float

errornumpy.ndarray, optional

(n_samples,) or () of float

masknumpy.ndarray, optional

(n_samples,) of bool

Returns:
alpha, betanumpy.ndarray, numpy.ndarray

A system of equations necessary to solve Ax=B where alpha (A) is of shape (coeffs, coeffs), beta (B) is of shape (coeffs,).