Skip to content

tfr_array_morlet issues with wavelet #11645

@RainyMeadows

Description

@RainyMeadows

Steps to reproduce

import numpy as np
from mne.time_frequency import tfr_array_morlet

freqs=np.arange(1, 50, 1)
power = tfr_array_morlet(Input_data, 1000, freqs, n_cycles=7.0, output='avg_power') # Input data is a 70 * 128 * 7000 array

Link to data

I can provide actual data of a single (or couple) channel(s), if necessary.

Expected results

An array of shape (n_chans, n_freqs, n_times)

Actual results

ValueError: At least one of the wavelets is longer than the signal. Use a longer signal or shorter wavelets.

The function works ONLY for n_cycles <= 4.

Additional information

Platform: Windows-10-10.0.22621-SP0
Python: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Executable: C:\Users\user\AppData\Local\Programs\Python\Python310\python.exe
CPU: Intel64 Family 6 Model 167 Stepping 1, GenuineIntel: 12 cores
Memory: 15.7 GB

mne: 1.3.1
numpy: 1.24.2 {unknown linalg bindings (threadpoolctl module not found: No module named 'threadpoolctl')}
scipy: 1.10.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    DOCEASYsprint-2023Issues reserved for the 2023 Intermediate Dev Training

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions