Optiland and RayCrafter (dev) vs Zemax
US 8,964,096, example 2 (F/1.5 photographic lens, ray aiming off): Optiland and RayCrafter (dev) against Zemax
An F/1.5 photographic prime to 23 degrees with its stop in air in the middle and Zemax's ray aiming off, compared with our own Zemax run as written and with real ray aiming (raycrafter #204). Its glasses are Hikari, Hoya, CDGM and Sumita as well as Schott, but the file lists only the Schott catalogue, so Zemax was told to load the others; every index then matches Optiland's to 1e-5. RayCrafter now aims at the file's entrance pupil, as Zemax does with aiming off, and its chief rays and ray fan agree to 0.03 µm, its RMS spot against field to 1.6 % (41.3 µm in both at 23 degrees; it was half of Zemax's off axis before) and its focal length and f-number to 0.0004 % (Partial). Its RMS wavefront against field is within 0.006 waves of Zemax's (Partial: over the 0.001 match limit, within 1 % of Zemax's value; it failed at 0.026 waves before raycrafter #218 took the exit pupil of its pivoted beams where Zemax has it, raycrafter #218). Optiland's first order matches too, but its rays at the image are up to 0.155 mm from Zemax's and its RMS spot up to 83 % off.
- Optiland: Position of every surface, differs by 9.1e−05 mm
- Optiland: Rays at the image, ray by ray, differs by 0.155 mm
- Optiland: Ray directions at the image, differs by 0.1424
- Optiland: Largest ray radius on every surface, differs by 8.498 mm
- Optiland: RMS spot of the same rays, differs by 79.01 %
- Optiland: OPD of every ray, differs by 25.45 waves
- Optiland: Zernike coefficients (37 standard), differs by 2.261 waves
- Optiland: RMS spot against field, from Optiland's rays, differs by 83.08 %
- Optiland: RMS spot against field, RmsSpotSizeVsField as it comes, differs by 52.21 %
- Optiland: RMS wavefront against field, from Optiland's OPD, differs by 1.715 waves
- Optiland: RMS wavefront against field, RmsWavefrontErrorVsField as it comes, differs by 4.278 waves
- Optiland: Seidel coefficients, sizes, differs by 0.5229 mm
Every failing row of the tables below, against our own Zemax run.
- RayCrafter: small differences left (every row Partial). RMS spot against field up to 1.6 % from Zemax's (0.30 µm; 41.3 µm in both at 23 degrees), RMS wavefront up to 0.006 waves, chief rays and tangential ray fan about 0.03 µm, no pupil point with a ray in one program only. Cause: Not located; they are at the level of rounding in the two programs' own rays. The RMS spot was about half of Zemax's off axis before raycrafter #204 aimed at the file's entrance pupil.
- Optiland: rays and spots off axis. Rays at the image up to 0.155 mm from Zemax's, RMS spot up to 83 %, RMS wavefront 1.7 waves, though its focal length, f-number and pupils match. Cause: Not located (issue 33).
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 glassLASFN8, E-LASFH9, H-LAFL5, SFL57, TAFD35, J-SF14. Optiland's data for LASFN8 differ from Zemax's | 3.3e−06 | 1e−06 / 0.0001 | Partial |
| Position of every surface | 9.1e−05 mm | 1e−09 / 1e−06 mm | Fail |
| Rays at the image, ray by rayThe rays Zemax traced, every galvo angle or field | 0.155 mm | 1e−06 / 0.001 mm | Fail |
| Ray directions at the imageDirection cosines. Zemax's are reversed after an odd number of mirrors | 0.1424 | 1e−09 / 1e−06 | Fail |
| Largest ray radius on every surface | 8.498 mm | 1e−06 / 0.001 mm | Fail |
| RMS spot of the same raysThe rays that get through, every one counted alike | 79.01 % | 0.1 / 2 % | Fail |
| Focal length, f-number, exit pupilSizes; Optiland's signs may differ after a mirror | 0.000355 % | 0.0001 / 0.1 % | Partial |
| OPD of every ray | 25.45 waves | 0.001 / 0.01 waves | Fail |
| Zernike coefficients (37 standard) | 2.261 waves | 0.001 / 0.01 waves | Fail |
| RMS spot against field, from Optiland's raysWith the pupil averaging Zemax uses (Gaussian quadrature) | 83.08 % | 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 | 52.21 % | 0.1 / 2 % | Fail |
| RMS wavefront against field, from Optiland's OPDPiston and tilt removed, as Zemax does | 1.715 waves | 0.001 / 0.01 waves, or 1 % of Zemax's if larger, to fail | Fail |
| RMS wavefront against field, RmsWavefrontErrorVsField as it comesA different meaning: piston and tilt are kept | 4.278 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 | 0.5229 mm | 1e−06 / 1e−05 mm | Fail |
All 14 rows, matches included
| Quantity | Largest difference from Zemax | Match / partial within | Result |
|---|---|---|---|
| Refractive index of each glassLASFN8, E-LASFH9, H-LAFL5, SFL57, TAFD35, J-SF14. Optiland's data for LASFN8 differ from Zemax's | 3.3e−06 | 1e−06 / 0.0001 | Partial |
| Position of every surface | 9.1e−05 mm | 1e−09 / 1e−06 mm | Fail |
| Rays at the image, ray by rayThe rays Zemax traced, every galvo angle or field | 0.155 mm | 1e−06 / 0.001 mm | Fail |
| Ray directions at the imageDirection cosines. Zemax's are reversed after an odd number of mirrors | 0.1424 | 1e−09 / 1e−06 | Fail |
| Largest ray radius on every surface | 8.498 mm | 1e−06 / 0.001 mm | Fail |
| RMS spot of the same raysThe rays that get through, every one counted alike | 79.01 % | 0.1 / 2 % | Fail |
| Focal length, f-number, exit pupilSizes; Optiland's signs may differ after a mirror | 0.000355 % | 0.0001 / 0.1 % | Partial |
| OPD of every ray | 25.45 waves | 0.001 / 0.01 waves | Fail |
| Zernike coefficients (37 standard) | 2.261 waves | 0.001 / 0.01 waves | Fail |
| RMS spot against field, from Optiland's raysWith the pupil averaging Zemax uses (Gaussian quadrature) | 83.08 % | 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 | 52.21 % | 0.1 / 2 % | Fail |
| RMS wavefront against field, from Optiland's OPDPiston and tilt removed, as Zemax does | 1.715 waves | 0.001 / 0.01 waves, or 1 % of Zemax's if larger, to fail | Fail |
| RMS wavefront against field, RmsWavefrontErrorVsField as it comesA different meaning: piston and tilt are kept | 4.278 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 | 0.5229 mm | 1e−06 / 1e−05 mm | Fail |
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 |
|---|---|---|---|
| Focal length and f-number | 0.000356 % | 0.0001 / 0.1 % | Partial |
| Chief ray at the image, every fieldFields where both programs block the chief ray are left out | 2.61e−05 mm | 1e−06 / 0.001 mm | Partial |
| Ray fan (tangential), every fieldFields where no ray gets through are left out | 3.15e−05 mm | 1e−06 / 0.001 mm | Partial |
| RMS spot against field | 1.617 % | 0.1 / 2 % | Partial |
| RMS wavefront against field | 0.005898 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 | 0.000356 % | 0.0001 / 0.1 % | Partial |
| Chief ray at the image, every fieldFields where both programs block the chief ray are left out | 2.61e−05 mm | 1e−06 / 0.001 mm | Partial |
| Ray fan (tangential), every fieldFields where no ray gets through are left out | 3.15e−05 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 | 1.617 % | 0.1 / 2 % | Partial |
| RMS wavefront against field | 0.005898 waves | 0.001 / 0.01 waves, or 1 % of Zemax's if larger, to fail | Partial |
What RayCrafter said when it imported the file
- 6 lens(es) are not in the catalogue and were named "Imported lens N".
- The stop (surface 7) is in air, and the file gives it no aperture, so it blocks no light with aiming off; it was not imported as an element.
- The file's aperture is not an entrance pupil diameter; the beam is its paraxial entrance pupil, 34.24 mm across.
- Each field angle was loaded at the primary wavelength, and each other wavelength as an on-axis field.
- The file has vignetting factors (VDX, VDY, VCX, VCY, VAN): each beam's rays are taken from the same window of the pupil as Zemax takes, and sweeps over the field angle interpolate them. RayCrafter otherwise finds the light itself, so they only matter where the file's window is narrower than its apertures.
- The file has no ray aiming and its stop is behind the front of the first lens, so, as in Zemax, each beam has the file's entrance pupil diameter and is aimed at the centre of the paraxial entrance pupil; it is not aimed to fill the stop, so off-axis beams may be vignetted or miss the stop's centre (#204).
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.
- 36. Field vignetting decenter ignored. The file moves each field's pupil window (VDX, VDY); Optiland drops it and 0.6.3 also compresses it twice. At 23 degrees 143 of 331 rays pass, against 331 in Zemax. Open Upstream: PR #937 (double compression fixed on main; decenter not).
- 42. Rays are lost where lens rims overlap. 9 of 331 rays at 16 degrees take the far side of a sphere. Open Upstream: not yet filed.
- 37. Thickness solve ignored. The image distance has a marginal-ray solve that Zemax re-solves (9.1e-5 mm). Open Upstream: not yet filed.
- 32. Glass catalogue chosen by a placeholder nd/vd. LASFN8 is 3.3e-6 off. Open Upstream: #942 (strict GCAT resolution on main (related)), #952 (AGF catalogues (related)).
- 26. Seidel sums ignore the asphere's r4 term. With it the sizes agree to 1e-5. Open Upstream: not yet filed.
- 33. Overview. These four causes, put in one at a time, bring every ray to within 1.4e-7 mm. Explained Upstream: not yet filed.
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 2 rows, matches included
| Quantity | Zemax | Optiland | Difference | Result |
|---|---|---|---|---|
| Semi-diameter, surface 7 (mm)Zemax: DIAM stored in the .ZMX (computed by Zemax) | 11.8209 | 11.8209 | 0.00% | Match |
| Semi-diameter, surface 16 (mm)Zemax: DIAM stored in the .ZMX (computed by Zemax) | 21.2815 | 21.3556 | 0.35% | 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 | 57.429 | 57.429 | 5.744 | LASFN8 | 24 (fixed) | 24 | |
| 2 | STANDARD | 582.707 | 582.707 | 0.1 | 24 (fixed) | 24 | ||
| 3 | STANDARD | 24.497 | 24.497 | 4.861 | E-LASFH9 | 17.5 (fixed) | 17.5 | |
| 4 | EVENASPH | 42.17 | 42.17 | 1.5 | 17.5 (fixed) | 17.5 | ||
| 5 | STANDARD | 78.28 | 78.28 | 1.6 | H-LAFL5 | 17.5 (fixed) | 17.5 | |
| 6 | STANDARD | 17.331 | 17.331 | 9.946 | 14 (fixed) | 14 | ||
| 7 | STANDARD (stop) | ∞ | ∞ | 7.607 | 11.821 | |||
| 8 | STANDARD | -21.793 | -21.793 | 1.8 | SFL57 | 14 (fixed) | 14 | |
| 9 | STANDARD | 125.879 | 125.879 | 5.803 | LASFN8 | 16 (fixed) | 16 | |
| 10 | STANDARD | -35.453 | -35.453 | 0.2 | 16 (fixed) | 16 | ||
| 11 | STANDARD | 757.383 | 757.383 | 4.5 | TAFD35 | 16 (fixed) | 16 | |
| 12 | EVENASPH | -87.538 | -87.538 | 0.5 | 16 (fixed) | 16 | ||
| 13 | STANDARD | -205.395 | -205.395 | 5.445 | TAFD35 | 16 (fixed) | 16 | |
| 14 | STANDARD | -30.329 | -30.329 | 1 | J-SF14 | 16 (fixed) | 16 | |
| 15 | STANDARD | -41.912 | -41.912 | 37.1845 | 16 (fixed) | 16 | ||
| 16 | STANDARD | ∞ | ∞ | 0 | 21.282 |
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/US08964096-2 uv run python -m evaluation_tools.build_summary # regenerates all HTML