# TFR Multitaper on Raw Data

**URL:** <https://mne.discourse.group/t/tfr-multitaper-on-raw-data/1382>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [December 4, 2017, 11:30pm UTC](https://mne.discourse.group/t/tfr-multitaper-on-raw-data/1382 "2017-12-04T23:30:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [December 4, 2017, 11:30pm UTC](https://mne.discourse.group/t/tfr-multitaper-on-raw-data/1382/1 "2017-12-04T23:30:56Z")

</div>

Hi all,

&nbsp;&nbsp;&nbsp;&nbsp;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](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20171204/cf98cdc8/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [December 4, 2017, 11:39pm UTC](https://mne.discourse.group/t/tfr-multitaper-on-raw-data/1382/2 "2017-12-04T23:39:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [December 6, 2017, 4:28pm UTC](https://mne.discourse.group/t/tfr-multitaper-on-raw-data/1382/3 "2017-12-06T16:28:12Z")

</div>

Thanks for the response,

&nbsp;&nbsp;&nbsp;&nbsp;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
