Why Stray Light Analysis Matters
The primary purpose of stray light analysis is to identify the source of ghost images and determine how to eliminate them. Ghost images reduce contrast, introduce artifacts, and can severely degrade system performance—especially in wide-FOV imaging systems, surveillance optics, and scientific instruments.
This article walks through a practical, step-by-step method for identifying ghost image sources using non-sequential ray tracing and path analysis.
Example System: 210-Degree Imaging Optics
The example shown here is a 210-degree imaging system (design file attached at the end of the article). Initial ray-tracing results clearly show unintended reflected light (ghost light) reaching the detector.
Our goal is to:
- Separate strong ghost paths from weak background noise
- Identify the dominant stray-light path
- Determine the physical cause of the ghost image


Step 1: Filter Weak Ghost Rays Using Relative Ray Intensity
A simple but powerful first step is to eliminate very weak rays.
Minimum Relative Ray Intensity
This setting defines the minimum energy ratio (relative to the source) for rays to continue tracing
Default value: 1.0E-6
Rays are traced until their energy drops below 1 ppm of the original source
To isolate strong ghost contributors, set:
Minimum Relative Ray Intensity = 0.0005
This stops tracing rays once their energy drops below 0.05% of the source, allowing weak ghost noise to be filtered out while retaining the strongest contributors.

Step 2: Identify Residual Ghost Energy on the Detector
After filtering weak rays, we observe that residual ghost light remains, concentrated near the bottom-center region of the detector.
At this stage, the key question becomes:
Where exactly is this ghost light coming from?

Step 3: Isolate Rays Hitting a Specific Detector Region
To focus only on rays reaching the problematic detector area, we apply a ray filter string targeting a defined region of interest (ROI) on the image plane:
X_XGT(28,-15) & X_XLT(28,15) &
X_YGT(28,-37) & X_YLT(28,-30)
This filter:
- Selects rays hitting a small rectangular region on the detector
- Eliminates all rays outside the ghost-affected area

Step 4: Too Many Paths? Use Path Analysis
The layout now shows many possible ray paths reaching the target region. Based on experience, we know:
- Not all paths contribute equally
- Typically one or two dominant paths account for most ghost energy
To identify these dominant contributors, we use Path Analysis.
Step 5: Path Analysis – Finding the Dominant Ghost Path
The Path Analysis tool groups rays from the ZRD file based on the sequence of surfaces and objects they interact with.
For each unique path, the tool:
- Sums the total flux
- Reports each path’s contribution to the detector

The analysis shows that:
- ~0.03% of the total energy
- Is concentrated almost entirely in Path #1
This strongly indicates a single dominant ghost mechanism.
Step 6: Visualizing the Dominant Path
To visualize the strongest ghost path:
- Append
&_1to the original filter string - Display the filtered layout

Let’s zoom in to see the details:

Root Cause Identified: Lens Edge Reflection
The dominant ghost path originates from reflection at the side (edge) of a lens element.
This type of ghost:
Is common in wide-angle systems
Often arises from:
Uncoated lens edges
Insufficient edge blackening
Missing or ineffective AR coatings
In this case, the ghost image would be eliminated by applying a proper AR coating and edge treatment.
Practical Stray Light Analysis Workflow Summary
- Use Minimum Relative Ray Intensity to suppress weak noise
- Isolate ghost regions using detector ray filters
- Avoid chasing every path—use Path Analysis
- Focus on energy-dominant stray paths
- Identify physical causes (lens edge, surface reflection, housing)
- Apply appropriate mitigation (AR coating, baffles, blackening)
Why Path Analysis Is So Powerful
- Converts complex ray data into actionable insight
- Quickly highlights dominant ghost contributors
- Prevents wasted effort on negligible paths
- Essential for robust stray-light mitigation
References
- https://www.zemax.com/
- The design file used in this article is attached. How to identify the source of “Ghost Image” lighting