v0.9.0 Rust core · Python API · LGPL-3.0

Weaving thin-film systems that perform.

Navette is a scattering-matrix engine for light in layered media. It stays stable however thick or absorbing a layer is, treats a millimetre substrate as incoherent where that is the physics, and designs coatings with the needle method on the same engine it simulates with.

Get started
Quarter-wave mirror, 16 films Reflectance vs wavelength · tilt it and the stopband walks blue
0°
51observables per solve: R, T, A, Ψ/Δ, Stokes, phase, GD/GDD
16dispersion models, plus six EMA mixing rules that nest
0.16 msfull observable mask, 40 λ × 3 θ, five layers
7least-squares backends for thickness refinement

01 · Physics

Stable by construction, rigorous by default

Each figure below is a direct engine run. The script that produced them, site/scripts/build_data.py, regenerates this page's data from the installed package.

No overflow, at any thickness

The textbook characteristic matrix multiplies cos δ and sin δ of a complex phase. Through an absorbing layer these grow like eIm δ, and past Im δ ≈ 709 a 64-bit float overflows.

Here a 525 µm silicon wafer sits in the stack as an ordinary layer. The naive transfer matrix returns NaN below 474 nm, where silicon absorbs strongly. Navette combines layers with the Redheffer star product, whose entries are bounded reflection and transmission amplitudes. It returns the physical answer everywhere: the front-surface Fresnel reflectance where the wafer is opaque, and the incoherent two-surface sum where it starts to transmit. Past 1000 nm the coherent naive answer is correct but useless: its fringes are about 0.3 nm apart on a 2 nm grid, so it samples them at random.

  • Redheffer star product, no exponentially growing terms
  • Incoherent wafer: intensity star product across the flagged layer
Silicon wafer, normal incidenceReflectance · shaded where the naive TMM overflows

The whole angle–wavelength plane in one pass

Operations run over the full (λ × θ) grid at once, in parallel across all cores with rayon. This map is 201 wavelengths by 35 angles of a 16-film TiO₂/SiO₂ mirror on BK7. The bright band is the stopband. It shifts toward the blue as the angle grows and, for p-polarisation, narrows towards the Brewster angle.

  • Full s and p treatment, Azzam & Bashara conventions
  • BK7 substrate from its Sellmeier dispersion
R(λ, θ) of a quarter-wave mirror

Coherence where it is real

Under a TiO₂ film, a 1 mm glass slide treated as fully coherent rings with fringes 0.12 nm apart. No spectrometer resolves them, and no real source is coherent over that path. Flag the slide incoherent and Navette splits the stack into coherent blocks, using a complex star product inside each block and an intensity star product across them (Katsidis & Siapkas 2002). The flagged answer is exactly the coherent one averaged over a round-trip phase period.

  • Three coherence modes, one of which refuses a cross-channel answer it cannot give
  • Checked against closed forms, not only against itself
80 nm TiO₂ on a 1 mm slideOne nanometre of spectrum around 600 nm
Phase, differentiated

Group delay and group-delay dispersion on reflection from the same 16-film mirror, as compute() keys. The GDD crosses zero at the 560 nm design wavelength and diverges at the band edges, which is the trade an ultrafast mirror designer works against.

Surface plasmon resonanceKretschmann: BK7 | gold | air, 633 nm, p-pol

Gold from a Drude model. The dip is deepest near 50 nm of gold, where the radiative loss through the metal matches its absorptive loss.

Ellipsometric trajectorySiO₂ growing on Si, 0 → 600 nm, 70°, 633 nm
100 nm

(Ψ, Δ) as the film grows. The curve closes on itself once the film reaches a full period of optical thickness, which is why a single wavelength cannot tell thickness modulo that period.

Materials as data

A material is a model name plus parameters. Sixteen models, among them Sellmeier, Drude and Tauc–Lorentz (Kramers–Kronig consistent), compose through six effective-medium rules.

02 · Design

Two bands, three oxides, one needle run

Navette runs Tikhonravov's needle method natively. The optimizer probes every depth in the stack with an infinitesimal layer of every material in its pool, inserts the one (depth, material) pair where the merit gradient is most negative, and re-optimises all thicknesses with bounded Levenberg–Marquardt. Here it designs a dual-band anti-reflection coating with a VIS and a NIR band: 0.35 % mean reflectance over the VIS band and 0.003 % at 1064 nm, from a seed of plain SiO₂ over Al₂O₃, with needles of all three oxides.

