tools.fit_transfer#
- bartorch.tools.fit_transfer()#
Fit a
SpiralTransferto a readout’s time map.With
method="mfi"the basis is the transfer attermsdemodulation frequencies spaced uniformly over[-band, band], as in multifrequency interpolation [1] and Gadgetron’sMFIOperator. Withmethod="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 ofdeblur()needs; for an Archimedean spiral, whose readout time is proportional to \(|k|\), it needs more terms than MFI for the sameSpiralTransfer.error(), and has a largerSpiralTransfer.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.Nonetakes the fewest terms whoseSpiralTransfer.error()is at mosttolerance, 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’sMFIOperator.tolerance (float, default=0.01) – Largest
SpiralTransfer.error()accepted whentermsisNone; 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()andSpiralTransfer.amplificationreport its quality.- Return type:
- Raises:
ValueError – If
termsis below one ormethodis unknown.
References
Examples
>>> timing = ReadoutTiming.from_trajectory(arm, duration=5e-3) >>> transfer = fit_transfer(timing, band=100.0)