next up previous contents
Next: 8. Least square fitting Up: 7. Manipulating and analysing Previous: 7.4 Data analysis

   
7.5 Fourier transform

KUPLOT can calculate a discrete Fourier transform of a 1D or 2D data set. Let us start with a little mathematic first. Details can again be found in the Numerical Recipes. The function we want to Fourier transform is f(xi) with i=1,..N with a constant grid size of $\Delta x$. This gives us the following range in Fourier space:


 \begin{displaymath}h_{n} = \frac{n}{N \Delta x} \;\; \mbox{with} \;\;
n = -\frac{N}{2} .. \frac{N}{2}
\end{displaymath} (7.1)

The Fourier transform is calculate as


 \begin{displaymath}F(h_{n}) = \Delta x \sum_{i=1}^{N} f(x_{i}) \left [
\cos (2\pi h_{n}x_{i}) + i \sin (2\pi h_{n}x_{i}) \right ].
\end{displaymath} (7.2)

The Fourier transform is a complex quantity and KUPLOT allows one to select the real and imaginary part and/or amplitude and phase angle to be stored as new data sets.

Let us consider a simple example, a box function as displayed in the upper left panel of Figure 7.4. Our data set has N=50points and a grid size of $\Delta x = 1.0$. Using equation 7.1 we find the grid size in Fourier space to be 1/50 = 0.02 and a calculated range of $-1/2\Delta x = -0.5$ to 0.5. In our example the command for the calculation of the Fourier transform is:

  four ria

The parameter 'ria' specifies that we want to keep the real and imaginary part as well as the amplitude of the Fourier transform. All three parts and the box function are shown in Figure 7.4.


next up previous contents
Next: 8. Least square fitting Up: 7. Manipulating and analysing Previous: 7.4 Data analysis
Thomas Proffen {Billinge}
1999-06-26