slmsuite.holography.toolbox.phase.zernike#
- zernike(grid, index, weight=1, **kwargs)[source]#
Returns a single real Zernike polynomial as a subset of
zernike_sum(). These polynomials are commonly used as an orthonormal basis for optical aberration and are used in a number of places insideslmsuitefor aberration compensation.Under the hood, this calls
zernike_sum()with a single term. Seezernike_sum()for more information about normalization and scaling.- Parameters:
grid ((array_like, array_like) OR
SLM) – Meshgrids of normalized \(\frac{x}{\lambda}\) coordinates corresponding to SLM pixels, in(x_grid, y_grid)form. These are precalculated and stored in anySLM, so such a class can be passed instead of the grids directly.index (int) – ANSI Zernike index defining the polynomial.
weight (float) – Amplitude of the polynomial.
**kwargs – Passed to
zernike_sum().
- Returns:
The phase for this function.
- Return type:
numpy.ndarray