pyinterp.RTree4DFloat32.optimal_interpolation

pyinterp.RTree4DFloat32.optimal_interpolation#

RTree4DFloat32.optimal_interpolation(self, coordinates: numpy.ndarray[dtype=float32, shape=(*, *), writable=False], lx: numpy.ndarray[dtype=float32, shape=(*), writable=False], ly: numpy.ndarray[dtype=float32, shape=(*), writable=False], lz: numpy.ndarray[dtype=float32, shape=(*), writable=False], lt: numpy.ndarray[dtype=float32, shape=(*), writable=False], sigma: numpy.ndarray[dtype=float32, shape=(*), writable=False], config: pyinterp.core.config.rtree.OptimalInterpolation | None = None) tuple[numpy.ndarray[dtype=float32, shape=(*), order='C'], numpy.ndarray[dtype=float32, shape=(*), order='C'], numpy.ndarray[dtype=uint32, shape=(*), order='C']]#

Optimal Interpolation (BLUE) at many query points.

For each query point this method retrieves up to config.k() neighbours from the 4D tree, builds the anisotropic covariance system with per-query length scales and field standard deviation, solves it via Cholesky (LDLT fallback) and returns the analysed value, the formal error standard deviation, and the number of neighbours actually used.

Parameters:
  • coordinates – Query points, shape (m, 4).

  • lx – Decorrelation length along axis 0, shape (m,).

  • ly – Decorrelation length along axis 1, shape (m,).

  • lz – Decorrelation length along axis 2, shape (m,).

  • lt – Decorrelation length along axis 3, shape (m,).

  • sigma – Field standard deviation, shape (m,).

  • config – Optional config.rtree.OptimalInterpolation instance (covariance_model, k, radius, num_threads).

Returns:

Tuple (values, errors, neighbors) of shape (m,) — analysed value, formal error standard deviation, and neighbour count. Cells with no neighbour return NaN / 0.