Skip to main content

Module scattered

Module scattered 

Source
Expand description

Interpolation of scattered 2-D data on a Delaunay triangulation, following scipy.interpolate: piecewise linear (LinearNDInterpolator), the C¹ Clough-Tocher scheme with globally estimated gradients (CloughTocher2DInterpolator), nearest neighbour (NearestNDInterpolator, any dimension) and the griddata front end.

See the book entry Piecewise polynomials, Hermite data and scattered interpolation.

Structs§

CloughTocher2DInterpolator
The C¹ piecewise-cubic Clough-Tocher interpolant (SciPy’s CloughTocher2DInterpolator): each triangle is split at its centroid into three cubic Bézier patches, fixed by the values and gradients at the vertices and by requiring the cross-boundary derivative to be linear along each edge.
LinearNDInterpolator
Piecewise-linear interpolation on the Delaunay triangulation (SciPy’s LinearNDInterpolator in 2-D): barycentric weights of the containing triangle.
NearestNDInterpolator
Nearest-neighbour interpolation in any dimension (SciPy’s NearestNDInterpolator); ties go to the first point.
TriangulationIndex
A Delaunay triangulation with neighbour links and a bucket grid for point location.

Enums§

GriddataMethod
The method of griddata.

Functions§

estimate_gradients_2d_global
Gradient estimates at the vertices that minimise the integrated squared second derivative of the Clough-Tocher interpolant along every edge (Nielson’s global method, SciPy’s estimate_gradients_2d_global). Each vertex’s 2 × 2 local problem is solved in turn with the current estimates at its neighbours (Gauss-Seidel), until the largest change is below tol (relative to the gradient, or absolute when it is below 1) or after max_iterations sweeps.
griddata
Interpolates scattered 2-D data at the query points (SciPy’s griddata): nearest neighbour, piecewise linear or Clough-Tocher; outside the convex hull the linear and cubic methods return NaN.