mne-tools / mne-tools/mne-python
Plot function for virtual channels in bridging electrode EEG analysis
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 1.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 100
Description
Describe the new feature or enhancement
The nice tutorial made by @alexrockhill in https://mne.tools/dev/auto_examples/preprocessing/eeg_bridging.html#sphx-glr-auto-examples-preprocessing-eeg-bridging-py shows how one can plot the "virtual" <bridge_elec1>-<bridge_elec2> signal and visually confirm if the data is in fact bridged.
I would like to have this plot as a function to enable someone's workflow.
Describe your proposed implementation
The https://mne.tools/dev/generated/mne.preprocessing.interpolate_bridged_electrodes.html#mne.preprocessing.interpolate_bridged_electrodes function internally has a method for computing the "virtual channels" for the sake of interpolation.
I would just refactor that to a private method, and then add a plot method for plot_bridged_virtual_ch to recreate this plot but for all bridged electrode pairs: https://mne.tools/dev/auto_examples/preprocessing/eeg_bridging.html#plot-the-raw-voltage-time-series-for-bridged-electrodes
Additional comments
I don't think we want to return the full Raw object probably(?), but the plot is generated from a "Raw" copy of the original data + bridged_idx. Should we plot all virtual channels? This might be cluttered because there could be MANY virtual channels...?
WDYT? @alexrockhill
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 with mne.preprocessing.interpolate_bridged_electrodes and the EEG bridging tutorial, especially the plot of raw voltage time series for bridged electrodes. Determine how the existing virtual-channel computation can support a public plot function for bridged electrode pairs; done means the function recreates that plot with an agreed behavior for multiple virtual channels.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100