API, list of functions

kronlininv.blockpostcov[source]

Compute a block of the posterior covariance defined by the min/max indices astart/aend (rows), bstart/bend (columns).

Parameters
  • factkli – (named tuple): a set of arrays computed with the function calcfactors()

  • astart,aend (integers) – the first and last row of the posterior covariance to be computed

  • bstart,bend (integers) – the first and last column of the posterior covariance to be computed

Returns

a block of the posterior covariance

Return type

ndarray

kronlininv.calcfactors(G1, G2, G3, Cm1, Cm2, Cm3, Cd1, Cd2, Cd3)[source]

Compute the factors required to solve the inverse problem. These factors are the ones to be stored to compute the posterior covariance or mean.

Parameters
  • G1,G2,G3 (ndarrays) – the three forward model matrices

  • Cm1,Cm2,Cm3 (ndarrays) – the three covariance matrices related to the model parameters

  • Cd1,Cd2,Cd3 (ndarrays) – the three covariance matrices related to the observed data

Returns

a set of arrays required to subsequently calculate the posterior mean or covariance

Return type

named tuple

kronlininv.posteriormean[source]

Compute the posterior mean model.

Parameters
  • factkli (named tuple) – a set of arrays computed with the function calcfactors()

  • G1,G2,G3 (ndarrays) – the three forward model matrices

  • mprior (ndarray, 1D) – the prior model

  • dobs (ndarray, 1D) – the observed data

Returns

the posterior mean model

Return type

ndarray, 1D