In the optical system analysis, fabrication, and test community, two different sets of Zernike polynomials are commonly used. These sets are both different than the one provided by Paul Fricker by his Zernfun2.m, part of his very helpful Zernike package.
Zernfun2a allows one to select either the University of Arizona "Fringe" set or the so-called 'Standard" or "Noll" set of Zernikes. The former is commonly used in optical fabrication and testing. The latter is often used in optical system performance analysis and theoretical studies.
The way that different sets of Zernike polynomials have been defined causes much confusion and difficulty in communication between individuals working in different organizations. This file is offered in the hope that it will help eliminate some of this.
As an example, some optics people define angles as being measured from the local Y axis rather than the local X axis! While the current file does not deal with that issue (both Paul and I define angles as being measured from the X axis), it does handle the wildly different definitions of exactly which Zernike terms are included in the first 36 or 37 terms, and what the exact ordering of these terms is.