Swanepoel's first step: separate T(λ) into a smooth upper envelope TM(λ) through the maxima and a smooth lower envelope Tm(λ) through the minima. The tool fits splines (or uses PCHIP) through the extrema to get continuous envelopes across the whole spectrum.
The job those envelopes do
- Every wavelength now has a (TM, Tm) pair, not just the measured extrema.
- The pair at any λ captures the fringe amplitude and so the local reflectance product R12·R23, which is what n(λ) inversion needs.
- The substrate transmittance Ts(λ) — measured separately — gives s(λ) through Swanepoel eq. (2).
Why smooth envelopes, not just extrema
Measured T is discrete. If you invert only at the extrema you get one n per fringe, not a continuous n(λ). The envelopes carry the fringe information across the whole band so the Cauchy fit (next lesson) has enough points.