TFR Multitaper on Raw Data

Hi all,

    Is there a way or best way to apply the tfr multitaper to an entire raw channel?

Thanks,

Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20171204/cf98cdc8/attachment.html

Hi Alex,

You can do:

# retrieve data as numpy array:
raw_array = raw.load_data().pick_channels([picked_channel,]).get_data()

# apply time frequency decomposition:
freqs = np.logspace(0, 1, 10)
sfreq = raw.info['sfreq']
tfr = mne.time_frequency.tfr_array_multitaper([raw_array], sfreq=sfreq,
freqs=freqs)

Best,

Jean-R?mi

1 Like

Thanks for the response,

    I am realizing now that the problem is with my time_bandwidth parameter. Since this is not for epochs but for the whole data, I am setting this to 30.0 but I get an index error from the tapers in _make_dpss. Is there some limit to the time_bandwidth? I am replicating someone else's multitaper parameters so if possible it would be great to be able to have this time_bandwidth.

Thanks,

Alex