-
Notifications
You must be signed in to change notification settings - Fork 92
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
Bipolar electrode recordings and "electrodes.tsv" #485
Comments
some hints to see how mne-python still can help.
https://mne.tools/dev/generated/mne.set_eeg_reference.html
https://mne.tools/dev/generated/mne.set_bipolar_reference.html
<https://mne.tools/dev/generated/mne.set_bipolar_reference.html#mne.set_bipolar_reference>
I am pretty sure that some references choices can be undone.
in chs['loc'] the first three value is the position of the electrode and
the next 3 the position
of the reference electrode.
In the FIF format EEG000 is the dig is the reference electrode
maybe this can help
|
@sappelhoff In BIDS, is there a way to define which electrodes were combined (and how) to form a channel in For a bipolar channel created from two unipolar electrodes, how you would specify the reference in The spec is very unclear on this:
|
What one could do is:
but this would be an ugly hack, and the virtual bipolar channel would assume the location of the |
cc @adam2392 |
Thinking about it, I guess this would be okay in principle. What still bothers me is that the channel name would always be equal to the name of that one electrode. |
Yes, that bothers me as well. I like your proposal here:
Perhaps we can propose this syntax or some variant of this to be included in BIDS as a recommendation for bipolar referencing schemes. Of course one would then have to be sure to find and it doesn't solve the issue for mne-bids, because MNE-Python just reads the "ECG" channel and has no clue that it was made out of two electrodes that are not channels. 🤔 re: coordinates --> I think these types of electrodes are seldom digitized (i have never seen that), EOG, ECG, ... so I think a |
I think this is a shortcoming on the BIDS side: Things could be pretty straightforward:
Alas, this is probably not going to happen… |
I think I've got an idea how to solve the issue within the existing specs. Starting from the thought about how "ordinary" EEG channels are handled. We always have an EEG reference – either an actual electrode, or a sum or mean of the signal across all channels, created inside the amplifier. Meaning that, in principle, each channel would use a bipolar referencing scheme: Yet, we simply refer to those channels as Transferring this approach to your ECG example, what we'd want to do is, instead of thinking within the boundaries of:
I suggest we think of this as:
Now,
Now there's 3 possibilities that could occur when dealing with the corresponding raw data:
Case 1: Case 2: Case 3: cc @agramfort |
The first part of your idea sounds reasonable to me, i.e., renaming The second part of what you write sounds like you are thinking more about a "read" or "read-BIDS" perspective. And I don't see where you refer to raw files (assuming you got only a single How would we write data to BIDS in your proposed setup, given that we only get an Regarding your cases: I guess the only file format that stores the data (i.e., a row in the channels x timepoints matrix) from electrodes, as opposed to from channels is Biosemi, as their referencing scheme is somehow "reference-free" (I never worked with that though). All other data formats typically store channels. I think case 2 (storing both channels and electrodes) would never happen. |
We followed the same approach using our BrainProducts amplifier when recording data via PyCorder :) It can use a virtual internal reference (inside the amplifier) |
If we have data for individual electrodes, each electrode becomes a separate channel in the Raw file. Only when reading, we populate the "true" channels based on the information in Does that make sense? Or did I misunderstand your question? |
Okay, now I know what you mean --> but the reality is probably (?) that Raw files do not contain data for each electrode. And that also clashes with the rule that channels.tsv should mirror the channels in the raw file 🙈 man I feel this is more complicated than it needs to be. |
This is fine too. In that case, we don't populate channels from electrodes.
This rule would need to be lifted, yes.
Yes. It's due to the (imho) arbitrary distinction between "channels" and "electrodes", which almost nobody seems to understand anyway. If you ask me,
|
(edited above example channels.tsv a bunch of times) |
When working on the impedances PR, I was working with data that included EOG and ECG channels.
(see electrode vs channel disambiguation in the entry paragraph of the BIDS EEG spec)
Each of these channels is coming from a set of two electrodes with bipolar referencing scheme.
E.g.
ECG
=ECG+
-ECG-
.In BIDS, the
electrodes.tsv
file is there to record electrodes, not channels. Yet, MNE-BIDS writes bipolar channels as a single row toelectrodes.tsv
.Furthermore, Ground and Reference would each need a row in
electrodes.tsv
as well.https://bids-specification.readthedocs.io/en/stable/04-modality-specific-files/03-electroencephalography.html#electrodes-description-_electrodestsv
I am aware that this is really hard to automate ... the reasons for that are twofold as far as I can see:
The text was updated successfully, but these errors were encountered: