Revisiting the Hartmann Test
| Benjamin Wells
* a, John Myrick b
a: Wells Research and Development, 15 A Lewis
Street, Lincoln MA 01773
b: ThorLabs Inc. 435 Route 206 North, Newton NJ,
07860
Abstract
We have implemented a variation
of the classical Hartmann test on a commercial
lens bench. We use a single motorized aperture,
an image analysis microscope with CCD detector,
and image processing software for scanning in
X,Y. In a short time, it is possible to measure
and plot the wavefront tilt at hundreds of points
across the entrance pupil.
The technique combines both
high sensitivity and large dynamic range. For
example,it is possible to measure wavefront tilt
to 1/200 wave across a 1.5 mm sampling aperture.
The high dynamic range allows useful measurement
of poorly molded plastic lenses whose surface
figure would not yield useable fringes on an interferometer.
Keywords: Hartmann test, lens
testing, wavefront sensing
Background
Over a century ago,
J. Hartmann published a method for testing telescope
objectives using a perforated screen
[1] . Small holes in the screen sample the
imaging performance of the lens (or mirror) at
various places in the aperture. If the lens or
mirror were perfect, the location of the image
would not depend on the location of the sampling
aperture. Variations on the basic test include
fixed apertures, scanning apertures, and the more
recent Shack-Hartmann sensor.
In theory, the test is capable
of measuring the local wavefront error with remarkable
resolution. However, in practice, it is difficult
to measure image location to the required precision
with an eyepiece. In addition, the tedium of measuring
tens or hundreds of spots is a powerful deterrent.
For these reasons the classical test is not often
used.
Shack Hartmann sensor
The Shack-Hartman
sensor is a modern variation on the classic test
[2]
. An array of tiny lenslets samples the incoming
wavefront. The lenslet array transforms the incident
wavefront to an array of dots on a CCD array or
similar detector. The nominal spot locations are
calibrated using a plane wavefront. When illuminated
with a non-plane wavefront, deviation of each
spot from the nominal location is a measure of
local slope in the wavefront. |

Figure 1: Shack-Hartman sensor
|
| This
is a powerful technique, and hardware is commercially
available from multiple vendors
[3] .
The method we describe below
is another variation on the Hartmann test, one
that is particularly applicable to lens testing.
Overview of the problem
of lens testing

|
| Figure 2: well
corrected lens |
Figure 3: lens
with severe aberration |
| When a perfectly
corrected lens is illuminated with plane wavefront,
the result is converging spherical wavefront. Such
a wavefront converges to a characteristic point
spread function (PSF), an Airy disk distribution
whose size depends only on the F-number of the lens
and the wavelength of the light. A
less well corrected lens will also form a converging
wave front, but one with deviations from a perfect
sphere. The resulting PSF will be larger than
the theoretical minimum Airy disk. Such deviations
may be due to limitations of the basic lens design,
or due to imperfect realization of the design.
In most real-world situations it is a combination
of both.
A lens bench is an apparatus
that allows us to view the PSF. On older equipment,
a visual microscope was used for the evaluation
[A] . More modern equipment can also display
the image on a computer screen. In some cases,
the bench can make measurements of image quality
such as contrast or MTF.
In any case, the PSF gives only
limited information about the wavefront. If the
PSF size approaches the limiting size set by diffraction,
we can deduce that the wavefront must be perfectly
spherical. However, if the PSF is larger we may
wonder why the spot is larger. Knowledge of the
wavefront can give helpful insight into this question.
Hartmann test with
single aperture When
a small aperture is introduced, only a small portion
of the lens contributes to forming the PSF image. |
| Figure 4: lens
with sampling aperture |
Figure 5: Geometry
detail |
| Unless the wavefront
is extremely severely aberated, the locally sampled
wavefront approximates a spherical wavefront with
superimposed tip. As a result, the PSF image approaches
an Airy disk, whose diameter is given by the familiar
formula: |
 |
