def test_dpsswavelet():
    """Test DPSS wavelet"""
    freqs = np.arange(5, 25, 3)
    Ws = _dpss_wavelet(1000, freqs=freqs, n_cycles=freqs / 2.,
                       time_bandwidth=4.0, zero_mean=True)

    assert_true(len(Ws) == 3)  # 3 tapers expected

    # Check that zero mean is true
    assert_true(np.abs(np.mean(np.real(Ws[0][0]))) < 1e-5)

    assert_true(len(Ws[0]) == len(freqs))  # As many wavelets as asked for
dataset/ETHPy150Open mne-tools/mne-python/mne/time_frequency/tests/test_tfr.py/test_dpsswavelet/original