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 0.6.3 RayCrafter dev 5ecb2efd λ 0.486133, 0.587562, 0.656273 µm Zemax OpticStudio (not yet run) (file) EPD 1.5 mm fields 0, 16, 23° Zemax run 2026-12-03 Zemax 24.1.3 (our run)
Not working on this page

Every failing row of the tables below, against our own Zemax run.

What we know about them
  • 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.

Ray paths through the system
Light travels from left to right.
Optiland spot diagrams
Optiland's spot diagrams at the file's own fields.

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.

0matching
2partial
12failing

Not matching: partial and fail rows.

QuantityLargest difference from ZemaxMatch / partial withinResult
Refractive index of each glassLASFN8, E-LASFH9, H-LAFL5, SFL57, TAFD35, J-SF14. Optiland's data for LASFN8 differ from Zemax's3.3e−061e−06 / 0.0001Partial
Position of every surface9.1e−05 mm1e−09 / 1e−06 mmFail
Rays at the image, ray by rayThe rays Zemax traced, every galvo angle or field0.155 mm1e−06 / 0.001 mmFail
Ray directions at the imageDirection cosines. Zemax's are reversed after an odd number of mirrors0.14241e−09 / 1e−06Fail
Largest ray radius on every surface8.498 mm1e−06 / 0.001 mmFail
RMS spot of the same raysThe rays that get through, every one counted alike79.01 %0.1 / 2 %Fail
Focal length, f-number, exit pupilSizes; Optiland's signs may differ after a mirror0.000355 %0.0001 / 0.1 %Partial
OPD of every ray25.45 waves0.001 / 0.01 wavesFail
Zernike coefficients (37 standard)2.261 waves0.001 / 0.01 wavesFail
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 count52.21 %0.1 / 2 %Fail
RMS wavefront against field, from Optiland's OPDPiston and tilt removed, as Zemax does1.715 waves0.001 / 0.01 waves, or 1 % of Zemax's if larger, to failFail
RMS wavefront against field, RmsWavefrontErrorVsField as it comesA different meaning: piston and tilt are kept4.278 waves0.001 / 0.01 waves, or 1 % of Zemax's if larger, to failFail
Seidel coefficients, sizesZemax prints six decimals. Optiland's signs may be opposite0.5229 mm1e−06 / 1e−05 mmFail
All 14 rows, matches included
QuantityLargest difference from ZemaxMatch / partial withinResult
Refractive index of each glassLASFN8, E-LASFH9, H-LAFL5, SFL57, TAFD35, J-SF14. Optiland's data for LASFN8 differ from Zemax's3.3e−061e−06 / 0.0001Partial
Position of every surface9.1e−05 mm1e−09 / 1e−06 mmFail
Rays at the image, ray by rayThe rays Zemax traced, every galvo angle or field0.155 mm1e−06 / 0.001 mmFail
Ray directions at the imageDirection cosines. Zemax's are reversed after an odd number of mirrors0.14241e−09 / 1e−06Fail
Largest ray radius on every surface8.498 mm1e−06 / 0.001 mmFail
RMS spot of the same raysThe rays that get through, every one counted alike79.01 %0.1 / 2 %Fail
Focal length, f-number, exit pupilSizes; Optiland's signs may differ after a mirror0.000355 %0.0001 / 0.1 %Partial
OPD of every ray25.45 waves0.001 / 0.01 wavesFail
Zernike coefficients (37 standard)2.261 waves0.001 / 0.01 wavesFail
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 count52.21 %0.1 / 2 %Fail
RMS wavefront against field, from Optiland's OPDPiston and tilt removed, as Zemax does1.715 waves0.001 / 0.01 waves, or 1 % of Zemax's if larger, to failFail
RMS wavefront against field, RmsWavefrontErrorVsField as it comesA different meaning: piston and tilt are kept4.278 waves0.001 / 0.01 waves, or 1 % of Zemax's if larger, to failFail
Seidel coefficients, sizesZemax prints six decimals. Optiland's signs may be opposite0.5229 mm1e−06 / 1e−05 mmFail

