Soon, we will launch a new and updated customer portal, which is an important step toward providing our customers with one place to learn, interact, and get help.

# How to Debug a Double-Pass Lens File

This article describes an easy way to test whether a double-pass lens file is correctly set up, or not, and to identify where any errors are.

Mark Nicholson
01/04/2016
System Modeling
OpticStudio

# How to Debug a Double-Pass Lens File

Due to the way sequential ray tracing works (rays are traced from one surface to the next in a specific order), modeling a double pass system requires that the optical system be modeled twice; once for each pass. Different solve types, such as position and pickup, are essential for making sure that the optics are mapped appropriately for the return path of the beam. Great care should be taken to ensure the model has been setup correctly, especially for tolerancing or whenever there are tilted or decentered components, as the return path must be identically perturbed compared to the first pass.

In this simple example ("Double-Pass.zmx which can be downloaded from the link at the bottom of this page) we have a simple singlet lens used in double pass:

the resulting spot is highly aberrated:

How do we know that this aberration is correct, and not just an artifact of some setup error we made? The answer is surprisingly simple.

Zemax OpticStudio supports a 'Retro-Reflect' surface type which acts like a plane mirror except that instead of reflecting rays using Snell's law, rays are reflected exactly back along the path they came in on. Therefore on the second path they ray should follow the exact path it came in on, and it should therefore be re-imaged to a perfect, unaberrated spot. In this system, if we make surface 3 a Retro-Reflect surface:

then the aberrations of the second pass exactly cancel those of the first, and a perfect point image results:

Even better, if you have made some mistake and you do not see perfect aberration correction, you can use Analysis...Calculations...RayTrace to trace a ray. The ray-trace data should be exactly the same on either side of the Retro Reflect surface, and when you identify a pair of surfaces that are not exactly the same, you have identified the setup problem:




When tolerancing, do a test tolerancing run in which the double-pass mirror is made a retro-reflector and tolerance for RMS spot size. If your system and tolerance operands are correctly set up, no matter what the tolerances are the tolerancing criterion should be identically zero for all operands and all Monte-Carlo files. Any non-zero results indicate setup errors in either the lens itself or the tolerance operands. You can use the SAVE operand to save the sensitivity analysis files, and also save the Monte-carlo files to disk as well.

Don't forget to reset to a real mirror surface after doing these tests!