mne-tools / mne-tools/mne-python

improve ica.plot_overlay for raw instances

Open
#11,061 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 when providing inst=raw, ica.plot_overlay transform it to an evoked for display. This doesn't really make sense when working with spontaneous data.
I would be great to be able to plot the overlay on the classic raw.plot() window. Each data channel would be represented by two superimposed traces of different colors: one representing the raw instance and the other the raw instance without the ICA components.
It would be useful as in this example, where we users are forced to manually apply ICA to a copy of the raw instance and then plot the 2 raw instances.

Describe your proposed implementation

Directly change the behavior of ica.plot_overlay(insta=raw) or create something like joint_plot(raw1, raw2) which allows to plot several raw instances with same info on the same plot.

Describe possible alternatives

A way to synchronize two raw.plot() windows, which allows to have always the same time window of the recordings in view.

Additional comments

This feature could also be implemented in mne-qt-browser

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 by reading ICA.plot_overlay and raw.plot(), then compare the behavior shown in the linked artifact-correction ICA example. Consider whether the change belongs in these entry points or in mne-qt-browser. Done means raw instances can be displayed together with synchronized views and distinguishable traces for original and ICA-cleaned data.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
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.