Compares the conic.h reflection routines with Mirror.comp
Identification
Site: Tests_optics
Author: Peter Willendrup
Origin: DTU
Date: October 2026
Description
A collimated, polychromatic beam hits a single flat mirror at grazing angle theta.
The mirror is either Mirror.comp or Mirror_conic.comp, which uses the reflection
routines from conic.h (as used by Conics_*, FlatEllipse_finite_mirror and NMO).
Reflected and transmitted beams are recorded separately as function of wavelength.
For a given theta, pairs of COMP settings should give identical results:
COMP=0: Mirror, transmit=1 (reference for COMP=1)
COMP=1: Mirror_conic, conic=0 (FlatSurf, reflectNeutronFlat)
COMP=2: Mirror, transmit=0 (reference for COMP=3)
COMP=3: Mirror_conic, conic=1 (ConicSurf, reflectNeutronConic)
COMP=0 and COMP=1 should agree exactly, and so should COMP=2 and COMP=3 when
no figure error is applied (sigma_m=sigma_s=0).
With sigma_m comparable to the grazing angle (e.g. theta=0.1 sigma_m=1.745e-3),
COMP=3 uses the waviness model of Hansen et al., arXiv:1612.03763 (see conic.h).