-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Corrmap #1795
Add Corrmap #1795
Changes from 1 commit
1912bc9
e9d0e23
73f51db
4f0019b
9b66382
a545bf9
5ccb793
5e0342b
c4cf10c
cedd88f
b3a91f4
d334dd5
e37b270
f86baff
28385cc
2cb1cef
7a7a136
71d9c51
da0c2f5
e43dc25
4abd7fa
a381423
d0f5902
504c983
191c167
aae9f66
fbf89bd
4fe301a
ea800e1
9b93666
daf2f17
8de11d5
52137a7
a1e9319
47cfdb7
0c2e6d6
ca57023
5d1ac0e
b7ff4a2
9ab4384
5c02bfb
26c6303
0f65fe0
5dc3fef
de27bfa
5b9ec57
210fe00
224189a
4781246
d66bb6b
c63c16c
2f82e21
f352927
5f91e19
3656f62
3f02722
8cdd181
26be7f3
664951c
b949ab8
57bc753
877a4db
54c9a4b
0f500db
3076bd1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2083,7 +2083,7 @@ def _band_pass_filter(ica, sources, target, l_freq, h_freq, verbose=None): | |
|
||
@verbose | ||
def corrmap(icas, template, threshold="auto", name="bads", | ||
plot=True, inplace=False, ch_type="eeg"): | ||
plot=True, inplace=False, ch_type="eeg"): | ||
|
||
"""Corrmap (Viola et al. 2009 Clin Neurophysiol) identifies the best group | ||
match to a supplied template. Typically, feed it a list of fitted ICAs and | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For consistency, put a summary here that fits in the first line, mov detaile description 1 line down and add a blank line in between |
||
|
@@ -2189,10 +2189,9 @@ def _plot_corrmap(data, subjs, indices, ch_type, name): | |
from mne.viz.utils import (_prepare_trellis, tight_layout, | ||
_setup_vmin_vmax) | ||
from mne.viz.topomap import (_prepare_topo_plot, _check_outlines, | ||
_make_image_mask, plot_topomap) | ||
plot_topomap) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why nested imports? do we have circular import issue here? if so, you should do relative imports using .. |
||
import matplotlib.pyplot as plt | ||
from mpl_toolkits.axes_grid import make_axes_locatable | ||
|
||
title = 'Detected components of type ' + name | ||
picks = list(range(len(data))) | ||
|
@@ -2245,10 +2244,10 @@ def _plot_corrmap(data, subjs, indices, ch_type, name): | |
target = all_maps[template[0]][template[1]] | ||
|
||
if plot is True: | ||
t = 'Template IC (Subj. ' + str(template[1]) + ')' | ||
ttl = 'Template IC (Subj. ' + str(template[1]) + ')' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ... string formatting |
||
icas[template[0]].plot_components(picks=template[1], | ||
ch_type=ch_type, | ||
title=t) | ||
title=ttl) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this one too |
||
|
||
# first run: use user-selected map | ||
if isinstance(threshold, (int, float)): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty line not needed