[SciPy-user] "chunk" filter ?

Stef Mientki s.mientki@ru...
Mon Feb 18 14:18:19 CST 2008


hello,

I need to filter (e.g. lowpass) a real time signal,
the samples are taken equidistant,
but the samples will arrive asynchronous
and I want to display the filtered signal as soon as it arrives


If I take a very simple lowpass filter, I can easily do it myself:
    a=0.1
    y = 0
    new = 1  # test signal = step function
    for i in range (100) :      # getting 100 samples
        y = a*new + (1-a)*y
    for i in range (18) :       # getting 18 samples
        y = a*new + (1-a)*y
        print y
         ... and so on

But to be able to use more complicated filters,
I would like to use the signal.lfilter,
therefor I obvious need to keep track of some history data,
but I can't find the right solution.

Does anyone has suggestions or a solution ?

thanks,
Stef Mientki



More information about the SciPy-user mailing list