In this particular sample file, rays which see the extraordinary index in the second crystal are bent at the crystal-crystal interface. In the first crystal, the crystal axis is along z and so the a ray sees the same index irrespective of its polarization. Remember: inside the birefringent material the S-polarization refers to a plane perpendicular to the crystal axis and the P to a plane parallel to it. At normal incidence with the crystal axis in z these are indistinguishable.

In the second, with the crystal axis along x, the S-polarization is still perpendicular to the crystal axis, and the P is parallel to it. These two limiting cases are clearly distinguishable. Therefore, rays polarized in y are bent at the crystal-crystal interface.

Rays polarized in y are bent whilst those in x are not

In this example, modes 1 and 3 (in which the ordinary ray is traced in the second crystal) are transmitted undeviated by the crystal, whilst configs 2 and 4 are bent by double refraction.

Let's say we want to compute the extinction ratio of the undeviated beam. Experimentally, we might illuminate the polarizer with y-polarizer light and measure the transmitted intensity, then repeat with x-polarized light, and then take the ratio. That is exactly what we will do in ZEMAX. The complication is that "the" transmitted intensity is the coherent sum of two configurations. So, instead of adding intensities, we must add fields, and then compute the intensities. The easiest way to do this is with a ZPL macro.

Here are the keywords we'll need (see the manual for the full syntax):

POLDEFINE Ex, Ey, PhaX, PhaY to define the initial polarization state of the ray, and
POLTRACE Hx, Hy, Px, Py, wavelength, vec, surf to perform polarization ray-tracing on the ray specified, to the surface specified, and to store the resulting data in an array specified by the vec expression. The data we need is stored in the following elements of this data array:

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

To compute the total intensity in the ray described by summing configuration 1 and configuration 3, the code is:

and the routine print_vector is just



In the main body of the macro the key  section is:


Using this to trace an axial ray gives an extinction ratio of infinity, whilst a general skew ray shows energy being transmitted from the x-polarized rays, and hence has a small extinction.

 An axial ray  An arbitrary skew ray


The Polarization Pupil Map can also sum the field amplitudes to compute the transmission of a given polarization state across the pupil. Because there may be any number of birefingent crystals there may be any number of configurations, this feature lets you define which configurations to consider simply by typing a space-delimited list of configuration numbers.

The Polarization Pupil Map can add field amplitudes to perfrom a calculation similar to that perfromed by the macro

 The settings show which configurations are added