tools.SpiralTransfer#

class bartorch.tools.SpiralTransfer#

Bases:

Low-rank factorization of the off-resonance transfer of a spiral readout.

\[e^{-2\pi i f t(k)} \approx \sum_m a_m(f)\, h_m(k)\]

with \(t(k)\) the readout time at which \(k\) is sampled. The field map enters only through the per-voxel weights \(a_m(f)\), and each term is one k-space multiply of the image by \(h_m\). Two bases are available:

  • multifrequency interpolation (MFI) [1], with demodulation frequencies \(f_m\): \(h_m(k) = e^{-2\pi i f_m t(k)}\), the image demodulated at \(f_m\);

  • a separable basis, with complex rates \(\alpha_m\): \(h_m(k) = e^{\alpha_m |k|^2 / k_{max}^2}\), a product over the axes, so that each term is also a separable convolution of the image.

As \(|k|\) is invariant under rotation, one factorization serves every interleaf of a rotated 2D spiral or 3D spiral-projection acquisition.

Parameters:
  • rates (numpy.ndarray or None) – Complex rates \(\alpha_m\) of the separable basis, (terms,); None for MFI.

  • weights (numpy.ndarray) – Weights \(a_m(f)\) at the tabulated frequencies, (terms, frequencies).

  • frequencies (numpy.ndarray) – Uniformly spaced off-resonance frequencies, in Hz; a frequency outside them is clamped to the nearest end.

  • demodulation (numpy.ndarray, default=None) – MFI demodulation frequencies \(f_m\), in Hz, (terms,).

  • timing (ReadoutTiming, default=None) – The time map \(t(k)\) the demodulation is evaluated on; required with demodulation.

Raises:

ValueError – If neither or both of rates and demodulation are given, or demodulation is given without timing.

References

property separable#

Whether each term’s k-space factor is a product over the axes.

property terms#

Number of terms.

property amplification#

Largest \(\sum_m |a_m(f)|\) over the tabulated frequencies.

The transfer has unit modulus, so a value much above one means nearly cancelling terms, whose residual is amplified by about this factor. It grows with the phase accrued over the readout and can be large while error() is small.

error()#

Largest density-weighted RMS error of the factorization over the frequencies.

Parameters:

timing (ReadoutTiming) – The time map the transfer was fitted to.

Return type:

float