-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
RuntimeWarning for channels with different filter settings on import #12643
Comments
It looks like those warnings have been in place for 9 years now. Rather than change their behavior to |
They were in place for so long without being noticed most likely. I've never encountered a BrainVision file that triggered the warning, and the other format is very niche. I still think different filter settings do not warrant RuntimeWarnings. Why do you think this is so important that an info message is not sufficient? In other words, do you have a reason other than the age? |
And for EDF/BDF these warnings are new, so if you don't want to change the warnings for the other formats, then let's either do it just for EDF/BDF or revert that change entirely. |
I seem to recall there being other PRs that were similar, and IIRC there have been some tests in place for them. But I'd need to look.
Well one thing to keep in mind is that age is at least some justification -- it suggests that behaviors have been around a while with expectations and experiences suggesting that they're somewhere between tolerable and useful. But beyond that, in general when we detect something is wrong/inconsistent/un-representable-in-MNE for a file that could lead to some bad behavior, emitting a warning is a reasonable thing to do, as it's much more visible than So to me the right thing to do here is improve the specificity of the warning as in (1) and (2). |
I think there's a big difference between incompatible/wrong filter settings vs. just different filter settings. What exactly are the consequences of not knowing that a common cutoff frequency has been set that is compatible with all filter settings? The signals are not affected at all, it's just some meta info field that MNE is setting. And people would still be able to see it in info, which is the default logging level. But okay, since it is not likely that I'll convince you, someone should take care of (1) and (2). I don't have the time, so if no one can do it soonish I'd still revert the EDF/BDF change as an intermediate fix. Right now, this warning is triggered for all BDF files. |
@larsoner My limited understanding is that this warning will be emitted when loading any BDF file, effectively rendering the informative value of the warning useless... |
Yeah if that's the case then that's not good. I'm suggesting that we should make it useful rather than eliminate it in all cases though. |
This sounds reasonable to me!! |
I was trying to argue for a quick hotfix (possibly to be released in 1.7.1), because I currently don't have the time to look into these two issues. I can only revert the warning for EDF/BDF, but if you would like to have a proper fix (i.e. make the warning actually useful and also do the right thing), then someone else would have to implement it in the near future. Again, this warning is triggered for every BDF file no matter what. Edit: OK, maybe I was wrong. Stim channels already seem to be excluded, and currently I don't know how to reproduce the warning with my BDF files. I'm investigating, but it seems like the warning might not get triggered for any BDF file after all, so this won't be that urgent. I'll report back. |
I can reproduce it, it is an interaction with the |
Since the warning has been fixed, there are two remaining issues:
|
I think we might for other readers but no strong feeling
I would go with whichever one we had the most extensive discussions about. Not sure offhand which one that is, will require some GitHub archaeology |
Recently (as of #12441), MNE started to raise warnings when importing EDF/BDF files containing channels with different filter settings (see here):
There are three issues with this behavior:
read_raw_brainvision()
(see here and here). Interestingly,read_raw_nsx()
also seems to do the wrong thing (see here).RuntimeWarning
is too much. Even if the check is only performed within (certain) channel types, I would only log to info.The text was updated successfully, but these errors were encountered: