PyStratify against PyMoosh

← Verification · Thin films · Plane wave
Reference
PyMoosh (independent S-matrix code)
Kind
code: another group's code
Calculated
R, T, r, t, per-layer A on the same stacks plus a magnetic layer (μ = 2)
Agreement
1e-12; observed ≤ 1.2e-14
A ten-pair Bragg mirror (n = 2.35 / 1.46) on glass at 30°: R and T against PyMoosh PyMoosh (Langevin, Moreau et al.) solves stacks with its own scattering matrices. The test runs nine stacks at four angles and three wavelengths for R, T, r, t and the absorption in every layer.
45050055060065070075080085000.20.40.60.81λ [nm]R, T
Rs, PyStratify Ts, PyStratify Rp, PyStratify Tp, PyStratify Rs, PyMoosh Ts, PyMoosh Rp, PyMoosh Tp, PyMoosh
Hover to read values.
  • largest |difference|: 2.34×10⁻¹⁴
  • PyStratify the lines, the reference the circles
A 150 nm layer with n = 1.5 and μ = 2 on glass at 633 nm: R and T against PyMoosh A magnetic layer changes the Fresnel coefficients through its impedance √(μ/ε), not only its index; PyMoosh takes ε and μ separately, an independent check of PyStratify's permeability.
0102030405060708000.20.40.60.81angle of incidence [°]R, T
Rs, PyStratify Ts, PyStratify Rp, PyStratify Tp, PyStratify Rs, PyMoosh Ts, PyMoosh Rp, PyMoosh Tp, PyMoosh
Hover to read values.
  • largest |difference|: 2.75×10⁻¹⁴
  • PyStratify the lines, the reference the circles

Run it yourself: test_planar_codes.py · planar_codes.py · figures.py · PLANAR_CODES.md on GitHub, PyStratify 97e52a9