-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Add FIR filter examples to scipy.signal documentation #4368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@mpastell's examples are nice, but it is not true (perhaps better to say no longer true) that "SciPy does not have a function for directly designing a high-pass FIR filter". Check out the docstring for Also check out |
|
typo :) |
but yes, thanks for that remark. |
Stop being so pendantic. |
Yes, feel free to use the examples and modify them in anyway you want. I'm happy if they are useful to someone. |
What I should have said first: Yes, this is a great idea! I put some I have several other tasks to finish on my scipy to-do list before I'd work on this, so if anyone wants to expand the |
Here's another example of filtfilt vs lfilter, though very similar to the one you linked to: http://dsp.stackexchange.com/a/19086/29 Could |
FWIW, here's another example that I created for a stackoverflow answer: |
Maybe this tutorial I wrote for MNE could be adapted: https://martinos.org/mne/stable/auto_tutorials/plot_background_filtering.html At least some (non-signal-processing engineer) neuroscientists I've talked to have found it to be a useful intro. Of course for SciPy it could be expanded to deal with other design methods (e.g., |
Add examples to remez docstring with lowpass, highpass, bandpass and bandstop Inspired by https://gist.github.com/WarrenWeckesser/67bef61f496080aeb798 Fixes scipy#4368 Work done together with @pooja-subramaniam and @jja4
gh-8744 just improved the |
Hi @endolith @rgommers , I think firwin2 should have more examples, especially for a custom filter. I want to add this something like this, but wanted to confirm from the maintainers and core members if the examples need to be from some standard reference material. I would like to know if it is correct or not, I tried replicating one of the examples that I encountered in my course but could not find in scipy. Additionally, I am confused if there is any difference between firwin and firwin2. I could notice that firwin2 accomodates type III and IV filters and I think we can give an arbitrary gain frequency map to it which is not possible in firwin. Kindly clarify if I got this right. |
@Adarsh-NP I know this response is quite late but can you please provide more details on the example that you tried to replicate? As for your final question,
The main difference is in the desired properties of the filter.
You are also correct that type III/IV filters can be designed using firwin2 but not with firwin. This line from the firwin documentary makes it clear.
Please let me know if I have missed anything. |
Is this issue still active? |
Here are a few examples that could easily be used to improve the docstrings and/or tutorial of scipy.signal:
http://www.scipy.org/Cookbook/FIRFilter
http://www.scipy.org/Cookbook/FiltFilt
http://mpastell.com/2010/01/18/fir-with-scipy/ (IIRC @mpastell was OK with using that content, but I can't find an archived email that says that anymore. Matti can you confirm that this is OK?)
signal.filtfilt
now has at least one nice example thanks to @WarrenWeckesser, and the tutorial is slowly improving mainly due to @endolith's PRs, but there's a ways to go....The text was updated successfully, but these errors were encountered: