POLTRACE

Calls the OpticStudio polarization ray tracing routines to trace a particular ray through the current system.

Syntax:

POLTRACE Hx, Hy, Px, Py, wavelength, vec, surf
 

Discussion:

The expressions Hx and Hy must evaluate to values between -1 and 1, and represent the normalized object coordinates. The pupil coordinates are specified by the expressions Px and Py, which also must be between -1 and 1. For more information about normalized coordinates, see the chapter "Conventions and Definitions" under "Normalized field and pupil coordinates". The wavelength expression must evaluate to an integer between 1 and the maximum number of defined wavelengths. The vec expression must evaluate to a number between 1 and 4, inclusive. The surf expression must evaluate to an integer between 1 and the number of surfaces, inclusive.

The input polarization state of the ray is defined by the POLDEFINE keyword.

Once the ray is traced, the polarization data for the ray is placed in the vector variable specified by the vec expression. For example, if the command "POLTRACE Hx, Hy, Px, Py, w, 2, n" is issued, the data will be stored in VEC2. The data is stored in the following format, where the first number in each line refers to the array position:

0: n, the number of data entries in the vector
1: The ray intensity after the surface
2: E-Field X component, real
3: E-Field Y component, real
4: E-Field Z component, real
5: E-Field X component, imaginary
6: E-Field Y component, imaginary
7: E-Field Z component, imaginary
8: S-Polarization field amplitude reflection, real
9: S-Polarization field amplitude reflection, imaginary
10: S-Polarization field amplitude transmission, real
11: S-Polarization field amplitude transmission, imaginary
12: P-Polarization field amplitude reflection, real
13: P-Polarization field amplitude reflection, imaginary
14: P-Polarization field amplitude transmission, real
15: P-Polarization field amplitude transmission, imaginary
16: E-Field X direction phase Px
17: E-Field Y direction phase Py
18: E-Field Z direction phase Pz
19: Major axis length of polarization ellipse
20: Minor axis length of polarization ellipse
21: Angle of polarization ellipse in radians
22: The surface number at which the ray was vignetted or zero if not vignetted
23: S-Polarization ray amplitude reflection, real
24: S-Polarization ray amplitude reflection, imaginary
25: S-Polarization ray amplitude transmission, real
26: S-Polarization ray amplitude transmission, imaginary
27: P-Polarization ray amplitude reflection, real
28: P-Polarization ray amplitude reflection, imaginary
29: P-Polarization ray amplitude transmission, real
30: P-Polarization ray amplitude transmission, imaginary

If the value in array position 0 is 0, then an error occurred and the polarization data is invalid. This may occur if the specified ray cannot be traced. See the RAYTRACE command to extract extended error information.

Example:

POLDEFINE 0, 1, 0, 0
POLTRACE 0, 1, 0, 0, pwav(), 1, nsur()
PRINT "Transmission of chief ray at primary wavelength is ", vec1(1)
 

Related Keywords:

POLDEFINE, RAYTRACE

Next: