Fast Fourier Transform (FFT) in IDL


When processing a time series of data, one of the main analysis consists of finding whether the series presents some periodic behaviour. One way to analyze the periodicity is to do a spectral analysis. In this work, I try to understand some of the features presented by the IDL FFT routine and give some tentative notes on its use.

IDL provides a build-in function called FFT to be used as

result = FFT(series)


A time series result of a sum of various sinusoidal functions of different frequencies is generated. "" is a simple IDL routine which generates a long time series with sampling every half an hour (30 min). The series is made of 4 sinusoidal frequencies at 0.5, 1, 10, and 36 day period (2, 1, 0.1, and 0.0278 cycle per day).

Series of 120 days and of 360 days are studied in this work.


The 120-day series as well as its corresponding power spectrum are illustrated in Figure 1. In this case, both spectrum with and without Hanning windowing are shown.
Figure 1.
Clear narrow peaks corresponding to 2 frequencies (2 and 1 cycles per day) are observed. Another frequency 0.1 cycle per day is also present but with a certain degree of spread. Those three frequencies correspond to 12, 24, and 240 hour (0.5, 1, and 10 day) period. Finally, there is the very spread peak at 0.025 frequency (or 40 day period).

As we can see, the first 2 frequencies are well defined and set to the right original frequencies, the third is also defined at the right original frequency; however, it starts showing some leakage phenomenon. The last one is defined with more leakage than the previous spike, its period is actually shifted by 4 days.

From this data, we can see that a series of 120 days allows to clearly extract periods of less than few days. At 10 day period, the spectrum starts to show leakage. The period which corresponds to 1/3rd of the length of the series are there but not well defined anymore.

When processing a series of 360 days of data, the corresponding power spectrum graph is given in Figure 2. One can see that some noises show up at high frequencies. In addition, the low frequency peak now shows up at 0.0278 cycle per day (~ 35.98 days closer to the real frequency). The way this frequency is spread is the same as in Fig. 1 for frequency at 10 days.
Figure 2.

My Conclusion:

The following conclusion is drawn by looking at the result. A furher and more in-depth investigation might be necessary to confirm it.

We are tempted to conclude that for a series of data, periods above 1/12 of the length of the data will start to show up with some sort of leakage (illustrated as spreading in the power spectrum graph).

The noises at high frequencies can be an artifact of the IDL FFT routine. Even by low-pass filtering the data, we still have almost the same power spectrum graph.


The following IDL routines were written and used to carry out the above study:

    Useful links: