RayCrafter evaluation

Optiland and RayCrafter against Zemax

For each optical design, how closely does the open-source ray tracer Optiland, and the lens-level design tool RayCrafter built on it, reproduce what Zemax OpticStudio gives?

What this is

Designs are of two kinds. A design made in Zemax starts as a file exported from OpticStudio, together with the plots and numbers Zemax produces for it (the reference). We load the same file into Optiland, run the same analyses, and compare. A design made in RayCrafter starts as a RayCrafter project: RayCrafter exports it as a Zemax file, a person opens that in OpticStudio, and the numbers Zemax gives for it are compared with RayCrafter's own. Every page puts the verdict first (match, partial or fail, computed from stated tolerances), then the evidence: the Zemax output next to ours. Problems we find in Optiland are written up in upstream/optiland_issues_found.md, and each one lists where it stands upstream in optiland/optiland (so far #1210, #1247, #1248 and a comment on #865).

RayCrafter is also run on made-in-Zemax designs it can load, and compared in its own column. What is tested is RayCrafter's development branch (dev), not the release on PyPI, so it may do things the release does not yet do. RayCrafter does its own calculating: this repository calls it, at a recorded version, and repeats none of it.

Each design folder holds the design itself (the Zemax export, or the RayCrafter project), a Zemax_reference_output/ folder (what we must match: our own Zemax run, where it has been done), Authors_reference_output/ (Zemax output that came with the design), the analyses of each tool with a README listing every file, and the generated page in HTML_summary/.

At a glance

Made in Zemax: can Optiland, and RayCrafter, read the Zemax file and give what Zemax gives? Made in RayCrafter: does the Zemax file RayCrafter exports give, in Zemax, what RayCrafter says it should? Those are grouped by what each design tests. The counts are of the rows of each tool's comparison with Zemax, as in the table on the design's page; each title links to that page.

