# Reading MNE TFR file in Fieldtrip

**URL:** <https://mne.discourse.group/t/reading-mne-tfr-file-in-fieldtrip/1955>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [September 19, 2019, 7:40am UTC](https://mne.discourse.group/t/reading-mne-tfr-file-in-fieldtrip/1955 "2019-09-19T07:40:10Z")\
**Posts on this page:** 2\
**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:** [September 19, 2019, 7:40am UTC](https://mne.discourse.group/t/reading-mne-tfr-file-in-fieldtrip/1955/1 "2019-09-19T07:40:10Z")

</div>

External Email - Use Caution

Dear FieldTrip and MNE lists,

I have a problem when trying to read a .fif file created with MNE python in  
Fieldtrip.  
It is an AverageTFR type (time-frequency transformed data), created with  
tfr\_multitaper. Does Fieldtrip support reading in TFR files?

When I try to read the epochs file before running the time-frequency  
transformation it works fine:

cfg = [];  
cfg.dataset = my\_file.fif  
ft\_preprocessing(cfg);

Trying to read the TFR file I get the error below (I tried EpochsTFR, too.  
Same problem),  
in fif\_open, tag.kind = -1.9918e+09, but it expects 100:

Error using fiff\_open (line 56)  
file does not start with a file id tag  
Error in fiff\_read\_meas\_info (line 82)  
&nbsp;&nbsp;&nbsp;&nbsp;[fid, tree] = fiff\_open(source);  
Error in ft\_read\_header (line 1842)  
&nbsp;&nbsp;&nbsp;&nbsp;info = fiff\_read\_meas\_info(filename);  
Error in ft\_preprocessing (line 397)  
&nbsp;&nbsp;hdr = ft\_read\_header(cfg.headerfile, 'headerformat', cfg.headerformat,...

Any help is appreciated!  
Thank you,  
Sophie

---

<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:** [September 19, 2019, 7:43pm UTC](https://mne.discourse.group/t/reading-mne-tfr-file-in-fieldtrip/1955/2 "2019-09-19T19:43:21Z")

</div>

External Email - Use Caution

hi Sophie,

I have a problem when trying to read a .fif file created with MNE python in

> Fieldtrip.  
> It is an AverageTFR type (time-frequency transformed data), created with  
> tfr\_multitaper. Does Fieldtrip support reading in TFR files?

not that I know of.

the best person to ask this is maybe Thomas Hartmann

Alex  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20190919/0ed0a71e/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190919/0ed0a71e/attachment.html)
