Skip to content

Commit d48fdf6

Browse files
committed
Remove test (not really needed)
1 parent 4985f17 commit d48fdf6

1 file changed

Lines changed: 2 additions & 22 deletions

File tree

mne/time_frequency/tests/test_multitaper.py

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44

55
import numpy as np
66
import pytest
7-
from numpy.testing import assert_allclose, assert_array_almost_equal
8-
from scipy.fft import rfft
7+
from numpy.testing import assert_array_almost_equal
98

109
from mne.time_frequency import psd_array_multitaper
11-
from mne.time_frequency.multitaper import _mt_spectra, dpss_windows
10+
from mne.time_frequency.multitaper import dpss_windows
1211
from mne.utils import _record_warnings
1312

1413

@@ -79,22 +78,3 @@ def test_adaptive_weights_convergence():
7978
):
8079
psd_array_multitaper(data, sfreq, adaptive=True, max_iter=2)
8180
psd_array_multitaper(data, sfreq, adaptive=True, max_iter=200)
82-
83-
84-
def test_mt_spectra_batched_matches_reference():
85-
"""Test that batched tapered spectra match an explicit channel loop."""
86-
rng = np.random.default_rng(0)
87-
x = rng.standard_normal((3, 17))
88-
sfreq = 200.0
89-
dpss, _ = dpss_windows(17, 2.5, 4, low_bias=False)
90-
91-
x_mt, freqs = _mt_spectra(x, dpss, sfreq)
92-
x = x - np.mean(x, axis=-1, keepdims=True)
93-
ref = np.array([rfft(sig[np.newaxis, :] * dpss, axis=-1) for sig in x])
94-
ref[..., 0] /= np.sqrt(2.0)
95-
if 17 % 2 == 0:
96-
ref[..., -1] /= np.sqrt(2.0)
97-
98-
assert x_mt.shape == ref.shape
99-
assert_allclose(x_mt, ref)
100-
assert freqs.shape[0] == x_mt.shape[-1]

0 commit comments

Comments
 (0)