mne-tools / mne-tools/mne-python

ENH: Channel tags

Open
#9,591 13 comments 3 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

It would be nice to be able to tag channels, for example as belonging to a particular "group".

  • for MEGIN MEG, this could be 1) each triplet of sensors that share a common spatial location, and also 2) which selection they are a part of; e.g. MEG0111 could have tags ('011X', 'Left', 'temporal') or so (part of the 0111/2/3 triplet, in the Left-temporal group in .sel)
  • for iEEG, this would probably be sEEG shafts / ECoG grid
  • for OPMs, manufacturers creating one "sensor" with multiple sensitive volumes (even if spatially offset from one another) will probably want these groups

I propose we add to our new enhanced channel block (https://github.com/mne-tools/fiff-constants/pull/33) the ability to specify which group each channel belongs to. I think it makes sense to add a new entry like:

ch_tags		352	str	-	"Channel tags"

@agramfort @alexrockhill @jasmainak thoughts? I think this will allow us to make visualization functions automagically work better, for example by:

  1. channel groups each get their own color from the mpl color cycle in plot_alignment et al.
  2. mne.channels.find_layout could construct linear layouts on a per-channel-group basis (e.g., for sEEG shafts) for use with mne.viz.plot_topo

If this makes sense, I'll open a parallel issue over in fiff-constants. But I figured we could think about and discuss it a bit here first!

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 by reviewing the proposed enhanced channel block and the referenced fiff-constants pull request. Consider how a ch_tags entry would interact with plot_alignment and mne.channels.find_layout; done means the channel-group design and follow-up scope are agreed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.