[SciPy-user] Frequency content of a transient signal

Matthieu Brucher matthieu.brucher@gmail....
Tue Jul 22 02:59:13 CDT 2008


2008/7/22 Nils Wagner <nwagner@iam.uni-stuttgart.de>:
> On Tue, 22 Jul 2008 09:15:11 +0200
>  "Matthieu Brucher" <matthieu.brucher@gmail.com> wrote:
>>
>> Hi !
>>
>> I think you can use a sliding DFT on your signal. This way, you will
>> get a moving estimation of the spectral information (it's a basic
>> time-frequency transform, before you use wavelets ;)).
>>
>> Matthieu
>>
>  Matthieu,
>
> I am not very familiar with signal processing. Please can
> you provide a short example ?
> I have attached the data file. The first column corresponds
> with the time, the second column represents the signal.
>  Thanks in advance
>
>                      Nils

A wikipedia article states it better than me, so here is a link :
http://en.wikipedia.org/wiki/Short-time_Fourier_transform
Feel free to ask any question ;)

In fact, what you will do is :

my_ffts = []
fo i in range(n):
  my_ffts.append(fft(data[i*size:(i+1)*size]))

with size the size of the sliding window you will use. This will give
you non overlapping FFTs, but you can use overlapping FFT, such as :
  my_ffts.append(fft(data[(i-1/2.)*size:(i+3/2.)*size]))

Matthieu
-- 
French PhD student
Website : http://matthieu-brucher.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn : http://www.linkedin.com/in/matthieubrucher


More information about the SciPy-user mailing list