-
Notifications
You must be signed in to change notification settings - Fork 18
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
BIDS electrodes.tsv import leads to incorrect chanlocs when channels.tsv and electrodes.tsv include different extra entries #236
Comments
@neuromechanist would you mind to have a look? |
@arnodelorme,
Without a clear specification, we should anticipate several scenarios, when
We are addressing this issue on EMG-BIDS (bids-standard/bids-specification#1371) by adding a I linked this issue to BIDS-specifications as well bids-standard/bids-specification#2041 |
@robertoostenveld can you comment on what you think of that issue for EEG? |
FYI there can also be an equal number of channels and electrodes that are not identical, which may not be included in your list below (e.g. reference electrode location in electrodes.tsv and not channels.tsv along with 1 extra channel in channels.tsv but not electrodes).
Since name is required for both channels.tsv and electrodes.tsv, why not just apply electrode.tsv information to channels of the same name?
Katy
…________________________________
From: Seyed (Yahya) Shirazi ***@***.***>
Sent: Tuesday, February 4, 2025 9:32 AM
To: sccn/EEG-BIDS ***@***.***>
Cc: Cross, Kathryn A. ***@***.***>; Author ***@***.***>
Subject: Re: [sccn/EEG-BIDS] BIDS electrodes[.]tsv import leads to incorrect chanlocs when channels[.]tsv and electrodes[.]tsv include different extra entries (Issue #236)
@ arnodelorme, This is the problem we discussed two weeks ago about EEG-BIDS not providing a clear linkage between channels. tsv and electrodes. tsv. This is from the BIDS specifications: the entries in *_electrodes. tsv and *_channels. tsv do not
@arnodelorme<https://urldefense.com/v3/__https://github.com/arnodelorme__;!!F9wkZZsI-LA!HuYkKWUe1_AlpxrcG1rKok9nYZSnzv37Q98xNVJ45xxBtefiqgcY2fqK28nDgLQyFOiVsfA9GGLm2-5zOy1Wqnd2nDIx$>,
This is the problem we discussed two weeks ago about EEG-BIDS not providing a clear linkage between channels.tsv and electrodes.tsv. This is from the BIDS specifications:
the entries in *_electrodes.tsv and *_channels.tsv do not have to match exactly, as for example in the case of recording a single EOG channel from a bipolar referencing scheme of two electrodes, or a data channel originating from an auxiliary, non-electrode device. That is, in most cases *_electrodes.tsv will have more entries than *_channels.tsv.
Without a clear specification, we should anticipate several scenarios, when channels.tsv and electrodes.tsv:
1. have the same order of channels and electrodes, respectively
2. have the same channels and electrodes, but out of order
3. there are more channels than electrodes, like the example above with audio and pressure sensor channels
4. there are more electrodes than channels, for example, with some bipolar electrodes like EOG, creating fewer channels (the case that the specification was anticipating).
We are addressing this issue on EMG-BIDS (bids-standard/bids-specification#1371<https://urldefense.com/v3/__https://github.com/bids-standard/bids-specification/issues/1371__;!!F9wkZZsI-LA!HuYkKWUe1_AlpxrcG1rKok9nYZSnzv37Q98xNVJ45xxBtefiqgcY2fqK28nDgLQyFOiVsfA9GGLm2-5zOy1Wqps6ToEO$>) by adding a signal_electrode to the channels.tsv, as can be seen in the example pull request, subject 5: bids-standard/bids-examples#480<https://urldefense.com/v3/__https://github.com/bids-standard/bids-examples/pull/480__;!!F9wkZZsI-LA!HuYkKWUe1_AlpxrcG1rKok9nYZSnzv37Q98xNVJ45xxBtefiqgcY2fqK28nDgLQyFOiVsfA9GGLm2-5zOy1WqtpH1JBf$>.
I linked this issue to BIDS-specifications as well bids-standard/bids-specification#2041<https://urldefense.com/v3/__https://github.com/bids-standard/bids-specification/issues/2041__;!!F9wkZZsI-LA!HuYkKWUe1_AlpxrcG1rKok9nYZSnzv37Q98xNVJ45xxBtefiqgcY2fqK28nDgLQyFOiVsfA9GGLm2-5zOy1WqpP77nkv$>
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https://github.com/sccn/EEG-BIDS/issues/236*issuecomment-2634628686__;Iw!!F9wkZZsI-LA!HuYkKWUe1_AlpxrcG1rKok9nYZSnzv37Q98xNVJ45xxBtefiqgcY2fqK28nDgLQyFOiVsfA9GGLm2-5zOy1WqlUalgJu$>, or unsubscribe<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AUHQJY5OWW76SZBW5ZD23T32OD2R3AVCNFSM6AAAAABWPASKTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZUGYZDQNRYGY__;!!F9wkZZsI-LA!HuYkKWUe1_AlpxrcG1rKok9nYZSnzv37Q98xNVJ45xxBtefiqgcY2fqK28nDgLQyFOiVsfA9GGLm2-5zOy1WqmEkvQHQ$>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
________________________________
UCLA HEALTH SCIENCES IMPORTANT WARNING: This email (and any attachments) is only intended for the use of the person or entity to which it is addressed, and may contain information that is privileged and confidential. You, the recipient, are obligated to maintain it in a safe, secure and confidential manner. Unauthorized redisclosure or failure to maintain confidentiality may subject you to federal and state penalties. If you are not the intended recipient, please immediately notify us by return email, and delete this message from your computer.
|
channels are something inside the amplifier, electrodes are something on the head, as explained on https://bids-specification.readthedocs.io/en/stable/modality-specific-files/electroencephalography.html There can be both situations where the number of electrodes is larger, the number of channels is larger, or where they are the exactly same (although the latter is unlikely, since voltage is by definition a differential measurement between two electrodes). For EEG data recorded with a unipolar montage we usually name channels according to the electrode that makes the channel unique (i.e. channel C3 is connected to electrode C3), where the voltage in the channel correspond to the voltage at that specific electrode minus the voltage at the common reference. The If a common EEG reference is used, the channel-to-electrodeposition mapping (for topographic plotting) is straightforward. If different references are used for different channels, it gets more complex. And channels that are not on the scalp (like triggers) don't have a position of course and should not be included in a topographic display. |
Dear @kacross, is the problematic dataset (or part of it) somewhere available online? I would like to see how FieldTrip would deal with it. |
@robertoostenveld It is not yet fully converted, but I have put a run from one subject at this link |
When loading BIDS folder to a study the channels are incorrect when the electrodes.tsv and channels.tsv are different.
Extra channels in EEG data that are not in electrodes.tsv (e.g. audio input, auxiliary response device) in combination with extra electrode entries that are not in channels.tsv (e.g. CZ=ref electrode location from 3D cap photo) leads to inappropriate assignment of extra channels in chanlocs due to assumed equivalent row indexing of electrodes.tsv and channels.tsv (lines 52-59 of bids_importchanlocs.m). See attached example where CZ=ref electrode location is included in electrodes.tsv and channels.tsv has different extra channels for audio and auxiliary response device inputs. [attached as .txt as git doesn't allow me to include .tsv files]
Behavior is different when loading the individual file using pop_fileio. This appears to correctly import the same example by matching electrode and channel names (lines 282 - 300).
sub-CM40_task-reaching_run-1_electrodes.txt
sub-CM40_task-reaching_run-1_channels.txt
The text was updated successfully, but these errors were encountered: