[SciPy-User] FFT Filter
Tue Sep 27 04:47:31 CDT 2011
Thanks a lot for the reply. I have started to look into this and
currently I am trying to use firwin2 to generate the filter coefficients
according to below
However I get strange results, when trying to filter even a very simple
signal :(. This is probably not a scipy related question, but how to put
the numtaps number? How is this related to the other inputs.
Christophe Grimault skrev 2011-09-26 18:32:
> Hi Anders,
> Use : scipy.signals.lfilter(b, a, x)
> Where x is your signal (complex or real, it doesn't matter). As a filter
> in the Fourier domain is basically FIR filter, you only need to pass the
> b array (the response of the filter) and set a = [1.0].
> On Sat, 2011-09-24 at 09:33 +0200, Anders Harrysson wrote:
>> Dear all,
>> I am kind of new to scipy and also new to the signal processing field
>> that this question relates to.
>> I am trying to do a bandpass FFT filter using python. The filter shape
>> is symmetric around 11 Hz and is defined by the parameters ff and Hz below.
>> sr = 250 # [samples/s]
>> nf = sr/2.0 # Nyquist frequence
>> Ns = len(tr[:,0]) # Total number of samples
>> N=float(8192) # Fourier settings
>> # Fourier transform
>> X1 = fft(x,n=int(N))
>> X1 = fftshift(X1)
>> F1 = arange(-N/2.0,N/2.0)/N*sr
>> # Filter
>> Hz = [9.5, 10, 12, 12.5]
>> My question is now:
>> Are ther built in functionallity for filtering in scioy and, if so, how
>> would a similar filter looks like.
>> Anders Harrysson
>> SciPy-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User