pwtools.signal.ezfft

pwtools.signal.ezfft(y, dt=1.0)[source]

Simple FFT function for interactive use.

Parameters:
  • y (1d array to fft)

  • dt (float) – time step

Return type:

faxis, fft(y)

Examples

>>> t = linspace(0,1,200)
>>> x = sin(2*pi*10*t) + sin(2*pi*20*t)
>>> f,d = signal.ezfft(x, dt=t[1]-t[0])
>>> plot(f,abs(d))