pyacs.glinalg.solve package

Submodules

pyacs.glinalg.solve.ls module

pyacs.glinalg.solve.ls.ls(G, d, verbose=False)[source]

Solve the least-squares (LS) problem m so that (Gm-d).T (Gm-d) is minimum.

Parameters
  • G – m x n model matrix as 2D numpy array

  • d – m 1D numpy observation vector

  • verbose – verbose mode

Returns

x,chi2: m (1D numpy array of dim m), chi2 (chi-square)

Note

solved through numpy.linalg.lstsq

pyacs.glinalg.solve.lscov module

pyacs.glinalg.solve.lscov.lscov(G, d, cov, method='chol')[source]

Solve the least-squares (LS) problem with data covariance

Parameters
  • G – m x n model matrix as 2D numpy array

  • d – m 1D numpy observation vector

  • cov – covariance matrix for d

pyacs.glinalg.solve.lsw module

pyacs.glinalg.solve.lsw.lsw(G, d, std)[source]

Solve the least-squares (LS) with data uncertainties provided as a vector

Parameters
  • G – m x n model matrix as 2D numpy array

  • d – m 1D numpy observation vector

  • std – standard deviation vector for d

Note

the system is modified to be solved by ordinary LS by the change G<- (G.T/std).T and d<- d/std

Module contents