简体   繁体   English

如何使用“scipy.signal.butter”function 进行低通滤波?

[英]How to use "scipy.signal.butter" function for doing low-pass filtering?

How should I use the "scipy.signal.butter" for low pass filtering my SST data from the year 1870-2000 for retaining the signal above 8 years?我应该如何使用“scipy.signal.butter”对 1870-2000 年的 SST 数据进行低通滤波,以将信号保留 8 年以上? I searched for this:- scipy.signal.butter(N, Wn, btype='low', analog=False, output='ba', fs=None)我搜索了这个:- scipy.signal.butter(N, Wn, btype='low', analog=False, output='ba', fs=None)

but what should I choose N, Wn particularly?但是我应该特别选择N,Wn吗?

It would be helpful if someone could explain the procedure to do this.如果有人可以解释执行此操作的程序,那将很有帮助。 And if there is any other way to do this.如果还有其他方法可以做到这一点。 Please let me know.请告诉我。

Here 's the scipy documentation on butter . 是关于butter的 scipy 文档。

Per that page, N is an int specifying the order of the filter and Wn is a list, tuple, or something similar which specifies "critical frequencies".在该页面中,N 是指定过滤器顺序的 int,而 Wn 是指定“临界频率”的列表、元组或类似的东西。 What those "critical frequencies" mean for a Butterworth filter is briefly described in the documentation.文档中简要描述了这些“临界频率”对巴特沃斯滤波器的含义。

Does that help clear up your confusion, or are you looking for more information about how Butterworth filters themselves work?这是否有助于消除您的困惑,或者您是否正在寻找有关 Butterworth 过滤器本身如何工作的更多信息? If you understand the signal processing you're trying to do and you just want help with the code, the documentation should be enough.如果您了解您正在尝试执行的信号处理并且您只需要代码方面的帮助,那么文档应该就足够了。 If you need help learning about how Butterworth filters work, it's probably best if you google it.如果您需要帮助了解 Butterworth 过滤器的工作原理,最好使用 Google 搜索。 If you understand what Butterworth filters are and what types of stuff they're used for, and you keep having trouble with using the Butterworth filter to do what you want, be aware that there's a signal processing StackExchange - that's a better place to ask questions about signal processing itself (StackOverflow is just for programming).如果您了解 Butterworth 过滤器是什么以及它们用于什么类型的东西,并且您在使用 Butterworth 过滤器做您想做的事情时遇到问题,请注意有一个信号处理 StackExchange - 这是一个更好的提问地方关于信号处理本身(StackOverflow 仅用于编程)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM