Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
55289a0
Added functions for plotting ica components.
jaeilepp Jun 30, 2015
94a81b2
Work towards ica plot. Refactoring.
jaeilepp Jun 30, 2015
fd0c263
Almost working plotter for ica components. Refactoring.
jaeilepp Jun 30, 2015
9ef7398
Fixes. Horizontal navigation.
jaeilepp Jun 30, 2015
d0b58a7
More refactoring.
jaeilepp Jul 1, 2015
089bb2d
Updated example. Removed parameter.
jaeilepp Jul 1, 2015
6688a1a
Refactoring. Interactive selection of components.
jaeilepp Jul 2, 2015
7d2ca2b
More refactoring. Bad channels shown on vertical scroll bar.
jaeilepp Jul 2, 2015
be345c3
Interactive exclusion.
jaeilepp Jul 2, 2015
e8710b8
Added test for plot_raw_components.
jaeilepp Jul 2, 2015
ceb4a58
Components added to ice.exclude. Docs.
jaeilepp Jul 3, 2015
679f8cc
ICA plotter for epochs.
jaeilepp Jul 6, 2015
c73b540
Updated test.
jaeilepp Jul 6, 2015
318fe9e
Disabled bad epoch selection for ica. Color for excluded components.
jaeilepp Jul 6, 2015
b10c69f
Changed plotters to be called by ica.plot_sources.
jaeilepp Jul 6, 2015
51b5f00
Updated examples and whats_new. Docstrings.
jaeilepp Jul 6, 2015
a075233
Fix to whats_new. Tests.
jaeilepp Jul 7, 2015
1a5752c
Fixes. Components plotted on click to label.
jaeilepp Jul 7, 2015
53e8239
Fixes.
jaeilepp Jul 7, 2015
c83336a
Bad channel selection by clicking label in mne_browse_raw.
jaeilepp Jul 7, 2015
e3a5b65
Separate topomaps for eeg, mag and grad. Fixes.
jaeilepp Jul 8, 2015
063a221
Cleaning. Docs.
jaeilepp Jul 8, 2015
fff6c7f
Docs. Tests. Checks.
jaeilepp Jul 8, 2015
d6d33fa
Customized help dialog. Fixes.
jaeilepp Jul 9, 2015
265992a
Help box for browse_raw.
jaeilepp Jul 9, 2015
a3781a1
Added interactive mode for viewing ica topos.
jaeilepp Jul 10, 2015
3682087
Tests.
jaeilepp Jul 10, 2015
9fc33c6
Reorganizing. Fix.
jaeilepp Jul 10, 2015
5e817d9
Unselecting removes duplicate bads. Removed adding of bad channel man…
jaeilepp Jul 10, 2015
696f369
Component name format. Manual bad channel back to example.
jaeilepp Jul 13, 2015
71daaeb
Fix to exclusion.
jaeilepp Jul 13, 2015
ec50bd4
Fix.
jaeilepp Jul 13, 2015
f8d234f
fixes fixes yeah
dengemann Jul 13, 2015
95e0ac1
Fix to raw sources.
jaeilepp Jul 14, 2015
00f65f5
Fix to channels per view.
jaeilepp Jul 14, 2015
57cd76b
Small fixes.
jaeilepp Jul 14, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/source/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ Changelog

- Add support for BEM solution computation :func:`mne.make_bem_solution` by `Eric Larson`_

- Add ICA plotters for raw and epoch components by `Jaakko Leppakangas`_


BUG
~~~

Expand Down
2 changes: 1 addition & 1 deletion examples/preprocessing/plot_ica_from_raw.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

show_picks = np.abs(scores).argsort()[::-1][:5]

ica.plot_sources(raw, show_picks, exclude=ecg_inds, title=title % 'eog')
ica.plot_sources(raw, show_picks, exclude=eog_inds, title=title % 'eog')
ica.plot_components(eog_inds, title=title % 'eog', colorbar=True)

eog_inds = eog_inds[:n_max_eog]
Expand Down
21 changes: 19 additions & 2 deletions mne/preprocessing/ica.py
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,7 @@ def plot_components(self, picks=None, ch_type=None, res=64, layout=None,
head_pos=head_pos)

def plot_sources(self, inst, picks=None, exclude=None, start=None,
stop=None, title=None, show=True):
stop=None, title=None, show=True, block=False):
"""Plot estimated latent sources given the unmixing matrix.

Typical usecases:
Expand Down Expand Up @@ -1363,15 +1363,32 @@ def plot_sources(self, inst, picks=None, exclude=None, start=None,
The figure title. If None a default is provided.
show : bool
If True, all open plots will be shown.
block : bool
Whether to halt program execution until the figure is closed.
Useful for interactive selection of components in raw and epoch
plotter. For evoked, this parameter has no effect. Defaults to
False.

Returns
-------
fig : instance of pyplot.Figure
The figure.

Notes
-----
For raw and epoch instances, it is possible to select components for
exclusion by clicking on the line. The selected components are added to
``ica.exclude`` on close. The independent components can be viewed as
topographies by clicking on the component name on the left of of the
main axes. The topography view tries to infer the correct electrode
layout from the data. This should work at least for Neuromag data.

.. versionadded:: 0.10.0
"""

return plot_ica_sources(self, inst=inst, picks=picks, exclude=exclude,
title=title, start=start, stop=stop, show=show)
title=title, start=start, stop=stop, show=show,
block=block)

def plot_scores(self, scores, exclude=None, axhline=None,
title='ICA component scores', figsize=(12, 6),
Expand Down
1 change: 1 addition & 0 deletions mne/viz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
plot_epochs_trellis, _drop_log_stats, plot_epochs_psd)
from .raw import plot_raw, plot_raw_psd
from .ica import plot_ica_scores, plot_ica_sources, plot_ica_overlay
from .ica import _plot_sources_raw, _plot_sources_epochs
from .montage import plot_montage
from .decoding import plot_gat_matrix, plot_gat_times
Loading