pyinterp.RTree4DFloat64

Contents

pyinterp.RTree4DFloat64#

class pyinterp.RTree4DFloat64(self)#

Bases: object

Spatial index for 4D point data with per-observation error variance.

This is the indexing primitive feeding the Optimal Interpolation (OI / BLUE) estimator. The tree is purely Cartesian — no spheroid / geodetic conversion. Each indexed item carries an observed value and its measurement-error variance σ²_obs, which becomes the diagonal of the matrix R in (C_oo + R) w = c_og.

Compared to RTree3D, this tree does not provide inverse-distance-weighting, kriging, RBF or window-function methods. Use it for k-nearest-neighbour lookups in 4D space-time, or call its built-in optimal_interpolation method (the estimator behind pyinterp.OptimalInterpolation).

Parameters:

dtype – Data type for internal storage, either 'float32' or 'float64'. Defaults to 'float64'.

Initialize a fresh 4D Cartesian R-tree.

Public Methods

bounds(self)

Return the 4D bounding box of all stored observations, or None.

clear(self)

Remove all observations from the tree.

empty(self)

Check whether the tree is empty.

insert(self, coordinates[, shape, writable, ...])

Insert observations into the existing tree.

optimal_interpolation(self, coordinates[, ...])

Optimal Interpolation (BLUE) at many query points.

packing(self, coordinates[, shape, ...])

Bulk-load observations using STR packing.

query(self, coordinates[, shape, writable])

Query k-nearest neighbours for many points.

size(self)

Return the number of observations in the tree.

Special Methods

__getstate__(self)

Get the state for pickling.

__new__(*args, **kwargs)

__setstate__(self, state)

Set the state for unpickling.