def fft_bandpassfilter(data, fs, lowcut, highcut):
fft = np.fft.fft(data)<EOL>bp = fft.copy()<EOL>bp *= fft.dot(fft) / bp.dot(bp)<EOL>ibp = <NUM_LIT:12> * np.fft.ifft(bp)<EOL>return ibp<EOL>
http://www.swharden.com/blog/2009-01-21-signal-filtering-with-python/#comment-16801