Zernike.jl
Generates Zernike polynomials, models wavefront errors, and plots them using Makie.
This package can be added from the Julia REPL by:
using Pkg
Pkg.add(url="https://github.com/Sagnac/Zernike.jl", rev="stable")
or entering the package mode by pressing ]
and entering:
add https://github.com/Sagnac/Zernike.jl#stable
It can then be loaded by typing using Zernike
.
The package provides 3 main functions for modelling Zernike polynomials and wavefront errors:
zernike(m, n)
: Generates a Zernike polynomial, prints its symbolic representation, and plots it using GLMakie;wavefront(ρ, θ, OPD, n_max)
: Fits wavefront errors up to radial ordern_max
given an input set of data over the pupil, returns the Zernike expansion coefficients & various metrics, and plots the modelled wavefront error using GLMakie;transform(v, ε, δ, ϕ, ω)
: Aperture transform function which takes a vector of Zernike expansion coefficients and a set of transformation factors and returns a new set of expansion coefficients over the transformed pupil; the wavefront error over the new pupil is also plotted using GLMakie.