tfft.spread
tfft.spread¶
- spread(source, points, grid_shape, tol=1e-06, name=None)¶
Spread an arbitrary set of points into a regular grid.
This function can be used to perform the spreading step of the NUFFT, without the FFT or the deconvolution.
See also
tfft.nufft,tfft.interp.- Parameters
source – A
Tensor. Must be one of the following types:complex64,complex128. The source point set. Must have shape[..., M], whereMis the number of non-uniform points and...is any number of batch dimensions.points – A
Tensor. Must be one of the following types:float32,float64. The source 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].grid_shape – A
Tensor. Must be one of the following types:int32,int64. The shape of the output grid.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 grid. Has shape[...] + grid_shape, where the batch shape...is the result of broadcasting the batch shapes ofsourceandpoints.