RayCrafter against Zemax

This is RayCrafter's development branch

Tested at commit 5ecb2efd of dev, not the release on PyPI.

The rows below are on a system with a flat image.

1matching
5partial
0failing

Not matching: partial and fail rows.

QuantityLargest difference from ZemaxMatch / partial withinResult
Focal length and f-number0.000356 %0.0001 / 0.1 %Partial
Chief ray at the image, every fieldFields where both programs block the chief ray are left out2.61e−05 mm1e−06 / 0.001 mmPartial
Ray fan (tangential), every fieldFields where no ray gets through are left out3.15e−05 mm1e−06 / 0.001 mmPartial
RMS spot against field1.617 %0.1 / 2 %Partial
RMS wavefront against field0.005898 waves0.001 / 0.01 waves, or 1 % of Zemax's if larger, to failPartial
All 6 rows, matches included
QuantityLargest difference from ZemaxMatch / partial withinResult
Focal length and f-number0.000356 %0.0001 / 0.1 %Partial
Chief ray at the image, every fieldFields where both programs block the chief ray are left out2.61e−05 mm1e−06 / 0.001 mmPartial
Ray fan (tangential), every fieldFields where no ray gets through are left out3.15e−05 mm1e−06 / 0.001 mmPartial
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 field1.617 %0.1 / 2 %Partial
RMS wavefront against field0.005898 waves0.001 / 0.01 waves, or 1 % of Zemax's if larger, to failPartial
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

Against field angle. Blue: from Optiland's rays and OPD with Zemax's meaning. Orange: Optiland's own analysis as it comes, where it differs.
Against field angle. Blue: from Optiland's rays and OPD with Zemax's meaning. Orange: Optiland's own analysis as it comes, where it differs.

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.

RMS spot radius against field angle.
RMS spot radius against field angle.
Strehl ratio and RMS wavefront against field angle.
Strehl ratio and RMS wavefront against field angle.

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%.

2matching
0partial
0failing

Every row matches Zemax.

All 2 rows, matches included
QuantityZemaxOptilandDifferenceResult
Semi-diameter, surface 7 (mm)Zemax: DIAM stored in the .ZMX (computed by Zemax)11.820911.82090.00%Match
Semi-diameter, surface 16 (mm)Zemax: DIAM stored in the .ZMX (computed by Zemax)21.281521.35560.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 #CommentTypeRadius, Zemax (mm)Radius, Optiland (mm)Thickness (mm)GlassSemi-diameter (mm)Clear aperture (mm)
0STANDARD∞∞∞0
1STANDARD57.42957.4295.744LASFN824 (fixed)24
2STANDARD582.707582.7070.124 (fixed)24
3STANDARD24.49724.4974.861E-LASFH917.5 (fixed)17.5
4EVENASPH42.1742.171.517.5 (fixed)17.5
5STANDARD78.2878.281.6H-LAFL517.5 (fixed)17.5
6STANDARD17.33117.3319.94614 (fixed)14
7STANDARD (stop)∞∞7.60711.821
8STANDARD-21.793-21.7931.8SFL5714 (fixed)14
9STANDARD125.879125.8795.803LASFN816 (fixed)16
10STANDARD-35.453-35.4530.216 (fixed)16
11STANDARD757.383757.3834.5TAFD3516 (fixed)16
12EVENASPH-87.538-87.5380.516 (fixed)16
13STANDARD-205.395-205.3955.445TAFD3516 (fixed)16
14STANDARD-30.329-30.3291J-SF1416 (fixed)16
15STANDARD-41.912-41.91237.184516 (fixed)16
16STANDARD∞∞021.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.

SystemWhat it isTests
The file's own fieldsThe file untouched, at its own fieldsOptiland, 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