4.10. Paraxial Analysis¶
4.10.1. Overview¶
A ray transfer matrix analysis object TMA
allows for the analysis of the paraxial properties of a lens or lens setups.
It is computed for the current state of the geometry and stores the properties for a specific wavelength.
These for instance include focal lengths, nodal points, optical powers and more.
4.10.2. Defining the Geometry for the Analysis¶
Group/Raytracer
From a Raytracer
with a specific geometry the TMA
object is calculated with the member function tma()
.
tma = RT.tma()
The function optionally takes a wavelength in nanometers as argument, for which the properties are calculated:
tma = RT.tma(780)
For a Group
object this works in the same way:
G = ot.presets.geometry.arizona_eye()
tma = G.tma()
Single Lens
We can also create the analysis object for a single Lens
:
front = ot.CircularSurface(r=5)
back = ot.SphericalSurface(r=5, R=-25)
n = ot.presets.refraction_index.K5
L = ot.Lens(front, back, n=n, d=0.5, pos=[0, 0, 10])
tma = L.tma()
While a single Lens defines the subsequent ambient medium, it has no knowledge on the preceding medium.
Normally it will be assigned by either the Raytracer
or the previous lens.
The same is the case for the medium n0
of the raytracer, which defines all undefined Lens.n2
media.
To define it for the TMA, we can provide a n0
parameter.
Otherwise it defaults to the vacuum properties.
n0 = ot.RefractionIndex("Constant", n=1.1)
tma = L.tma(n0=n0)
Multiple Lenses
Without a specific geometry, we can also create the TMA
object by providing a list of lenses.
back2 = ot.SphericalSurface(r=5, R=-25)
front2 = ot.CircularSurface(r=5)
n2 = ot.presets.refraction_index.F2
L2 = ot.Lens(front, back, n=n2, de=0.5, pos=[0, 0, 16])
Ls = [L, L2]
tma = ot.TMA(Ls)
As for the lens, the previous ambient medium (or the medium for all undefined Lens.n2
) can be provided with the n0
parameter.
tma = ot.TMA(Ls, n0=n0)
4.10.3. Paraxial Properties¶
The following table provides an overview of supported TMA properties. Details on their meaning and calculation are documented in Section 5.5 and more information on the different definitions for focal lengths and powers in Section 5.5.10.
Variable |
Type |
Unit |
Meaning |
---|---|---|---|
|
|
refractive index value before the lens setup |
|
|
|
refractive index value after the lens setup |
|
|
mm |
front and back position of vertices of the system |
|
|
mm |
thickness, distance between vertex points |
|
|
|
ABCD matrix |
|
|
mm |
principal points (z-positions) |
|
|
mm |
nodal points (z-positions) |
|
|
mm |
optical center (z-position) |
|
|
mm |
focal points (z-positions) |
|
|
mm |
focal lengths |
|
|
mm |
focal lengths, scaled with refractive index |
|
|
dpt |
optical powers of the system |
|
|
dpt |
optical powers, scaled with the refractive index |
|
|
mm |
effective focal length of the system |
|
|
mm |
effective focal length, scaled by the refractive index |
|
|
mm |
back focal length |
|
|
mm |
front focal length |
|
|
nm |
wavelength for the analysis |
Access the properties in the following way:
>>> tma.efl
30.645525910383494
>>> tma.abcd
array([[ 0.9046767 , 6.50763158],
[-0.03263119, 0.87064057]])
4.10.4. Calculating Image and Object Distance¶
The method image_position
allows for the calculation of an image position.
You need to provide an object position:
>>> tma.image_position(-50)
72.87925720752206
Both input and output value are absolute positions at the optical axis in millimeters.
Conversely, we can calculate an object position from a known image position with object_position
:
>>> tma.object_position(100)
-33.84654855214077
In botch cases infinite values (-np.inf, np.inf
) are supported as function parameters.
For the image position at infinity we get:
>>> tma.object_position(np.inf)
-16.93123809931588
Which is equal to the position of the first focal point:
>>> tma.focal_points[0]
-16.93123809931588
Analogously the magnification factors at the image/object plane can be calculated:
>>> tma.image_magnification(-57.3)
-0.7591396036811361
>>> tma.object_magnification(18)
0.8640542105175426
A positive factor corresponds to an upright image, a negative to an inverted one. A magnitude larger than one implies magnification, a smaller number a size decrease.
Details on the implementation are described in Section 5.5.12.
Another feature is the calculation of the ABCD matrix for a specific object and image distance.
The corresponding matrix_at
method requires the object and image position:
>>> tma.matrix_at(-60, 80.2)
array([[ -1.16560585, -19.55567495],
[ -0.03263119, -1.40538498]])
4.10.5. Calculation of Entrance and Exit Pupils¶
Methods for calculating the entrance and exit pupil position and magnifications are also available. Details on the math are found in Section 5.5.14.
The following example loads the paraxial eye model from legrand_eye()
and creates the TMA object:
eye = ot.presets.geometry.legrand_eye()
aps = eye.apertures[0].pos[2]
tma = eye.tma()
The function pupil_position
requires an aperture stop position argumentand returns a tuple of entrance and exit pupil position along the optical axis.
The aperture can lie inside, behind or in front of the lens setup.
>>> tma.pupil_position(aps)
(3.037565216550855, 3.6821114369501466)
The method pupil_magnification
calculates the pupil magnifications:
>>> tma.pupil_magnification(aps)
(1.1310996628960361, 1.0410557184750733)
4.10.6. Miscellaneous Properties¶
The calculation is currently limited to these properties.
Unfortunately pupil sizes, numerical apertures, f-numbers, airy disk diameters are not available.
This is due to the TMA
object not having any information about the lens diameters or ray characteristics.
In some cases the properties can be estimated using the interactive GUI and ray picking.
For instance, the pupil sizes can be calculated from the pupil positions from the TMA
and the radial distance of the outermost traced rays at this position.