Prism: Reflectometry Curve-Fitting (Fresnel Equations & Brewster Angle)

Executes the inverse non-linear regression problem for Variable Angle Reflectometry. Because the absolute reflectance of p-polarized light approaches a deep intensity null at the Brewster angle, the extraction of the refractive index (nglass) is susceptible to systematic hardware errors, such as extinction leakage (ε), analyzer misalignment (γ), and geometric zero-offset (θoff). This simulation contrasts three distinct statistical approaches: a Naive 2-Degree-of-Freedom (2-DOF) model that assumes perfect polarization, a Rigorous 2-DOF model parameterized with pre-calibrated baseline errors, and an unconstrained Covariant 5-DOF model. By evaluating the residual signatures and the extracted parameters across these models, the widget demonstrates the consequences of over-parameterization.

System Parameters

Solver Architecture
Defines the degrees of freedom provided to the regression algorithm.
Target Material
True bulk refractive index. Overridden if a specific wavelength is selected.
Hardware Metrology Errors (Hidden from Naive Solver)
Quality of the polarizing filter (10−6 = Ideal, 10−2 = Poor).
Azimuthal error in the transmission axis.
Mechanical misalignment of the normal baseline.
Gaussian scatter scale multiplier.
Extracted Index (nglass)
--
True Value: --
Extracted Amplitude (A0)
--
True Amplitude strictly 1.0000
Extraction Error (Δn)
--
Deviation from True Index
Absolute Reflectance (Linear Scale)
Brewster Minimum (Logarithmic Scale)
Rp Residuals
Rs Residuals

Fresnel Equations Regression Models

1. Analytical Formulations & Objective Function

Variable Angle Reflectometry measures the absolute reflectance of p-polarized (Rp) and s-polarized (Rs) light. For a bulk boundary, the ideal Fresnel reflectances are determined by the bulk refractive index (nglass), the ambient index (nair = 1.0003), and the incident (θi) and transmitted (θt) angles:

Rp,ideal = [ (nglass cos θinair cos θt) / (nglass cos θi + nair cos θt) ]2

Rs,ideal = [ (nair cos θinglass cos θt) / (nair cos θi + nglass cos θt) ]2

Hardware polarization leakage introduces a global amplitude scaling factor (A0), an extinction ratio (ε), and an analyzer misalignment angle (γ). These hardware errors blend the orthogonal reflection states arriving at the detector:

Rp,meas = A0 [ Rp,ideal (cos2 γ + ε sin2 γ) + Rs,ideal (sin2 γ + ε cos2 γ) ]

Rs,meas = A0 [ Rs,ideal (cos2 γ + ε sin2 γ) + Rp,ideal (sin2 γ + ε cos2 γ) ]

The statistical regression algorithm minimizes the joint Mean Squared Error (MSE) across the array of N data points:

MSE = (1 / 2N) ∑ [ (Rp,dataRp,meas)2 + (Rs,dataRs,meas)2 ]

2. Naive Model (2-DOF)

Unlike Variable Angle Ellipsometry (which is ratiometric), reflectometry relies on measuring absolute intensity. If the statistical solver is restricted to assume perfect hardware (a Naive Model), it interprets the elevated signal floor near the Brewster minimum as a fundamental change in the material's optical properties. Because the global amplitude parameter (A0) is strictly multiplicative, it cannot mathematically absorb the additive leakage caused by polarization errors (ε and γ). Consequently, the solver is forced to artificially skew the refractive index (nglass) to minimize the mean squared error, resulting in extraction inaccuracies and a bowed residual signature.

3. Rigorous Model (2-DOF)

In proper metrological practice, hardware constraints (ε, γ, θoff) are characterized independently prior to the sample measurement. By passing these fixed, pre-calibrated values directly into the theoretical model, the solver successfully decouples the background leakage from the interfacial reflectance. This Rigorous Model reliably extracts the true index, limited only by standard Gaussian noise standard deviation (σ).

Algorithmic Note: When the Rigorous Model is active, adjusting the hardware error sliders does not destabilize the extracted nglass. Because the simulation routes the exact selected error values directly into the solver as known constants, the algorithm mathematically neutralizes the data corruption in real-time. This mathematically stable extraction visually demonstrates the necessity of independent hardware pre-calibration.

4. Covariance & Over-Parameterization (5-DOF)

When an analytical model produces a poor fit under a naive assumption, an approach might be to unconstrain the hardware parameters and allow the solver to fit them simultaneously alongside nglass and A0. This 5-DOF Covariant Model evaluates parameters across bounded domains (nglass ∈ [1.50, 1.90], A0 ∈ [0.80, 1.20], ε ∈ [0, 0.01], γ ∈ [0, 2.0]°, and θoff ∈ [−1.0, 1.0]°) using an 8-Pass Adaptive Zoom multi-dimensional grid search. However, the parameters ε and γ contribute nearly identical additive constants to the intensity minimum, introducing significant parameter covariance. This degeneracy creates a flat parameter space in the objective function. The grid search halts within this space, achieving a visually flat residual line while extracting mathematically valid but physically incorrect parameters. This demonstrates why over-parameterization destabilizes experimental extraction.

Diagnostic Note (Extracted Parameters): When the Covariant Model is active, the diagnostic readout displays the final extracted hardware parameters (ε, γ, θoff). These extracted values will typically diverge significantly from the true baseline conditions established by the input sliders. Because the covariance creates a degenerate mathematical topology, infinite combinations of these parameters yield an identical minimum MSE. The solver merely extracts the discrete coordinate at which the algorithm halts within the flat optimization valley, resulting in a mathematically optimized fit constructed from physically arbitrary values.

Algorithmic Note: Standard derivative-based solvers (e.g., Levenberg-Marquardt) rely on calculating the Jacobian matrix, which becomes singular and causes algorithmic crashes when navigating covariant, flat parameter spaces. The discrete grid search is deployed here because it evaluates the MSE directly and is immune to gradient collapse. This guarantees the simulation will successfully locate the degenerate minimum to demonstrate the overfitting vulnerability, while the adaptive zoom bounding technique reduces the computational load to maintain real-time performance across the 5-DOF domain. Note that this discrete 8-Pass Adaptive Zoom engine is utilized globally across all three models (collapsing to a 2D grid for the Naive and Rigorous architectures). Consequently, all extracted parameters—even in the mathematically stable Rigorous model—are subject to the grid's terminal quantization resolution, which produces slight, systematic bowing in the residual plots.