mne-tools / mne-tools/mne-python

ENH: sEEG and ECoG sensor sizes are too large by default, should be configurable

Open
#12,472 10 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

The mne.viz.Brain functionality has improved a lot lately, and I have a request to make it even better. The current size of the sensors when you use brain.add_sensors() to an ECoG or sEEG visualization is quite a bit bigger than the actual sensors are in reality, which I think actually makes it difficult to appreciate where they are in space and makes them overlap in a way that is not aesthetically pleasing. I have two suggestions, one really easy, and one maybe more complex.

  1. I would like to suggest an overall change to the global default size for sEEG and ECoG electrodes in this visualization.
  2. I suggest another keyword argument to brain.add_sensors() that would allow for adjusting the electrode size on an individual basis instead of the whole montage. This can be a nice way of showing visually the size of different effects on each electrode (for example, make the electrode bigger if it's response is larger).
Describe your proposed implementation
  1. For 1, I propose to change the default size in defaults.py* -- for defaults['coreg']['ecog_scale'] and ['seeg_scale'] I suggest 2e-3 instead of 5e-3. Typically ECoG electrodes might be anywhere from 1-2.5 mm in diameter, and sEEG electrodes closer to 0.8-1mm. The spacing between contacts can vary between a few millimeters to a centimeter, so the scale of 5e-3 (5mm) often will make them overlap for a denser montage. I've already made this change in my own fork.

  2. For 2, I would add something to add_sensors(), but I want to make sure it wouldn't break anything else, so I'm open to alternatives.

Picture attached of what the new (smaller) size looks like:

image
Describe possible alternatives

N/A

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 in defaults.py with the coreg ecog_scale and seeg_scale settings, then inspect mne.viz.Brain.add_sensors() to understand how electrode size is currently applied. Compare the requested global defaults with the proposed per-electrode adjustment and define completion as configurable, non-overlapping ECoG and sEEG sensor sizing without breaking existing usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.