When To Use Ray Aiming

When To Use Ray Aiming

This article will talk about what Ray Aiming is, when to use it and some recommendations if you get errors.

Summary

The tl;dr summary:

  • If Pupil Aberrations are less than 2%, do not use Ray Aiming.?
  • If Stop is in Object Space, do not use Ray Aiming.
  • If Ray Aiming is needed, always use Float By Stop Size and Paraxial Ray Aiming.

Defining a Ray

A ray is fully defined by knowing the starting location, the initial direction and the wavelength.?If the first two values are fully defined using XYZ positions and LMN direction cosines, then we don’t have to do any conversion for the ray trace algorithm.?However, all systems are defined using Hx/Hy normalized field coordinates and Px/Py normalized pupil coordinates.?From these 2 sets of points in space, OpticStudio needs to calculate the XYZ starting location and the LMN initial direction cosine.

For all systems in the OpticStudio GUI, the XYZ starting position is well defined with the Hx/Hy starting pair; if it’s a finite conjugate, the XYZ are explicitly defined in the Lens Data Editor and the Field Data Editor and if it’s an infinite conjugate system the XYZ are on a plane tangent to the chief ray in object space.?

The tricky situation comes with figuring out the initial direction cosines. With the Hx/Hy defined, OpticStudio needs a second plane located somewhere else in the optical system to calculate another set of "target points" on and then determine what LMN direction cosine connects the two sets of points.?

Direction Cosines from 2 sets of Cartesian coordinates

With no Ray Aiming, OpticStudio uses the Paraxial Entrance Pupil as this second plane and as long as there are very “low mapping differences” (pupil aberrations) between the Paraxial Entrance Pupil and the actual Stop, using the Entrance Pupil is fine.?These pupil aberrations are defined as a percent difference of a real ray hitting the same normalized location in both the Entrance Pupil and the Stop (i.e., the chief ray goes through the center or the marginal ray hits the edge).?You can see these aberrations by clicking Analyze > Aberrations > Pupil Aberrations:

No alt text provided for this image

If the total pupil aberrations are less than about 1%-2%, then ray aiming is not needed.

Ray Aiming

If ray aiming is needed, then OpticStudio uses an 2 step iterative algorithm to change the initial LMN direction cosine until the ray hits the correctly defined Px/Py position in the actual Stop (and not the Entrance Pupil); the initial XYZ is also modified for infinite conjugate systems as long as the ray still falls on the plane tangent to the chief ray.?The first step is to find a single "best guess" ray that mathematically traces from the Object Plane to the Stop. If this "best guess" ray makes it to the Stop, then OpticStudio will slightly iterate this ray until it makes it to the correct Px/Py location. If this "best guess" ray does not make it to the Stop, then a more robust search algorithm is used to try to determine the direction cosine for any ray that can make it to the Stop. If Ray Aiming fails, it's typically because OpticStudio cannot efficiently find a ray that makes it from Object Plane to the Stop.

