[SciPy-User] rfft

Fabrice Silva silva at lma.cnrs-mrs.fr
Mon Jun 20 11:09:22 EDT 2011


Le lundi 20 juin 2011 à 08:03 -0700, garyr a écrit :
> If I generate a sine wave of a particular frequency in an array of type 
> float32 or float64 and compute the transform using the function fft (in 
> scipy/fftpack/basic.py) I find the signal in the correct bin. If I use the 
> function rfft, which is described as returning the Fourier transform of a 
> real sequence,  I find the signal in the bin corresponding to twice the 
> actual frequency. I thought rfft would be the proper function to use for 
> real (non-complex) data. What is the correct usage of rfft? 

Note that fft gives estimations of the Fourier transform over the range
[0, Fs). rfft uses the property of the real signals (hermitian symmetry)
to return values over the [0, Fs/2) range only.
-- 
Fabrice Silva




More information about the SciPy-User mailing list