Tuesday, August 12, 2008

Fast Fourier Transforms in Mathematica

This tutorial demonstrates how to perform a fast Fourier transform in Mathematica. The example used is the Fourier transform of a Gaussian optical pulse. First, define some parameters. Note that all wavelength values are in nm and all time is in fs. Thus the speed of light c is 300 nm/fs and all frequencies w is thus represented in radians/fs. The fundamental wavelength in interest, lo, is 800 nm with its corresponding frequency wo. For all values the unit for time will be femtosecond, the unit of length nanometers, and the unit for power is Watts.

c = 300;
λo = 800;
ωo = 2 π c
λ o;
ωo êê N 2.35619
Since a Fast Fourier Transform (FFT) is used, one must be careful to sample the electric field properly. To prevent any aliasing, the range is set such that the value of the pulse electric field is approximately zero at the ends of the range. Define the temporal step dt that the pulse electric is sampled in order to prevent aliasing. Also, the FFT requires that the number of points that sample the pulse, num, must be a power of two. In this case num=2048

Download

No comments:

Post a Comment