Lecture of 30 September 1994
Using Maple to Evaluate Fourier Transforms
Discrete One-Dimensional FFTs
- Execute the command
xmaple
- Get information on FFTs by selecting
Help Browser from the
Help menu, (This can be issued from the keyboard as
(Alt-H B). Then asking for help on the Topic "Miscellaneous",
Subtopic "FFT".
- Then follow the instructions about what to type to the maple system.
The example of Figure 3.5 in the text can be verified by evaluating the
following:
readlib(FFT);
x := array([2.,3.,4.,4.]);
y := array([0,0,0,0]);
FFT(2,x,y);
print(x);
print(y);
One oddity, Maple yields the following values for x and y:
[13. -2. -1. -2.]
[0 1. 0 -1.]
What could explain this difference?
Symbolic Evaluation of the Fourier Transform
Maple also provides the ability to carry out symbolic evaluation of the
Fourier transform as in the following example:
readlib(fourier);
fourier(1,x,u);
which results in 2 pi Dirac(u).
Using Khoros to Evaluate Image FFTs
You can set your account up to use Khoros as follows:
- Copy the file /cis/wave1/khoros/dotfiles/Xdefaults.snazzy into the
file named
cantata in your XAPPLRESDIR.
If you don't already have an XAPPLRESDIR, create a directory
~/.resources and place following line in your
.cshrc file
setenv XAPPLRESDIR ~/.resources
Your XAPPLRESDIR will now be the directory ~/.resources
- Add the following lines at the end of your .cshrc file:
# stuff to make khoros work
setenv KHOROS_HOME /cis/wave1/khoros
set path=($KHOROS_HOME/bin $path)
source $KHOROS_HOME/dotfiles/khoros_env
#
- If you want to immediately run the cantata visual programming environment,
you must execute the following unix commands:
source ~/.cshrc
rehash
Cantata is a visual programming environment that brings together a number
of program utilities. You can create glyphs that correspond to
programs, and connect up their input and output streams with wires.
Menus (in green boxes) let you choose different kinds of glyphs that correspond
to separate programs that carry out different kinds of processes.
To see an image, you must input it and display it. To do this you can
- Select
Input Data File from the INPUT SOURCES
menu
- Click on one of the image names in the
input_file box
then press the Glyph button to make a glyph called
images
- Select
Display Image from the OUTPUT menu
- Click on the
Glyph button in the display
box to make a glyph called put_update.
- Click (with left button)
on the output arrow of the
images glyph and
then click on the top input arrow of the put_update glyph
to connect them with a wire.
- Press the (red)
RUN button to execute the flowgraph
you've drawn.
To view the Fourier Transform of an image like ball.xv
or visual_mtf.xv or airport.xv, you must
select Transforms from the IMAGE PROCESSING
menu, then manipulate the output of the transform appropriately
(perhaps by using a Data Conversion from the
CONVERSIONS menu to get from complex to real by taking the
magnitude, then squaring this and taking its log).
This document is
copyright 1994
by Joseph N. Wilson.
$Id$