Skip to main content

tfi_single

Function tfi_single 

Source
fn tfi_single(
    rdf: &[f64],
    mask: &[bool],
    p: &[f64],
    n_std: Vec<f64>,
    dk: &[f64],
    wg: &[Vec<f64>; 3],
    grid: &Grid,
    ppm_to_rad: f64,
    params: &TfiParams,
    progress: impl FnMut(usize, usize),
) -> Vec<f64>
Expand description

tfi_l1 in MATLAB’s single precision (TfiPrecision::Single): MEDI_L1.m line for line with MATLAB’s types. tempn = single(N_std) makes the data weight m, and with it the data b0 = m.*RDF, single; from there every product with a single operand is single, so the operator, the right-hand side, cgsolve.m’s vectors and scalars, dx and the iterate x (x + dx) are single. Double operands (P, the edge mask, ε, the kernel, and after MERIT the data weight and data, which dataterm_mask remakes from double(N_std)) are rounded to single where they meet a single one. FFTs are single precision.