Tutorial 9a - Edmund Optics Catalogue
This tutorial shows how to retrieve optical components from the Edmund Optics lens catalogue. In particular, we cover:
How to open Zemax files in Optiland
How to retrieve and analyze an aspheric lens from the Edmund Optics catalogue
Optiland uses the function load_zemax_file to load a Zemax (.zmx) files into the Optiland format. The function accepts either a file directly or a URL link to the file. If a URL is provided, Optiland downloads the file prior to extracting the lens data.
[1]:
from optiland import analysis
from optiland.fileio import load_zemax_file
File retrieval
For this example, we will use a 15 mm Dia., 0.33 Numerical Aperture Uncoated, Aspheric Lens. We pass the filename of the downloaded .zmx file to our load_zemax_file function:
[2]:
filename = "zmax_47728.zmx" # downloaded from link above
lens = load_zemax_file(filename)
The function directly returns an instance of an Optiland Optic class. We can draw the lens as shown.
[3]:
lens.draw()
We also print an overview of the lens data. This currently excludes the aspheric coefficients.
[4]:
lens.info()
+----+---------------------+----------+-------------+------------+----------+-----------------+
| | Type | Radius | Thickness | Material | Conic | Semi-aperture |
|----+---------------------+----------+-------------+------------+----------+-----------------|
| 0 | Planar | inf | inf | Air | 0 | 7.5 |
| 1 | Stop - Even Asphere | 13.255 | 4 | L-BAL35 | -2.36414 | 7.5 |
| 2 | Planar | inf | 19.9823 | Air | 0 | 6.66094 |
| 3 | Planar | inf | nan | Air | 0 | 2.66454e-15 |
+----+---------------------+----------+-------------+------------+----------+-----------------+
Lens Analysis
To assess performance, we generate a spot diagram and the ray aberration fans:
[5]:
spot = analysis.SpotDiagram(lens)
spot.view()
[6]:
fan = analysis.RayFan(lens)
fan.view()
Conclusions
This tutorial showed how to retrieve and analyze an Edmund Optics catalogue lens.
The load_zemax_file function does not currently support all Zemax surface types and may fail to convert a lens into an Optiland Optic instance in some cases. Users are encouraged to create an issue on the GitHub page if an error occurs.