pub fn r2primenet_from_magnitude(
magnitude: &[f64],
echo_times: &[f64],
mask: &[u8],
grid: &Grid,
b0_tesla: f64,
model_onnx: &[u8],
norm: &R2PrimeNetNorm,
params: &R2PrimeNetParams,
progress: impl FnMut(usize, usize),
) -> Result<(Vec<f64>, Vec<f64>), OnnxError>Expand description
Convenience: fit R2* from multi-echo magnitude with ARLO, then run r2primenet.
magnitude is voxel-major (n_voxels, n_echoes) and echo_times are in seconds
(ARLO requires ≥3 increasing echo times; other echo times are OnnxError::Domain); R2* is 0 outside mask. Returns (r2prime_hz, r2star_hz) so the caller
can keep the intermediate R2* map.