pub fn metric(
matrix: &DMatrix<Complex>,
pol: &[u8],
ks: [f64; 2],
kind: Metric,
) -> Result<(f64, MetricResidual)>Expand description
One Metric of a global helicity T-matrix.
pol is the polarization index of each row and ks holds the negative and positive
helicity wavenumbers of the embedding, which enter circular dichroism only.
Upstream: treams.TMatrix.cd, treams.TMatrix.db and treams.TMatrix.chi.
Differences: circular dichroism requires positive real wavenumbers where treams
requires a real material; the other two scale the matrix to a largest entry of 1
first; the chirality gradient is an error at zero helicity contrast.