[SciPy-User] Signal processing and filtering functions

Nils Wagner nwagner@iam.uni-stuttgart...
Thu Mar 10 04:52:20 CST 2011


On Wed, 9 Mar 2011 12:25:09 -0600
  Warren Weckesser <warren.weckesser@enthought.com> wrote:
> On Wed, Mar 9, 2011 at 12:17 PM, Nils Wagner
> <nwagner@iam.uni-stuttgart.de>wrote:
> 
>> On Wed, 9 Mar 2011 12:01:51 -0600
>>  Warren Weckesser <warren.weckesser@enthought.com> 
>>wrote:
>> > On Wed, Mar 9, 2011 at 10:33 AM, Joe Kington
>> ><jkington@wisc.edu> wrote:
>> >
>> >>
>> >> The SAE filtering operation performs two-pass, zero
>> >>phase
>> >>
>> >> shift, second-order Butterworth filtering.
>> >>
>> >>
>> >> You may already be aware of it, but that sounds
>> >>suspiciously like this
>> >> cookbook example...
>> >>http://www.scipy.org/Cookbook/FiltFilt
>> >>
>> >
>> >
>> > That cookbook code was added to scipy in r4391 and
>> >r5195.  scipy.signal has
>> > the filtfilt and lfilter_zi function.  The basic idea 
>>is
>> >to apply an IIR
>> > (e.g. Butterworth) filter to the signal twice, first
>> >forward and then
>> > backward.
>> >
>> > There is a lot of room for improvement in that code.
>> > I've been working on
>> > rewriting it, and implementing the true Gustafsson
>> >algorithm; despite the
>> > comment in the code, lfilter_zi does not implement
>> >Gustafsson's method.
>> > Once the change to github is made, I'll start a branch
>> >containing this work.
>> >
>> > Warren
>> >
>> >
>> Warren,
>>
>> Can you provide a reference wrt Gustafsson's algortihm ?
>>
> 
> 
> 
> The paper is available on his web page; see reference 
>1996 [A5] in the
> section "Journal Papers" here:
> http://www.control.isy.liu.se/~fredrik/pub.html
> 
> In case that link ever dies, the full reference is:
> 
>F. Gustafsson. Determining the initial states in 
>forward-backward filtering.
> * Transactions on Signal Processing*, 46(4):988 - 992, 
>1996.
> 
> 
> Warren
> 
> 
> 
Hi Warren,

IMHO, the docstrings of filtfilt and lfilter_zi  are very 
short.
it would be nice if you could add some meaning 
information.

>>> from scipy.signal import lfilter_zi
>>> help (lfilter_zi)

>>> from scipy.signal import filtfilt
>>> help (filtfilt)

Help on function filtfilt in module 
scipy.signal.signaltools:

filtfilt(b, a, x)
(END)

Help on function lfilter_zi in module 
scipy.signal.signaltools:

lfilter_zi(b, a)

Thanks in advance.

Nils


More information about the SciPy-User mailing list