gaussian_random_field.grf_module.spde_mesh

SPDE mesh for use with the GRF module.

Classes

SpdeMesh(mesh_name[, prior_sigma_1, ...])

SPDE mesh for use with the GRF module.

class SpdeMesh(mesh_name: str, prior_sigma_1: float = 1.0, prior_sigma_2: float = 0.01)

Bases: object

SPDE mesh for use with the GRF module.

covers(x: ndarray, y: ndarray) → ndarray

Which of the given positions fall on the mesh.

A position off the mesh cannot be projected onto any triangle, which gives an all-zero row in the projector matrix and makes INLA refuse the fit. Positions exactly on a triangle edge do project, so the boundary counts as covered.

Parameters:
  • x (np.ndarray) – Eastings, in the mesh’s own coordinate reference system.

  • y (np.ndarray) – Northings, in the mesh’s own coordinate reference system.

Returns:

Boolean, true where the position falls on the mesh.

Return type:

np.ndarray

property footprint: Geometry

The area the mesh covers, as a single polygon.

Returns:

The union of the mesh triangles.

Return type:

shapely.Geometry

meshes_path = PosixPath('/app/src/gaussian_random_field/grf_module/meshes')