transform(v, ε, δ, ϕ, ω)
Pupil transform function; computes a new set of Zernike wavefront error expansion coefficients under a given set of transformation factors and plots the result.
Available transformations are scaling, translation, & rotation for circular and elliptical exit pupils. These are essentially coordinate transformations in the pupil plane over the wavefront map.
v::Vector{Float64}
: vector of full Zernike expansion coefficients ordered in accordance with the ANSI / OSA single index standard. This is thev
vector returned bywavefront(ρ, θ, OPD, n_max)
;ε::Float64
: scaling factor{0 ≤ ε ≤ 1}
;δ::ComplexF64
: translational complex coordinates (displacement of the pupil center in the complex plane);ϕ::Float64
: rotation of the pupil in radians(mod 2π)
, defined positive counter-clockwise from the horizontal x-axis;ω::NTuple{2, Float64}
: elliptical pupil transform parameters; 2-tuple whereω[1]
is the ratio of the minor radius to the major radius of the ellipse andω[2]
is the angle defined positive counter-clockwise from the horizontal coordinate axis of the exit pupil to the minor axis of the ellipse.
The order the transformations are applied is:<br> scaling –> translation –> rotation –> elliptical transform.
The translation, rotation, and elliptical arguments are optional.
ε
= r₂/r₁
where r₂
is the new smaller radius, r₁
the original
In particular the radial variable corresponding to the rescaled exit pupil is normalized such that:<br> ρ
= r/r₂
; {0 ≤ ρ ≤ 1}
<br> r
: radial pupil position, r₂
: max. radius<br> ΔW₂(ρ₂, θ)
= ΔW₁(ερ₂, θ)
For translation the shift must be within the bounds of the scaling applied such that:<br> 0.0 ≤ ε + |δ| ≤ 1.0
.
For elliptical pupils (usually the result of measuring the wavefront off-axis), the major radius is defined such that it equals the radius of the circle and so ω[1]
is the fraction of the circular pupil covered by the minor radius (this is approximated well by a cosine projection factor for angles up to 40 degrees); ω[2]
is then the direction of the stretching applied under transformation in converting the ellipse to a circle before fitting the expansion coefficients.
The transformed expansion coefficients are computed using a fast and accurate algorithm suitable for high orders; it is based on a formulation presented by Lundström & Unsbo (2007).