Tool for Interactive Fourier Transforms
Conceptual Introduction to Fourier Transforms in General
Explanation of the Tool for Interactive Fourier Transforms (TIFT)
Get Familiar with the Controls in TIFT
Skip to exercises to designed specifically to enhance understanding of the VSRT labs
Exercises to perform with the Interactive Tool to gain some first-hand experience with some basics of Fourier Transforms
Select "Full Complex TIFT," which will open four plot windows. The top two represent the magnitude and phase of f(t) and the bottom two are the magnitude and phase of F(&\nu;), the Fourier transform of f(t).
First, note the units of the x-axis in the two windows. We use time and frequency as the Fourier variables, because this is the application of Fourier Transforms with which the most people are familiar. But, keep in mind that Fourier transforms can occur with a different pair of variables, as long as their units are inverses of each other.
Now, in the column of input boxes at the right, set Δt = 0.1, no. of points = 100, and maximum frequency = 10.
1. Using the mouse, pull up a single point in the lower graph at around 1 Hz. What kind of function do you get in the upper graph? It should look like a simple cosine function. What is its period?
2. Click "reset" and pull up a single point at a smaller frequency -- 0.5 Hz. How does this change the transform? Measure the period now?
3. Click "reset" and pull up a single point at a larger frequency -- 2 Hz. Measure the period now? How does the period in the upper graph relate to the frequency of a non-zero point in the lower graph?
In general, a spike in the frequency graph at frequency ν (with zero signal at all other frequencies) corresponds to a sinusoidal function in the time graph with a period = 1/ν.
4. Click "reset" and then (before moving any data points) predict what the upper graph will look like if you pull up the point at freq = 0 in the lower graph. Hint: what will the period be if frequency = 0? What will this function look like? Now do it--pull up the freq=0 data point. Does the time graph look as you expected?
5. Now, set number of points = 200 (with Δt = 0.1, and max. frequency = 10) and pull up two points in the frequency graph, one around 5 Hz and the other around 5.4 Hz. Set the same y-value for both points. (With 200 points you may find the tool to run a little slower. If so, be patient and take care in moving your data points). What does the funtion vs. time curve look like? If you haven't seen this before, this is called a "beat" signal, and occurs whenever two cosine (or sine) waves of different but close frequencies are added. In the frequency plot you selected two different cosine functions to be added, but with frequencies that are close to each other. The resulting function contains an envelope with a
frequency = ν2 - ν1, where
ν2 is the frequency of the slightly faster cosine wave.
6. Do steps 1-5 in the upper window and note what you get the lower window. You should find that you get the exact same result but with roles of the windows reversed.
If g(1/x) is the Fourier transform of f(x), then f(x) is the Fourier transform of g(1/x).
7. Click "Enter Equation" and input "cos(2*pi*x)." This will calculate data in the upper window with a cosine function of angular frequency 2π, or frequency in terms of cycles per second of 1 Hz. You should see a nice cosine funtion in the upper window. Now, what appears in the lower window? Considering what you saw in step 6, above, what should you expect the lower window to look like? In step 6 you saw that the transform of a single cosine function should be a single spike. But, the plot in the lower window now is not just a spike. There is a spike but it is surrounded by a series of decreasing oscillations in both directions. This results because the program is not actually calculating the transform of just a pure cosine function. That would require a cosine function for all times, from t = -infinity to +infinity, while, here, the cosine function is given only over a fixed window in time. So, in fact, we are calculating the transform of a function that is zero for all times, except in the window of our data, where the data is a cosine. This is effectively accomplished by the product of two functions: the cosine function times a function which defines the window, where the window is defined by a function that is equal to 1 wherever we have data and equal to zero outside the window. This "window" function looks like a plateau. Now, change the equation to model the window: click "enter equation" and input "stepxxx". What does the plot in the lower look like? A series of decreasing oscillations. This is a "sinc function", and it is the Fourier transform of the window function. So, now let's return to the product of the cosine function and the window function. The Fourier transform of the product of these two functions (the cosine function times the window function) is a spike "convolved" with the sinc function. This is important to keep in mind when dealing with Fourier Transforms.
Because you'll never have data going from -infinity to +infinity, the Fourier Transform of your data will always involve a "ringing" due to the edges of your window. The Fourier transform you obtain will be the convolution of the transforms of the data and the transform of the window, i.e. the sinc function.
8. Click "Enter Equation" and input cos(2*pi*x)+2*cos(3*pi*x)+1.5*cos(3.6*pi*x). In the upper window, now, you should see an ugly mess. This is the sum of three different cosine functions, of different frequencies and amplitudes, but when added together they are hard to disentangle. The lower window, however, should be more revealing. You should see three spikes (each convolved with the sinc function due to the finite window) and the location of the three spikes should be equal to the frequencies of the cosine functions (i.e. 1, 1.5, and 1.8 Hz). This demonstrates how taking the Fourier Transform of a time-dependent signal reveals the fundamental frequencies involved in that signal. The frequencies are often not apparent in the time-domain, but the transform to the frequency-domain makes them clear. Note also that the relative heights of the three spikes are given by the relative amplitudes (1, 2, and 1.5) of the three input cosine functions.
The Fourier transform of a time dependent signal yields a "power spectrum" which reveals the frequencies of the input signals.
9. a. Click "Enter Equation" and input e^(_1*x^2)). In the upper window you should now see a Gaussian curve, centered at x=0. What is the transform of the Gaussian? In the bottom window You should also see a Gaussian.
The Fourier transform of a gaussian is also a gaussian.
b. Measure the Half-Width-at-Half-Maximum of each Gaussian. Then, make the Gaussian in top window narrower by changing the equation to e^(_1*((x/2)^2)). How does this change the Gaussian in the bottom window?
c. Now make the Gaussian in the top window wider, by changing the equation to e^(_1*((2*x)^2)) and note how the Gaussian in the bottom window changes.
In the Fourier transform, how do the widths of Gaussians relate to each other?
In general the relation between the full-width-at-half-maxima of Gaussian functions that are
Fourier transforms of each other is
σ = 0.221/σ',
where σ and σ' are the FWHM of the two Gaussians.
Exercises specifically to go with VSRT labs
Open "TIFT_Chooser," select "Full Complex TIFT," and keep the display set to show plots of magnitude and phase. If you are unfamiliar with complex numbers, for the purposes of understanding the VSRT labs, focus only on the magnitude plots and feel free to ignore the phase plots.
A Single Source of Varying Size
1. In the top-most graph, move the point at t = 0 upward (to a magnitude ~ 1). Note what happened to the magnitude of F(ν) (the third graph).
2. Move the second point in the top graph up to the same magnitude as the first point, and note, again, how the magnitude of F(ν) changes.
3. Keep moving subsequent points up to the same magnitude, watching the magnitude of F(ν) as you do so.
4. Consider the top graph as representing the CFL in your VSRTI Observations of a Resolved Source lab. Recall the shape of the Visibility function with a single source and how the Visibility function depended on the angular size of the source. Does the magnitude of F(ν) look like the Visibility function you measured in the VSRTI Lab?
A Double Source of Varying Separation
1. First hit "Reset" to move all the points back to zero.
2. In the top-most graph, move the point at t = 0 upward. Then move the point at t = 0.3 to the same height. What does the magnitude of F(ν) look like now? Count the number of cycles from ν = 0 to ν = 10. What is the period of oscillation in F(ν)?
3. Move the t = 0.3 point back to zero and move the t = 0.2 point up to the same height as the t = 0 point. How does this change the magnitude of F(ν)? Count the number of cycles between ν = 0 to ν = 10. What is the new period of
F(ν)?
4. Considering the top graph, now, as representing the pair of CFLs in your "VSRTI Observations of a Binary Source" lab, how does the magnitude of F(ν) compare with the shape of the Visibility function you observed in the lab?
5. What is the relation between the period of oscillation in
F(ν) and the positions of the spikes in f(t)?
Fourier Transforms and VSRT data
1. Discuss the relation of the visibilities in the VSRT labs to the Fourier transforms you encountered in the exercises above. Is there a relation between the visibility function,
V(b/λ), and the the intensity of the radio-emission of the CFLs as a function of angle, I(θ) analogous to that between f(t) and F(ν)?
2. Consider the independent variable in the visibility function. Is it unitless? Consider inverting it to find its Fourier co-variable ... do you get the independent variable needed to describe the distribution of radio emission in the source?
3. Considering that any function's Fourier Transform can be inverted to yield the original function, discuss the recovering of the radio source brightness distribution from the visibility function, i.e. what must radio astronomers do to obtain an image, of even complex sources, from the interferometric data?
4. Why do the VSRT labs not include this final step? In the "mystery source" lab, for example, why not just do an inverse Fourier Transform to obtain the result? (Hint, consider the fact that in the TIFT exercises you saw 4 windows, not 2.)
Introduction to the Fourier Transform
Fourier Transforms are extremely useful and far more common than most people realize. Since there are extensive presentations of Fourier Transforms in numerous textbooks, we won't bother to give an explanation here. We will, instead, just give a quick summary of the basic idea and the more important aspects and concepts.
The most familiar example of a Fourier Transform is the conversion of a function of time to a function of frequency. For example, consider the detection of a signal that oscillates with time at a frequency of 10 Hz, so that it cycles up and down every tenth of a second. If this signal vs. time is Fourier Transformed one gets a function that contains spikes at +10 Hz and -10 Hz, and zero at all other frequencies, showing that all the power in this signal occurs at a frequency of 10 Hz. If the signal was more complicated than a single frequency cosine function, the Fourier Transform will produce a "power spectrum", revealing all the frequencies involved in the signal vs. time, and how much power occurs at each frequency.
Mathematically, in principle, any real function, f(x), can be expressed as a series sum of cosine or sine functions, e.g.
f(x) = ΣmAmcos(mx).
When the sum is turned into an integral, this becomes something like
f(x) = ∫g(m)cos(mx) dm,
where the series of Am's becomes the continuous function g(m). Here, f(x) is considered a cosine transform of g(m); a cosine transform is one specific type of Fourier Transform. Now, the interesting thing is that this transform is easily reversed, i.e. g(m) is also the cosine transform of f(x), i.e.
g(m) = ∫ f(x)cos(mx) dx.
The cosine transform, however, only considers math along the real axis and is not as powerful as a transform that occurs in the complex plane (with real and imaginary numbers). You won't need to have any familiarity with complex numbers to find this tutorial informative, but a brief explanation here will be helpful for understanding one limitation of the Tool for Interactive Fourier Transform, (discussed below). In general, a full Fourier Transform involves a real part, which includes a cosine transform, and an imaginary part, using sines. The full Fourier Transform is given by
f(x) = ∫ g(m)(cos(mx)-isin(mx) dm = ∫ g(m)exp(-imx)dm
and its inverse is given by
g(m) = ∫ f(x)exp(imx)dx.
(NOTE: for sake of brevity, we have intentionally neglected the limits of integration and the normalization factors in front. We assume that a reader interested in knowing the details of Fourier Transforms will find a complete presentation elsewhere.)
Important Things To Know:
1. Since the arguments of cosine and sine, and of exponentials, must be unitless, the independent variables of functions which are Fourier transforms of each other must be the inverse of each other. For example, frequency = 1/time. And, in our general expressions above, m = 1/x.
2. In the Fourier Transform, since all cosine functions are "even" and sines are "odd" about the origin,
(i.e. cos(-x) = cos(x) while sin(-x) = -sin(x)), the imaginary part of the transform is needed to pick up asymmetries in the initial function. That is, the limitation of a cosine-only transform is that it cannot produce an f(x) in which f(-x) does NOT equal f(x).
About the Tool for Interactive Fourier Transforms (TIFT)
One can choose to either run the "Full Complex TIFT" or the "Cosine TIFT". The latter tool, as its name implies, calculates a cosine transform, meaning only the real part of a full Fourier transform). As a result the display in the "Cosine TIFT" shows only curves of real functions. This option is a great idea for starters since it facilitates a simpler demonstration of the relation between functions and their Fourier transforms. After getting comfortable with the transform with only the real parts, one can then explore the full complex Fourier transforms.
One consequence of using just the cosines in the transform, as mentioned above, is that the transform is insensitive to asymmetries about the origin. The graphs displayed in Cosine TIFT, therefore, only show the functions and their transforms for x > 0.
The transform produces a set of points in the Fourier domain with the same number of data points as in the original set, and because of the inverse relation of the independent variables, with a full Fourier transform the step along the x-axis (Δx) in one graph is equal to the inverse of the maximum x-value in the other graph, and visa versa, i.e.
Δx = 1/x'max,
and
xmax=1/Δx',
where x and x' are the independent variables in the original function and its Fourier transform. With a cosine transform, though, half the information is missing (the sine terms), and so the maximum x-value in one graph is only 1/2 of the inverse of the maximum x-value in the other, i.e.
xmax=(1/2)(1/Δx'max).
With Cosine TIFT, for example, if you set Δt=0.1, you would normally expect that you can get an F(ν) that extends to 10 Hz, but you'll see that the largest ν that can be displayed is 5 Hz.
The TIFT window Buttons and Controls
Start by clicking on the "TIFT_Chooser" shortcut. You'll then see a small pop-up window with two buttons; one for "Full Complex TIFT" and the other for "Cosine TIFT". If this is your first introduction to Fourier transform, it is advisable that you start with "Cosine TIFT", which uses only real functions and so is easier to get comfortable with.
2. Once you select a TIFT option, a new display window pops up with with either two graphs (for "cosine TIFT") or 4 graphs (for "Full Complex TIFT"). The top one or two graphs shows f(t) and the lower graphs show F(ν), where ν is frequency, which = 1/period. With the "Full Complex TIFT" one can choose to the display graphs to represent either the real and imaginary parts ("Show Rectangular") or magnitude and phase ("Show Polar").
3. To the right are two boxes for inputting parameters, one for the step size along the x-axis of the input function and the other for setting the number of points. Be sure to hit "Enter" after changing the value in each input box.
The other two input boxes control only the display and can be used for zooming in on either or both graphs.
4. There are three ways of inputting the initial function.
a. One can click in the graph window to indicate the value of individual points, which is a convenient way of inputting a delta function, for example. Scroll the mouse over the graph, when the cursor becomes a "+" sign then a click will move the data point at that x-value to the position of the cursor. Or, you can grab a data point and pull it up or down. If you want to trace a curve, rather than changing every individual point, you can hold the left-button down while you move the mouse (slowly) along the desired curve.
b. One can click on "Enter Equation," which brings up a pop-up window in which one can input a function for f(t). (As of 17 Sep 2011 this tool does not provide a way of inputting a function with an imaginary part (only relevant for "Full Complex TIFT").)
c. Or, one can click on "Open File" and read in a data set that had been saved with "Save File" previosly.
Even after a function has been input, one can change the y-axis values in either graph with the mouse.
You'll find that as you change the function in the upper graph(s), the transform in the other graph changes instantly. This provides an interactive way for you to see the relation between the Fourier transform and the initial function.
5. The x and y values of any data point can be read by moving the cursor on to the data point,
6. The “Reset” button undoes any changes you made to any data points, resetting the data values to that given by the equation, but does not change the values of the input parameters. The "Full Reset" erased the function and sets all data values to zero.
7. If you get a plot that you’d like to save, you can right-click on the graph and save the image as a JPEG file.
8. At any point, you can click “Save File”. You can, then, at a later date use "Open File" to read these data back in.