McStas logo McStas - A neutron ray-trace simulation package ILL; PSI; ESS Niels Bohr Institute DTU Physics

McStas

About McStas
 Conditions of use
 Authors/Contacts
 Project funding

Download
 Components

Mailing list

Search web/mailinglist

Documentation
 Wiki (GitHub)
 McStas manual
 Publications

Links

Report bugs (GitHub)

Code-repository (GitHub)


McStas: Test_Mirror_conic

[ Identification | Description | Examples | Input parameters | Links ]

The Test_Mirror_conic Instrument

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).

Examples

(Test cases in bold)
  • Test: COMP=0 Detector: L_refl_I=8.98208e-07
  • Test: COMP=1 Detector: L_refl_I=8.98208e-07
  • Test: COMP=0 Detector: L_trans_I=7.01789e-07
  • Test: COMP=1 Detector: L_trans_I=7.01789e-07
  • Test: COMP=2 Detector: L_refl_I=8.9763e-07
  • Test: COMP=3 Detector: L_refl_I=8.9763e-07
  • Test: COMP=3 theta=0.1 sigma_m=1.745e-3 Detector: L_refl_I=1.35886e-06

Input parameters

Parameters in boldface are required; the others are optional.
NameUnitDescriptionDefault
COMP1Mirror implementation, see description0
thetadegGrazing angle of the beam on the mirror1
lengthmMirror length1
m1Mirror m-value2
R01Low-angle reflectivity0.99
QcAA^-1Critical scattering vector0.0217
alphaAASlope of reflectivity6.07
WAA^-1Width of supermirror cut-off0.003
LminAAMinimum source wavelength1
LmaxAAMaximum source wavelength11
sigma_mradRMS meridional slope (figure) error, COMP=3 only0
sigma_sradRMS sagittal slope (figure) error, COMP=3 only0

Links


[ Identification | Description | Examples | Input parameters | Links ]

Generated for mcstas 3.10.0


Last Modified: Friday, 23-Oct-2026 18:32:10 CEST
Search website mailinglist archive GitHub repos