linop.WaveSense

Contents

linop.WaveSense#

bartorch.linop.WaveSense()#

Wave-CAIPI encoding operator.

The chain BART’s wave builds (src/wave.c):

Sampling . FFT(phase encodes) . Diagonal(psf) . FFT(readout) . Resize . Coils

The point spread function is given as psf, or generated from a sine wave along y and, in 3D, a cosine wave along z, as BART’s wavepsf. With a temporal basis this is Wave-Shuffling. Everything after the sensitivities runs in the coil-slab loop.

Parameters:
  • sensitivities (tensor) – Coil sensitivities ([batch, sets,] coils, [z,] y, x), or k-space kernels with kernels=True.

  • image_shape (tuple of int) – (*batches, [batch,] [sets,] [coeffs,] [z,] y, x), before readout oversampling. The samples are (*batches, [batch,] coils, [frames,] [z,] y, readout).

  • readout (int) – Oversampled readout length (BART’s wx), at least x.

  • pattern (tensor, default=None) – Binary sampling mask broadcast over one coil’s samples ([frames,] [z,] y, readout).

  • centred (bool, default=False) – Centred, unitary transforms. False matches BART’s wave (uncentred, unnormalized); wshfl centres them.

  • psf (tensor, default=None) – Point spread function broadcast over ([z,] y, readout), the same for every frame; see wave_psf(). Exclusive with the wave parameters below.

  • max_grad (float, default=None) – Maximum gradient amplitude, G/cm.

  • max_slew (float, default=None) – Maximum slew rate, G/cm/s. The wave amplitude is the largest both limits allow.

  • cycles (int, default=None) – Sine cycles over the readout.

  • adc (float, default=None) – Readout duration in ms, on a 10 µs gradient raster.

  • resolution (float or tuple of float, default=None) – Voxel size along the phase encodes in cm, one value or (z, y).

  • offset (float or tuple of float, default=0.0) – Distance of the field-of-view centre from isocentre along the phase encodes in cm, one value or (z, y).

  • delay (float or tuple of float, default=0.0) – Gradient delay of each wave in ms, one value or (z, y).

  • scale (float or tuple of float, default=1.0) – Gradient amplitude relative to nominal, one value or (z, y).

  • positions (tensor, default=None) – Alternative to pattern, as for CartesianSense(): ([frames,] shots, d). The samples are then (*batches, [batch,] coils, [frames,] shots, readout).

  • basis (tensor, default=None) – Temporal subspace basis (coeffs, frames).

  • toeplitz (bool, default=True) – Apply the normal as one coefficient-by-coefficient kernel between the phase-encode transforms, with the point spread function on either side. A pattern varying along the readout keeps the forward and adjoint applications.

  • kernels (bool, default=False) – Read sensitivities as k-space kernels.

  • coil_batch (int, default=1) – Coils per slab; 0 applies all coils at once.

  • device (torch.device or str, default=None) – Device the operator is built and computes on.

  • ndim (int, default=None) – Number of spatial axes (2 or 3) where the sensitivities and the image do not determine it, as for a bank of four kernel axes.

Return type:

LinearOperator

Raises:

ValueError – When neither psf nor all of max_grad, max_slew, cycles, adc and resolution are given, when both are, when both pattern and positions are, or when readout < x.

Examples

>>> A = WaveSense(maps, (z, y, x), readout=3 * x, pattern=mask,
...               max_grad=2.7, max_slew=18700.0, cycles=5, adc=5.0688,
...               resolution=(0.1, 0.1))
>>> A.oshape
(coils, z, y, 3 * x)