Assess Spectral Angle Between Reference and Test Spectra
Source:R/assess_mismatch_angle.R
assess.mismatch.angle.RdAs assess.mismatch(), but reports the spectral angle (in degrees)
between each fluorophore's reference and test spectra rather than their
cosine similarity. The angle is acos() of the same cosine value
assess.mismatch() returns, so the two metrics are a strictly
monotonic transform of one another – but unlike cosine similarity,
spectral angle increases with divergence, so it can be plotted directly
against other divergence-increasing metrics (e.g. mismatch distance)
without an inverted axis.
Arguments
- reference.variants
Named list of spectral variant matrices (one per fluorophore), as returned in the
variantselement ofget.spectral.variants(). Row 1 of each matrix is treated as the reference spectrum.- test.variants
Named list of spectral variant matrices in the same format as
reference.variants, to be compared against it.