Path Analysis





This feature is only available in the Premium and Enterprise editions of Ansys Zemax OpticStudio.

This feature groups rays from a Ray Database file according to the path the rays took through the system. Rays that have the same sequence of object faces are grouped in the same path and their flux is added together to determine the path's total flux.

Note that the path analysis reports the sequence with the n.f format where n is the object number and f is the face number. This feature also may automatically generate path filters so the groups of rays may be studied separately.

Ray Database Selects the ray data or path file to analyze.

First/Last Ray Choose the ray range. To use all rays, set the First ray to 1 and the last ray to -1.

Filter See The Filter String. Filters for PAF files must be specified during the Ray Trace and cannot be applied here.

Generate Path Filters If selected, path filters for all possible paths are automatically generated.

Relative Minimum Flux The relative flux is the amount of energy at the end of a branch relative to the starting energy at launch. If this value is less than the specified minimum, then the branch is added to the "uncategorized" sum.

Sort Paths By Specify the arrangement of the paths. The options available are total ending flux, number of objects struck, number of branches, last object struck, number of unique objects struck, average optical path length, number of diffraction events.

Discussion

This feature reads all or some subset of the rays in the selected ZRD file and filters the rays according to the specified filter string, if any. Then, the path analysis tool extracts the path sequence of each ray branch to group them by their path sequence. The path sequences represent the order in which the ray interacted with the given object surfaces. For example, path 1 from the screenshot has the following sequence: 1.0, 2.1/(0,*), 2.2, 5.0, 4.0. The sequence indicates that the ray branches started from source 1, traveled and interacted with object 2 face 1; at this face the diffraction order 0 in the x direction is generated, the "*" indicates that no diffraction order is generated in the y direction; the the ray branch interacts with object 2 face 2, continues to object 5 face 0, and is terminated at object 4 face 0.

There is a maximum number of objects allowed in any one path sequence, and this limit is currently 100. All paths with more than this number of object interactions are considered to have the same path.

All branches that have the same path sequence are grouped together. The flux (always in watts, regardless of the source units) at the end of the path is summed for all branches having the identical path sequence. The list of all possible paths is generated and sorted as described in the Sort Paths By section. This data is summarized in a report listing the path #, flux out, relative flux out as a percentage of the total flux in for all rays, the number of branches with that same path, and then the path sequence.

Ray branches that do not fall into any path because of a Relative Minimum Flux requirement, or because the maximum number of unique paths (currently 10,000) is exceeded, are added to the catch-all "uncategorized" path.

Only one ZRD file can be active with the Path Analysis feature at one time, however many path analysis windows can be open.

If "Generate Path Filters" is checked, this feature will create a path filter for each path defined, and this filter will be named _1 for path 1, _2 for path 2, etc. These path filters may subsequently be used in any analysis feature that supports filter strings to isolate the selected path. These filters must not have any leading zeros before the path number. For example _02 should not be used instead of _2. The generated path filters are automatically saved with the lens file.

There is a handy shortcut for using path filters when looking at the NSC 3D Layout, NSC Shaded Model, or Detector Viewer plots: press the spacebar to increment the path filter number (from 1 to 2 or 5 to 6, etc). Press Ctrl-Space to decrement the path filter number. Also, holding down the Shift key while pressing the space bar will increment or decrement the path filter by 10.

Path filters may also be used in combination with other filters, whether explicit or named. For example, the following is a valid filter that selects only ghost rays off object 11 with the specified path: "_7 & G11".  For more information see The Filter String and Named Filters.

Note that path filters _n doesn't include the filters used when performing the Path Analysis. The path filter _n only filters rays by selecting ray branches whose segments follow an explicit path.

Next: