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_shapeis the shape of the grid and...is any number of batch dimensions.grid_shapemust 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], whereMis the number of non-uniform points,Nis the rank of the grid and...is any number of batch dimensions, which must be broadcastable with the batch dimensions ofsource.Nmust 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]forcomplex64types and[1e-14, 1e-01]forcomplex128types. 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 ofsourceandpoints.