What does the sampling correspond to in wavefront-based calculations?

This article describes how to interpret the sampling used in wavefront-based analyses such as the Wavefront Map, the PSF and the MTF.

Authored By Ken Moore


Question: Where is the center of the sampling grid for the Wavefront Map and similar analyses?

What does the sampling correspond to in wavefront-based calculations?

As the basis for the discussion, let's look at the sample file "Cooke 40 degree field.ZMX", located in the folder {Zemax}\Samples\Sequential\Objectives\. We start by looking at the Wavefront Map, as this is the fundamental data OpticStudio uses for calculations of the PSF, MTF, and encircled energy. Open up the Wavefront Map (under Analyze...Image Quality...Wavefront) using the following settings:

wavefront map

When doing numerical computations, we want to preserve pupil symmetry, and we want the chief ray to be an actual point in the center of the array. Also, for calculating the FFT we need to center the array on the center of what the FFT routine expects. To do all this, we define the center of the pupil in exit pupil space (the near field, or the spatial domain, depending upon your perspective) as (n/2 + 1, n/2 + 1). So, if you look closely on the Wavefront Map, you will see the left most column is all zeros, as is the bottom row. The exact center is at (17, 17) in this case.

wavefront map

Now let’s look at the PSF. The PSF is the FFT of the Wavefront Map squared. If we plot the PSF using the following settings:


We can see that the PSF is centered on the (n/2, n/2) pixel. So the center is now (16, 16). This is a property of the FFT and the orientation convention OpticStudio uses. While the grid center is at n/2 + 1 in one domain (spatial) it is at n/2 in the other (frequency). Look closely at the picture below and you will see there is an extra column on the top and right.

fft psf

Now, the MTF is the autocorrelation of the Wavefront Map, and so it will in general be twice as many pixels wide (ignoring dimensional changes). Thus, to calculate the MTF in OpticStudio the Wavefront Map is first zero-padded from 32x32 to 64x64 and then the autocorrelation is performed. For the surface MTF analysis this is actually done by squaring the FFT of the wavefront, and then taking the FFT again – in other words the MTF is the Fourier transform of the PSF. With the following settings for the FFT MTF surface plot:

fft surface mtf

fft surface mtf

The peak is now at (32, 32), or in general at (n/2, n/2).

To determine the frequency spacing in the FFT MTF surface plot, OpticStudio uses the fact that the edge of the autocorrelation is at 1/(λ*F/#), where λ is the shortest wavelength in the system (if we ask for the polychromatic result). OpticStudio actually computes this cutoff frequency for all wavelengths and F/#s and uses the biggest value to scale the entire plot. Other wavelengths are scaled in pupil space so that the PSF’s are all sampled at the same point spacing. The cutoff frequency is then doubled to get the OTF width (that is the 850.06 cycles/mm listed in the plot above), then divide by 2*n (because of the zero-padding used in the MTF calculation) to get the point spacing.

For example, in the above case, the OTF width is 850.06 cycles/mm, and the sampling is 32x32. Thus, the point spacing is 850.06/64 = 13.282 cycles/mm. The center of the FFT MTF surface plot, which again is at (n/2, n/2) = (32, 32), corresponds to the zero frequency point in the plot. In other words, column 32 corresponds to an X-frequency of 0 cycles/mm. Column 33 then corresponds to 13.282 cycles/mm, column 34 to 26.564 cycles/mm, etc. The last column, column 64, corresponds to 32*13.282 = 425.03 cycles/mm. The first column, column 1, corresponds to -31*13.282 = -411.748 cycles/mm.

Just as with the PSF, there is one more column on the right and on the top of the FFT MTF surface plot relative to the left and the bottom. Thus, the left and right columns are not exactly opposite in frequency coordinate (and neither are the top and bottom rows). But remember that each column corresponds to the "center" of the frequency coordinate. If you take into account the "half pixel" on either side of left and right edge (or top and bottom), you'll see that the width is exactly 850.06 cycles/mm. The edges of the finite-area pixels cover that full width, but the center coordinates of each pixel (i.e. each column or row) are inset by half a pixel on either end.


Was this article helpful?
0 out of 0 found this helpful



Article is closed for comments.