ZernikeCalc

A Matlab function to work with Zernike polynomials over circular and non-circular pupils.

You are now following this Submission

This function either displays Zernike polynomials over a circular, hexagonal, elliptical, rectangular or annular shaped pupil, or fits surface data to these pupil shapes. See Mahajan, V.N., G.-m. Dai, "Orthonormal polynomials in wavefront analysis: analytical solution," J. Opt. Soc. Am. A, Vol. 24, No. 9, Sept. 2007 for a description of Zernike polynomials for non-circular pupil shapes. Can specify the Zernikes to use in j-ordering or (n,m) notation, Mahajan/Noll or Born&Wolf normalization, Fringe subset, and which sign convention to use. A mask can be specified to select a subset of the surface data to use to fit the Zernike polynomials. Least squares fit coefficients are calculated. If no surface data is specified then the function displays the sum of the Zernike polynomials specified over the pupil shape specified. The unit circle's center and radius in pixel units to be used in the fitting can be specified.

Cite As

Nikolas Romer (2026). ZernikeCalc (https://uk.mathworks.com/matlabcentral/fileexchange/33330-zernikecalc), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.1.2.0

Added information in comments about coordinate system used & suggestions for dealing with data from exterior sources.

1.1.0.0

Added non-circular default masks for non-circular pupil shapes to allow easy display of the non-circular polynomials.

1.0.0.0