-
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
DOC: impedances may be obtained for BrainVision #12861
Conversation
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.
LGTM. Would it be worthwhile to mention that it will be None
if nothing was read re impedances?
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.
LGTM. I don't think mentioning that this attribute is None
if no impedance values are available is necessary.
mne/io/brainvision/brainvision.py
Outdated
@@ -63,6 +63,9 @@ class RawBrainVision(BaseRaw): | |||
Notes | |||
----- | |||
If the BrainVision header file contains impedance measurements, these may be | |||
accessed using ``raw.impedances`` after reading using this function. |
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.
Question: I see that this attribute was discussed and added many years ago in #7974, but I thought that attributes that don't survive I/O roundtrips aren't supposed to be added?
e.g. #11825 (comment)
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.
I think we made an exception for BV at one point. But thinking about it I think I'd rather deprecate this param and show an example of how to use pybv
directly to access this information.
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.
my guess is that .impedances
is allowed to deviate for legacy reasons (probably either someone judged that it would break too much user code to remove it, or it's needed by downstream libraries).
edit: hadn't seen Eric's comment until after my review
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.
Note that I actually stumble upon this while adding the ANT reader, and thus I added a similar ìmpedance
attribute in the ANT reader. Maybe it should be removed as well and live in antio
.
mne/io/brainvision/brainvision.py
Outdated
@@ -63,6 +63,9 @@ class RawBrainVision(BaseRaw): | |||
Notes | |||
----- | |||
If the BrainVision header file contains impedance measurements, these may be | |||
accessed using ``raw.impedances`` after reading using this function. |
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.
my guess is that .impedances
is allowed to deviate for legacy reasons (probably either someone judged that it would break too much user code to remove it, or it's needed by downstream libraries).
edit: hadn't seen Eric's comment until after my review
Co-authored-by: Clemens Brunner <clemens.brunner@gmail.com>
I agree in principle @larsoner and I'd be happy to take this functionality out of mne-python and give it a new home in pybv. The order of steps could be:
Any other suggestions? |
I'm not sure there is a ton of value to (1) or (2) ideally (3) would make (1) and (2) obsolete. But if we don't get around to (3) for a while then (1) is useful in the interim (and done already!), so why not at least merge this.
Yes! In fact this makes me think that we should have in a tutorial somewhere about how you can get additional information not provided by |
Thanks @sappelhoff ! |
I am currently a bit short on time with a big backlog, so I will have to deprioritize this, but I have it on my list for pybv, at least. Would be happy if someone beat me to it though :-) |
This was not clear from the documentation before.