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 0.6.3 RayCrafter dev 5ecb2efd λ 0.486133, 0.587562, 0.656273 µm Zemax OpticStudio (not yet run) (file) EPD 2.032 mm fields 0, 7, 10° 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: 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.

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.

1matching
5partial
8failing

Not matching: partial and fail rows.

QuantityLargest difference from ZemaxMatch / partial withinResult
Refractive index of each glassK50, BASF2, BK7. Optiland's data for BK7, K50 differ from Zemax's0.000471e−06 / 0.0001Fail
Rays at the image, ray by rayThe rays Zemax traced, every galvo angle or field0.000475 mm1e−06 / 0.001 mmPartial
Ray directions at the imageDirection cosines. Zemax's are reversed after an odd number of mirrors0.000671e−09 / 1e−06Fail
Largest ray radius on every surface0.01802 mm1e−06 / 0.001 mmFail
RMS spot of the same raysThe rays that get through, every one counted alike17.3 %0.1 / 2 %Fail
Focal length, f-number, exit pupilSizes; Optiland's signs may differ after a mirror0.01445 %0.0001 / 0.1 %Partial
OPD of every ray0.03068 waves0.001 / 0.01 wavesFail
Zernike coefficients (37 standard)0.006819 waves0.001 / 0.01 wavesPartial
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 count51.95 %0.1 / 2 %Fail
RMS wavefront against field, from Optiland's OPDPiston and tilt removed, as Zemax does0.001998 waves0.001 / 0.01 waves, or 1 % of Zemax's if larger, to failPartial
RMS wavefront against field, RmsWavefrontErrorVsField as it comesA different meaning: piston and tilt are kept0.1179 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 opposite2.99e−06 mm1e−06 / 1e−05 mmPartial
All 14 rows, matches included
QuantityLargest difference from ZemaxMatch / partial withinResult
Refractive index of each glassK50, BASF2, BK7. Optiland's data for BK7, K50 differ from Zemax's0.000471e−06 / 0.0001Fail
Position of every surface4.09e−12 mm1e−09 / 1e−06 mmMatch
Rays at the image, ray by rayThe rays Zemax traced, every galvo angle or field0.000475 mm1e−06 / 0.001 mmPartial
Ray directions at the imageDirection cosines. Zemax's are reversed after an odd number of mirrors0.000671e−09 / 1e−06Fail
Largest ray radius on every surface0.01802 mm1e−06 / 0.001 mmFail
RMS spot of the same raysThe rays that get through, every one counted alike17.3 %0.1 / 2 %Fail
Focal length, f-number, exit pupilSizes; Optiland's signs may differ after a mirror0.01445 %0.0001 / 0.1 %Partial
OPD of every ray0.03068 waves0.001 / 0.01 wavesFail
Zernike coefficients (37 standard)0.006819 waves0.001 / 0.01 wavesPartial
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 count51.95 %0.1 / 2 %Fail
RMS wavefront against field, from Optiland's OPDPiston and tilt removed, as Zemax does0.001998 waves0.001 / 0.01 waves, or 1 % of Zemax's if larger, to failPartial
RMS wavefront against field, RmsWavefrontErrorVsField as it comesA different meaning: piston and tilt are kept0.1179 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 opposite2.99e−06 mm1e−06 / 1e−05 mmPartial

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.

3matching
3partial
0failing

Not matching: partial and fail rows.

QuantityLargest difference from ZemaxMatch / partial withinResult
Ray fan (tangential), every fieldFields where no ray gets through are left out0.000554 mm1e−06 / 0.001 mmPartial
RMS spot against field0.724 %0.1 / 2 %Partial
RMS wavefront against field0.001207 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-number3.09e−07 %0.0001 / 0.1 %Match
Chief ray at the image, every fieldFields where both programs block the chief ray are left out9.39e−09 mm1e−06 / 0.001 mmMatch
Ray fan (tangential), every fieldFields where no ray gets through are left out0.000554 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 field0.724 %0.1 / 2 %Partial
RMS wavefront against field0.001207 waves0.001 / 0.01 waves, or 1 % of Zemax's if larger, to failPartial
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

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.

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

1matching
0partial
0failing

Every row matches Zemax.

All 1 rows, matches included
QuantityZemaxOptilandDifferenceResult
Semi-diameter, surface 6 (mm)Zemax: DIAM stored in the .ZMX (computed by Zemax)4.36134.36320.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 #CommentTypeRadius, Zemax (mm)Radius, Optiland (mm)Thickness (mm)GlassSemi-diameter (mm)Clear aperture (mm)
0STANDARD∞∞∞0
1STANDARD (stop)5.2835.2830.7366K501.5 (fixed)1.5
2STANDARD-9.474-9.4740.3302BASF21.5 (fixed)1.5
3STANDARD49.53249.5320.02541.5 (fixed)1.5
4STANDARD5.4365.4362.159BK71.5 (fixed)1.5
5STANDARD3.0513.05116.95311.3 (fixed)1.3
6STANDARD∞∞04.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.

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/US02158507-1
uv run python -m evaluation_tools.build_summary                    # regenerates all HTML