bartorch.linop.NUFFT

bartorch.linop.NUFFT#

class bartorch.linop.NUFFT(traj, image_shape, kspace_shape=None, weights=None, basis=None, toeplitz=True, oversampling=0.0, width=0.0)#

Non-uniform FFT from coil images to samples along a trajectory.

Parameters:
  • traj (tensor) – Trajectory of shape (..., samples, 3) in grid units, as bartorch.tools.traj() produces. Its third component being zero makes the transform two-dimensional.

  • image_shape (tuple of int) – Coil-image shape, C order, for instance (coils, y, x).

  • kspace_shape (tuple of int, optional) – Sample shape; by default the trajectory’s, with the coordinate axis replaced by the image’s coil axes.

  • weights (tensor, optional) – Diagonal in k-space, applied on the way out and conjugated on the way back.

  • basis (tensor, optional) – Subspace basis over frames and coefficients, contracting the image’s coefficients into k-space frames. The weights and the basis are part of the operator because its Toeplitz normal is built over both.

  • toeplitz (bool) – Apply the normal as a convolution with a point spread function.

  • oversampling (float) – Grid oversampling and kernel width; zero keeps the defaults.

  • width (float) – Grid oversampling and kernel width; zero keeps the defaults.

Examples

>>> A = NUFFT(traj, image_shape=(8, 128, 128))
>>> A.adjoint(kspace).shape
torch.Size([8, 128, 128])
__init__(traj, image_shape, kspace_shape=None, weights=None, basis=None, toeplitz=True, oversampling=0.0, width=0.0)#

Methods

A(x, **kwargs)

A x, under deepinv's name.

A_adjoint(y, **kwargs)

A^H y, under deepinv's name, recorded for autograd.

A_adjoint_A(x, **kwargs)

A^H A x, under deepinv's name, recorded for autograd.

A_dagger(y, **kwargs)

The pseudo-inverse, under deepinv's name.

__init__(traj, image_shape[, kspace_shape, ...])

adjoint(y[, out])

A^H y, without recording for autograd.

cogram()

A A^H as an operator.

conj()

conj(A): conjugate the input, apply, conjugate the output.

forward(x[, out])

A x, without recording for autograd.

gram()

A^H A as an operator.

normal(x[, out])

A^H A x.

opnorm()

The spectral norm, by BART's power iteration on A^H A.

pinv(y[, damp])

(A^H A + damp I)^-1 A^H y, the damped least-squares solution.

to_nonlinear()

The same operator as a NonlinearOperator.

Attributes

H

A^H, from BART's own adjoint constructor.

T

A^T, the adjoint without the conjugation, as conj(A).H.

codim_rank

How many axes the codomain has.

codim_shape

The codomain, under pyxu's name for it; the same as oshape.

codim_size

How many elements the codomain holds.

device

dim_rank

How many axes the domain has.

dim_shape

The domain, under pyxu's name for it; the same as ishape.

dim_size

How many elements the domain holds.

ishape

oshape