validate_wavenumbers

Function validate_wavenumbers 

Source
pub(crate) fn validate_wavenumbers(
    ks: [Complex; 2],
    helicity: bool,
    allow_zero: bool,
) -> Result<()>
Expand description

Check the medium wavenumbers ks (negative, positive helicity) of a basis operation: both finite, nonzero unless allow_zero, and equal for parity polarizations (helicity false), because parity waves exist only in an achiral medium. Operations that never mix polarizations pass helicity = true.