Skip to main content

resample_complex_to_axial

Function resample_complex_to_axial 

Source
pub fn resample_complex_to_axial(
    magnitude: &[f64],
    phase: &[f64],
    nx: usize,
    ny: usize,
    nz: usize,
    affine: &[f64; 16],
    params: &AxialResampleParams,
) -> ResampledComplex
Expand description

Resample magnitude and wrapped phase to a cardinal-aligned grid, interpolating in the complex domain so wraps survive.

mag·cos φ and mag·sin φ are interpolated separately and recombined, which is continuous across the ±π boundary. The returned affine is diagonal, so the dipole kernel can be built with B0 = (0, 0, 1).

§Panics

If magnitude and phase differ in length or do not match nx · ny · nz.