Professional Documents
Culture Documents
Using Maple
Marc A. Murison
Abstract: This paper describes a package for analytical ray tracing of relatively simple optical systems.
AESOP (An Extensible Symbolic Optics Package) enables analysis of the effects of small optical element
misalignments or other perturbations. (It is possible to include two or more simultaneous independent per-
turbations.) Wavefront aberrations and optical path variations can be studied as functions of the perturbation
parameters. The power of this approach lies in the fact that the results can be manipulated algebraically,
allowing determination of misalignment tolerances as well as developing physical intuition, especially in the
picometer regime of optical path length variations.
52 MapleTech Vol. 4, No. 2, pp. 52–62; ISSN 1061-5733
c Birkhäuser Boston 1997
Analytical Study of Optical Wavefront Aberrations Using Maple
cfa.harvard.edu/ reasen/points.html.
where is the perpendicular distance from the axis of sym- In an analytical ray tracing procedure, one can consider
metry, f is the focal length at the vertex, and " is the conic a single ray that is transformed by passage through an opti-
constant. The quadric surface types as a function of " are: cal system. The resulting output ray then strikes a detector
surface. The position on the detector of the output ray inter-
"=0 paraboloid of focal length f section point, the output ray direction, and the total OPL (the
"=1 spheroid of radius 2 f optical path from the incident ray anchor point to the detec-
"<0 hyperboloid tor surface) are all functions of the input ray anchor point and
0<"<1 prolate spheroid direction. Taking the input ray anchor point position as lying
">1 oblate spheroid q on an incident wavefront (a function we can represent ana-
The eccentricity of a prolate spheroid is e = 1, "
" , and
lytically, usually a plane), we can construct a corresponding
q output wavefront from the ray trace of the input ray.
that of an oblate spheroid is e = ",1 . Commonly, the
"
conic constant is denoted by k = " , 1 so that k = 0 refers
S URFACE I NTERSECTION P OINT
to a spheroid. The quantity used here is more convenient for Given a ray propagating toward an optical surface, we must
our purposes, since the paraboloid is the most frequently en- find the intersection point of the ray with that surface. Define
countered focusing surface in astronomical optics. For small the surface local coordinate frame with origin at the surface
values of we have vertex and Z axis along the vertex normal. An equation for
> an input ray parameterized by optical path t is
r( ) = +
assume(f>0):
>
t r0 t v (2)
sag := rhoˆ2 / (2*f + sqrt(4*fˆ2 -
> epsilon*rhoˆ2)): where r = [x ; y ; z ] is the ray anchor point and v is the
0 0 0 0
> s(rho) = series( sag, rho, 7 ); unit direction vector
The leading term we recognize as the sagitta of a where ( ; ) are the polar and azimuthal angles with respect
paraboloid. All conicoids are paraboloidal at second order. to the +Z axis and counterclockwise from the +X axis in the
Hence, all conicoids exhibit arbitrarily good focusing of a local coordinate frame, respectively. The equation of the sur-
sufficiently narrow, on-axis input wavefront. The first aber- face — the sagitta — in the local coordinate frame is of the
rational term is spherical aberration, which enters in with a form
linear term at fourth order in radius. We see that wavefront
aberrations are a function of conicoid family type.
g( )=
x; y; z z , x; ys( ) = 0 (4)
R AYS , R AY B UNDLES , AND WAVEFRONTS We can find the value of t which corresponds to the intersec-
tion point (x,y,z) by substituting
In the geometric optics regime, we may develop the concept 9
of a wavefront W as follows. Consider an infinitely narrow x = x0 + t sin cos = x0 + t vx =
beam, or ray, r, defined by an anchor point p, a point in space y = y0 + t sin sin = y0 + t vy (5)
from which the ray originates; a propagation direction v, con- z = z0 + t cos = z0 + t vz ;
veniently but not necessarily represented as a unit vector; and
an optical path length (OPL) t, defined as the index of refrac- into the scalar equation g(x; y; z ) and solving for t.For a
tion n of the propagation medium integrated over a geometric (perhaps perturbed) quadric surface there will in general be
RL
distance L from p along v: t = n( )
l dl . Hence, we may two solutions. AESOP automatically chooses the correct so-
= +
0
write r p t v . lution. Then we substitute the solution for t back into the
A wavefront may be viewed as a surface W R3 of equations for the ray, t r( ) = +
r0 t v, to determine the x, y,
constant optical phase propagating through space (or through and z values of the intersection point.
an optical medium). An infinitesimally small neighborhood E XIT R AY D IRECTION
U 2 W of each point p 2 W propagates in a direction v p () Upon encountering an optical surface, a ray must know how
that is normal to W at p. We can therefore associate a ray
with each point of W. We define a ray bundle as the set of to interact with that surface and choose an output direction.
rays belonging to W. A concave wavefront (or portion of a After the intersection point is found, we determine the unit
wavefront) produces a converging ray bundle, and a convex normal vector at that point, thus providing a local reference
wavefront produces a diverging ray bundle. for measuring input and output angles. The normal vector is
easily found from the gradient of the surface equation at the
intersection point.
Rn; m () =
X
2
(,1)k (n , k)! n, k ( 2 ) optical element's surface shape (usually, but not necessarily,
Z axis is coincident with the vertex normal vector. The [dir] asphere The asphere object is one whose conicoidal sur-
and [pos] elements contain, respectively, a Maple vector and face is perturbed by a series of radial ripples. AESOP em-
an AESOP point which describe the surface vertex normal ploys a general asphere model of the form
vector direction and the vertex position, both in the global
2 1
X
reference frame. The [type] element is the object identifier. s() = p + Ak k
2 f + 4 f , " k=1
(24)
Finally, the [coord] table element is a point which contains 2 2
beam A beam object is a Maple table that has four ele- equation bloat seems to go as some power of the number of
ments. The first two elements consist of an AESOP point focusing optical elements in a system. Flat surfaces certainly
[pos], which contains the beam (or ray) anchor position, and contribute to increasing equation complexity, but at a rate that
a Maple vector [dir], which contains the ray propagation di- pales in comparison to that of focussing surfaces.
rection vector. Next is a scalar element [path] for storing the Since we are interested in analyzing optical systems whose
expression corresponding to the accumulated optical path. elements are slightly misaligned, the small parameters to per-
Finally, a beam contains an identifier [' type' ] := ' beam' , which form the series expansion on are naturally the misalignment
procedures may query to check that the object is a beam. An perturbations. Hence, AESOP is not meant to analyze the
associated type() function makes the Maple type procedures very interesting properties of ideal, perfectly aligned optical
aware of beams. It is a beam object which serves as the systems. It requires at least one misalignment or other per-
optical ray being propagated through an optical system. turbation parameter.
For a given optical system, a certain amount (sometimes
H OW AESOP D OES R AY T RACING a great amount) of tinkering on the part of the user is required
An overview of the ray tracing process using AESOP is as to hit upon the best ways of simplifying the cumbersome ex-
follows. pressions so that their size is manageable. Great care has
(1) In a Maple procedure that the user writes, the user first been taken in the types of simplification taking place in the
defines the various optical elements comprising the optical AESOP ray tracing routines. However, they are no doubt
system. These surfaces are assembled into a Maple list which optimized for the particular systems the author has analyzed
AESOP routines will use. Perturbations (misalignments) are and will therefore perhaps be less than optimum for other
applied in the form of rotations and/or translations of spec- kinds of optical systems. Hence, AESOP is nowhere near
ified optical elements. AESOP provides object rotation and the “black box” stage, where a user can provide necessary
translation procedures to make this a simple process. input, crank the handle, and magically produce an answer
(2) The user then defines the input ray, which is subse- without caring overmuch about the internals of the black box.
quently launched into the optical system by calling the AE- Nonetheless, AESOP can be quite useful and represents a
SOP procedure raytrace(). AESOP then automatically traces significant advance in capability for analyzing perturbed op-
the ray to each successive optical element, performing series tical systems and performing misalignment sensitivity stud-
expansions on the perturbation parameter(s) as necessary and ies. It also serves as an invaluable check on numerical pro-
simplifying the cumbersome expressions as much as possi- grams as well as an essential aid to developing reliable in-
ble, until finally an output ray is produced at the detector. sight into the arcane and beautiful world of high-precision
Progress during this process is communicated via informa- optics.
tional messages and key intermediate expressions to the mon-
itor screen. If nothing else, there is plenty of stuff the user Availability
can peruse while waiting for the ray trace to finish, since AE-
SOP is intentionally a bit chatty. The AESOP source code, help files, examples, background
(3) The OPD is then calculated from the output ray ex- papers, and other information may be found at the web site
pressions, followed by calculation of the aperture-averaged http://aa.usno.navy.mil/AESOP/.
OPD.
(4) Optionally, the Zernike components of the OPD are References
determined next, either at the Maple prompt or from within Note: copies of relevant Smithsonian Astrophysical Obser-
the user's driver procedure. The resulting Zernike coeffi- vatory (SAO) Technical Memoranda may be obtained from
cients may then be combined to produce wavefront aberra- the author. They are also available at
tion plots. The aberrated wavefronts are represented by 3D http://aa.usno.navy.mil/AESOP/.
Maple surface plots. Maple procedures are supplied for mak-
ing the wavefront plots in the Maple worksheet.
An illustrative example of this entire process for a simple
References
beam compressor is shown in Appendix A. [1] M. Born, and E. Wolf: Principles of Optics, sixth edi-
In practice, the essential step for useful analytical ray tion, Pergamon, Section 9.2, (1980).
tracing is to make series expansions at each intersection of
a ray with an optical surface. (The original insight for this [2] K.J. Johnston, P.K. Seidelmann, M.E. Germain, D.M.
trick is due to R.D. Reasenberg.) This reduces the “equa- Monet, M.A. Murison, S. Urban, N. Davinic, L.J.
tion bloat” considerably. Even so, it is still rather easy to Rickard, K. Weiler, M. Shao, A. Vaughan, J. Fansen
cause the intermediate expressions to mushroom in size so and D. Norris: “Fizeau astrometric mapping explorer
that they overwhelm the available machine resources. The (FAME)”, submitted to Astronomical Journal, (1997).
[3] L. Lindegren and M.A.C. Perryman: “GAIA: Global [14] SIM97. http://huey.jpl.nasa.gov/sim/
astrometric interferometer for astrophysics”, Astron.
and Astrophys. Supp. 116, p. 579, (1996). [15] W.T. Welford: Aberrations of Optical Systems, Adam
Hilger, Boston, (1986).
[4] S. Loiseau and F. Malbet: “Global astrometry with
OSI”, Astron. and Astrophys. Supp. 116, p. 373, (1996). [16] F. Zernike: Physica 1, p. 689, (1934).
+ 25 (600 + 28f f ) R
4 4
BeamComp [364]: Done!
4
This run took 364 seconds on a 100 MHz Pentium ma-
, 5125 (800 + 33 f ) R 10 10
WAVEFRONT
+ 2565 (1400 + 58 f ) R 8 8
>
[theta,cos(phi),sin(phi),rho],
simplify )); f 2
1
+ (, 1024 f + 256
R 11
1 R ,1R
11 9 9 7 7
f 11
1 R
5
15
R 3 3
122880 f 11
[...output deleted...]
The Zernike series coefficients are now in a globally ac-
1
, 30720 (138960000+ 5779097 f ) R 9 9
cessible table called c, and the Zernike wavefront represen-
f 9 tation is stored in the global variable S. Determination of the
1
+ 384 (4266000+ 179791 f) R 7 7 Zernike series coefficients is a time-consuming process (this
f 7 particular example took 11
minutes), but it is not memory
1
, 192 (4704000+ 200159 f) R 5 5 intensive like the ray tracing process. To show an example,
f 5
the classical coma term is
>
+ 241 (1086000 + 46621 f) R 3 3 ZernikeTerm(3,1,c);
f 3
1 R (,1611482048 R f
( 5160960
, 13 (198000+f8821 f ) R )cos()) + ((
3 6 3
3
, 38338560000 R f , 115218432000 R f6 2 2 6
1 (124000 + 5294 f ) R 12 12
+ 123002880000 f + 72963072000 R f 8 4 4
2048 f 12
+ 3136046592 R f , 4989153792 R f
4 5 2 7
f 10
81 R(
+ 733365255 R f ) f , 215040 3 11 3
1
+ 64 (24000 + 1071 f) R 8 8
f
8 75 R + 17920 f , 5376 R f , 320 R f
8 8 2 6 6 2
1
, 32 (26000 + 1181 f) R 6 6
+ 1344 R f ) f )(3 , 2 )cos()
4 4 10 3
f
6
We see that it has a first-order term in (other aberrations For the first plot, we subtract the average wavefront. The
begin at second order in ). Hence, we expect coma to be an resulting wavefront residual is
important aberration resulting from rotational misalignment > read`plotting.p`:
of the primary mirror. (In fact, for this particular example, it > PlotZernikeWavefront(opd,theta,c,[[0,0]],
turns out that all of the coma terms [3,1], [5,1], [7,1], etc. are > `microns`,evalf(0.2*arcsec), 100.0,10.0,
first order in the perturbation, while the other aberrations are
> orientation=[-70,65]);
second or third order in the perturbation. Hence, coma is by
far the dominant aberration after wavefront tilt, as we shall
see below.)
We now subtract the original OPD from the Zernike se-
ries representation to check that the two are indeed equiva-
lent. 1.5
0 0.5
OPD 0
This is reassuring! We see by calculating the “cost” of
each that the Zernike series representation contains quite a -0.5
few more terms than the heavily simplified (in the Maple -1 10
sense) expression for OPD. -1.5
0
> cost(S); -10
-5
0
251 additions + 2433 multiplications
radius (cm) 5
10 -10
+ 30 divisions + 17 functions
(Wavefront Error (microns))
> cost(opd);
(The fifth argument is a string which sets the physical
53 additions + 599 multiplications units of the plot, in this case microns.) The plot represents
+ 28 divisions + 4 functions a mapping between the input beam coordinates (XY plane)
and the output wavefront (OPD). Divide the horizontal scale
A NALYSIS OF THE WAVEFRONT A BERRATIONS by the compression factor (C = 10
in this case) to get output
beam coordinates. We recognize that the primary aberration
Now comes the fun part. We will read in, among others, the
is, as expected, wavefront tilt, to the tune of about 1.5 mi-
Zernike plotting function, PlotZernikeWavefront(). This
crons at the edge of the beam. Hence, let us additionally
Maple procedure produces a color 3D Maple surface plot of
remove the tilt term:
the residual wavefront after the specified Zernike terms have
been subtracted. Hence, it is a useful visual and quantitative > PlotZernikeWavefront( opd, theta, c,
> [[0,0],[1,1]],
tool for determining what are the important aberrations for > `microns`,evalf(0.2*arcsec), 100.0,10.0);
the particular system and misalignment under study. Typi-
cally, one takes a look at a plot of the wavefront, from which
the aberration with the largest magnitude is usually appar-
ent. One then subtracts the Zernike term(s) corresponding
to that aberration and views the resulting residual wavefront,
from which the next most important aberration is now appar-
ent. This process is repeated as desired, resulting in a series
of 3D plots showing all of the important aberrations. In our
example here, we use a primary mirror focal length of 100
cm and an input beam radius of 10 cm, which sets the out-
put beam radius at 1 cm since we have previously taken the
compression ratio to be 10. For this session, a perturbation
1
magnitude of 0.2 arc second ( microradian) of primary
mirror rotation is specified. Changing the perturbation mag-
nitude only changes the scale of the aberrations and not their
relative importance, as long as we remain in the regime that
is valid within the expansion orders used.
-0.1 -10
-0.2 0
10
5
0 0.2
radius (cm) -5
-10 10
(microns))
0.1
(Wavefront Error
All of the coma terms are first order in the rotation angle ,
-0.1 -10
and therefore dominant. Let us then additionally subtract all
orders of coma:
-0.2 0
> PlotZernikeWavefront( opd, theta, c, 10
> [[0,0],[1,1],[3,1],[5,1],[7,1],[9,1],
5
0
radius (cm) -5
> [11,1]], -10 10
> `pm`, evalf(0.2*arcsec), 100.0, 10.0);
(Wavefront Error (fm))
Now we recognize exceedingly small 0.2 fm residuals
due to trefoil ([3,3], [5,3], etc.) aberrations. These aberra-
tions happen in this system to be third order in the perturba-
tion angle . For example,
80 > ZernikeTerm(3,3,c);
1
860160 R (46914105 R f
60
3 3 8
OPD
+ 1127700000 R , 2453760000 R f
40
8 6 2
+ 200878720 R f , 7182336000 R f
4 5 2 6
, 315227136 R f + 7526400000
0 0
10
5
2
f 7 8
+ 337559040 f ) cos(3 ) f
0
radius (cm) -5 9 3 11
-10 10
(pm))
(Wavefront Error C ONCLUSION