How PyStratify is verified

32 checks15 checks40 checks · PyStratify 97e52a9

The calculator computes every film, cylinder and sphere with PyStratify, an open-source Python package (GPL-3.0). This page shows what PyStratify is checked against: closed forms and conservation laws, extended-precision references, independent methods, other groups' codes and published papers.

Coverage at a glance places every test for the geometry the switch at the top picks: one circle per test, by the kind of reference and the source of light. A circle opens the test's page: what exactly is calculated, the agreement required, and a plot for each case, PyStratify as lines and the reference as circles on the same axes, with the largest difference beneath it. The replication corpus is plotted record by record in the Replications.

A check counts as independent only when the reference shares no code with PyStratify. Closed forms and conservation laws are independent of any code; extended-precision references prove the numerics; another group's code or a different method (finite differences in time, finite elements, boundary elements, volume integrals) proves the formulation. Every plot is computed by a script in the PyStratify repository, linked from its page, so anyone can rerun it and see the numbers; one command, benchmarks/verify_all.py, reruns the whole study.

Coverage at a glance

One circle per test; each opens its details. ● asserted on every test run, ◐ a report, or a crosscheck read against a published figure; blank: not compared, or the reference cannot compute it.

Coverage for thin films
ReferenceKindPlane wavePoint dipoleFocused beam
closed forms, limits, conservationanalytic●●●●●●●●●●●
backend S-matrix (Redheffer star)method●
Sommerfeld integrals (Chance–Prock–Silbey), written separatelymethod●
plane-wave superposition / cone averagemethod●●
pyElli (2×2 and Berreman 4×4)code●
PyMooshcode●●●●
tmmaxcode●
smuthi (T-matrix + Sommerfeld, dipole sources)code●
Meep (FDTD; cylindrical coordinates where the source is on axis)code●
OLED / thin-film emitter paperspaper◐
multilayer.app replication corpuspaper◐
Byrnes tmm, backend inc_tmmlineage●
explicit phase average of coherent solvesmethod●
RCWA with zero patterningmethod●
position-resolved field against Parsevalmethod●
independent flux budget (escape + guided + absorbed = total)method●
guided-pole uncertainty within tolerance; 3D sources are not line sourcesmethod●
the same reference on a weakly absorbing guide (k = 1e-3), quasi-poles as breakpointsmethod●
Coverage for cylinders
ReferenceKindPlane wavePoint dipoleFocused beam
closed forms, limits, conservationanalytic●●●●
plane-wave superposition / cone averagemethod●●●●
treamscode●
Meep (FDTD; cylindrical coordinates where the source is on axis)code●
NGSolve (finite elements)code●
Davis, Carney & Bhargava 2010 (FT-IR)paper◐
classic papers recomputed (crosscheck/classics/, 16; the site's Classics page)paper◐
grazing endpoint continuation within the error budgetmethod●
grazing light-line caps, bounded errormethod●
Coverage for spheres
ReferenceKindPlane wavePoint dipoleFocused beam
closed forms, limits, conservationanalytic●●●●●●●
mpmath transfer matrices / Mie sumsprecision●●◐●●●●
plane-wave superposition / cone averagemethod●●●
BHMIE (Bohren & Huffman)code●
treamscode●●●●
scattnlaycode●●
pyGDM2 (volume Green dyadic)code●●
MNPBEM (boundary elements, under GNU Octave)code●◐●
smuthi (T-matrix + Sommerfeld, dipole sources)code●
Meep (FDTD; cylindrical coordinates where the source is on axis)code●
Majic & Le Ru 2020; Yuan, Zhu & Zhu 2023/24; Wu et al. 1991/1997paper◐◐
Guzatov & Klimov 2012paper●
Gonçalves et al. 2020 (Feibelman)paper●
classic papers recomputed (crosscheck/classics/, 16; the site's Classics page)paper◐◐
Bohren & Huffman reference valuespaper●
published small chiral sphere polarisabilitiespaper●
quadrupole coupling against finite differencesmethod●