pub fn chi_sep_medi(
inputs: &ChiSepMediInputs<'_>,
grid: &Grid,
bdir: (f64, f64, f64),
params: &ChiSepMediParams,
progress: impl FnMut(usize, usize),
) -> Result<ChiSepMaps, InputError>Expand description
χ-separation by the SNU χ-separation toolbox’s chi_sep_MEDI (see the module docs).
Takes the volumes of ChiSepMediInputs on grid and the B0 direction bdir (used as
given, as the toolbox uses params.b0_dir; pass a unit vector), and returns (χ+, χ−, χ_total) in ppm, χ+ ≥ 0, χ− ≤ 0, zero outside the mask. progress receives
(iteration, max_iter) after each Gauss-Newton step.
§Errors
An InputError for parameters ChiSepMediParams::validate rejects and for a volume
whose length is not the grid’s.