mne-tools / mne-tools/mne-python

ENH: add `ch_names` to `find_ch_adjacency`

Open
#10,663 1 comment 1 reaction 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

Currently find_ch_adjacency, when it finds a template adjacency it reads all available channels. The user is then left with picking the ones to use and making sure the channel order is the same as in his file. For example in one of the tutorials we pick the channels by comparing returned ch_names list and .ch_names of an mne instance.
I think it would be useful then to allow to pass ch_names to find_ch_adjacency. Even if we don't want to subselect channels available in the template, we can make sure that the desired channels are in the template and that the channel order is the same.

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 at the find_ch_adjacency entry point and read the linked cluster-based statistics tutorial to understand how the returned channel names are used. The change is done when callers can pass ch_names and receive an adjacency restricted to those channels in the same order, while confirming the requested channels are available in the template.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.