pub fn mcpc3ds_combine<P: AsRef<[f64]>, M: AsRef<[f64]>>(
phases: &[Vec<P>],
mags: &[Vec<M>],
tes: &[f64],
sigma: [f64; 3],
echoes: [usize; 2],
unwrap_method: UnwrapMethod,
grid: &Grid,
) -> CoilCombinationResultExpand description
MCPC-3D-S multi-coil phase combination (Eckstein et al., MRM 2018), as in
MriResearchTools.jl’s mcpc3ds for 5D (multi-echo, uncombined) input.
Each receive coil carries its own TE-independent phase offset, so uncombined channels cannot simply be summed. The algorithm estimates the offsets from the coil-summed Hermitian inner product (HIP) of two echoes and combines the channels coherently:
HIP = Σ_c |S_{1,c}| |S_{2,c}| exp(i(φ_{2,c} − φ_{1,c}))— the coil offsets cancel in the inter-echo phase difference, so the HIP phase is pure field evolution over ΔTE.- The HIP phase is unwrapped once (weighted by √|HIP|, on a robust mask of that weight).
- Per coil,
po_c = φ_{1,c} − (TE₁/ΔTE)·unwrapped_HIP, smoothed in the complex domain with the same masked box-filter Gaussian approximation as MriResearchTools (nan_box_smooth_3d_phase;sigmain voxels, the reference default is [10, 10, 5]). - Per echo,
S_e = Σ_c |S_{e,c}|² exp(i(φ_{e,c} − po_c)); output phasearg(S_e)and magnitudesqrt(|S_e|).
With a single coil this reduces to phase_offset_removal (with the robust HIP mask).
§Arguments
phases- Wrapped phase, coil-major:phases[coil][echo](eachnx*ny*nz)mags- Magnitude, same layout asphasestes- Echo times (any consistent unit; only the ratioTE₁/ΔTEis used)sigma- Gaussian smoothing sigma in voxels [x, y, z] for the phase offsetsechoes- Which two echoes form the HIP, default[0, 1]unwrap_method- How to unwrap the HIP phase (ROMEO or Laplacian)grid- Volume grid
§Panics
If there are no coils, the coils do not all have the same number of echoes, magnitude
and phase layouts differ, or echoes is out of range.