pyacs.lib.glinalg

Linear algebra for Geodesy problems.

corr_to_cov

Convert correlation matrix and standard deviations to covariance matrix.

cov_to_corr

Convert covariance matrix to correlation and standard deviations.

cov_to_invcov

Return the inverse of a covariance matrix.

dot

Matrix/matrix, matrix/vector, or vector/vector multiplication (BLAS).

dot_and_sum

Compute weighted sum of arrays (matrix-by-scalar product then sum).

extract_block_diag

Extract block diagonal from a 2D array.

ls

Solve the least-squares problem min |Gx - d|**2.

lscov

Solve least-squares with data covariance matrix.

lscov_full

Solve least-squares with data covariance and return posterior covariance.

lsw

Solve weighted least-squares with data standard deviations.

lsw_full

Solve weighted least-squares and return solution and posterior covariance.

make_normal_system

Form the normal system for A x = d with data covariance Cd.

make_normal_system_tarantola

Form the Tarantola-style normal system (with prior).

matrix_from_pattern

Build a block matrix from a pattern scaled by a structure matrix.

odot

Scale block rows of G by vector a (element-wise then reshape).

repeat_matrix_in_col

Repeat a matrix vertically n times (stack n copies).

syminv

Invert a symmetric positive-definite matrix.

symmetrize

Form a symmetric matrix from the upper or lower triangle.

sympinv

Pseudo-inverse of a positive semi-definite symmetric matrix.