pyinterp.core.geodetic.RTree.radial_basis_function¶
- RTree.radial_basis_function(self: pyinterp.core.geodetic.RTree, lon: typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"], lat: typing.Annotated[numpy.typing.NDArray[numpy.float64], "[m, 1]"], radius: typing.SupportsFloat | None = None, k: typing.SupportsInt = 9, rbf: pyinterp.core.RadialBasisFunction = <RadialBasisFunction.Multiquadric: 4>, epsilon: typing.SupportsFloat | None = None, smooth: typing.SupportsFloat = 0, within: bool = True, num_threads: typing.SupportsInt = 0) tuple ¶
Interpolation of the value at the requested position by radial basis function interpolation.
- Parameters:
lon – The longitude of the points, in degrees, to be interpolated.
lat – The latitude of the points, in degrees, to be interpolated.
radius – The maximum radius of the search (m). Default to the
value (largest) – that can be represented on a float.
k – The number of nearest neighbors to be used for calculating the interpolated value. Defaults to
9
.rbf – The radial basis function, based on the radius, r, given by the distance between points. Default to
pyinterp.core.RadialBasisFunction.Multiquadric
.epsilon – Adjustable constant for gaussian or multiquadrics functions. Default to the average distance between nodes.
smooth – Values greater than zero increase the smoothness of the approximation.
within – If true, the method ensures that the neighbors found are located around the point of interest. Defaults to
true
.num_threads – 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
.
- Returns:
The interpolated value and the number of neighbors used for the calculation.