RTree3DFloat64.radial_basis_function(self: pyinterp.core.RTree3DFloat64, coordinates: numpy.ndarray[numpy.float64], radius: Optional[float], k: int = 9, rbf: pyinterp.core.RadialBasisFunction = <RadialBasisFunction.Multiquadric: 4>, epsilon: Optional[float] = None, smooth: float = 0, within: bool = True, num_threads: int = 0) tuple

Interpolation of the value at the requested position by radial basis function interpolation.

  • coordinates (numpy.ndarray) – a matrix (n, 3) where n is the number of observations and 3 is the number of coordinates in order: longitude and latitude in degrees and altitude in meters. If the shape of the matrix is (n, 2) then the method considers the altitude constant and equal to zero.

  • radius (float, optional) – The maximum radius of the search (m). Default to the largest value that can be represented on a float.

  • k (int, optional) – The number of nearest neighbors to be used for calculating the interpolated value. Defaults to 9.

  • rbf (pyinterp.core.RadialBasisFunction, optional) – The radial basis function, based on the radius, r, given by the distance between points. Default to pyinterp.core.RadialBasisFunction.Multiquadric.

  • epsilon (float, optional) – Adjustable constant for gaussian or multiquadrics functions. Default to the average distance between nodes.

  • smooth (float, optional) – Values greater than zero increase the smoothness of the approximation.

  • within (bool, optional) – If true, the method ensures that the neighbors found are located around the point of interest. Defaults to true.

  • num_threads (int, optional) – The number of threads to use for the computation. If 0 all CPUs are used. If 1 is given, no parallel computing code is used at all, which is useful for debugging. Defaults to 0.


The interpolated value and the number of neighbors used for the calculation.

Return type