[SciPy-user] FFT speed ?

Samuel GARCIA sgarcia@olfac.univ-lyon1...
Thu Feb 8 03:06:07 CST 2007


Thanks all,
for fast and efficient answers.
Zeros padding was really my solution.

Sam


Scott Ransom wrote:
> On Wed, Feb 07, 2007 at 04:39:21PM +0200, Stefan van der Walt wrote:
>   
>> On Wed, Feb 07, 2007 at 03:18:19PM +0100, Samuel GARCIA wrote:
>>     
>>> yes I was thinking of doing something like that but
>>> fft(a,pow(2,18)).shape is of course 262144 (2**18)
>>> and when I use ifft after that The length of my signal have changed I have an
>>> interpolated signal ... new problem for me ...
>>>       
>> An interpolated signal?
>>     
>
> Padding a time series gives you an interpolated (actually, the
> term often used is "oversampled" Fourier spectrum).
>
> Scott
>
>   
>> In [19]: N.real(N.fft.ifft(N.fft.fft(N.arange(11),16)))
>> Out[19]: 
>> array([  0.,   1.,   2.,   3.,   4.,   5.,   6.,   7.,   8.,   9.,  10.,
>>         -0.,   0.,   0.,   0.,   0.])
>>
>> Padding in the Fourier-domain, on the other hand:
>>
>> In [20]: N.real(N.fft.ifft(N.fft.fft(N.arange(11)),16))
>> Out[20]: 
>> array([ 0.        ,  2.10035464,  3.04455839,  1.35780382,  3.23688237,
>>         3.12291155,  2.35790278,  4.12133152,  3.4375    ,  3.29213721,
>>         5.00323313,  3.69035768,  4.32561763,  5.98165513,  3.3443057 ,
>>         6.58344845])
>>
>>
>> Cheers
>> Stéfan
>> _______________________________________________
>> SciPy-user mailing list
>> SciPy-user@scipy.org
>> http://projects.scipy.org/mailman/listinfo/scipy-user
>>     
>
>   

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Samuel Garcia
Universite Claude Bernard LYON 1
CNRS - UMR5020, Laboratoire des Neurosciences et Systemes Sensoriels
50, avenue Tony Garnier
69366 LYON Cedex 07
FRANCE
Tél : 04 37 28 74 64
Fax : 04 37 28 76 01
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20070208/0898fd2e/attachment-0001.html 


More information about the SciPy-user mailing list