localization_matrix#

dageo.utils.localization_matrix(covariance, data_positions, shape, cov_type='lower')[source]#

Return a localization matrix

Build a localization matrix from a full covariance matrix based on specific data positions.

Parameters:
covariancendarray

The lower triangular covariance matrix (nx*ny, nx*ny).

data_positionsndarray

Positions in the grid for each data point (e.g., wells), zero-indexed, of size (nd, 2).

shapetuple

Dimensions of the grid (nx, ny).

cov_type{‘lower’, ‘upper’, ‘full’}; default: ‘lower’

Matrix type of the provided covariance matrix.

Returns:
loc_matrixndarray

Localization matrix of shape (nx, ny, nd).