pub fn bipolar_correction<P: AsMut<[f64]> + AsRef<[f64]>>(
phases: &mut [P],
mags: &[impl AsRef<[f64]>],
tes: &[f64],
mask: &[u8],
sigma: [f64; 3],
grid: &Grid,
)Expand description
Bipolar gradient correction for multi-echo phase data.
Removes linear phase artefact caused by bipolar readout gradients. Requires at least 3 echoes.
Reference: Eckstein PhD thesis (2021), Section 3.1.3 https://doi.org/10.34726/hss.2021.43447
§Arguments
phases- Mutable phase data per echo (modified in-place)mags- Magnitude data per echotes- Echo times (any consistent unit; only ratios are used)mask- Binary masksigma- Smoothing sigma for artefact estimationgrid- Volume grid (dimensions and voxel sizes)