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], where M is 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], 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].

  • grid_shape – A Tensor. Must be one of the following types: int32, int64. The shape of the output grid.

  • 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 grid. Has shape [...] + grid_shape, where the batch shape ... is the result of broadcasting the batch shapes of source and points.