Seidel Aberrations
The total third order system coefficients can be extracted by querying the relevant WIJK fields. In addition, chromatic aberration can be quantified for a given δn dispersion vector. The results are optical path differences in waves at the d spectral line for a system in mm; the wavelength parameter can also be tuned.
# for an object "at infinity"
# -- collimated rays, maximum paraxial field of view, focusing at the focal point
W = aberrations(system)OpticalRayTracing.Aberration{OpticalRayTracing.System{Layout, Spherical}}
W040: 16.3806
W131: -3.4316
W222: -15.7483
W220: 41.0542
W311: 50.5448
W020: 0.0000
W111: 0.0000The return value holds the relevant metadata in an Aberration structure which can be evaluated over the pupil if called with normalized polar coordinates and a normalized field value. In addition, transverse ray error functions can be constructed and evaluated as well.
H = 0.7
x = 0.3
y = 0.4
ρ = 0.5
θ = π/4
εx = RayError{Tangential}(W)
εy = RayError{Sagittal}(W)
ε = RayError{Skew}(W)julia> W(ρ, θ, H)11.005539797521951julia> εx(x, H)-0.08563851124613303julia> εy(y, H)-0.06708489418133919julia> ε(x, y, H)(-0.05425739768782114, -0.1072734546152148)
The long form named fields (spherical, coma, astigmatism, etc.) hold the per surface coefficient vectors. W220P / petzval, W220T / tangential, & W220 / sagittal refer to the respective field curvatures while the W020 & W111 coefficients refer to defocus & tilt from axial & lateral color, respectively.
julia> W.spherical8-element Vector{Float64}: 76.99586232645058 59.91132869082527 -145.5387096106125 -67.98299803388174 -0.0 0.21968196432568776 14.087080964996582 78.68832927291777
Third order coefficients can also be computed for a given object height & axial position by passing a RayBasis instead of a System:
rays = raytrace(system, 10.0, -system.f + system.EFFD)
W_4f = aberrations(surfaces, rays)OpticalRayTracing.Aberration{RayBasis}
W040: 14.6910
W131: 8.0334
W222: 0.8199
W220: 2.9919
W311: -0.8633
W020: 0.0000
W111: -0.0000