# testfft.py # import numarray.fft as nfft old from numpy import array # basic arrays from numpy.fft import fft # so I can use simple names from numpy.fft import ifft from numpy.fft import fftshift print "testfft.py running, using numpy.fft" a=array([0.0,0.7071,1.0,0.7071,0.0,-0.7071,-1.0,-0.7071]) print "a=" print a b=fft(a) print "b=fft(a)=" print b print "abs(b)=" print abs(b) print "fftshift(abs(b))=" print fftshift(abs(b)) c=ifft(b) print "c=ifft(b)=" print c absc=abs(c) print "abs(c)=" print absc print "dir(numpy.fft)" import numpy.fft # just to get list of functions print dir(numpy.fft)