mne-python icon indicating copy to clipboard operation
mne-python copied to clipboard

Improve `mne.Report.add_ica` with `ica.plot_sources`

Open sappelhoff opened this issue 7 months ago • 1 comments

Describe the new feature or enhancement

Adding an ICA object to a report is a versatile and convenient method to screen data quality.

  • https://mne.tools/stable/generated/mne.Report.html#mne.Report.add_ica

One aspect that I often find missing from the overview is a plot of the source timecourses, which can be visualized via:

  • https://mne.tools/stable/generated/mne.preprocessing.ICA.html#mne.preprocessing.ICA.plot_sources

I propose that we add an option to add an option to .add_ica to also plot the sources.

Describe your proposed implementation

In practice, my proposal would add a subsection to the ICA section called "sources".

It would consist of a "standard timecourses plot" like in the screenshot below:


Image


This plot would be interactive, and the arrow keys would allow to scroll

  • left / right (in time)
  • up / down (through sources)

The parameter that controls whether or not sources are plotted would allow to control:

  • how much overall time to show (defaults to not too much)
  • from when to when to show data (interacting with how much time overall to show)
  • how many sources to show per "scroll through"
  • how much time to show per "scroll through"
  • which sources to show (defaults to all, but can take indices)

Describe possible alternatives

The sources could be added to the Report in a non-interactive way.

Additional context

No response

sappelhoff avatar May 27 '25 11:05 sappelhoff

+1, I've missed having this feature recently

drammock avatar May 27 '25 13:05 drammock