get_interpolators_from_fieldmap#
- mrinufft.operators.off_resonance.get_interpolators_from_fieldmap(b0_map, readout_time, n_time_segments=6, n_bins=(40, 10), mask=None, r2star_map=None)[source]#
Approximate
exp(-2j*pi*fieldmap*readout_time) ≈ Σ B_n(t)C_n(r)
.Here, B_n(t) are n_time_segments temporal coefficients and C_n(r) are n_time_segments temporal spatial coefficients.
The matrix B has shape
(n_time_segments, len(readout_time))
and C has shape(n_time_segments, *b0_map.shape)
.From Sigpy: mikgroup/sigpy and MIRT (mri_exp_approx.m): https://web.eecs.umich.edu/~fessler/code/
- Parameters:
b0_map (np.ndarray) – Static field inhomogeneities map.
b0_map
andreadout_time
should have reciprocal units. Also supports Cupy arrays and Torch tensors.readout_time (np.ndarray) – Readout time in
[s]
of shape(n_shots, n_pts)
or(n_shots * n_pts,)
. Also supports Cupy arrays and Torch tensors.n_time_segments (int, optional) – Number of time segments. The default is
6
.n_bins (int | Sequence[int] optional) – Number of histogram bins to use for
(B0, T2*)
. The default is(40, 10)
If it is a scalar, assumen_bins = (n_bins, 10)
. For real fieldmap (B0 only),n_bins[1]
is ignored.mask (np.ndarray, optional) – Boolean mask of the region of interest (e.g., corresponding to the imaged object). This is used to exclude the background fieldmap values from histogram computation. Must have same shape as
b0_map
. The default isNone
(use the whole map). Also supports Cupy arrays and Torch tensors.r2star_map (np.ndarray, optional) – Effective transverse relaxation map (R2*).
r2star_map
andreadout_time
should have reciprocal units. Must have same shape asb0_map
. The default isNone
(purely imaginary field). Also supports Cupy arrays and Torch tensors.
Notes
The total field map used to calculate the field coefficients is
field_map = R2*_map + 1j * B0_map
. If R2* is not provided, the field is purely immaginary:field_map = 1j * B0_map
.- Returns:
B (np.ndarray) – Temporal interpolator of shape
(n_time_segments, len(t))
. Array module is the same as input field_map.tl (np.ndarray) – Time segment centers of shape
(n_time_segments,)
. Array module is the same as input field_map.