smarsland / AviaNZ

GNU General Public License v3.0
28 stars 14 forks source link

Butterworth Bandpass needs to handle errors for too steep filters #46

Closed jjuod closed 5 years ago

jjuod commented 5 years ago

In training, and possibly elsewhere, it is possible to request bandpass filtering that results in very steep filter, e.g. try setting 60 Hz lower critical (or do we set bandstop?) freq. scipy can't handle it and throws error Filter order must be a nonnegative integer. Probably need to wrap all of it in some try-except.

jjuod commented 5 years ago

Seems like the issue stemmed from having stop bands deep in the negative numbers, so just hardcoded them to always be in the positives.