Fourier Optics - 'Diffraction calculations '
Aims
- An ability to simulate any optical system
- Compile a library of optical functions
- Gain an understanding of Python
- Learn about Frauhofer and Fresnel integrals
Background
There are some basic pieces of information that are need in this project. There are as follows:
Fourier Transform
This is the general form of a Fourier transform for 2-D which is needed so that in complex integrals found in Fresnel can be transferred into a more useful form
Discrete Fourier Transform
This is the general form of a Fourier transform for 2-D which is the equation a computer uses to do a Fourier transform. A computer cant do a calculation over an infinite space, it and only deal with single points at a time and then summing them, so as can be seen in the equation in stead of dealing with x and y, the computer deals with integers p and q.
Functions
There are three basic function that are useful:
Rectangular
This is used to simulate a rectangular aperture
- 2-D Plot of Rectangular Function:
Circular
This is used to simulate a circular aperture
where
- 2-D Plot of Circular Function:
Gaussian
This is the most useful for real case simulations as most lasers would have a Gaussian wave form.
- 2-D Plot of Gaussian Function:
Book work
Huygens-Fresnel Principle
All this project stems from the Huygen's Fresnel Principle which describes what happens to a wavefield when it propagates some perpendicular distance in z between to parallel planes. The equation for this is as follows
where
From this two approximation are applied so as to enable a relationship to a fourier transform to be made.
The Fresnel Approximation
With Fresnel a binomial expansion is applied to r.
The general form of the expansion is
Now we rearrange r by removing z fromt he square root as to match up with the general expresion
So now we can presides with the expansion, taking only the first 3 terms as relevant
Now this new r is substituted into huygens-Fresnel, qith the exponinent this is a simple thing but int he fraction r the contribution from the terms involving x and y are so small that they become in consequential. all this leads to the following equation which is the general form of the Fresnel approximation
The Fraunhofer Approximation
With Fraunhofer the Fresnel approximation is taken and generalised for very large distances where
This means that this part of the expanded exponent can be ignored to give
The condition which should be satisfied so that this approximation can be used is
where D is the linear dimension of the aperture.
Book to Computer
How a human and computer approach a problem is very different. So all the analytical calculation that have been done up to this point must now be transformed into the discrete calculation a computer will preform.
Analytical Vs. Discrete
A Fourier transform is normally an analytical calculation, but a computer does it discretely gemma smells, this two approaches can not be exactly related, therefore a correction factor must be found to enable an exact comparison and further more enable the computer to do the right calculation. this is done as follows.
Comparing Fourier sections
equationing releven parts
log both sides
replacing k
cancel down
equating for:
rearranged
rearranged
we also know that
so
canceling m and p
Rearanging for dx
Similarly for dy
General Programing
There are element that will be constantly reapering through out this equation, i.e.
- Inputs
- wavelength - wl
- distance from aperture - z
- Size of Aperture - w
- Spacing between points - d
- Output
- Fourier Transform - ft
- New Wave field - U
- Intensity - U*U.cong()
1-D Rectangular Apertures
To enable a easy understand when starting to program, we start with doing this calculation in 1-D, this also means that the calculation is easier to understand.
Fraunhofer
We start with the Founhofer approximation as its the simpler of the two.
This is the start wave field put in:
This is the end intensity when the calculation is done by hand:
where
- 1-D Plot for a Franuhofer Calculation, with: *wavelength = 60mm *z = 4km *w = 5m:
Fresnel
Now the complex Fresnel approximation is done, this is the same as the Franhofer but with the addition of an extra phase within the Fourier transform.
This is the start wave field put in:
This is the end intensity when the calculation is done by hand:
where we use the Fresnel integrals
and where
Another interesting piece of information is the Fresnel Number:
As can be seen in the example below as the Fresnel number increases the distance decreases, also it can be seen how as the distance gets closer to the one used for a Fraunhofer approximation the shapes become the same.For this example all the wavelengths are 60mm and the widths is 5m.
- 1-D Plot for a Fresnel Calculation, with: *z = 4km *Fresnel Number = 0.1:
- 1-D Plot for a Fresnel Calculation, with: *z = 400m *Fresnel Number = 1:
- 1-D Plot for a Fresnel Calculation, with: *z = 100m *Fresnel Number = 4:
- 1-D Plot for a Fresnel Calculation, with: *z = 40m *Fresnel Number = 10:
*
fresnelRect.py.txt: Code for Fresnel Rectangular Apperture
2-D
The transformation from 1-D to 2-D is simple for the equation as all that is needed is to add in the y componts along with the x, it become more complex for the decrete points being used as now instead of just a line of points, it is necessary to create a grid of points. This is done by taking 2 arrays, x and y, and meshing them into a grid.
Classes
Up until this point all the code has been written as a list of commands. By transfering this code into classes it means that there will be less errors, as once a piece of code it correct it can then just be called on. Also it means that later when multiple elements are simulated simultaneously, this can be done easily by calling the relevent piece of code, meaning hundreds of lines of code can be compressed into just a few lines.
In this case the code has been split into two classes
- Intensity - this is where all the information about a wave field, its grids and all plots, this means that no information about the intensity is lost at any point through the calculation.
- Progation - this is a function class where all the transformation on a wave field are done.
Examples
These are examples of 2-D plots using the new classes system
- 2-D Plot of Rectangular Function through Fraunhofer at z = 4m and w = 0.5mm:
- 2-D Plot of Rectangular Function through Fresnel at z = 0.01m and w = 0.5mm:
- 2-D Plot of Circular Function through Fraunhofer at z = 0.1m and w = 0.05mm:
- 2-D Plot of Circular Function through Fresnel at z = 0.1, and w = 0.5mm:
- 2-D Plot of Gaussian Function through Fraunhofer at z = 20m and w = 0.05mm:
- 2-D Plot of Gaussian Function through Fresnel at z = 0.02m and w = 0.5mm:
- rum.py.txt: Test Code using Classes system and in 2-D
Lens
When adding a lens it is just a case of ajusting the phase of the wave field. This is done by multipying the wave feild by the a phase factor before doing a normal fresnel approxiamtion.
Lens phase alteration
Where f is the focal length
Example
This is an example of a gaussian wave field propagating thought a lens and then over sum distant to the focal point. With a focal length of 0.5m and w = 1mm
- Plots just after lens:
- These are intensity plot along z. NB - this distance in z is at the top of each graph:
- This is a plot of the second moment, or in other words its a plot of the outside edge of constructive interference:
NB The lens is still having problems and therefore still being worked on
Latex rendering error!! dvi file was not created.