Definition in polar coordinate system

The Zernike polymials form an orthogonal basis within the unit circle, when defined using polar coordinates (\(\rho,\theta\)) as follows,

\begin{eqnarray} \label{zernike_definition_B&W} Z_n^m (\rho,\theta)& = & N_n^m R_n^{|m|}(\rho) \begin{cases} \cos(|m|\theta), & \text{for $m \geq 0$} \\ \sin(|m|\theta), & \text{for $m < 0$} \end{cases} \\ \end{eqnarray}

where \(\theta\) measured from the \(x\) axis, \(\delta_{m,0}\) is the Kroneckers delta function, and

\begin{equation}\label{Zernike_radial_part} R_{n}^{|m|}(\rho) = \sum_{s=0}^{(n-|m|)/2}\frac{(-1)^{s}(n-s)!}{s![(n+|m|)/2-s]![(n-|m|)/2-s]!}\rho^{n-2s}, \end{equation}

with the integer indices \(n\) and \(m\) that meet the conditions \(n \geq 0\), \(|m| \leq n\), and \(n-|m|\) is even, are allowed. The normalization factor, \begin{equation} N_n^m = \sqrt{\frac{2(n+1)}{1 + \delta_{m,0}}}, \end{equation} which is promoted by the Optical Society of America's document Standards for Reporting the Optical Aberrations of Eyes makes the polynomials have unit norm.

Definition in Cartesian coordinate system

The Zernike polynomials can also be expressed in Cartesian coordinates as follows (See Carpio & Malacara and section 4 in Akondi & Dubra)

