Skip to content

What is a reference raytrace failure and how to correct it

Question

When I'm optimizing or performing an analysis on a lens, I sometimes get an error message that indicates: Warning: reference ray trace failed. What is the problem? How do I correct it?"

Synopsis

What is a reference raytrace failure and how to correct it

Symptoms

In versions of OSLO prior to OSLO 6.2.2, the other text accompanying this message was not very helpful to explain the situation. Starting with OSLO 6.2.2, the accompanying text gives a little more description about the cause of the problem.

Solution

A "Reference Raytrace Failure" means that the reference ray (the ray that is iterated to pass through the center of the aperture stop) gets stopped while passing through your optical system for at least one of your field positions. This may be due to a number of situations, including surface curvatures being too small or aspheric terms being too large to accommodate the appropriate rays. It is important to note a few things:
  1. When this begins to happen during an optimization, it can appear intermittently and may appear to be a bug in the OSLO program - but it is not. The optical design needs to be altered to stop this condition from happening.
  2. Note that a reference ray trace is performed during analyses, not during lens drawings - so performing a ray drawing will not encounter the "Reference Ray Failure" message although the rays themselves will be truncated at the surface preceding a ray failure (in a lens drawing).
  3. Lens drawings rely on a different set of field points than analysis field points. It is possible that rays traced using analysis field points fail, while rays in drawings appear to trace correctly all the way to the image plane without ray failures. NOTE: Drawing field points are defined using "Lens>>Lens Drawing Conditions" and analysis field points are defined using "Optimize>>Error Function Tables>>Field Point Set".
There are a couple of things you can do to stop the error:
  1. If it is obvious what is causing the ray failure (i.e. lens radius too small and the ray misses the lens) simply correct it. If you are not sure exactly what the problem is, there are some other things to try:
  2. The reference ray trace error usually happens for large field angles before it happens for the on-axis reference ray. Reduce the size of your system field angle until the problem stops.
  3. It is valuable to do a real ray trace to determine the cause of the error - so that you can correct it.
    • Click on the CHF icon in the text window standard toolbar. This traces a reference ray through your system - it should fail and give you the error message, but it also sets the analysis field point to be at the maximum field.
    • Click on the TRA icon in the text window standard toolbar and accept the default values in the resulting dialog by clicking "OK". The ray trace will fail (again) but this time it will tell you which surface was the problem and why.