Skip to main content

solve_point_rmatrix

Function solve_point_rmatrix 

Source
pub fn solve_point_rmatrix<T: Real>(
    q: T,
    k0: T,
    layers: &[LayerCoeffs<T>],
) -> Result<[[T; 2]; 2]>
Expand description

Polarized reflectance at one q-point from the 4x4 reflection-matrix recursion.

Agrees with super::solve_point in exact arithmetic (including cross-polarized terms and the fronting unit-|E| mode normalization) and is accurate to near working precision in f32 and f64; see the module documentation for the formulation. Transmission is not computed.

§Parameters

Same as super::solve_point.

§Returns

Reflectance in the super::PointResult packing: (0, 0) = R_pp, (1, 1) = R_ss, off-diagonals cross-polarized.

§Errors

[RefloxideError::SingularDynamicMatrix] with the failing layer index and q_index = usize::MAX when a dynamic matrix or the 2x2 recursion denominator is singular.