Code covered by the BSD License  

Highlights from
Zernfun2a.m

5.0

5.0 | 1 rating Rate this file 12 Downloads (last 30 days) File Size: 3.07 KB File ID: #25475

Zernfun2a.m

by

 

02 Oct 2009 (Updated )

Alternative to Paul Fricker's Zernfun2.m. Allows selection of industry standard Zernike orderings.

| Watch this File

File Information
Description

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.

Acknowledgements

Zernike Polynomials inspired this file.

MATLAB release MATLAB 6.1 (R12.1)
Other requirements Requires Paul Fricker's Zernike Polynomials package.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
30 Aug 2010 Bob

Great function, but because of not available even oder odd-function this function was not usable for newer versions of MATLAB.

I have changed for the section:

if Ordering == 'Noll'

the following three lines (old --> new):

ind = find(odd(n)); --> ind = find(mod(n,2));
ind = find(even(n)); --> ind = find(1-mod(n,2));
ind = find(even(p)); --> ind = find(1-mod(p,2));

Now it works within Matlab 7.6.0 (2008a).

Tanks!

Updates
06 Oct 2009

Added comments to provide more references.

Contact us