ZernikeTermen
Zernike terms, or Zernike polynomials, are a set of basis functions used to describe wavefront errors on a circular aperture. Named after the Dutch physicist Frits Zernike, they provide a complete, orthogonal expansion for phase distortions within the pupil of a optical system. The polynomials are indexed by a radial degree n ≥ 0 and an azimuthal frequency m, with |m| ≤ n and n − m even. A common starting term is piston Z_0^0, followed by tilt terms Z_1^{±1}, then defocus Z_2^0, astigmatism Z_2^{±2}, and so on. Any wavefront W(r, theta) can be written as W(r, theta) = sum a_n^m Z_n^m(r, theta), where a_n^m are the Zernike coefficients that quantify the contribution of each mode.
The Zernike functions separate into a radial part R_n^m(r) and an angular part that is cos(m theta)
In practical use, the first few terms correspond to familiar aberrations: piston, tip and tilt, defocus, astigmatism,