Interesting. It does work with lower filter order. In fact, there is a range of values of filter order for which I get the warning, but also some result. This results looks slightly flatter than the result with filter order set to 6, but is not completely flat. What does the filter order do, intuitively?

Thanks - Ariel  

On Thu, Mar 4, 2010 at 9:24 AM, Warren Weckesser <warren.weckesser@enthought.com> wrote:
Ariel Rokem wrote:
> Hi Warren,
>
> thanks for this example!
>
> I am getting the following error:
>
> Library/Frameworks/Python.framework/Versions/6.0.0/lib/python2.6/site-packages/scipy/signal/filter_design.py:224:
> BadCoefficients: Badly conditionned filter coefficients (numerator):
> the results may be meaningless
>   "results may be meaningless", BadCoefficients)
>
> For any attempt to filter a low-pass below 12 Hz in this example (so -
> I don't get the plot you got - instead I get a flat line on the bottom
> subplot). Do you (or anyone?) have any idea why that is?
>

Nils Wagner reported the same behavior a week or so ago, and I see the
same behavior now ("BadCoefficients" and a flat line in the last plot).
Try lowering the order of the Butterworth filter to order=6.

Warren


> Cheers,
>
> Ariel
>
> On Wed, Feb 24, 2010 at 7:51 AM, Warren Weckesser
> <warren.weckesser@enthought.com
> <mailto:warren.weckesser@enthought.com>> wrote:
>
>     Nils Wagner wrote:
>     > Hi all,
>     >
>     > I have two questions concerning signal processing
>     >
>     > I have used scipy.stats.signaltonoise to compute the
>     > signal-to-noise ratio.
>     > The value is 0.0447.
>     > How can I judge it ?
>     >
>     > How can I filter out high frequencies using scipy ?
>     >
>
>     I posted an example low-pass filtering using 'butter' and
>     'lfilter' from
>     scipy.signal here:
>
>        http://mail.scipy.org/pipermail/scipy-user/2010-January/024032.html
>
>     Warren
>
>     > How can I eliminate noise from the signal ?
>     >
>     > Nils
>     > _______________________________________________
>     > SciPy-User mailing list
>     > SciPy-User@scipy.org <mailto:SciPy-User@scipy.org>
>     > http://mail.scipy.org/mailman/listinfo/scipy-user
>     >
>
>     _______________________________________________
>     SciPy-User mailing list
>     SciPy-User@scipy.org <mailto:SciPy-User@scipy.org>
>     http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
>
>
> --
> Ariel Rokem
> Helen Wills Neuroscience Institute
> University of California, Berkeley
> http://argentum.ucbso.berkeley.edu/ariel
> ------------------------------------------------------------------------
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>

_______________________________________________
SciPy-User mailing list
SciPy-User@scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-user



--
Ariel Rokem
Helen Wills Neuroscience Institute
University of California, Berkeley
http://argentum.ucbso.berkeley.edu/ariel