This applet is designed to explain the concept of a fourier transform and demonstrate its use in analysing pulsar observations.
On start up the main body of the applet shows a graph of a sine wave whose period of 1.0 seconds is given in the field labelled "Sine Period". You should convince yourself that the graph does indeed show a sine wave with this period. You can click on the graph and drag out a square which is then replotted filling the range. This allows you to zoom in to any region. To zoom out to the full range click on the "Fill" button at top right.
Now click in the "Sine Period" field and edit the 1.0 to read 2.0 and press carriage return. You should see that the sine wave spreads out to give a longer period of 2 sewconds.
The data being plotted are commonly referred to as a "Time Series" since they are simply values as a function of time. Now calculate the Fourier Transform of this time series by changing the choice box currently labelled "Time Series" to "Power Spectrum". This now displays the amount of power contained in the original time series as a function of frequency. Since a sine wave is a signal at a specific freqency you should expect to see a single spike at a frequency given by 1.0/P where P is the period you have entered in the "Sine Period" field. Leaving the display on "Power Spectrum" experiment with different values for "Sine Period" to confirm the FFT (fast fourier transform) is indeed showing power at the correct frequency.
You might note that as you reduce the period towards 0.04 seconds the peak on the power spectrum moves to the extreme right at 25 Hz. This is referred to as the Nyquist frequency and is an upper limit on the information you can obtain about the time series. It arises from the sampling interval in the original time series. A point is plotted every 0.02 seconds - a sampling frequency of 50 Hz. The Nyquist frequency is half this value. If you think about it, if you you only sample a function every 0.02 seconds you can have no idea what it is doing inbetween each sampling. It could be varying up and down at very high frequency but yuou would never know. In order to analyse high frequency information one needs to sample at high frequency.
You might further note that if you set a period smaller than the critical period of 0.04 the power spectrum shows a clean spike at a mid-range frequency. For example at about 16.7 Hz for a period of 0.03 seconds. Now 1/0.03 is actually 33.3 Hz - the power spectrum has got it wrong by a factor 2. This phenomenon is called "aliasing". Because the high frequency input signal (the time series) is not sampled at a sufficiently high rate it is being confused with a lower frequency signal. Change the display to Time Series and zoom in on part of the range. You should be able to see that the period is apparently 0.06 seconds. This purely because the function is being sampled at too low a rate (every 0.02 seconds in this case) and mimics a longer period function. Try changing the "Sampling Period" to 0.01 seconds. You should note the Time Series now displays the correct period and the Power Spectrum the correct frequency (the Nyquist Frequency has now doubled to 50 Hz and so the sine wave frequency of 33.3 Hz is within range).
In summary, this section should have demonstrated the power of the FFT for analysing frequencies within time series. You should also have appreciated complications related to sampling interval for example.
Change the "Sampling Period" back to 0.02. Switch the display back to "Time Series". Now change the "Sine" choice to "Pulse". You should see a single spike at about 10 seconds. This is commonly called a "delta function" - something that is zero except at one point. Look at its power spectrum. You should see that you get a horizontal line at a power level of 1.0. This is indicating that an extremely narrow function contains a broad range of frequencies.
Now switch back to Time Series and change the "Pulse period" to 2.0. You should see a "train" of several delta functions. You should see that the power spectrum of such a function is also a train of delta functions. The spacing in frequency of these spikes is inversely proportional to the pulse period - with the display on "Power spectrum" try changing the pulse period to 0.3; you should see far fewer spikes in the spectrum. You might also note that there is a very narrow spike at a frequency of zero. This represents the average power in the original time series - in any function where this average is not zero then there will be a component at zero frequency in the power spectrum - this is sometimes called a DC level; you can avoid plotting this by siwtching off the DC level check box. Check on the Time Series that you do indeed have a train of delta functions spaced by 0.3 seconds.
On the power spectrum measure the frequency of the first spike. You should find that it peaks at about 3.3 Hz which is the frequency you would expect from the inverse of the period of 0.3 seconds. The other spikes occur at interger mutiples of this fundamental frequency. The series of spikes are termed harmonics and are a charecteristic of these patterns of repeated pulses in the time series.
Now view the time series and change the pulse period back to 2 seconds. Now change the pulse width from 0 to 0.1 - this changes the delta functions to square pulses. You may need to zoom in on the time series to see this. Now look at the power spectrum. You should see that the previous train of delta functions (switch the pulse width back to zero to remind yourself what this looked like) is still there but that their amplitude varies such that they are strongest at low frequency, fade away to higher frequencies, then increase and fade again repeatedly. This "envelope" is called a sinc function and is the transform of a single square pulse.
You could confirm that the frequency of the fundamental harmonic is what you would expect from the pulse period. This illustrates that the pulse period can be determined from the frequency of the fundamental harmonic. In some cases with real data the fundamental may be buried in noise but if the regular pattern of the higher harmonics is still visible it is still possible to deduce the fundamental frequency.
Note the frequency at which the amplitude of the delta functions first reaches a minimum (the first minimum in the sinc function envelope) - it should be about 10 Hz. Now whilst viewing the power spectrum change the pulse width to 0.08. You should see that this first minimum shifts out to about 12.5 Hz. This frequency is just the inverse of the pulse width. Experiment with increasing the pulse width. This illustrates that information on the width of the pulses can be obtained by investigating the reducing amplitude of the harmonics.
Change back to Time Series display and change the "Pulse" option to "Pulsar". You should see a large dataset containing regular pulses from a pulsar. The brightness of these pulses is not constant but varies due to scintillation.
Zoom in on an individual pulse to see that the pulse shape is not square as in the previous artificial example but rises and falls slightly more gradually. This means that the transform will not give the classic sinc function envelope although it should still exhibit the same behaviour with harmonic amplitudes gradually decreasing with the frequency at which they disappear giving information on the pulse width.
View the power spectrum. You will need to switch off the DC level to see the train of harmonics. Measure the frequency of the fundamental harmonic - is this consistent with the period you would deduce from the time series plot?
Estimate the frequency at which the harmonics disappear into the noise. What pulse width does this imply and is this consistent with what you can see on the time series byzooming into an individual pulse?
Now that you have an estimate of the pulse period we could take the original time series and chop it into sections each lasting one period long. Then we could add these sections on top of one another. If we have picked the correct period we should expect to see the pulse profile appear with much higher signal to noise than an individual pulse in the original time series. This is called data folding and can be done by switching from "Time Series" (or "Power Spectrum") to "Folded Data". You will need to change the "Fold Period" to an appropriate number either by typing into the text field of clicking on the arrows on the ends of the adjacent scrollbar. At the correct period the pulse profile should appear as a clean single pulse.
As a final example consider the data in "Pulsar-b". This is the same pulsar as above but the data were recorded with digitisation into only a few bits and have been rebinned into a lower sampling rate of 0.01 seconds compared with 0.002074 seconds in the previous case. Hence the pulse is not clearly visible on the original time series. However you should be able to see that analysis of the power spectrum can still reveal the pulsar frequency. Simple data folding does not reveal a clear pulse profile since the sampling interval is comparable with the pulse width.
Overall this applet should have given you a good introduction into how pulse periods can be obtained by examing power spectra and how data folding on observations with suitable dynamic range can then reveal the underlying profile.