cortex.polyutils.Surface.interp

Surface.interp(verts, vals)[source]

Interpolates a function between N knot points verts with the values vals. vals can be a D x N array to interpolate multiple functions with the same knot points.

Using this function directly is unnecessarily expensive if you want to interpolate many different values between the same knot points. Instead, you should directly create an interpolator function using _create_interp, and then call that function. In fact, that’s exactly what this function does.

See create_biharmonic_solver for math details.

Parameters:
verts1D array-like of ints

Indices of vertices that will serve as knot points for interpolation.

vals2D ndarray, shape (dimensions, len(verts))

Values at the knot points. Can be multidimensional.

Returns:
tphi2D ndarray, shape (total_verts, dimensions)

Interpolated value at every vertex on the surface.