mne-tools / mne-python

MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python
https://mne.tools
BSD 3-Clause "New" or "Revised" License
2.7k stars 1.31k forks source link

ENH: Interactive MNE report for IC selection #6002

Open fraimondo opened 5 years ago

fraimondo commented 5 years ago

Describe the problem

Selecting ICA components is sometimes a complex process that requires viewing IC time series, spectral properties, topography, variance, etc. Every plot also takes time to build, so the interactive approach has a high component of waiting.

Describe your solution

I solved this by taking advantage of the MNE report, and created one with all the components' plots. In order to make the selection process easier, I added JavaScript code that adds buttons and option buttons to select the component to reject, and when done, download a JSON file.

My use case is quite general, although the use of a JSON file needs to be discussed (although it should not be up to the user to remember the numbers!).

The report needs some aesthetic tweaks, but it does it job for now.

Additional context

Code to create report: https://github.com/fraimondo/eeg_cleaner/blob/master/cleaner/report.py Example of a report: https://www.dropbox.com/s/oq9u5heyqrem06v/LS103_LGMM_3%2020170504%201056-icm-lg_mm-egi-epo-ica.html?dl=0

hoechenberger commented 4 years ago

Nice work, @fraimondo. I will see if I can incorporate your idea or some of that code into the Report.