Skip to main content

uniaxial_reflectivity

Function uniaxial_reflectivity 

Source
pub fn uniaxial_reflectivity(
    q: &[f64],
    layers: &[Layer],
    tensor: &[Matrix3<Complex<f64>>],
    energy_ev: f64,
    parallel: bool,
) -> Result<UniaxialOutput>
Expand description

Computes polarized reflectance and transmission for a uniaxial multilayer.

§Parameters

  • q: scattering wavevectors in 1/Angstrom.
  • layers: per-slab parameters, length nlayers. The first and last entries describe the fronting and the backing.
  • tensor: per-slab 3x3 dispersion tensor, length nlayers. The Berreman dielectric is built as eps = conj(I - 2 * tensor).
  • energy_ev: photon energy in eV. Must be strictly positive.
  • parallel: when true, distribute q-points across rayon’s global thread pool. When false, run sequentially. Callers driving the kernel from a Python fitting routine that is itself multi-threaded or multi-process should pass false to avoid CPU oversubscription. The rayon pool size is controlled by the RAYON_NUM_THREADS environment variable when set.

§Errors

Returns [RefloxideError] for shape mismatches, fewer than two slabs, non-finite or non-positive energies, and for singular dynamic matrices at any (q, layer).