tfft.interp
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
, wheregrid_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]
, whereM
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 ofsource
.N
must be 1, 2 or 3 and must be equal to the rank ofgrid_shape
. The non-uniform coordinates must be in units of radians/pixel, i.e., in the range[-pi, pi]
.tol – An optional
float
. Defaults to1e-06
. The desired relative precision. Should be in the range[1e-06, 1e-01]
forcomplex64
types and[1e-14, 1e-01]
forcomplex128
types. The computation may take longer for smaller values oftol
.name – A name for the operation (optional).
- Returns
A
Tensor
. Has the same type assource
. The target point set. Has shape[..., M]
, where the batch shape...
is the result of broadcasting the batch shapes ofsource
andpoints
.