compute_mfi_coefficients#
- mrinufft.extras.compute_mfi_coefficients(field_map: ndarray[tuple[Any, ...], dtype[_ScalarT]], readout_time: ndarray[tuple[Any, ...], dtype[_ScalarT]], mask: ndarray[tuple[Any, ...], dtype[_ScalarT]], L: int = 9, n_bins: int | tuple[int, int] = 1024, lazy: bool = True)[source]#
Compute off-resonance correction coefficients using Mixed-Frequency-Interpolator.
- Parameters:
field_map (NDArray) – The field map (off-resonance map) in rad/s, If complex-valued, the real part is interpreted as R2* mapping. If real-valued this is the field inhomogeneities in Hz. and will be multiplied by \(2j\pi\)
readout_time (NDArray) – The vector of time points (in seconds) at which to compute phase evolution.
mask (NDArray) – Binary mask indicating object region for field map/statistics.
L (int, optional) – Number of virtual centers or basis functions retained (default is -1, automatically estimated).
n_bins (int, optional) – Number of histogram bins for off-resonance value clustering (default is 1000).
lazy (bool, default False) – If True, use a lazy evaluation scheme for the space interpolator C, saving memory.
- Returns:
B (NDArray) – [L, nbins] phase basis matrix in the time domain.
C (NDArray) – [L, nt] interpolation matrix to transform weighted basis to phase at the time points; nt = len(readout_time).
E (NDArray) – [nbins, nt] exponential off-resonance phase matrix at input histogram bins.
References
Man, L.-C., Pauly, J.M. and Macovski, A. (1997), Multifrequency interpolation for fast off-resonance correction. Magn. Reson. Med., 37: 785-792. https://doi.org/10.1002/mrm.1910370523
Note
This function uses
numpyfor all CPU arrays, andcupyfor all on-gpu array. It will convert all its array argument to the respective array library. The outputs will be converted back to the original array module and device.See also
This function is part of the orc_factorization registry. You can find other registered functions in this registry below: