Skip to main content

hermitian_inner_product

Function hermitian_inner_product 

Source
pub fn hermitian_inner_product(
    phase1: &[f64],
    mag1: &[f64],
    phase2: &[f64],
    mag2: &[f64],
    mask: &[u8],
    n: usize,
) -> (Vec<f64>, Vec<f64>)
Expand description

Compute Hermitian Inner Product (HIP) between two echoes

HIP = conj(echo1) * echo2 = mag1 * mag2 * exp(i * (phase2 - phase1))

Returns (hip_phase, hip_mag) where:

  • hip_phase = phase2 - phase1 (wrapped to [-π, π])
  • hip_mag = mag1 * mag2