Logo for Computational Physics


This page provides a short and simple program for any student with an account on the departmental server to make use of the discrete fast Fourier transform (discrete FFT or DFFT) to analyze a data file of N {time,amplitude} pairs, one pair per line, tab delimited (i.e., a single tab character between the time and amplitude values). The N transform pairs are computed and written to files for plotting. The power spectrum, |Y_i|**2 is also computed and a plot is executed for the user using the interactive graphics package xmgrace.

The input data set should look like:

"Descriptive title of your choice..."
Time(s)	Voltage (V)
0.0000	2.427
0.0004	2.388
0.0008	2.349
0.0012	2.315
  .       .
  .       .
  .       .
24.9428	2.363
24.9432	2.329
24.9436	2.315

Download this file into an appropriate directory, then open a console or shell window and type the following:
 
tar -zxf tlg_dfft_download.tgz
 
and hit the enter key. Type ("make all" enter). If this is successful, then you should be able to run the whole package with the following procedure: Invoke the Perl script by typing:
 
perl dfft_tlg.pl
 
and hit the enter key. If you don't have your own data, you can select spectrum.in (actual data from one of Dr. Glab's lab projects when he taught optics) or you can create synthetic data (in file fft_ex_data.in) by compiling and running the program data_maker.cc Enjoy.


This page designed and maintained by t.l. gibson

<< Return to Gibson Home Page