Solved

Plotting ray coordinates as function of the object field

  • 13 April 2022
  • 2 replies
  • 337 views

Badge +1

Hi,

By this question I am trying to understand how Zemax and in general how raytracing and geometrical optics work.

As part of my learning ZOS-API, I am trying to raytrace as a function of hy (normalized field coordinates along y-axis) at px = py =0 for a lens with the specs below

OpticStudio can plot the ray coordinates as function of entrance aperture but here I am trying to plot the ray coordinates as function of field coordinates). When the px = py =0, so the aperture dependent terms will be zero and only the Distortion terms (nonlinear field-dependent terms) are present. However, raytracing with Zemax (I use ZOS-API) results a plot like this (x-axis is the 0 < hy < 1 and y-axis is the ray coordinates.

My Question

Why this plot is linear and non-linear terms are absent? I found that by changing the px and py values this plot does not change a lot.

 

Here is the important parts of my Python code based on ZOS-API. After the lens and aperture are created a QuickFocus is run to put the image plane at the lens focus.

 

 

max_rays = 100
px = 0.0
py = 0.0
hx = 0.0
hy = np.linspace(0,1,max_rays)
for i in range(0 , max_rays):
RayTraceData.AddRay(1, hx, hy[i], px, py, Enum.Parse(ZOSAPI.Tools.RayTrace.OPDMode, "None"))

raytrace.RunAndWaitForCompletion()

RayTraceData.StartReadingResults()

 

icon

Best answer by Jeff.Wilde 15 April 2022, 02:47

View original

2 replies

Userlevel 7
Badge +3

It looks like your system has low distortion, less than -0.5%, which you can see by using the Field Curv/Dist analysis:

 

So, what appears to be a straight line for the chief ray intercept in the image plane should actually have a small degree of non-linearity (relative to the f*tan(theta) reference displacement for an ideal lens).  By the way, you can also easily generate the same plot using the Universal Plot tool:

 

Hope this helps...

Badge +1

It looks like your system has low distortion, less than -0.5%, which you can see by using the Field Curv/Dist analysis:

 

So, what appears to be a straight line for the chief ray intercept in the image plane should actually have a small degree of non-linearity (relative to the f*tan(theta) reference displacement for an ideal lens).  By the way, you can also easily generate the same plot using the Universal Plot tool:

 

Hope this helps...

Thanks Jeff. You are right!

Reply