Optiland and RayCrafter (dev) vs Zemax
US 2,158,507 (small objective, stop at the front lens, ray aiming real): Optiland and RayCrafter (dev) against Zemax
A two-lens objective with its stop on the front surface and Zemax's real ray aiming on, compared with our own Zemax run as written and with ray aiming off (raycrafter #204). As expected, aiming makes no difference in Zemax: RMS spot 9.64 and 9.68 µm at 10 degrees. Optiland and RayCrafter place every surface and chief ray as Zemax does, but Optiland takes BK7 and K50 from Sumita's catalogue though the file names Schott's (issue 32), so its BK7 is 0.00047 from Zemax's and its RMS spot up to 17 %. RayCrafter now has Zemax's glass data (raycrafter #216): its focal length and f-number match to 3e-9, its RMS spot is within 0.8 % of Zemax's and its RMS wavefront within 0.0012 waves (Partial).
- Optiland: Refractive index of each glass, differs by 0.00047
- Optiland: Ray directions at the image, differs by 0.00067
- Optiland: Largest ray radius on every surface, differs by 0.01802 mm
- Optiland: RMS spot of the same rays, differs by 17.3 %
- Optiland: OPD of every ray, differs by 0.03068 waves
- Optiland: RMS spot against field, from Optiland's rays, differs by 15.94 %
- Optiland: RMS spot against field, RmsSpotSizeVsField as it comes, differs by 51.95 %
- Optiland: RMS wavefront against field, RmsWavefrontErrorVsField as it comes, differs by 0.1179 waves
Every failing row of the tables below, against our own Zemax run.
- RayCrafter: RMS spot, RMS wavefront and ray fan, a little. RMS spot against field up to 0.8 % from Zemax's, RMS wavefront up to 0.0012 waves, the ray fan 0.55 µm apart. The focal length matches to 3e-9. Cause: Not located; small differences left after the glass data were made Zemax's (raycrafter #216).
- Optiland: glass indices and the spots that follow. Indices up to 0.00047 from Zemax's; RMS spot up to 17 %, ray directions 0.00067, OPD 0.03 waves. Cause: Optiland's Zemax reader takes BK7 and K50 from Sumita's catalogue, though the file names only Schott's (issue 32).
System layout
Drawn from Optiland's surface positions and rays. The comparison with our own Zemax run is above.


Optiland against Zemax
Optiland 0.6.3, as released, with the file preparation and patches listed under "Optiland issues found". Nothing here uses RayCrafter. Each row is the largest difference from our own Zemax run (OpticStudio 24.1.3) over every galvo angle or field of every system below.
Not matching: partial and fail rows.
| Quantity | Largest difference from Zemax | Match / partial within | Result |
|---|---|---|---|
| Refractive index of each glassK50, BASF2, BK7. Optiland's data for BK7, K50 differ from Zemax's | 0.00047 | 1e−06 / 0.0001 | Fail |
| Rays at the image, ray by rayThe rays Zemax traced, every galvo angle or field | 0.000475 mm | 1e−06 / 0.001 mm | Partial |
| Ray directions at the imageDirection cosines. Zemax's are reversed after an odd number of mirrors | 0.00067 | 1e−09 / 1e−06 | Fail |
| Largest ray radius on every surface | 0.01802 mm | 1e−06 / 0.001 mm | Fail |
| RMS spot of the same raysThe rays that get through, every one counted alike | 17.3 % | 0.1 / 2 % | Fail |
| Focal length, f-number, exit pupilSizes; Optiland's signs may differ after a mirror | 0.01445 % | 0.0001 / 0.1 % | Partial |
| OPD of every ray | 0.03068 waves | 0.001 / 0.01 waves | Fail |
| Zernike coefficients (37 standard) | 0.006819 waves | 0.001 / 0.01 waves | Partial |
| RMS spot against field, from Optiland's raysWith the pupil averaging Zemax uses (Gaussian quadrature) | 15.94 % | 0.1 / 2 % | Fail |
| RMS spot against field, RmsSpotSizeVsField as it comesEqual weights on hexapolar rings count the pupil's edge too much, and only the rays that get through count | 51.95 % | 0.1 / 2 % | Fail |
| RMS wavefront against field, from Optiland's OPDPiston and tilt removed, as Zemax does | 0.001998 waves | 0.001 / 0.01 waves, or 1 % of Zemax's if larger, to fail | Partial |
| RMS wavefront against field, RmsWavefrontErrorVsField as it comesA different meaning: piston and tilt are kept | 0.1179 waves | 0.001 / 0.01 waves, or 1 % of Zemax's if larger, to fail | Fail |
| Seidel coefficients, sizesZemax prints six decimals. Optiland's signs may be opposite | 2.99e−06 mm | 1e−06 / 1e−05 mm | Partial |
All 14 rows, matches included
| Quantity | Largest difference from Zemax | Match / partial within | Result |
|---|---|---|---|
| Refractive index of each glassK50, BASF2, BK7. Optiland's data for BK7, K50 differ from Zemax's | 0.00047 | 1e−06 / 0.0001 | Fail |
| Position of every surface | 4.09e−12 mm | 1e−09 / 1e−06 mm | Match |
| Rays at the image, ray by rayThe rays Zemax traced, every galvo angle or field | 0.000475 mm | 1e−06 / 0.001 mm | Partial |
| Ray directions at the imageDirection cosines. Zemax's are reversed after an odd number of mirrors | 0.00067 | 1e−09 / 1e−06 | Fail |
| Largest ray radius on every surface | 0.01802 mm | 1e−06 / 0.001 mm | Fail |
| RMS spot of the same raysThe rays that get through, every one counted alike | 17.3 % | 0.1 / 2 % | Fail |
| Focal length, f-number, exit pupilSizes; Optiland's signs may differ after a mirror | 0.01445 % | 0.0001 / 0.1 % | Partial |
| OPD of every ray | 0.03068 waves | 0.001 / 0.01 waves | Fail |
| Zernike coefficients (37 standard) | 0.006819 waves | 0.001 / 0.01 waves | Partial |
| RMS spot against field, from Optiland's raysWith the pupil averaging Zemax uses (Gaussian quadrature) | 15.94 % | 0.1 / 2 % | Fail |
| RMS spot against field, RmsSpotSizeVsField as it comesEqual weights on hexapolar rings count the pupil's edge too much, and only the rays that get through count | 51.95 % | 0.1 / 2 % | Fail |
| RMS wavefront against field, from Optiland's OPDPiston and tilt removed, as Zemax does | 0.001998 waves | 0.001 / 0.01 waves, or 1 % of Zemax's if larger, to fail | Partial |
| RMS wavefront against field, RmsWavefrontErrorVsField as it comesA different meaning: piston and tilt are kept | 0.1179 waves | 0.001 / 0.01 waves, or 1 % of Zemax's if larger, to fail | Fail |
| Seidel coefficients, sizesZemax prints six decimals. Optiland's signs may be opposite | 2.99e−06 mm | 1e−06 / 1e−05 mm | Partial |
RayCrafter against Zemax
Tested at commit 5ecb2efd of dev, not the release on PyPI.
The rows below are on a system with a flat image.
Not matching: partial and fail rows.
| Quantity | Largest difference from Zemax | Match / partial within | Result |
|---|---|---|---|
| Ray fan (tangential), every fieldFields where no ray gets through are left out | 0.000554 mm | 1e−06 / 0.001 mm | Partial |
| RMS spot against field | 0.724 % | 0.1 / 2 % | Partial |
| RMS wavefront against field | 0.001207 waves | 0.001 / 0.01 waves, or 1 % of Zemax's if larger, to fail | Partial |
All 6 rows, matches included
| Quantity | Largest difference from Zemax | Match / partial within | Result |
|---|---|---|---|
| Focal length and f-number | 3.09e−07 % | 0.0001 / 0.1 % | Match |
| Chief ray at the image, every fieldFields where both programs block the chief ray are left out | 9.39e−09 mm | 1e−06 / 0.001 mm | Match |
| Ray fan (tangential), every fieldFields where no ray gets through are left out | 0.000554 mm | 1e−06 / 0.001 mm | Partial |
| Ray fan: pupil points with a ray in one program only, every fieldLight that one program lets through and the other stops: vignetting that differs. Zemax draws a tangential fan point only if the ray one step lower in the pupil also gets through, so its window really starts one to two steps below its first point and ends up to one step above its last; a point where the edge may be is undecided and not counted (raycrafter #258); the sagittal fan is not compared (no vignetted sagittal reference to show Zemax does the same) | 0 % | 0 / 1 % | Match |
| RMS spot against field | 0.724 % | 0.1 / 2 % | Partial |
| RMS wavefront against field | 0.001207 waves | 0.001 / 0.01 waves, or 1 % of Zemax's if larger, to fail | Partial |
What RayCrafter said when it imported the file
- 2 lens(es) are not in the catalogue and were named "Imported lens N".
- Each field angle was loaded at the primary wavelength, and each other wavelength as an on-axis field.
- The file has Zemax's ray aiming on (real), which makes no difference here: the stop is at the front, so the beams have the file's pupil as it is.
Optiland: the file's own fields

RayCrafter: its own plots
What RayCrafter's window and report draw, with Zemax's points over them (open markers), on the file's own fields.


Optiland issues found
Full details are in upstream/optiland_issues_found.md. Causes found by putting Zemax's value in one at a time.
- 38. Ray aiming of the file (RAIM) ignored. The file uses real ray aiming; with it set by hand the rays agree to 2e-8 mm. Open Upstream: not yet filed.
- 32. Glass catalogue chosen by a placeholder nd/vd. BK7 is Sumita's K-BK7, 4.7e-4 below Zemax's Schott BK7. Open Upstream: #942 (strict GCAT resolution on main (related)), #952 (AGF catalogues (related)).
Semi-diameters stored in the file
Zemax stores, for every surface whose semi-diameter is automatic, the largest ray radius it computed. We re-trace the file in Optiland and take the largest local ray radius. Status is computed from the tolerances in comparison.json: match within 0.5%, partial within 5%.
Every row matches Zemax.
All 1 rows, matches included
| Quantity | Zemax | Optiland | Difference | Result |
|---|---|---|---|---|
| Semi-diameter, surface 6 (mm)Zemax: DIAM stored in the .ZMX (computed by Zemax) | 4.3613 | 4.3632 | 0.05% | Match |
Lens data
Prescription as stored in the Zemax file. The Optiland radius is read back from the loaded model, so a difference would show an import error.
| Zemax # | Comment | Type | Radius, Zemax (mm) | Radius, Optiland (mm) | Thickness (mm) | Glass | Semi-diameter (mm) | Clear aperture (mm) |
|---|---|---|---|---|---|---|---|---|
| 0 | STANDARD | ∞ | ∞ | ∞ | 0 | |||
| 1 | STANDARD (stop) | 5.283 | 5.283 | 0.7366 | K50 | 1.5 (fixed) | 1.5 | |
| 2 | STANDARD | -9.474 | -9.474 | 0.3302 | BASF2 | 1.5 (fixed) | 1.5 | |
| 3 | STANDARD | 49.532 | 49.532 | 0.0254 | 1.5 (fixed) | 1.5 | ||
| 4 | STANDARD | 5.436 | 5.436 | 2.159 | BK7 | 1.5 (fixed) | 1.5 | |
| 5 | STANDARD | 3.051 | 3.051 | 16.9531 | 1.3 (fixed) | 1.3 | ||
| 6 | STANDARD | ∞ | ∞ | 0 | 4.361 |
How Zemax was run
By make_zemax_reference.py, the same way for every design, on
2026-12-03.
What is asked for, and which tool each result tests, is in
zemax_analyses.md; every file is in
Zemax_reference_output.
| System | What it is | Tests |
|---|---|---|
| The file's own fields | The file untouched, at its own fields | Optiland, RayCrafter |
Reproduce
export UV_PROJECT_ENVIRONMENT=~/uv_venvs/evaluation_mac uv run python -m evaluation_tools.from_zemax.analyze_zmx designs/from_zemax/US02158507-1 uv run python -m evaluation_tools.build_summary # regenerates all HTML