mne-tools / mne-tools/mne-python

Channel adjacency improvements

Open
#12,292 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Proposed documentation enhancement

The docstring of the picks argument in read_ch_adjacency is wrong as there is no info provided to this function.

Also, find_ch_adjacency could benefit from an extra argument similar to pick in read_ch_adjacency to select channels to include in the adjacency matrix. I see 2 options forward:

  • (1) Keep ch_type and add exclude=() which can be set to exclude="bads"
  • (2) Deprecate ch_type in favor of the traditional picks argument, with an adapted docstring mentioning that the channel selection provided must yield a single channel type (+ check and appropriate error message)

I'm in favor of (2) as it offers more flexibility to find_ch_adjacency.

Correspond to this forum post: https://mne.discourse.group/t/find-ch-adjacency-not-accounting-for-bad-channels/7968/

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 the read_ch_adjacency and find_ch_adjacency entry points and their linked documentation, then review the related forum discussion. Resolve the proposed channel-selection API before changing the picks docstring; done means the documentation is accurate and find_ch_adjacency supports the agreed selection behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.