The difference between Paraxial Ray Aiming and Real Ray Aiming is how the physical stop size is set if the Aperture Type is set to anything other than Float By Stop Size.?Since most first-order properties use the Paraxial Entrance Pupil (F/#, NA, efl, m,?etc), Paraxial Ray Aiming uses paraxial rays to determine the size of the Stop; this option makes sure that first-order properties are still calculated using the Paraxial Entrance Pupil.?Real Ray Aiming will use real rays rather than paraxial rays to find the size of the Stop.?For both algorithms, once the size of the Stop is determined, the same algorithm is used to determine the initial XYZ and LMN value and real rays are traced through the system for aberration analysis.?However, Real Ray Aiming is about 2x-8x slower and fails in more instances than Paraxial Ray Aiming.

Ray Aiming Rules of Thumb

A few things to consider when using Ray Aiming:

  • Ray Aiming is not needed if the Pupil Aberrations are less than 1%-2%
  • You should always set the Aperture Type to Float By Stop Size if Ray Aiming is turned on (the algorithm needs to have something to aim at)
  • If you need Ray Aiming, start with Paraxial Ray Aiming, check the Pupil Aberrations and if the aberrations are now less than 1%-2%, you don’t need Real Ray Aiming

How to Fix Errors

If there are errors (for advanced users and compiled by a computational physicists at Zemax):

  • If using Real Ray Aiming, switch to Paraxial Ray Aiming
  • If pupil shifts are off, try turning them on
  • If pupil shifts are on, turn them off and set the values to:
  • 0 if the values are small and make sense
  • To a reasonable value if one of them doesn’t make sense (i.e., the Z Shift is past the Image Plane)
  • Change the Semi-Diameter of the first surface with optical power (there is a built-in grid search for determining the correct XYZ and LMN values to use)
  • Make sure it isn’t some absurd value
  • Set it to Fixed in the Clear Semi-Diameter solve box
  • Try to change the size of the Semi-Diameter by either a factor of 2x or 0.5x
  • Set the aperture type to Float by Stop Size
  • Use a Field Type defined in object space
  • Toggle the Ray Aiming Cache off/on
  • Turn on Robust Ray Aiming?

Brian Koss

Senior Optical Engineer, designer/builder, simulator, hands-on tester, of opto-mechanical systems across physics, chemistry, biology, and space applications

4 个月

"If Pupil Aberrations are less than 2%, do not use Ray Aiming" This generalization is not helpful. What is needed is a specific description of how one should measure pupil abberrations in the first place. Also, which aberrations? All? What field angle? All wavelengths, or just primary? Does robust ray aiming need to be engaged as well? What if the source is not infinitely far away, or is inside the hyperfocal distance? I wish I had a penny for every optical sumulation instruction that did not state the obvious impacting details.

要查看或添加评论,请登录

Michael Humphreys的更多文章

  • True MTF

    True MTF

    FFT or Huygens OpticStudio can accurately calculate the MTF of an optical system, either using the FFT MTF or Huygens…

    2 条评论
  • Zemax OpticStudio Monte Carlo Thermal Analysis

    Zemax OpticStudio Monte Carlo Thermal Analysis

    Mechanical Change Zemax OpticStudio provides a robust first-order thermal analysis that looks at both the linear…

    1 条评论
  • Why Should I Reverse a Sequential Design

    Why Should I Reverse a Sequential Design

    OpticStudio only knows how to trace rays from "left to right". Or in more technical terms, OpticStudio only knows the…

    5 条评论
  • ZOS-API: IBatchRayTrace & Ray Aiming

    ZOS-API: IBatchRayTrace & Ray Aiming

    For those who have used sequential ray tracing in the ZOS-API, you know there are 4 main types of sequential ray…

  • OpticStudio Coherent Power

    OpticStudio Coherent Power

    OpticStudio non-sequential mode is extremely powerful and accurate when calculating the coherent (interference) power…

  • Visualize Gaussian Beam Envelope in Sequential Mode

    Visualize Gaussian Beam Envelope in Sequential Mode

    OpticStudio has several specific analysis features to model different aspects of a sequential optical design, such as…

  • Advanced ZPL using BAT files

    Advanced ZPL using BAT files

    The Zemax Programming Language (ZPL) is an extremely powerful scripting language for use inside of OpticStudio. On the…

  • Rayleigh Resolution Criteria for PSF

    Rayleigh Resolution Criteria for PSF

    In perfect geometric optics, a point source is imaged to a perfect point. In order to achieve this perfect imaging, the…

    2 条评论
  • What Are Vignetting Factors?

    What Are Vignetting Factors?

    As a basic explanation, OpticStudio launches from a point source a circular grid of rays into the Entrance Pupil (EP)…

  • Modeling Refractive Index

    Modeling Refractive Index

    When tolerancing in OpticStudio, it is important to take into account both the manufacturing defects of individual…

    1 条评论

社区洞察

其他会员也浏览了