ABCD description

PAOS implements the paraxial theory described in Lawrence et al., Applied Optics and Optical Engineering, Volume XI (1992).

In PAOS, this is handled by the classes ABCD and WFO (see POP description).

Paraxial region

Following e.g. Smith, Modern Optical Engineering, Third Edition (2000), the paraxial region of an optical system is a thin threadlike region about the optical axis where all the slope angles and the angles of incidence and refraction may be set equal to their sines and tangents.

Optical coordinates

The PAOS code implementation assumes optical coordinates as defined in Fig. 15.

../../_images/coordinates.png

Fig. 15 Optical coordinates definition

where

  1. \(z_{1}\) is the coordinate of the object (\(<0\) in the diagram)

  2. \(z_{2}\) is the coordinate of the image (\(>0\) in the diagram)

  3. \(u_{1}\) is the slope, i.e. the tangent of the angle = angle in paraxial approximation; \(u_{1} > 0\) in the diagram.

  4. \(u_{2}\) is the slope, i.e. the tangent of the angle = angle in paraxial approximation; \(u_{2} < 0\) in the diagram.

  5. y is the coordinate where the rays intersect the thin lens (coloured in red in the diagram).

The (thin) lens equation is

(1)\[-\frac{1}{z_1}+\frac{1}{z_2} = \frac{1}{f}\]

where \(f\) is the lens focal length: \(f > 0\) causes the beam to be more convergent, while \(f < 0\) causes the beam to be more divergent.

The tangential plane is the YZ plane and the sagittal plane is the XZ plane.

Ray tracing

Paraxial ray tracing in the tangential plane (YZ) can be done by defining the vector \(\vec{v_{t}}=(y, u_{y})\) which describes a ray propagating in the tangential plane. Paraxial ray tracing can be done using ABCD matrices (see later in Optical system equivalent).

Note

In the sagittal plane, the same equation apply, modified when necessary when cylindrical symmetry is violated. The relevant vector is \(\vec{v_{s}}=(x, u_{x})\).

PAOS implements the function raytrace to perform a diagnostic Paraxial ray-tracing of an optical system, given the input fields and the optical chain. This function then prints the ray positions and slopes in the tangential and sagittal planes for each surface of the optical chain.

Several Python codes exist that can implement a fully fledged ray-tracing. In a next PAOS version we will add support for using one of such codes as an external library to be able to get the expected map of aberrations produced by the realistic elements of the Ariel optical chain (e.g. mirrors)

Example

Code example to call raytrace, provided you already have the optical chain (if not, back to Parse configuration file).

from paos.core.raytrace import raytrace
raytrace(field={'us': 0.0, 'ut': 0.0}, opt_chain=opt_chains[0])
['S02 - LOS tilt        y:  0.000mm ut: 1.745e-03 rad x:  0.000mm us: 0.000e+00 rad',
 'S03 - Move to M1      y:500.000mm ut: 1.745e-03 rad x:  0.000mm us: 0.000e+00 rad',
 'S04 - M1              y: 49.136mm ut: 4.294e-01 rad x:  0.000mm us: 0.000e+00 rad',
 'S05 - M2              y: 24.559mm ut:-1.846e-02 rad x:  0.000mm us: 0.000e+00 rad',
 'S06 - FOCUS           y: 19.855mm ut:-1.846e-02 rad x:  0.000mm us: 0.000e+00 rad',
 'S07 - M3              y: 19.855mm ut: 9.637e-02 rad x:  0.000mm us: 0.000e+00 rad',
 'S08 - Ray Centering   y: -0.018mm ut:-6.050e-05 rad x:  0.000mm us: 0.000e+00 rad',
 'S09 - Move to M4      y: -0.006mm ut:-6.050e-05 rad x:  0.000mm us: 0.000e+00 rad',
 'S10 - x tilt - M4     y: -0.009mm ut:-1.124e+00 rad x:  0.000mm us: 0.000e+00 rad',
 'S11 - M4              y: -0.009mm ut: 1.124e+00 rad x:  0.000mm us: 0.000e+00 rad',
 'S12 - x tilt - M4     y:  0.000mm ut: 6.050e-05 rad x:  0.000mm us: 0.000e+00 rad',
 'S13 - exit pupil      y:  0.000mm ut: 6.050e-05 rad x:  0.000mm us: 0.000e+00 rad',
 'S14 - Z1              y:  0.000mm ut: 6.050e-05 rad x:  0.000mm us: 0.000e+00 rad',
 'S15 - L1              y:  0.015mm ut: 6.022e-05 rad x:  0.000mm us: 0.000e+00 rad',
 'S16 - IMAGE_PLANE     y:  0.015mm ut: 6.022e-05 rad x:  0.000mm us: 0.000e+00 rad']

