linop.NUFFT#
- class bartorch.linop.NUFFT#
Bases:
LinearOperatorNon-uniform FFT from images to samples along a trajectory.
Type-2 transform with a negative exponent, scaled by one over the square root of the number of voxels, as BART’s
nufft; computed by FINUFFT (cuFINUFFT on a card) through BART’snufft_create.- Parameters:
traj (tensor) – Trajectory
(*encoding, shots, samples, ndim)in grid units (kx, ky[, kz]), asbartorch.tools.traj()returns. Akzthat is zero everywhere makes the transform two-dimensional. The encoding axes are any further axes the samples vary along (frames, echoes, cardiac phases).image_shape (tuple of int) – Image shape
(*batches, *encoding, [z,] y, x). Leading batch axes (coils, slices) are transformed independently.kspace_shape (tuple of int, default=None) – Sample shape, which must be
(*batches, *encoding, shots, samples);Nonetakes it.weights (tensor, default=None) – k-space weighting, broadcast over
(*encoding, shots, samples); applied on the forward and conjugated on the adjoint.basis (tensor, default=None) – Temporal subspace basis
(coeffs, frames)over the last encoding axis, which has lengthcoeffsin the image andframesin k-space.toeplitz (bool, default=True) – Apply the normal as a convolution with a point spread function rather than as the forward and adjoint transforms. The point spread function includes
weightsandbasis.oversampling (float, default=0.0) – Upsampling factor of FINUFFT’s fine grid, BART’s
-o; 0 takes the library setting (1.25 by default). On a card only 2 and 1.25 are accepted.width (float, default=0.0) – Spreading-kernel width in fine-grid points, BART’s
-w, converted to the FINUFFT tolerance that gives it and clamped at single precision; 0 keeps the library tolerance.
- Raises:
ValueError – When the trajectory, image, sample shape, weights or basis are inconsistent.
Examples
>>> A = NUFFT(traj, image_shape=(8, 128, 128)) >>> A.adjoint(kspace).shape torch.Size([8, 128, 128])
Also has the methods and properties of LinearOperator.