[Mne_analysis] mn.time_frequency.tfr_array_stockwell
Paul Fishback
fishbacp at mail.gvsu.edu
Wed Jul 8 17:15:22 EDT 2020
External Email - Use Caution
Hello,
I'm reading in an EDF (not FIF) file and would like to compute the
Stockwell Transform for a single channel using
time_frequency.tfr_array_stockwell as
described at
https://mne.tools/stable/generated/mne.time_frequency.tfr_array_stockwell.html?highlight=mne%20time_frequency%20tfr_stockwell
.
It says that the last dimension of my data is time. I'm not sure what that
means, but I interpret it to be that, for a single channel, the first
column consists of signal readings and the second consists of corresponding
times.
Here's what I've tried for the first channel of my signal, which is 10
minutes long with sampling frequency 200
import numpy as np
import mne as mn
raw=mn.io.read_raw_edf('/Users/fishbacp/Desktop/EEG_file.edf', preload=True)
Fs=raw.info['sfreq']
data,times=raw[:,:]
signal=np.array([data[0,:],times]).T #Creates a number_of_times -by- 2
array, whose second column consists of times.
min_freq=5
max_freq=100
st_power, itc, freqs=mn.time_frequency.tfr_array_stockwell(signal,
Fs,fmin=min_freq,fmax=max_freq)
This results in the following error:
line 172, in tfr_array_stockwell
n_out = data.shape[2] // decim + bool(data.shape[2] % decim)
IndexError: tuple index out of range
I gather that I'm not interpreting how my input signal should be formatted.
Thanks for any assistance you can provide.
Paul F.
--
Professor of Mathematics, Grand Valley State University
Department of Mathematics (MAK C-2-408)
Grand Valley State University
1 Campus Dr.
Allendale, MI 49401
fishbacp at mail.gvsu.edu
616.331.2040
616.331.3120 (fax)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200708/b0cd525d/attachment.html
More information about the Mne_analysis
mailing list