Skip to main content

Module stokes_mueller

Module stokes_mueller 

Source
Expand description

Stokes vector and Mueller $4\times 4$ matrix polarimetric realizability verifiers (C02 Mode 1 & Mode 4).

All reference calculations are evaluated from first principles in independent f64 arithmetic:

  • Overflow-safe scaled 3D hypotenuse $\operatorname{hypot}_3(S_1, S_2, S_3)$.
  • Physical Stokes admission: $S_0 \ge 0$ and $\operatorname{hypot}_3(S_1, S_2, S_3) \le S_0 + 64,\varepsilon \max(S_0, \operatorname{hypot}_3(S_1, S_2, S_3))$.
  • Degree of Polarization $\text{DoP} = \operatorname{hypot}_3(S_1, S_2, S_3) / S_0 \in [0, 1]$, never clamping source components to mask over-polarized states.
  • Cloude $4\times 4$ Hermitian coherency matrix $\mathbf{C}(\mathbf{M})$ constructed from the 16 Pauli-basis Dirac-Kronig projections in the candidate C02 $V$-sign convention, with deterministic complex Hermitian Jacobi eigenvalue verification ($\lambda_i \ge -64,\varepsilon |\mathbf{M}|_F$).
  • Fry-Kattawar trace/transmittance passivity conditions and Jones-to-Mueller exact equivalence.

Structs§

Complex64
Complex scalar in f64 precision for independent Jones & Cloude algebra.
VerifiedMuellerReport
Verified Mueller $4\times 4$ physical realizability report.
VerifiedStokesState
Verified Stokes physical state summary (retaining original unmodified components).

Enums§

PolarimetricValidationError
Structured rejection reason for Stokes or Mueller physical realizability failures.

Constants§

C02_ROUNDING_FACTOR
Standard C02 small-operation rounding allowance factor ($64 \times 2^{-52}$).
F64_EPS
Machine epsilon for IEEE-754 f64 ($2^{-52}$).
VACUUM_SPEED_OF_LIGHT_M_PER_S
Exact defined speed of light in vacuum $c_0$ ($\text{m/s}$).

Functions§

apply_mueller_matrix
Apply a $4\times 4$ Mueller matrix to a Stokes vector: $\mathbf{S}{\text{out}} = \mathbf{M}\mathbf{S}{\text{in}}$.
compute_cloude_coherency_matrix
Construct the $4\times 4$ Hermitian Cloude coherency matrix $\mathbf{C}(\mathbf{M})$ from a $4\times 4$ Mueller matrix $\mathbf{M}$ using the 16 Hermitian Pauli-basis projections:
deterministic_transverse_basis
Deterministic transverse basis $(\mathbf{e}_1, \mathbf{e}_2)$ for propagation unit vector $\mathbf{k}$.
hermitian_4x4_eigenvalues
Compute all 4 real eigenvalues (sorted ascending) of a $4\times 4$ complex Hermitian matrix using deterministic two-stage complex-phase clearing + real Jacobi rotations.
jones_to_mueller_matrix
Convert a $2\times 2$ complex Jones matrix $\mathbf{J}$ to its exact $4\times 4$ Mueller matrix $\mathbf{M}(\mathbf{J}) = \mathbf{A}(\mathbf{J} \otimes \mathbf{J}^*)\mathbf{A}^{-1}$ in the C02 Mode 1/4 convention.
jones_vector_to_stokes
Convert a complex Jones vector $(E_x, E_y)$ to a Stokes vector $(S_0, S_1, S_2, S_3)$ in the C02 Mode 1 convention where $(1, i)/\sqrt{2} \mapsto (1, 0, 0, -1)$.
rotate_stokes_transverse_basis
Passive transverse basis rotation of a Stokes vector by angle $\theta$ ($\text{rad}$).
scaled_hypot3
Overflow- and underflow-safe 3D Euclidean norm $\sqrt{x^2 + y^2 + z^2}$.
vacuum_or_homogeneous_propagation_delay_s
Compute geometric propagation time $\Delta t = \frac{n \cdot d}{c_0}$ in a homogeneous medium.
verify_jones_to_mueller_equivalence
Verify that a candidate $4\times 4$ Mueller matrix agrees with the exact Jones-to-Mueller transformation $\mathbf{M}(\mathbf{J}) = \mathbf{A}(\mathbf{J} \otimes \mathbf{J}^*)\mathbf{A}^{-1}$ within the C02 closed-form budget $64 \cdot 2^{-52} Q$.
verify_mueller_realizability
Verify physical realizability and passivity of a $4\times 4$ Mueller matrix (C02 Mode 4).
verify_stokes_realizability
Verify physical Stokes realizability per C02 Mode 1. Never clamps or modifies input components.