Propagation

Either in free space or in a refractive medium, propagation over a distance \(t\) (positive left \(\rightarrow\) right) is given by

(2)\[\begin{split}\begin{pmatrix} y_2\\ u_2 \end{pmatrix} = \begin{pmatrix} 1 & t\\ 0 & 1 \end{pmatrix} \begin{pmatrix} y_1\\ u_1 \end{pmatrix} = \hat{T} \begin{pmatrix} y_1 \\ u_1 \end{pmatrix}\end{split}\]

Example

Code example to initialize ABCD to propagate a light ray over a thickness \(t = 50.0 \ \textrm{mm}\).

from paos.classes.abcd import ABCD
thickness = 50.0  # mm
abcd = ABCD(thickness=thickness)
print(abcd.ABCD)
[[ 1. 50.]
 [ 0.  1.]]

Thin lens

A thin lens changes the slope angle and this is given by

(3)\[\begin{split}\begin{pmatrix} y_2\\ u_2 \end{pmatrix} = \begin{pmatrix} 1 & 0\\ -\Phi & 1 \end{pmatrix} \begin{pmatrix} y_1\\ u_1 \end{pmatrix} = \hat{L} \begin{pmatrix} y_1 \\ u_1 \end{pmatrix}\end{split}\]

where \(\Phi = \frac{1}{f}\) is the lens optical power.

Example

Code example to initialize ABCD to simulate the effect of a thin lens with radius of curvature \(R = 20.0 \ \textrm{mm}\) on a light ray.

from paos.classes.abcd import ABCD
radius = 20.0  # mm
abcd = ABCD(curvature=1.0/radius)
print(abcd.ABCD)
[[ 1.    0.  ]
 [-0.05  1.  ]]

Dioptre

When light propagating from a medium with refractive index \(n_1\) enters in a dioptre of refractive index \(n_2\), the slope varies as

(4)\[\begin{split}\begin{pmatrix} y_2\\ u_2 \end{pmatrix} = \begin{pmatrix} 1 & 0\\ -\frac{\Phi}{n_2} & \frac{n_1}{n_2} \end{pmatrix} \begin{pmatrix} y_1\\ u_1 \end{pmatrix} = \hat{D} \begin{pmatrix} y_1 \\ u_1 \end{pmatrix}\end{split}\]

with the dioptre power \(\Phi = \frac{n_2-n_1}{R}\), where \(R\) is the dioptre radius of curvature.

Note

\(R>0\) if the centre of curvature is at the right of the dioptre and \(R<0\) if at the left.

Example

Code example to initialize ABCD to simulate the effect of a dioptre with radius of curvature \(R = 20.0 \ \textrm{mm}\) that causes a change of medium from \(n_1 = 1.0\) to \(n_2 = 1.25\) on a light ray.

from paos.classes.abcd import ABCD
n1, n2 = 1.0, 1.25
radius = 20.0  # mm
abcd = ABCD(curvature = 1.0/radius, n1 = n1, n2 = n2)
print(abcd.ABCD)
[[ 1.    0.  ]
 [-0.01  0.8 ]]

Medium change

The limiting case of a dioptre with \(R \rightarrow \infty\) represents a change of medium.

(5)\[\begin{split}\begin{pmatrix} y_2\\ u_2 \end{pmatrix} = \begin{pmatrix} 1 & 0\\ 0 & \frac{n_1}{n_2} \end{pmatrix} \begin{pmatrix} y_1\\ u_1 \end{pmatrix} = \hat{N} \begin{pmatrix} y_1 \\ u_1 \end{pmatrix}\end{split}\]

Example

Code example to initialize ABCD to simulate the effect of a change of medium from \(n_1 = 1.0\) to \(n_2 = 1.25\) on a light ray.

from paos.classes.abcd import ABCD
n1, n2 = 1.0, 1.25
abcd = ABCD(n1 = n1, n2 = n2)
print(abcd.ABCD)
[[1.  0. ]
 [0.  0.8]]

Thick lens

A real (thick) lens is modelled as

(6)\[\begin{split}\begin{pmatrix} y_2\\ u_2 \end{pmatrix} = \hat{D_b}\hat{T}\hat{D_a} \begin{pmatrix} y_1 \\ u_1 \end{pmatrix}\end{split}\]

i.e. propagation through the dioptre \(D_a\) (first encountered by the ray), then a propagation in the medium, followed by the exit dioptre \(D_b\).

Note

When the thickness of the dioptre, \(t\), is negligible and can be set to zero, this gives back the thin lens ABCD matrix.

Note

