Skip to content

Commit

Permalink
FIX : remove induced_power in csd test
Browse files Browse the repository at this point in the history
  • Loading branch information
agramfort committed Aug 21, 2014
1 parent b96f288 commit 87fd896
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions mne/time_frequency/tests/test_csd.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import numpy as np
from nose.tools import (assert_raises, assert_equal, assert_almost_equal,
assert_true)
from nose.tools import assert_raises, assert_equal, assert_true
from numpy.testing import assert_array_equal
from os import path as op
import warnings
Expand All @@ -9,7 +8,7 @@

from mne.io import Raw
from mne.utils import sum_squared
from mne.time_frequency import compute_epochs_csd, induced_power
from mne.time_frequency import compute_epochs_csd, tfr_morlet

warnings.simplefilter('always')
base_dir = op.join(op.dirname(__file__), '..', '..', 'io', 'tests', 'data')
Expand Down Expand Up @@ -74,11 +73,8 @@ def test_compute_epochs_csd():

# Computing induced power for comparison
epochs.crop(tmin=0.04, tmax=0.15)
with warnings.catch_warnings(record=True): # deprecation
warnings.simplefilter('always')
power, _ = induced_power(epochs.get_data(), epochs.info['sfreq'], [10],
n_cycles=0.6)
power = np.mean(power, 2)
tfr = tfr_morlet(epochs, freqs=[10], n_cycles=0.6, return_itc=False)
power = np.mean(tfr.data, 2)

# Maximum PSD should occur for specific channel
max_ch_power = power.argmax()
Expand Down

0 comments on commit 87fd896

Please sign in to comment.