mne-tools / mne-tools/mne-python
Retrieving channel adjacencies for our standard montages
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 1.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 100
Description
I'd like to be able to do something like the following:
# %%
import mne
montage_name = 'easycap-M1'
m = mne.channels.make_standard_montage(montage_name)
adj = m.get_adjacency()
i.e., if I'm using one of our built-in montages and we are shipping a matching adjacency matrix, I want to be able to retrieve this matrix without having to worry about ch_names etc in the way I have to when using the current approach:
# %%
import mne
m = mne.channels.make_standard_montage('easycap-M1')
adj, ch_names = m.get_adjacency('easycapM1') # now what do I even do with those ch_names? match them up with those in `m`??
Alternatively, we could have support for make_standard_montage(..., return_adjacency=True) to return the matrix alongside the montage.
WDYT?
cc @mmagnuski @sappelhoff @cbrnr
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining make_standard_montage and the existing montage get_adjacency entry points described in the issue. Trace how built-in montage names and adjacency matrices are currently associated, especially the ch_names handling. Done means a caller can retrieve the matching adjacency for a standard montage without manually reconciling channel names, with the chosen API behavior covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100