Skip to content

Commit

Permalink
BUG: Fix Xdawn check (mne-tools#8528)
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner authored Nov 15, 2020
1 parent cedae25 commit 0473162
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mne/channels/tests/test_interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def test_interpolation_meg():
"""Test interpolation of MEG channels."""
# speed accuracy tradeoff: channel subselection is faster but the
# correlation drops
thresh = 0.7
thresh = 0.68

raw, epochs_meg = _load_data('meg')

Expand Down
5 changes: 1 addition & 4 deletions mne/preprocessing/tests/test_xdawn.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
create_info, EpochsArray)
from mne.decoding import Vectorizer
from mne.io import read_raw_fif
from mne.utils import requires_sklearn, run_tests_if_main, check_version
from mne.utils import requires_sklearn, check_version
from mne.preprocessing.xdawn import Xdawn, _XdawnTransformer

base_dir = op.join(op.dirname(__file__), '..', '..', 'io', 'tests', 'data')
Expand Down Expand Up @@ -351,6 +351,3 @@ def test_xdawn_decoding_performance():
for i in range(len(relev_patterns)):
r, _ = stats.pearsonr(relev_patterns[i, :], mixing_mat[0, :])
assert np.abs(r) > 0.99


run_tests_if_main()
2 changes: 1 addition & 1 deletion mne/viz/ica.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def _plot_ica_properties(pick, ica, inst, psds_mean, freqs, n_trials,
else:
x = np.linspace(ymin, ymax, 50)
kde_ = kde(x)
kde_ /= kde_.max()
kde_ /= kde_.max() or 1.
kde_ *= hist_ax.get_xlim()[-1] * .9
hist_ax.plot(kde_, x, color="k")
hist_ax.set_ylim(ymin, ymax)
Expand Down

0 comments on commit 0473162

Please sign in to comment.