# The Source Diffractive object

In this article, we discuss the Source Diffractive object. This object uses a User Defined Aperture file to perform a Fourier transform on a specified aperture. We will briefly cover the theory behind this object, and will then use an example involving Young's double slit experiment to discuss the most important settings, and their affects on the system. The example file is provided as an article attachment.

Authored By Rhys Poolman

Article Attachments

## Introduction

The Source Diffractive object in Non-Sequential Mode is defined by a collimated ray bundle passing through a User Defined Aperture (UDA). The simulation of this source includes scalar diffractive effects due the clipping of the wavefront by the aperture. This article will briefly explain the theoretical background behind the Source Diffractive object and demonstrate its use. A simple Young’s double slit experiment will be used for the demonstration.

## Theory

The well-known Huygens-Fresnel principle states that the electric field at a given surface may be estimated by modeling a wavefront as the superposition of a series of point sources. A phase factor is then used to model the propagation of the wavefront.  The electric field U(x,y) at a screen after passing an arbitrary aperture can be stated as where the coordinates on the screen are x and y and in the aperture are ξ and η.  The screen is at a position of Δz and the distance between it and an arbitrary point on the wavefront is r0

To simplify the use of this function the Fraunhofer approximation can be employed. The Fraunhofer approximation first assumes that r0 is approximated using a binomial expansion.  To complete the approximation it is also assumed that the screen is placed at a distance from the aperture at least an order of magnitude larger than the greatest dimension of the screen.1  Finally, for the Source Diffractive, the aperture is also assumed to be small relative to the separation  between the screen and aperture.  These approximations allow the field at the screen to be written as The electric field at the screen is the product of a propagation term, given by the exponential term above, and the integral term, which is a Fourier transform of the field at the aperture. In OpticStudio the calculation of the electric field is performed in angular space, that is the final result of the Fraunhofer diffraction function is U(l,m).

## OpticStudio setup

The example that will be used for demonstrating this feature will be a simple model of Young’s double slit experiment, mainly chosen for the ease of comparing with the well known Young’s double slit formula and its familiarity to most readers. The aperture used to define the source for this case consists of two rectangular slits separated by d = 0.96 mm, with each slit being 1 mm tall (along Y) and 0.01 mm wide (along X). The wavelength of the source is 0.584 μm, and a rectangular detector is placed at L = 13.6×103 mm from the source. We will compare the results on the detector with Young’s formula for the position of the 3rd order fringe.

## Creating Source Diffractive objects

A Source Diffractive is best described as an aperture illuminated by collimated rays. The ray’s direction cosines are modified, due to the presence of the aperture, according to Fraunhofer diffraction theory. For this calculation to be made several things must be defined first. The aperture shape is set by the a user defined aperture (UDA) file (detailed instructions for defining a UDA are given in the Help System under The Setup Tab...Editors Group (Setup Tab)...Lens Data Editor...Surface Properties...Aperture (surface properties)...User Defined Apertures and Obscurations). The UDA file must be stored in the folder {Zemax}\Objects\Apertures for it to be selected from the “File:” combo box for the Source Diffractive object. This file can then be scaled using the UDA Scale option in the Object Properties dialog box. To calculate the effect diffraction of the wavefront has on the rays, it is necessary to define both a wavelength and the input wavefront sampling value. The wavelength is defined using the Wavenumber parameter (parameter 4) in the NSCE. The other sources in OpticStudio allow this parameter to be set to zero, indicating that all rays defined in the Wavelength Data dialog box should be traced through the system. This is not the case with the Source Diffractive. A single wavelength must be selected by supplying the appropriate non-zero integer to this parameter corresponding to a wavelength from the Wavelength Data dialog box.

The Source Diffractive also uses the Sampling parameter (parameter 6) in the NSCE. This is an integer that defines the sampling grid used to calculate the input wavefront. Each integer N corresponds to a square, power of 2 sampling grid of size N = 2^(s+4). Thus, when the Sampling parameter is s = 1 the size of the grid is N = 32.  When the maximum sampling is used, which is s = 9, the size of the grid is N = 8192. The sampling grid is the discretized input wavefront U(ξlm), defined in Eq. (2). Therefore, the sampling grid size is not the same as the number of sampling points in the aperture and always overfills the aperture, significantly so for large N. Where a pixel’s position, which is defined by (ξlm), is found inside the aperture the real part of the wavefront in that pixel is set to U(ξlm)=1. If found outside the aperture the real part of the wavefront is set to U(ξlm)=0. The imaginary component of the wavefront is always zero.

## Results

Young’s formula for the double slit experiment can be rearrange so that the position ∆xn of the nth order fringe can be calculated given L and d as defined in the figure below:  Using the above equation and the stated parameters, we find the position of the third order fringe n = 3 to be ∆xn = 24.8 mm.

The ray tracing results shown below show both the incoherent irradiance and radiant intensity. The detector has been set to have a half width of 24.8 mm in both x and y directions. At the edge of the detector the incoherent irradiance data shows the third order fringe peak as predicted in Eq. (3). To show the detailed plot of the radiant intensity data the detector has been limited to accept  rays between an angular range of ±0.06º. It should be noted of course the angular distribution in this simple system is independent of detector position along the Z-axis. ## Discussion

This simple OpticStudio file contains two sampling controls. The sampling in the wavefront, which is controlled by parameter 6 on the Source Diffractive object, and the number of pixels on the detector, which is controlled by parameters 3 and 4 on the Detector Rectangle. These parameters can interact to degrade the results of the ray tracing.

Parameter 6 of the Source Diffractive defines both the size and the number of points used for sampling the wavefront. For a grid with N points, the size of the sampling grid is W = 2D√s, where D is the largest extent of the UDA file, in this case the size of the aperture in the y-direction. This grid extends over a square region of size W but the number of points in the aperture can be far smaller than N, particularly if N is large or the UDA file made of several smaller apertures. This usually makes the sampling of the wavefront defined by the sampling parameter in the Source Diffractive the limiting sampling parameter. This means that if the pixel count in the detectors is increased to sufficiently large numbers, such that it exceeds the density of points in the aperture, then the results of the ray trace on the detector can become unreliable. The figure below shows the same data as above, but with a detector that has 300 pixels in x and y, this results in the striations that can be seen in the pixel data. To resolve this issue it is recommend that the the number of pixels on the detector should be reduced or the sampling on the source Diffractive increased; it usually more computationally efficient to use the former. Using pixel interpolation on your detectors can help to a limited degree. In this case the results for 100×100 pixels are shown in the first figure.

## References

1. J. W. Goodman, Introduction to Fourier Optics, chapter 4, pages 63-75, (McGaw-Hill Book Co., 1996) 2nd edition.

KA-01451