If a dioptre has \(R \rightarrow \infty\), this gives a plano-concave or plano-convex lens, depending on the curvature of the other dioptre.

Example

Code example to initialize ABCD to simulate the effect of a thick lens on a light ray. The lens is \(t_c = 5.0 \ \textrm{mm}\) thick and is plano-convex, i.e. the first dioptre has \(R = \infty\) and the second has \(R = -20.0 \ \textrm{mm}\), causing the beam to converge. The index of refraction in object space and in image space is that of free space \(n_{os} = n_{is} = 1.0\), while the lens medium has \(n_l = 1.25\).

import numpy as np
from paos.classes.abcd import ABCD

radius1, radius2 = np.inf, -20.0  # mm
n_os, n_l, n_is = 1.0, 1.25, 1.0
center_thickness = 5.0
abcd = ABCD(curvature = 1.0/radius1, n1 = n_os, n2 = n_l)
abcd = ABCD(thickness = center_thickness) * abcd
abcd = ABCD(curvature = 1.0/radius2, n1 = n_l, n2 = n_is) * abcd
print(abcd.ABCD)
[[ 1.      4.    ]
 [-0.0125  0.95  ]]

You can now print the thick lens effective focal length as

print(abcd.f_eff)
80.0

Notice how in this case the resulting \(f_{eff}\) does not depend on \(t_c\).

Magnification

A magnification is modelled as

(7)\[\begin{split}\begin{pmatrix} y_2\\ u_2 \end{pmatrix} = \begin{pmatrix} M & 0\\ 0 & 1/M \end{pmatrix} = \hat{M} \begin{pmatrix} y_1 \\ u_1 \end{pmatrix}\end{split}\]

Example

Code example to initialize ABCD to simulate the effect of a magnification \(M = 2.0\) on a light ray.

from paos.classes.abcd import ABCD
abcd = ABCD(M=2.0)
print(abcd.ABCD)
[[2.  0. ]
 [0.  0.5]]

Prism

The prism changes both the slope and the magnification. Following J. Taché, “Ray matrices for tilted interfaces in laser resonators,” Appl. Opt. 26, 427-429 (1987) we report the ABCD matrices for the tangential and sagittal transfer:

(8)\[\begin{split}P_{t} = \begin{pmatrix} \frac{cos(\theta_{4})}{cos(\theta_{3})} & 0\\ 0 & \frac{n cos(\theta_{3})}{cos(\theta_{4})} \end{pmatrix} \begin{pmatrix} 1 & L\\ 0 & 1 \end{pmatrix} \begin{pmatrix} \frac{cos(\theta_{2})}{cos(\theta_{1})} & 0\\ 0 & \frac{cos(\theta_{1})}{n cos(\theta_{2})} \end{pmatrix}\end{split}\]
(9)\[\begin{split}P_{s} = \begin{pmatrix} 1 & \frac{L}{n}\\ 0 & 1 \end{pmatrix}\end{split}\]

where n is the refractive index of the prism, L is the geometrical path length of the prism, and the angles \(\theta_i\) are as described in Fig.2 from the article, reproduced in Fig. 16.

../../_images/tache.png

Fig. 16 Ray propagation through a prism

After some algebra, the ABCD matrix for the tangential transfer can be rewritten as:

(10)\[\begin{split}P_{t} = \begin{pmatrix} A & B\\ C & D \end{pmatrix}\end{split}\]

where

(11)\[\begin{split}A = \frac{cos(\theta_2) cos(\theta_4)}{cos(\theta_1) cos(\theta_3)} \\ B = \frac{L}{n} \frac{cos(\theta_1) cos(\theta_4)}{cos(\theta_2) cos(\theta_3)} \\ C = 0.0 \\ D = 1.0/A\end{split}\]

Example

Code example to initialize ABCD to simulate the effect of a prism on a collimated light ray. The prism is \(t = 2.0 \ \textrm{mm}\) thick and has a refractive index of \(n_p = 1.5\). The prism angles \(\theta_i\) are selected in accordance with the ray propagation in Fig. 16.

import numpy as np
from paos.classes.abcd import ABCD

thickness = 2.0e-3  # m
n = 1.5

theta_1 = np.deg2rad(60.0)
theta_2 = np.deg2rad(-30.0)
theta_3 = np.deg2rad(20.0)
theta_4 = np.deg2rad(-30.0)

A = np.cos(theta_2) * np.cos(theta_4) / (np.cos(theta_1) * np.cos(theta_3))
B = thickness * np.cos(theta_1) * np.cos(theta_4) / (np.cos(theta_2) * np.cos(theta_3)) / n
C = 0.0
D = 1.0 / A

