Optiland and RayCrafter (dev) vs Zemax
75 mm scan lens for the OrganGrinder: Optiland and RayCrafter (dev) against Zemax
A scan lens (the file's lens comments name LC1120-B, LB1106-B and an ACT508-200-B pair) for a 5.5 mm beam at 0.92 um, with the stop at the first surface: spherical surfaces, no tilts or fold mirror, one configuration, fields at 0, 5 and 11 degrees. Compared with our own Zemax run. RayCrafter (dev) matches on every row: focal length 73.36 mm and f/13.34 to rounding, its rays, chief rays, RMS spot and distortion to rounding, its Strehl ratios on Zemax's pixel grid within 0.0035, its MTF within 0.002, and its RMS wavefront against field within 0.001 waves (largest difference 0.00095 waves, so just inside the match limit). Optiland traces the same rays to rounding and gives the same OPD and Zernike coefficients, but its RMS spot against field is 55.1 % away (it weights the rings of the pupil equally, Zemax does not) and its RMS wavefront against field differs by up to 0.082 waves (it keeps piston and tilt); its Strehl ratios (0.0098 from Zemax's Huygens PSF with the glass's absorption divided out) and its largest grid distortion (3.100 % against 3.139 %) are Partial. Its distortion and field curvature analyses match Zemax at the primary wavelength, 0.92 um (until round 6's review they were read at the file's first wavelength, 0.78 um, which put its field curvature 0.12 mm off).
- Optiland: RMS spot against field, RmsSpotSizeVsField as it comes, differs by 55.1 %
- Optiland: RMS wavefront against field, RmsWavefrontErrorVsField as it comes, differs by 0.08196 waves
Every failing row of the tables below, against our own Zemax run.
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 |
|---|---|---|---|
| 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 | 55.1 % | 0.1 / 2 % | Fail |
| RMS wavefront against field, RmsWavefrontErrorVsField as it comesA different meaning: piston and tilt are kept | 0.08196 waves | 0.001 / 0.01 waves, or 1 % of Zemax's if larger, to fail | Fail |
| Strehl ratio, FFTPSF, glass absorption divided outAgainst Zemax's Huygens PSF, which prints three decimals and is itself a little above what Zemax's own wavefront gives | 0.009825 | 0.005 / 0.02 | Partial |
| Strehl ratio, FFTPSF as it comesA different meaning: light absorbed by the glass counts as lost | 0.01667 | 0.005 / 0.02 | Partial |
| Grid distortion, largestAfter a fold, x is read in global axes (issue 24) | 0.03891 percentage points | 0.005 / 0.05 percentage points | Partial |
All 21 rows, matches included
| Quantity | Largest difference from Zemax | Match / partial within | Result |
|---|---|---|---|
| Refractive index of each glassN-BK7, N-SF57, N-SK2 | 2.22e−16 | 1e−06 / 0.0001 | Match |
| Position of every surface | 0 mm | 1e−09 / 1e−06 mm | Match |
| Rays at the image, ray by rayThe rays Zemax traced, every galvo angle or field | 4.33e−14 mm | 1e−06 / 0.001 mm | Match |
| Ray directions at the imageDirection cosines. Zemax's are reversed after an odd number of mirrors | 3.55e−15 | 1e−09 / 1e−06 | Match |
| Largest ray radius on every surface | 1.78e−14 mm | 1e−06 / 0.001 mm | Match |
| RMS spot of the same raysThe rays that get through, every one counted alike | 0 % | 0.1 / 2 % | Match |
| Focal length, f-number, exit pupilSizes; Optiland's signs may differ after a mirror | 6.78e−05 % | 0.0001 / 0.1 % | Match |
| OPD of every ray | 6.82e−09 waves | 0.001 / 0.01 waves | Match |
| Zernike coefficients (37 standard) | 7.59e−09 waves | 0.001 / 0.01 waves | Match |
| RMS spot against field, from Optiland's raysWith the pupil averaging Zemax uses (Gaussian quadrature) | 0 % | 0.1 / 2 % | Match |
| 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 | 55.1 % | 0.1 / 2 % | Fail |
| RMS wavefront against field, from Optiland's OPDPiston and tilt removed, as Zemax does | 1.78e−05 waves | 0.001 / 0.01 waves, or 1 % of Zemax's if larger, to fail | Match |
| RMS wavefront against field, RmsWavefrontErrorVsField as it comesA different meaning: piston and tilt are kept | 0.08196 waves | 0.001 / 0.01 waves, or 1 % of Zemax's if larger, to fail | Fail |
| Strehl ratio, FFTPSF, glass absorption divided outAgainst Zemax's Huygens PSF, which prints three decimals and is itself a little above what Zemax's own wavefront gives | 0.009825 | 0.005 / 0.02 | Partial |
| Strehl ratio, FFTPSF as it comesA different meaning: light absorbed by the glass counts as lost | 0.01667 | 0.005 / 0.02 | Partial |
| MTF, tangential and sagittal, every field | 0.002421 | 0.005 / 0.02 | Match |
| Distortion, f-tan and f-theta | 3.37e−10 percentage points | 0.005 / 0.05 percentage points | Match |
| Grid distortion, largestAfter a fold, x is read in global axes (issue 24) | 0.03891 percentage points | 0.005 / 0.05 percentage points | Partial |
| Field curvature, FieldCurvature as it comesAt the edge of the field | 0.000591 mm | 0.01 / 0.1 mm | Match |
| Field curvature, from Optiland's raysNear-axis rays of each beam, in the image surface's own axes | 0.000591 mm | 0.01 / 0.1 mm | Match |
| Seidel coefficients, sizesZemax prints six decimals. Optiland's signs may be opposite | 3.88e−07 mm | 1e−06 / 1e−05 mm | Match |
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.
Every row matches Zemax.
All 12 rows, matches included
| Quantity | Largest difference from Zemax | Match / partial within | Result |
|---|---|---|---|
| Focal length and f-number | 4.22e−13 % | 0.0001 / 0.1 % | Match |
| Chief ray at the image, every fieldFields where both programs block the chief ray are left out | 7.82e−14 mm | 1e−06 / 0.001 mm | Match |
| Ray fan (tangential), every fieldFields where no ray gets through are left out | 3.91e−14 mm | 1e−06 / 0.001 mm | Match |
| 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 % | 0.1 / 2 % | Match |
| RMS wavefront against field | 0.000954 waves | 0.001 / 0.01 waves, or 1 % of Zemax's if larger, to fail | Match |
| Strehl ratio, every fieldRayCrafter's Strehl ratio on the pixel grid of Zemax's Huygens PSF, as Zemax reads its own (its largest pixel); Zemax's prints three decimals | 0.00354 | 0.005 / 0.02 | Match |
| MTF plot (one wavelength) | 0.00157 | 0.005 / 0.02 | Match |
| Distortion, f-tan and f-theta | 3.05e−08 percentage points | 0.005 / 0.05 percentage points | Match |
| Grid distortion, largest | 1.8e−07 percentage points | 0.005 / 0.05 percentage points | Match |
| Field curvatureRayCrafter takes the best focus of a whole fan, Zemax that of rays near the chief ray. Signs are opposite by convention | 0.000555 mm | 0.01 / 0.1 mm | Match |
| Field curvature, change from the axis | 0.000555 mm | 0.01 / 0.1 mm | Match |
What RayCrafter said when it imported the file
- Each field angle was loaded at the primary wavelength, and each other wavelength as an on-axis field.
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.








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 1 (mm)Zemax: DIAM stored in the .ZMX (computed by Zemax) | 2.7500 | 2.7500 | 0.00% | Match |
| Semi-diameter, surface 12 (mm)Zemax: DIAM stored in the .ZMX (computed by Zemax) | 13.8830 | 13.8830 | 0.00% | 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) | ∞ | ∞ | 18 | 2.75 | |||
| 2 | STANDARD | ∞ | ∞ | 4 | N-BK7 | 12.7 (fixed) | 12.7 | |
| 3 | LC1120-B | STANDARD | 51.46 | 51.46 | 30.1 | 12.7 (fixed) | 12.7 | |
| 4 | LB1106-B | STANDARD | 127.37 | 127.37 | 8.12 | N-BK7 | 25.4 (fixed) | 25.4 |
| 5 | not too critical | STANDARD | -127.37 | -127.37 | 2 | 25.4 (fixed) | 25.4 | |
| 6 | STANDARD | 422.363 | 422.363 | 5 | N-SF57 | 25.4 (fixed) | 25.4 | |
| 7 | STANDARD | 118.656 | 118.656 | 8.2 | N-SK2 | 25.4 (fixed) | 25.4 | |
| 8 | ACT508-200-B | STANDARD | -121.012 | -121.012 | 1.12 | 25.4 (fixed) | 25.4 | |
| 9 | ACT508-200-B | STANDARD | 121.012 | 121.012 | 8.2 | N-SK2 | 25.4 (fixed) | 25.4 |
| 10 | STANDARD | -118.656 | -118.656 | 5 | N-SF57 | 25.4 (fixed) | 25.4 | |
| 11 | STANDARD | -422.363 | -422.363 | 88 | 25.4 (fixed) | 25.4 | ||
| 12 | STANDARD | ∞ | ∞ | 0 | 13.883 |
How Zemax was run
By make_zemax_reference.py, the same way for every design, on
2026-12-04 13:38.
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
uv run python -m evaluation_tools.from_zemax.analyze_zmx designs/from_zemax/organgrinder_75mm_scan_lens uv run python -m evaluation_tools.from_zemax.compare_optiland designs/from_zemax/organgrinder_75mm_scan_lens # needs Zemax_reference_output/ uv run python -m evaluation_tools.from_zemax.compare_raycrafter designs/from_zemax/organgrinder_75mm_scan_lens uv run python -m evaluation_tools.build_summary # regenerates all HTML