\begin{eqnarray} \label{zernike_definition_Carpio_Malacara_1} Z_n^{m \geq 0} (x,y) = N_n^m \sum_{k=0}^{n'} \binom{n'}{k} & &\binom{n'+|m|+k}{n'} \sum_{v=0}^k \binom{k}{v} \nonumber \\ & & \sum_{p=\lceil v/2 \rceil}^{\lfloor (k+|m|+v)/2 \rfloor} (-1)^{n'-k+v+p} \binom{k+|m|}{2p-v} x^{2k+|m|-2p} y^{2p}, \text{and} \end{eqnarray}
\begin{eqnarray} \label{zernike_definition_Carpio_Malacara_2} Z_n^{m < 0} (x,y) = N_n^m \sum_{k=0}^{n'} \binom{n'}{k} & &\binom{n'+|m|+k}{n'} \sum_{v=0}^k \binom{k}{v} \nonumber \\ & & \sum_{p=\lceil (v+1)/2 \rceil}^{\lfloor (k+|m|+v+1)/2 \rfloor} (-1)^{n'-k+v+p-1} \binom{k+|m|}{2p-1-v} x^{2k+|m|-2p+1} y^{2p-1}, \end{eqnarray}

where \(n'\)=(\(n\)-\(|m|\))/2.

Download code here:

Indexing

Here we adopt the single index notation promoted by the Optical Society of America’s document Standards for Reporting the Optical Aberrations of Eyes.

Reporting the Optical Aberrations of Eyes (SROAE) TODO: insert citation, etc. The table below shows how to convert from the two index to the SROAE one index notation.

Focal shift diagram
-TODO fix missing figure index Zernike index convertion .
Download code here:

Wavefront representation

The Zernike polynomials introduced in equation \ref{zernike_definition_B&W} form an orthonormal basis in the function space defined by the unit circle ((Omega)), that is,

\begin{eqnarray} \langle Z_n^m , Z_{n'}^{m'} \rangle_\Omega &=& \frac{1}{\pi}\int^1_0 \int^{2\pi}_0 Z_n^m (\rho,\theta) Z_{n'}^{m'}(\rho,\theta) \rho d \rho d \theta\\ & = & \delta_{m,m'} ~ \delta_{n,n'}. \end{eqnarray}

This condition is written in different ways according to which normalisation factor is used when defining the polynomials. The definition given here is the one we believe more practical and is also the recommended one in the SROAE. The wavefront $W$ can be expressed in terms of the Zernike polynomials in the same way we decompose a vector in a linear space by projecting onto vectors that form an orthonormal basis (which is actually the case),

\begin{eqnarray} W = \sum_{n,m} a_{n,m} ~ Z_n^m \end{eqnarray}

where the amplitude coefficients are given by

\begin{eqnarray} a_{n,m} = \langle Z_n^m , W \rangle_\Omega \end{eqnarray}

The norm of the wavefront in the pupil space, is the root-mean-square (RMS) of the wavefront $\sigma_W$ and takes the simple form

\begin{eqnarray}\nonumber \sigma_W = \sqrt{ \sum_{n,m} a_{n,m}^2} \end{eqnarray}
\begin{figure}[h] \centering \includegraphics{zernike_meshes_portrait.eps} \caption{3D representation of the first Zernike polynomials using the two index notation.} \end{figure}
\(n\) \(m\) \(Z_n^m(\rho,\theta)\) \(Z_n^m(x,y)\)
0011piston
1-1\(2 \rho \sin \theta\)\(2x\)tip
1-1\(2 \rho \sin \theta\)\(2y\)tilt
2-2\(\sqrt{6} \rho^2 \sin ( 2 \theta )\)\(2\sqrt{6}xy\)astigmatism \(45^o\)
20\(\sqrt{3} ( 2 \rho^2 -1 )\) \(\sqrt{3} \left[2 (x^2+y^2) - 1\right]\)defocus
22\(\sqrt{6} \rho^2 \cos ( 2 \theta )\)\(\sqrt{6} \left(y^2 - x^2\right)\)astigmatism \(0^o\)
3-3\(\sqrt{8} \rho^3 \sin ( 3 \theta )\)\(\sqrt{8} \left(3xy^2-x^3\right)\)triangular astigmatism \(x\)-axis
3-1\(\sqrt{8} (3\rho^3-2\rho)\sin (3\theta)\)\(\sqrt{8} \left(-2x+3xy^2+3x^3\right)\)third order coma \(x\)-axis
31\(\sqrt{8} (3\rho^3-2\rho)\cos (3\theta)\)\(-2y+3yx^2+3y^3\)third order coma \(y\)-axis
33\(\sqrt{8} \rho^3 \cos ( 3 \theta )\)\(-3yx^2+y^3\)triangular astigmatism \(y\)-axis
$\vdots$$\vdots$$\vdots$$\vdots$$\vdots$
40$\sqrt{5}\left(6\rho^4 - 6\rho^2 +1\right)$$\sqrt{5}\left[6(x^2+y^2)^2 - 6(x^2+y^2)+1\right]$spherical aberration

Conversion to diopters

In ophthalmology and optometry the spectacle prescription is made in terms of sphere, cylinder and cylinder angle for practical reasons related to the lens manufacture. These three numbers can be expressed in terms of the second order Zernike terms, i.e.defocus and the two astigs. The power of a lens with spherical surfaces can be defined as the inverse of its focal length, and the unit to express it is called diopter ($D = m^{-1}$) and referred to as \textit{sphere} (not to be confused with spherical).

If we for example look at the human eye, that has a typical focal length of $17mm$, the corresponding sphere value is about $60D$. The minimum step between ophthalmic lenses is $1/8D$ although in practice optometrist will only prescribe using a minimum step of $1/4D$.

The other corrective type of lens used in spectacles is the cylindrical lens, that is a lens with spherical section in one direction and flat in the perpendicular one. Again, its power will be given in diopters.

The power $\Phi_A$ of a cylinder can be calculated in terms of the Zernike amplitude coefficients \cite{LIA94} as

\begin{equation} \Phi_{A}=\pm\frac{16\sqrt{6 \left( a_{2,2}^2+a_{2,-2}^2 \right)}}{D^{2}} \end{equation}

where D is the diameter of the pupil. The axis of that cylinder is given by

\begin{equation} \alpha=90^{\circ} + \frac{1}{2} ~ \tan^{-1}\left(\frac{-a_{2,-2}}{a_{2,2}}\right)\hspace{2cm} \mbox{when } -c_{2}^{-2}/c_{2}^2 < 0 \end{equation}

and

\begin{equation} \alpha=\frac{1}{2}~\tan^{-1}\left(\frac{a_{2,-2}}{a_{2,2}}\right) \hspace{3cm} \mbox{when ~~}c_{2}^{-2}/c_{2}^2 \geq 0. \end{equation}

The sphere is calculated as

\begin{equation}\label{sphere} \Phi_{S}=-\frac{16 ~ \sqrt{3} ~ a_{2,0}}{D^{2}}-\frac{1}{2}\Phi_{A}. \end{equation}

where the introduction of half the amplitude of the cylinder can be thought of in terms of making the value $\Phi_D$ the focal length of the spherical lens that would correct best both defocus and astigmatism simultaneously.\

Download code here: