[PYTHON MATRIX-SIG] FFT question

Jim Hugunin hugunin@mit.edu
Mon, 9 Jun 1997 12:27:39 -0400


> Could someone explain to me how the functions real_fft and
> inverse_real_fft in FFT.py are supposed to be used? The first one
> returns a complex array, which the second one won't accept as input.

These functions are based on the corresponding functionality in FFTPACK.

Both functions are applied to an array of real numbers.  In both cases, the result
of the transform will be symetric and so only one half of this result is be
returned.

>From the docs:

---
real_fft(a, n=None, axis=-1) 

Will return the n point discrete Fourier transform of the real valued array a. n
defaults to the length of a. This is most efficient for n a power of two. The
returned array will be one half of the symmetric complex transform of the real
array.
---

inverse_real_fft isn't in the documentation yet, but if you replace Fourier
transform with inverse-Fourier transform you'll have it's docs.

Note: These function are both available for efficiency only.  There is no reason
that you can't use the ordinary fft function on an array of reals.  The result you
get back will be much easier to deal with.

-Jim

_______________
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________