abcdt = ABCD()
abcdt.ABCD = np.array([[A, B], [C, D]])
abcds = ABCD()
abcds.ABCD = np.array([[1, thickness / n], [0, 1]])

print(abcdt.ABCD)
print(abcds.ABCD)
[[1.59626666e+00 7.09451848e-04]
 [0.00000000e+00 6.26461747e-01]]
[[1.         0.00133333]
 [0.         1.        ]]

Optical system equivalent

The ABCD matrix method is a convenient way of treating an arbitrary optical system in the paraxial approximation. This method is used to describe the paraxial behavior, as well as the Gaussian beam properties and the general diffraction behaviour.

Any optical system can be considered a black box described by an effective ABCD matrix. This black box and its matrix can be decomposed into four, non-commuting elementary operations (primitives):

  1. magnification change

  2. change of refractive index

  3. thin lens

  4. translation of distance (thickness)

PAOS adopts the following factorization:

(12)\[\begin{split}\begin{pmatrix} A & B\\ C & D \end{pmatrix} = \begin{pmatrix} 1 & t\\ 0 & 1 \end{pmatrix} \begin{pmatrix} 1 & 0\\ -\Phi & 1 \end{pmatrix} \begin{pmatrix} 1 & 0\\ 0 & n_1/n_2 \end{pmatrix} \begin{pmatrix} M & 0\\ 0 & 1/M \end{pmatrix} = \hat{T}\hat{L}\hat{N}\hat{M}\end{split}\]

where the four free parameters \(t\), \(\Phi\), \(n_1/n_2\), \(M\) are, respectively, the effective thickness, power, refractive index ratio, and magnification. Not to be confused with thickness, power, refractive index ratio, and magnification of the optical system under study and its components.

All diffraction propagation effects occur in the single propagation step of distance \(t\). Only this step requires any substantial computation time.

The parameters are estimated as follows:

(13)\[\begin{split}M = \frac{A D - B C}{D} \\ n_1/n_2 = M D \\ t = \frac{B}{D} \\ \Phi = - \frac{C}{M}\end{split}\]

With these definitions, the effective focal length is

(14)\[f_{eff} = \frac{1}{\Phi M}\]

Example

Code example to initialize ABCD to simulate an optical system equivalent for a magnification \(M = 2.0\), a change of medium from \(n_1 = 1.0\) to \(n_2 = 1.25\), a thin lens with radius of curvature \(R = 20.0 \ \textrm{mm}\), and a propagation over a thickness \(t = 5.0 \ \textrm{mm}\).

from paos.classes.abcd import ABCD

radius = 20.0  # mm
n1, n2 = 1.0, 1.25
thickness = 5.0  # mm
magnification = 2.0

abcd = ABCD(thickness = thickness, curvature = 1.0/radius, n1 = n1, n2 = n2, M = magnification)
print(abcd.ABCD)
[[ 1.9   2.  ]
 [-0.02  0.4 ]]

Thick lens equivalent

A thick lens can be implemented as two spherical surfaces separated by some distance, and a medium change.

The ABCD matrix is

(15)\[\begin{split}\begin{pmatrix} A & B\\ C & D \end{pmatrix} = \begin{pmatrix} 1 & 0\\ -\Phi_2/n_1 & n_2/n_1 \end{pmatrix} \begin{pmatrix} 1 & L\\ 0 & 1 \end{pmatrix} \begin{pmatrix} 1 & 0\\ -\Phi_1/n_2 & n_1/n_2 \end{pmatrix} = \begin{pmatrix} 1 - L \Phi_1/n_2 & L n_1/n_2\\ L \frac{\Phi_1 \Phi_2}{n_1 n_2} - \frac{1}{n_1} (\Phi_1 + \Phi_2)& n_1/n_2 \end{pmatrix}\end{split}\]

This is equivalent to two thin lenses separated by some distance, described by the ABCD matrix

(16)\[\begin{split}\begin{pmatrix} A & B\\ C & D \end{pmatrix} = \begin{pmatrix} 1 & 0\\ -1/f_2 & 1 \end{pmatrix} \begin{pmatrix} 1 & L n_1/n_2\\ 0 & 1 \end{pmatrix} \begin{pmatrix} 1 & 0\\ -1/f_1 & 1 \end{pmatrix}\end{split}\]

where

(17)\[\begin{split}\frac{1}{f_1} = \Phi_1 = \frac{n_2 - n_1}{R_1} \\ \frac{1}{f_2} = \Phi_2 = \frac{n_1 - n_2}{R_2} \\\end{split}\]

The curvature radii, \(R_1\) and \(R_2\), follow the usual sign convention: positive if the centre lies in the image space, and negative if it lies in the object space.