-
Notifications
You must be signed in to change notification settings - Fork 230
Auto-estimate margins based on freq_min/f0+Q for filters #4227
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
base: main
Are you sure you want to change the base?
Conversation
|
I think this is a great feature, but I already told @samuelgarcia that maybe we should at very least warn (prevent ?) users that will use very low frequencies for filters, trying to get LFP and/or low pass versions of the data. If the automatic margin starts to be really large (maybe larger than the default chunk size of 1s), then we should warn users that they are doing something clearly suboptimal. |
Sub-optimal but somehow needed! Maybe we can warn if the margin is greater than the |
|
Yes, I've read the PR, and indeed, at least a warning that the theoretical margin should be XX, and that it has be clipped to max_margin_s. The thing is that if users really want to do that, then the warning message could also advise them to increase chunk_duration in the default_job_kwargs, to reduce IO overloads |
| filter_mode="sos", | ||
| margin_ms=5.0, | ||
| margin_ms=5, | ||
| max_margin_s=5, |
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.
Not sure I like this concept of max margin...
We really should prevent users to use spikeinterface for lfp low frequency purpose.
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.
We have to use it! For wideband signals, there is no way around. You have to extract LFP on chunks. Extending the margin will minimize the error and the max margin is a tradeoff between accuracy and performance.
@samuelgarcia let's discuss!