tools.fit_transfer

tools.fit_transfer#

bartorch.tools.fit_transfer()#

Fit a SpiralTransfer to a readout’s time map.

With method="mfi" the basis is the transfer at terms demodulation frequencies spaced uniformly over [-band, band], as in multifrequency interpolation [1] and Gadgetron’s MFIOperator. With method="separable" the rates are shared by every frequency and found by multi-snapshot ESPRIT over the columns of the exact transfer, with growing terms made purely oscillatory. Either way the weights are the density-weighted least-squares fit at each frequency, which is the least-squares fit over the readout’s samples.

MFI is close to the truncated-SVD factorization of the same rank and well conditioned. The separable basis is what the "conv" backend of deblur() needs; for an Archimedean spiral, whose readout time is proportional to \(|k|\), it needs more terms than MFI for the same SpiralTransfer.error(), and has a larger SpiralTransfer.amplification.

Parameters:
  • timing (ReadoutTiming) – Time map of the readout.

  • band (float) – Half-width of the off-resonance range, in Hz.

  • terms (int, default=None) – Number of terms; deblur() costs one k-space multiply or separable convolution per term. None takes the fewest terms whose SpiralTransfer.error() is at most tolerance, starting from \(\lceil 2.5\, \Delta f\, T \rceil\) rounded up to an odd number, with \(\Delta f\) the band and \(T\) the readout duration: the number of frequencies of Gadgetron’s MFIOperator.

  • tolerance (float, default=0.01) – Largest SpiralTransfer.error() accepted when terms is None; ignored otherwise. The search stops at 64 terms.

  • frequencies (int, default=65) – Number of tabulated frequencies spanning [-band, band].

  • method ({"mfi", "separable"}, default='mfi') – The k-space basis, as described in SpiralTransfer.

Returns:

The factorization; SpiralTransfer.error() and SpiralTransfer.amplification report its quality.

Return type:

SpiralTransfer

Raises:

ValueError – If terms is below one or method is unknown.

References

Examples

>>> timing = ReadoutTiming.from_trajectory(arm, duration=5e-3)
>>> transfer = fit_transfer(timing, band=100.0)

Examples using fit_transfer#

Off-resonance correction of spiral imaging

Off-resonance correction of spiral imaging