mne-tools / mne-tools/mne-python
Issues computing connectivity with CTF system
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 1.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 100
Description
I got a report that the connectivity computation was problematic. If you have a CTF-270 system, the function find_ch_connectivity gives you the connectivity of the CTF-275 system. Code to reproduce:
import mne
from mne.channels import find_ch_connectivity
contrast = mne.evoked.read_evokeds('./S1_discrimination_conds-ave.fif',
condition='contrast_RP', verbose=None)
connectivity, ch_names = find_ch_connectivity(contrast.info, ch_type='mag')
assert connectivity.shape[-1] == len(contrast.info['ch_names'])
here is the file: https://www.dropbox.com/s/bae8rjdu068ws14/S1_discrimination_conds-ave.fif?dl=0.
My suggestion would be to make _compute_ch_connectivity public and deprecate the find_ch_connectivity function. The guesswork in the function introduces more problems than solves.
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
Reproduce the report with the linked FIF file and inspect find_ch_connectivity and _compute_ch_connectivity in mne/channels/channels.py. Compare the computed connectivity and channel count for the CTF-270 data, then determine whether exposing the internal function and deprecating find_ch_connectivity is appropriate. Done means the CTF-270 computation no longer uses the wrong system assumptions and the reported shape remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100