Dual-band anti-reflection, VIS and NIRSiO₂ / Al₂O₃ / HfO₂ on fused silica · log scale · shaded: design bands and tolerances
Merit by macro cyclelog scale · hover for the film count

Near the optimum, the merit need not be monotone. The needle pass and the cleanup each end by re-optimizing all thicknesses, and either can land in a worse local minimum, so a cycle can jump up before the next one recovers. Which step jumps, and in which cycle, depends on floating-point detail and differs between platforms. Synthesis runs at a 2 nm floor and ends with its thinnest film at 6.6 nm; a last pass re-optimizes with every film at 10 nm or more (thinnest now 13.7 nm), and that design is the one in the spectrum and the stack.

The finished stack22 films · ambient on the left
HfO₂ n ≈ 2.0Al₂O₃ n ≈ 1.64SiO₂ n ≈ 1.46

Joint targets

Spectral, angular and CIE colour demands in one merit, with analytic chain-rule terms in the needle gradient. Targets include phase, retardance, s/p ratios, Ψ, GD…FOD and Stokes/DOP for an input state.

Several surroundings

A design segment defined once and optimised against every environment, for example bare and laminated, at the same time.

Graded media

Mixture gradients are a layer property. A graded span's thickness is one parameter, not one per sublayer.

Tolerances as a model

Six error channels × four laws, for Monte-Carlo runs of what the coater will actually deposit.

A rugate notch, graded versus stepped

A 1550 nm notch in co-sputtered SiO₂:Ta₂O₅ on BK7, both materials dispersive, mixed by Bruggeman: 40 periods between n = 1.55 and 1.95. The rugate is ln n sinusoidal in optical thickness, faded in and out, and ramped onto the substrate and the top layer, drawn as 504 linear FixedSpan spans. The stepped stack, quarter-wave pairs of the same two mixtures, rejects harder, but it also reflects 100 % at 525 nm: its third-order band, a green mirror. The rugate has none, and nowhere in its passband does it reflect more than 5.8 %, mostly the bare outer surface. Without the fading and the ramps, the same sinusoid has sidelobes up to 33 %.

The cost is shown, not hidden: 1512 solver rows against 80, because the solver sees each span's sublayers.

Rugate notch vs quarter-wave stacksame period count, same index range

03 · Performance

Measured, not claimed

--release builds on a 32-core Windows machine, each number from a named script under validation/benches/. Each script refuses to run against a debug build.

WorkloadMeasuredScript
Full observable mask, 40 λ × 3 θ, 5 layers0.164 msbench_backside_speed
Rigorous 12-channel request, 6 layers, 20 000 / 60 000 points1.68 / 4.02 msbench_core_engine_scaling
pchip interpolation, 1 M points1.22 ms1dinterpol_test_bench
ΔE76 … ΔE2000 colour-difference batches23–36× fasterbench_validate_color
One LM thickness optimisation with needle re-fold2.1 msbench_refold
One needle insertion, 61 λ, 4 → 26 films: scan / LM re-optimisation2.2–2.6 / 19–66 msbench_needle_insertion
10 000 Monte-Carlo tolerance expansions, 3 layers, 6 channels0.03 sREADME

Two caveats, stated in the README too: grids under about 2 000 points are dispatch-bound, and in needle synthesis the time goes to the thickness re-optimisation after each insertion, not to the needle scan.

Pythonnavettethin API, numpy in and out
PyO3navette._navetteone abi3 wheel, GIL released
Rustnavette crateS-matrix · materials · synthesis · rayon

04 · Get started

Install and compute a mirror

Python 3.12+
Rust 1.88+

The published wheels and crate use default features. Optional optimizer backends (opt-minpack-lm, opt-argmin, opt-basin) are built from a checkout with maturin develop --release --features ….

mirror.py
import numpy as np
from navette.smatrix.smatrix import Request, ScatterMatrix

wl = np.linspace(380.0, 780.0, 401)            # nm
H, L, lam0 = 2.35, 1.46, 560.0                 # TiO2 / SiO2, design wavelength

n = [1.0] + [H, L] * 8 + [1.52]                # ambient, 16 films, glass
d = [0.0] + [lam0 / (4 * H), lam0 / (4 * L)] * 8 + [0.0]
nk = np.array(n, dtype=complex)[:, None] * np.ones_like(wl)

mirror = ScatterMatrix(nk, d, wavelengths=wl, angles_deg=[0.0, 45.0])
out = mirror.compute(Request.RS | Request.RP)  # arrays of shape (angles, wavelengths)
print(f"peak Rs at normal incidence: {out['Rs'][0].max():.4f}")
peak Rs at normal incidence: 0.9987