DesignAgainst Zemax
Made in Zemax
SMOD4.5 scan systemGalvo scan system: 4.5 mm beam, 54 mm scan lens, 250 mm tube lens, 45° fold mirror and an ideal 12.5 mm objective.Zemax disagrees with itself: FFT and Huygens MTFs differ by up to 0.124 (fail limit 0.02); Huygens PSF and Wavefront Map Strehl ratios differ by up to 0.020 (fail limit 0.02)
Optiland9 match0 partial11 fail
RayCrafter8 match0 partial3 fail
US 5,899,585, example 1 (wide-angle photographic lens, ray aiming real)A photographic prime to 21.6 mm image height with a floating stop in air behind the sixth lens, and Zemax's real ray aiming on. Checks that RayCrafter's fields fill the stop as real aiming does (raycrafter #204).
Optiland1 match1 partial13 fail
RayCrafter6 match2 partial0 fail
US 2,158,507 (small objective, stop at the front lens, ray aiming real)A two-lens objective with its stop on the front surface and Zemax's real ray aiming on. With the stop at the front, aiming is expected to make no difference (the run checks this): RayCrafter does not fill the stop here and uses the file's entrance pupil as it is (raycrafter #204). Run again with ray aiming off.
Optiland1 match5 partial8 fail
RayCrafter3 match3 partial0 fail
US 8,964,096, example 2 (F/1.5 photographic lens, ray aiming off)An F/1.5 photographic prime to 23 degrees, with its stop in air in the middle and Zemax's ray aiming off, so it aims at the paraxial pupil. Run again with ray aiming real. Tests how far real aiming, which RayCrafter's filled stop copies, is from Zemax's own paraxial aiming (raycrafter #204).
Optiland0 match2 partial12 fail
RayCrafter1 match5 partial0 fail
75 mm scan lens for the OrganGrinderA collimated 5.5 mm beam at 0.92 um through a negative lens, a plano-convex lens, a doublet pair and a long run to a flat image: effective focal length 73.4 mm, f/13.3, fields 0, 5 and 11 degrees. No tilts, no mirror, one configuration.
Optiland16 match3 partial2 fail
RayCrafter12 match0 partial0 fail
Paraxial excitation into a 30 mm blockAn ideal f = 50 mm lens, telecentric, NA 0.15, focusing into a model glass that runs up to the image. Fields are image heights.
Optiland9 match3 partial11 fail
RayCrafter14 match0 partial0 fail
Relay with custom spherical aberrationA collimated beam through two pairs of LA1253 plano-convex lenses to a stop in air, with two doublets set to be ignored. On axis, nearly collimated output.
Optiland12 match0 partial5 fail
RayCrafter4 match1 partial0 fail
Scan and tube lens, 8 May 2024 (6 mm beam, fold mirror, ideal 12.5 mm objective)A collimated 6 mm beam at 0.8 to 1.04 um through a scan lens, a 190 mm gap and a tube lens of two doublets, a 45 degree fold mirror and an ideal 12.5 mm objective, to an image at f/0.70. Fields 0 to 6 degrees. One configuration.Zemax disagrees with itself: FFT and Huygens MTFs differ by up to 0.118 (fail limit 0.02)
Optiland9 match0 partial12 fail
RayCrafter10 match1 partial0 fail
TWINKLE collection opticsFluorescence collection: 18.4 mm entrance pupil, fold mirror, achromat pair, dichroic mirror, filter, aspheric condenser and a 2.5 mm detector aperture. Fields to 12°.
Optiland3 match1 partial7 fail
RayCrafter6 match0 partial1 fail
TWINKLE excitation pathTwo-photon microscope excitation: 4.4 mm beam, galvo, 200 mm relay, scan lens, tube lens, three fold mirrors, dichroic and an ideal objective. 22 galvo angles in the file.
Optiland9 match0 partial1 fail
RayCrafter1 match3 partial0 fail
TWINKLE scan lens (alone)Galvo, relay and the scan lens on their own, as a component check of the excitation path. 18 galvo angles in the file.
Optiland15 match2 partial5 fail
RayCrafter27 match6 partial0 fail
TWINKLE tube lens (alone)The tube-lens doublet pair on its own, as a component check of the excitation path. 6 configurations in the file.
Optiland17 match1 partial4 fail
RayCrafter31 match2 partial0 fail
Made in RayCrafter: Singlets and achromats at infinity
100 mm biconvex singlet, object at infinityThorlabs LB1630-A biconvex singlet with a 40 mm collimated beam at 555 nm and four fields to 2 degrees.
RayCrafter18 match1 partial0 fail
250 mm achromat, object at infinityThorlabs ACT508-250-A achromat with a 40 mm collimated beam at 555 nm and four fields to 2 degrees.
RayCrafter19 match3 partial0 fail
Made in RayCrafter: Aspheres
100 mm asphere, object at infinityThorlabs AL50100-A asphere with a 40 mm collimated beam at 555 nm and four fields to 2 degrees.
RayCrafter18 match4 partial0 fail
Asphere ACL2520UThorlabs ACL2520U-A conic condenser, the right way round, under a collimated 18 mm beam at 587.6 nm, 0 and 1 degree, image at RayCrafter's autofocus.Zemax disagrees with itself: FFT and Huygens MTFs differ by up to 0.099 (fail limit 0.02)
RayCrafter20 match2 partial2 fail
Asphere ACL2520U, turned roundThorlabs ACL2520U-A conic condenser, turned round, under a collimated 12 mm beam at 587.6 nm, 0 and 1 degree, image at RayCrafter's autofocus.
RayCrafter18 match1 partial0 fail
Asphere AL2550GThorlabs AL2550G-A, the right way round, under a collimated 18 mm beam at 532 nm, 0 and 1 degree, image at RayCrafter's autofocus.
RayCrafter19 match5 partial0 fail
Asphere AL2550G, turned roundThorlabs AL2550G-A, turned round, under a collimated 12 mm beam at 532 nm, 0 and 1 degree, image at RayCrafter's autofocus.
RayCrafter18 match1 partial0 fail
Asphere AL7560Thorlabs AL7560, with high-order terms below 1e-16, the right way round, under a collimated 60 mm beam at 587.6 nm, 0 and 1 degree, image at RayCrafter's autofocus.
RayCrafter19 match5 partial0 fail
Asphere AL7560, turned roundThorlabs AL7560, with high-order terms below 1e-16, turned round, under a collimated 30 mm beam at 587.6 nm, 0 and 1 degree, image at RayCrafter's autofocus.
RayCrafter18 match1 partial0 fail
Asphere Edmund67248Edmund 67248 (f/0.75), the right way round, under a collimated 36 mm beam at 587.6 nm, 0 and 1 degree, image at RayCrafter's autofocus.Zemax disagrees with itself: FFT and Huygens MTFs differ by up to 0.038 (fail limit 0.02)
RayCrafter20 match4 partial0 fail
Asphere Edmund67248, turned roundEdmund 67248 (f/0.75), turned round, under a collimated 20 mm beam at 587.6 nm, 0 and 1 degree, image at RayCrafter's autofocus.
RayCrafter18 match1 partial0 fail
Made in RayCrafter: Folds
SMOD4.5 folded, exported by RayCrafterSMOD4.5 imported into RayCrafter with its fold mirror and exported again: five angles at 850 nm. The ideal objective is widened to 50 mm.Zemax disagrees with itself: FFT and Huygens MTFs differ by up to 0.172 (fail limit 0.02)
RayCrafter22 match1 partial4 fail
A mirror that clips the beamTwo Thorlabs AC254-100-A with a 4 mm beam at 555 nm, 0 and 2 degrees, and an elliptical mirror too small for the 2 degree beam.Zemax disagrees with itself: Huygens PSF and Wavefront Map Strehl ratios differ by up to 0.054 (fail limit 0.02)
RayCrafter24 match3 partial0 fail
One fold mirror behind the lensesTwo Thorlabs AC254-100-A with a 4 mm beam at 555 nm, 0 and 2 degrees, and an elliptical 38.1 mm mirror behind the second lens that turns the light towards +x.
RayCrafter24 match3 partial0 fail
One fold mirror, upTwo Thorlabs AC254-100-A with a 4 mm beam at 555 nm, 0 and 2 degrees, and a rectangular 25 x 40 mm mirror that turns the light up.
RayCrafter24 match3 partial0 fail
Two folds, out of planeTwo Thorlabs AC254-100-A with a 4 mm beam at 555 nm, 0 and 2 degrees, and a rectangular mirror turning towards -x and an elliptical one at 35 degrees turning up.
RayCrafter24 match3 partial0 fail
PeriscopeTwo Thorlabs AC254-100-A with a 4 mm beam at 555 nm, 0 and 2 degrees, and two round 50 mm mirrors forming a periscope.
RayCrafter24 match3 partial0 fail
A periscope whose second mirror clips the beamTwo Thorlabs AC254-100-A with a 4 mm beam at 555 nm, 0 and 2 degrees, and two mirrors forming a periscope: a round 50 mm one and then the elliptical mirror of fold_clipping_mirror, too small for the 2 degree beam, at the same distance from the first lens.
RayCrafter24 match3 partial0 fail
TWINKLE tube lens, exported by RayCrafterThe TWINKLE tube lens imported into RayCrafter with its fold mirror and curved image and exported again: 0, 0.5 and 1 degree at 920 nm.
RayCrafter30 match0 partial0 fail
Made in RayCrafter: Immersion: media and coverslips
Achromat focusing into waterA Thorlabs AC254-050-A with water from its back face to the image, under a collimated 10 mm beam at 550 nm.
RayCrafter14 match4 partial0 fail
Custom medium and a diamond windowA Thorlabs AC254-100-A, a custom medium (n_d 1.45, V_d 60) up to a 3 mm diamond window, then air to the image, under a collimated 8 mm beam at 550 nm.
RayCrafter17 match1 partial0 fail
Ideal lens focusing into waterAn ideal (paraxial) lens of f = 50 mm with water behind it, under a collimated 10 mm beam at 550 nm.
RayCrafter14 match4 partial0 fail
Object in water under a coverslipAn object point in water (object-space NA 0.03 = n sin theta) under a 0.17 mm N-BK7 coverslip, imaged by a Thorlabs AC254-050-A at 550 nm.
RayCrafter17 match0 partial0 fail
Made in RayCrafter: Apodization: Gaussian and uniform beams
Gaussian beam filling a stopA Thorlabs LA1509 singlet (f = 100 mm) at 550 nm with an 11 mm stop in front, filled by a Gaussian beam (fill factor 1).
RayCrafter17 match1 partial0 fail
Gaussian beam, no stopA Thorlabs LA1509 singlet (f = 100 mm) at 550 nm under a 14 mm Gaussian beam that fills its edge (fill factor 1).
RayCrafter17 match1 partial0 fail
Gaussian beam overfilling its edgeA Thorlabs LA1509 singlet (f = 100 mm) at 550 nm under a 14 mm beam cut from a Gaussian twice as wide (fill factor 2, written `GFAC 0.25 1`: it shows which number Zemax takes as the factor).Zemax disagrees with itself: Huygens PSF and Wavefront Map Strehl ratios differ by up to 0.031 (fail limit 0.02)
RayCrafter16 match2 partial0 fail
Uniform beam, the contrastA Thorlabs LA1509 singlet (f = 100 mm) at 550 nm under a uniform 14 mm beam.
RayCrafter17 match1 partial0 fail
Made in RayCrafter: Telescopes and afocal systems
4f scan system (RayCrafter's example)RayCrafter's Help > Examples > 4f scan system: a scanner, a Plossl scan lens of two AC254-100-A and an ACT508-250-A tube lens turned round, with a 4 mm beam at 555 nm and fields 0, 2.5 and 5 degrees. The light leaves collimated.
RayCrafter18 match0 partial0 fail
Galilean beam expanderLC1715 and LA1708 singlets (N-BK7), collimated in and out, with a 2.5 mm beam at 632.8 nm on axis.
RayCrafter11 match0 partial0 fail
Galilean telescope with an eyeACT508-300-A objective, LC2679 negative eyepiece and an ideal 17 mm eye lens, with a 50 mm beam at 555 nm and fields 0 and 1.5 degrees.
RayCrafter21 match1 partial0 fail
Keplerian telescope with an eyeACT508-300-A objective, AC254-030-A eyepiece and an ideal 17 mm eye lens, with a 50 mm beam at 555 nm and fields 0 and 1.5 degrees.
RayCrafter19 match3 partial0 fail
Keplerian telescope without an eyeACT508-300-A objective and AC254-030-A eyepiece, collimated in and out, with a 50 mm beam at 555 nm and fields 0 and 1.5 degrees.
RayCrafter16 match5 partial0 fail
Made in RayCrafter: Ideal lens: the path across a paraxial surface
Ideal lens at F/0.6 behind an aberrated singletAn ideal (paraxial) lens of f = 12.5 mm, 25 mm wide, 3.2 mm behind a Thorlabs LB1811-B bi-convex singlet (f = 35 mm, N-BK7), with a 20 mm collimated beam at 555 nm and fields 0, 5 and 10 degrees. The singlet's spherical aberration reaches the ideal lens as a wavefront of 18 waves rms; the system is F/0.52.
RayCrafter19 match1 partial2 fail
Made in RayCrafter: Finite objects and distortion
Distortion of a finite objectTwo Thorlabs achromats imaging a finite object 95 mm away (object-space NA 0.05, 555 nm), object heights 0 to 5 mm.
RayCrafter15 match3 partial0 fail
Distortion of a finite object, defocusedThe finite-object system with the image 53.9 mm behind the last lens, 10 mm from the earlier design.
RayCrafter14 match1 partial0 fail
AC254-050-A as an objective at infinityA Thorlabs AC254-050-A turned to work as an objective: the object on its front focal plane (555 nm), an 8 mm stop 0.5 mm behind it that the fields fill, object heights 0, 1.5 and 3 mm. Every point leaves collimated.
RayCrafter13 match0 partial0 fail
Ideal objective, object imaged at infinityAn ideal (paraxial) lens of f = 10 mm with the object on its focal plane (object-space NA 0.25, 555 nm), object heights 0, 0.25 and 0.5 mm: every point leaves as a collimated beam.
RayCrafter12 match0 partial0 fail
Ideal-lens microscopeIdeal 10 mm objective and 200 mm tube lens, object points at 0, 0.5 and 1 mm, NA 0.25, 555 nm: 20x.
RayCrafter17 match0 partial0 fail
Made in RayCrafter: Stops and clipping
Negative lens under a wide beamThorlabs ACN127-020-A (12.7 mm) under a collimated 20 mm beam at 587.6 nm.
RayCrafter10 match0 partial0 fail
Cut-cone object point: MTFAn object point on axis, and one at 1 mm, each with an object-space NA of 0.04 at 555 nm, imaged by a Thorlabs AC254-100-A 400 mm away. The lens rim passes NA 0.0317, 79 % of the cone's diameter. RayCrafter once gave the MTF the cutoff of the whole cone (raycrafter #142, #174).
RayCrafter15 match2 partial0 fail
Stopped-down beam: autofocusA 10 mm beam at 555 nm cut to 1.001 mm by an aperture 5 mm in front of an ideal 50 mm lens, with the image plane 10 mm behind the focus. RayCrafter's autofocus once sent it 1 mm behind the lens (raycrafter #129).
RayCrafter9 match0 partial0 fail
Stopped-down relay: CollimateA 10 mm beam at 555 nm cut to 1.001 mm by an aperture in front of two ideal 100 mm lenses, saved at the 200 mm gap RayCrafter's Collimate found. It once set that gap to 0 mm (raycrafter #193).
RayCrafter8 match0 partial0 fail