linop.FieldCorrected

Contents

linop.FieldCorrected#

bartorch.linop.FieldCorrected()#

Off-resonance-corrected encoding operator, by time segmentation.

A voxel off resonance by \(f\) accrues phase \(e^{+i 2 \pi f t}\) at sample time \(t\). Time segmentation approximates the exact operator by

\[A = \sum_{l=1}^{L} \operatorname{diag}(b_l) \, E \, \operatorname{diag}(c_l)\]

for any encoding \(E\) (CartesianSense(), WaveSense(), NoncartesianSense); the non-Cartesian case is mirtorch’s Gmri. The coefficients are fitted by mri-nufft.

Parameters:
  • encoding (LinearOperator) – Encoding without off-resonance.

  • field_map (tensor, default=None) – Off-resonance in Hz, broadcastable to the encoding’s domain.

  • readout_time (tensor, default=None) – Sample times in s, broadcastable to the encoding’s codomain.

  • mask (tensor, default=None) – Support of the field map; the fit weights the field-map histogram by it. None is everywhere.

  • segments (int, default=-1) – Number of terms \(L\); -1 lets mri-nufft choose from the field-map range and the readout length.

  • method ({"svd", "mti", "mfi"}, default='svd') – mri-nufft factorization.

  • coefficients (tuple of tensor, default=None) – Precomputed (b, c) of shapes (L, *codomain) and (L, *domain), up to broadcasting; replaces the fit, and field_map and readout_time are not needed.

Return type:

LinearOperator

Raises:

ValueError – When neither coefficients nor both field_map and readout_time are given, when b and c differ in term count, or when the field map has a single value under the mask.

Notes

Over a NoncartesianSense without basis, sets or encoding axes, with sample weights varying along the shots and the readout only, the sum is lowered to one operator: the spatial weights expand the image to one image per segment, the sample weights act as a basis over the samples, and the normal is a Toeplitz convolution per pair of segments.

Over CartesianSense() with a pattern or a basis, and over WaveSense(), the segments are applied around each slab’s transform in the coil-slab loop, and the normal is the forward and adjoint applications.

Otherwise, or when the weights vary along the batches, coils, sets or coefficients, the result is BART’s sum of chains, and plan.contraction is "chained".

Examples

>>> E = CartesianSense(maps, (y, x), pattern=mask)
>>> A = FieldCorrected(E, b0_hz, readout_time=times, segments=6)