tfft.nufft
tfft.nufft¶
- nufft(source, points, grid_shape=None, transform_type='type_2', fft_direction='forward', tol=1e-06, options=None)¶
Computes the non-uniform discrete Fourier transform via NUFFT.
Evaluates the type-1 or type-2 non-uniform discrete Fourier transform (NUDFT) via the non-uniform fast Fourier transform (NUFFT) algorithm. Supports 1D, 2D and 3D transforms.
- Parameters
source – A
tf.Tensorof typecomplex64orcomplex128. The source grid, for type-2 transforms, or the source point set, for type-1 transforms. Iftransform_typeis"type_2",sourcemust 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. Iftransform_typeis"type_1",sourcemust have shape[..., M], whereMis the number of non-uniform points and...is any number of batch dimensions.points – A
tf.Tensorof typefloat32orfloat64.float64. The target non-uniform point coordinates, for type-2 transforms, or the source non-uniform point coordinates, for type-1 transforms. 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 1D
tf.Tensorof typeint32orint64. The shape of the output grid. This argument is required for type-1 transforms and ignored for type-2 transforms.transform_type – An optional
strfrom"type_1","type_2". The type of the transform. A"type_2"transform evaluates the DFT on a set of arbitrary points given points on a grid (uniform to non-uniform). A"type_1"transform evaluates the DFT on grid points given a set of arbitrary points (non-uniform to uniform).fft_direction – An optional
strfrom"forward","backward". Defines the sign of the exponent in the formula of the Fourier transform. A"forward"transform has negative sign and a"backward"transform has positive sign.tol – An optional
float. 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. Defaults to1e-06.options – A
tfft.Optionsstructure specifying advanced options. These options may affect the internal details of the computation, but do not change the result (beyond the precision specified bytol). You might be able to optimize performance or memory usage by tweaking these options. Seetfft.Optionsfor details.
- Returns
A
tf.Tensorof the same type assource. The target point set, for type-2 transforms, or the target grid, for type-1 transforms. Iftransform_typeis"type_2", the output has shape[..., M], where the batch shape...is the result of broadcasting the batch shapes ofsourceandpoints. Iftransform_typeis"type_1", the output has shape[...] + grid_shape, where the batch shape...is the result of broadcasting the batch shapes ofsourceandpoints.
References
Barnett, A.H., Magland, J. and Klinteberg, L. af (2019), A parallel nonuniform fast Fourier transform library based on an “exponential of semicircle” kernel. SIAM J. Sci. Comput., 41(5): C479-C504. https://doi.org/10.1137/18M120885X
Shih Y., Wright G., Anden J., Blaschke J. and Barnett A.H. (2021), cuFINUFFT: a load-balanced GPU library for general-purpose nonuniform FFTs. 2021 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW), 688-697 https://doi.org/10.1109/IPDPSW52791.2021.00105