mne-tools / mne-tools/mne-python

ENH: sEEG and ECoG electrodes should have sensor labels in brain visualizations

Open
#12,475 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ENH
Dominant language
Python
Stars
3.5k
Forks
1.6k
Avg merge
1d 6h
Merged PRs (30d)
100

Description

Describe the new feature or enhancement

Since sEEG and ECoG montages differ substantially from participant to participant and there is no "default" montage like in EEG, we should have a way to show the labels for each electrode in the mne.viz.Brain. For example, even electrodes within the same brain area can have wildly different names (in our lab, sometimes the electrode RPPST might be in the same area as one named PST-PH or PTG-HG, so it's anyone's guess where they actually are unless you label them). Having the option to include the sensor labels in add_sensors would be very helpful for interpreting evoked activity or analyses on individual electrodes.

Describe your proposed implementation

in brain.add_sensors() in mne.viz.Brain, I propose that sensor_labels be added as a boolean argument, where the labels would be taken directly from info['ch_names']. I'm not sure the best way to implement this based on the 3D viewer, since ideally these would be labels that are not added like the title text but instead would follow the electrode in 3D and be tied to the x, y, z coordinate of each electrode sphere (offset by a tiny amount so the electrode itself is still viewable, and maybe ideally with some control over the font size and characteristics).

In spirit, this is kind of like how in mne.viz.plot_montage you can have the show_names=True argument.

Example for a grid shown below:
image

and for sEEG:
image

For the user, this is helpful when interpreting analyses, and I wouldn't necessarily include all the electrode labels like this in a paper figure, but it's really helpful when exploring the data.

Describe possible alternatives

sensor_labels could also be passed as a list if the user wanted to manually specify their names for some reason (maybe they want to have shorter names or want to name them by function?), but I think this is probably a less realistic usage. Open to opinions.

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with mne.viz.Brain.add_sensors and compare its intended behavior with mne.viz.plot_montage(show_names=True). Done means an optional sensor_labels behavior uses info['ch_names'] and keeps labels attached to electrode coordinates in the 3D view; resolve whether manual names and font controls are in scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics, data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.