tfft.interp

interp(source, points, tol=1e-06, name=None)

Interpolate a regular grid at an arbitrary set of points.

This function can be used to perform the interpolation step of the NUFFT, without the FFT or the deconvolution.

See also tfft.nufft, tfft.spread.

Parameters
  • source – A Tensor. Must be one of the following types: complex64, complex128. The source grid. Must have shape [...] + grid_shape, where grid_shape is the shape of the grid and ... is any number of batch dimensions. grid_shape must have rank 1, 2 or 3.

  • points – A Tensor. Must be one of the following types: float32, float64. The target non-uniform point coordinates. Must have shape [..., M, N], where M is the number of non-uniform points, N is the rank of the grid and ... is any number of batch dimensions, which must be broadcastable with the batch dimensions of source. N must be 1, 2 or 3 and must be equal to the rank of grid_shape. The non-uniform coordinates must be in units of radians/pixel, i.e., in the range [-pi, pi].

  • tol – An optional float. Defaults to 1e-06. The desired relative precision. Should be in the range [1e-06, 1e-01] for complex64 types and [1e-14, 1e-01] for complex128 types. The computation may take longer for smaller values of tol.

  • name – A name for the operation (optional).

Returns

A Tensor. Has the same type as source. The target point set. Has shape [..., M], where the batch shape ... is the result of broadcasting the batch shapes of source and points.