-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
ENH: Overlap-add filtering for long signals #10
Conversation
would it make sense to pass a filter length to the *_filter functions to let users specify the frequency resolution they want (like mne_process_raw does) something like:
where XXX is None means use full signal FFT or XXX=4096 means use overlap add with buffers of size 4096. It seems like exposing the N_fft parameter (that btw should be nfft or n_fft) |
Improved code based on your comments. The test now compares direct filtering and overlap-add filtering. Note that due to the different types of convolution (circular and linear with mirrored boundary), the edges of the filtered signal are slightly different. I don't think it is possible to avoid this. |
# response | ||
n_edge = min(n_h, len(x)) | ||
|
||
x_ext = np.r_[2 * x[0] - x[n_edge - 1:0:-1],\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need the \ in parenthesis
ENH: adding a test for channels / bads mismatch
Added zero-phase overlap-add filtering for signals longer than 60s (direct FFT filtering is faster for shorter signals). Unified filter function for low/high/band - pass.