| Simple geometry
ties the shift “h” to wavefront tip.
Consider a test lens with 50 mm focal length, and
a 1.5 mm sampling aperture. In green light the PSF
diameter will be approximately 45 microns. If we
measure the spot location with a precision of 0.25
micron, we are able to measure wavefront tip with
a precision of 1/200,000. Across the 1.5 mm sampling
aperture, this amount of tip corresponds to 1/240
wave. This technique
works even in the face of discontinuous jumps
in wavefront phase, so long as the jumps are only
a fraction of a wavelength. By sampling at a large
number of places across the lens aperture, we
can build up a complete wavefront slope map.
Experimental apparatus
We began with
a commercial lens-testing bench
[B] . A halogen light source with a narrow
band filter illuminates a reticle, typically a
50 micron pinhole. For the tests described in
this paper we used a 550 nm filter. The pinhole
lies in the focal plane of a well-corrected
[C] 200 mm lens. The lens under test follows
the collimator, and forms a real image of the
pinhole in space |
| 
Figure 6: experimental apparatus |
| A microscope
relays the image to the CCD camera chip. For this
paper, a 4X microscope lens was used, although higher
NA lenses would be appropriate for testing faster
lenses. The lens-tester software allows measurement
of spot location to an accuracy of about 1/10 pixel.
With the 4X lens, each camera pixel maps to 1.9
microns at the image plane. We
a constructed a small motorized XY stage to carry
the moveable aperture over a 50 mm square area.
Because high precision is not required, we were
able to use an inexpensive “digital linear
actuator.” This clever device combines a
fixed leadscrew with a stepper motor whose rotor
is threaded. The positional accuracy of the stage
is approximately 1/20 mm, which is adequate for
this application.
A 1.5 mm sampling aperture was
used for the tests described here, picked to be
about 1/50 of the lens aperture. For convenience,
we have chosen place the scan aperture immediately
before the lens, although this is not an essential
requirement.
Control software
We created software to step
the aperture through an XY pattern with programmable
step size. At each point, an image is grabbed,
and the location of the PSF is measured in the
X and Y. If the grid spacing is 2 mm or less,
the system captures and analyzes approximately
2 images per second. At the end of the pattern,
the locations are displayed as an arrow plot of
“ray” errors.
Experimental results
We measured a molded plastic
triplet intended for use in an inexpensive 35
mm camera. The specific lens measured for this
paper was an early shot from the mold, selected
to represent less than sterling performance. Such
a lens would be difficult or impossible to measure
on an interferometer because of the large number
of fringes.
Focal length of the lens was
76 mm. The design aperture was 6.3 mm, or F12.
The error map is shown below. The x-direction
MTF curve is also shown for reference |
| 
Figure 7: ray error plot for
plastic triplet |

Figure 8: MTF plot for same
lens |
| Removing radial
component When testing
a lens on-axis it is desirable to identify and
extract the radial component of ray error. The
purely radial component can be compared to the
sagital ray fan generated by a lens design program.
After removing the radial component, any non-symmetric
residual must be due to fabrication error
To demonstrate this technique
we measured an 80 mm achromatic doublet, intentionally
mounted with the flatter surface towards the collimator.
This mounting position would be expected to generate
a relatively large amount of spherical aberration.
The raw error map is shown below, together with
the best fit to the radial ray error
[D] . |

Figure 9: ray error plot for
reversed doublet |

Figure 10: best fit of radial
ray error.
Note large amount of spherical aberration. |
| The best fit
has the characteristic S shape we would expect from
spherical aberration. After
removing the radial component, the residual fabrication
error looks like this: |

Figure 11: residual ray error
plot after removing radially symmetric content |

Figure 12: Wavefront that would
produce the ray errors shown in figure 11. |
| Converting
measured ray errors to wavefront map
In many situations, the plot
of ray errors is the most useful way to present
the information. However, for some purposes it
is desirable to reconstruct the wavefront phase
map itself.
The literature describes two
main techniques for reconstructing the wavefront:
modal and zonal.
In modal reconstruction
[4] , the wavefront is viewed as series of
orthogonal functions such as Zernike polynomials.
An attempt is made to find the set of polynomials
that best fits the measured slope data.
In zonal reconstruction
[5] , an attempt is made to find the actual
wavefront that would produce the measured slope
data. Because the system is overdetermined, we
seek a solution that minimizes the squared error
terms. Matrix math can be used to solve directly
using SVD. (singular value decomposition) Alternately
SOR (successive over relaxation) can be used to
generate a series of successively better approximations.
The approximations can be shown to converge on
the desired wavefront. We used Southwell’s
SOR method to compute the wavefront map shown
in figure 12.
Fundamental accuracy limitations
We are aware of several factors
that can limit the precision and accuracy of this
technique. The first is mechanical vibration.
Any motion of the microscope translates directly
to error in the ray error plots. We quickly learned
not to touch the fixture during a measurement
cycle. However, once we exercised reasonable care
we found vibration was not the dominant error.
We were concerned with camera
noise, but this turned out not to be a significant
noise source. The Airy PSF spots are quite large
because of the Hartman aperture results in a large
F-number. Noise in individual pixels is averaged
out because so many pixels are involved in the
image.
We also realize that it would
be difficult to separate (for example) spherical
aberration in the microscope lens from spherical
aberration in the lens under test. We believe
the microscope lenses to be of high quality because
of off-line testing
[E] .
The remaining error source is
air path disturbance. Even heat from our hands
was enough to create small thermal disturbances
that could be seen on the when measuring PSF spot
locations. This problem is not unique to our system:
It should be familiar to anyone who has used an
interferometer to evaluate lenses or flats. Nevertheless,
we had to take special care to shield the test
setup from thermal effects.
Comparison to Shack-Hartman
sensor
It should be apparent that the
scanning aperture technique is not appropriate
when dynamic events must be captured. Capturing
several hundred data points with our stage takes
one or two minutes, and this rules out many applications.
Even when making static measurements
the Shack Hartman sensor has some advantage because
the effects of thermal air path disturbances are
less severe over short time spans. However, air
path disturbances are a serious issue for both
measurement techniques.
On the other hand, in the context
of lens evaluation, speed is seldom the driving
issue. The ability to make wavefront measurements
in-situ on the lens bench is of considerable value.
Transferring the lens to a separate (but faster)
instrument could possibly consume as much time
as it saves.
Moreover, the scanning technique
has some outright advantages over the Shack Hartman
sensor
- The number of apertures
is completely adjustable, and not constrained
by the lenslet array.
- With a moving aperture it
is simple to over-sample as shown in figure
14. The Shack-Hartman sensor is limited to adjacent-aperture
sampling, as shown schematically in figure 13.
This may be of value when the wavefront has
high frequency components that would be aliased
by adjacent aperture sampling
[6]
- Closely spaced apertures
do not force a tradeoff between dynamic range
and sensitivity
[F] .
- High sensitivity measurements
are less sensitive to camera noise because the
PSF spot covers many pixels.
|
| 
Figure 13: S-H apertures limit
sampling |

Figure 14: oversampling |
| REFERENCES
* The author
may be contacted by email at ben@wellsresearch.com,
or by phone at 781-258-8667
[A] Purists (including the author) occasionally
prefer an eyepiece to an image on a computer screen.
The human eye has remarkable dynamic range, and
can see subtle detail that is hard to capture
or display with a video camera.
[B] Wells Research OpticStudio model OS-100,
distributed by ThorLabs
[C] This lens was separately tested on an
interferometer to verify wavefront error was less
than 1/20 wave.
[D] The fit was done in Microsoft Excel using
the wonderful “solver” tool. In the
future, we intend to use SVD matrix math to automate
the least-squares fit process.
[E] The next logical step is to use the scanning
technique to measure the microscope lens, but
we have not done this yet.
[F] In a Shack-Hartman sensor, PSF spots
from adjacent lenslets may interfere or even overlap
if the wavefront is highly aberated. Shorter focal
length lenslets minimize this problem, but at
the expense of lower angular sensitivity.
This paper prepared for presentation
at SPIE Annual meeting in San Diego, August 2003
[1] Malacara devotes a full chapter to the
Hartman test, and concludes with an extensive
bibliography: D. Malacara, Optical Shop Testing,
Wiley Interscience, New York, 1992.
[2] See for example: D. Kwo, et al, A Hartman-Shack
wavefront sensor using a binary optic lenslet
array. SPIE Vol 1544: Miniature and Micro Optics:
Fabrication and System Applications.
[3] For example: Wavefront Sciences “CLAS
–2D Wavefront sensor.” www.wavefrontsciences.com
[4] Guang-ming Dai, Moddified Hartman-Shack
Wavefront Sensing and Iterative Wavefront Reconstruction,
SPIE Vol 2201: Adaptive Optics in Astronomy, 1994.
The classic, albeit terse, reference
is: W. H. Southwell, Wave-front estimation from
wave-front slope measurements, JOSA Vol 70,No.
8, August 1980. Kwo, et al (above) gives an easier
to follow presentation of Southwell’s method
[6] J.D. Mansel et al Sub-Lens
Resolution Shack-Hartman Wavefront Sensing, NSF
grant 2WMF572, article available at http://fastloki.stanford.edu/~jmansell/kewfs/kewfs5.pdf |
|
|
| |
|