<div dir="ltr"><div><div><div>I just realized that I was not using the recent version I just downloaded (problem of multiple fieldtrip paths) but now that is ok. I also tried to change the path name to '-epo.fif'. Yet, I still have an error:<br><br>My code:<br><b>%test<br>filename = '/neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epoch_test_LG-epo.fif' ;<br>cfg = [];<br>cfg.dataset = filename;<br>data1 = ft_preprocessing(cfg);</b><br><br></div>The error: <br><b>Reference to non-existent field 'FIFFB_EPOCHS'.<br><br>Error in fiff_read_epochs (line 43)<br>ep = fiff_dir_tree_find(meas, FIFF.FIFFB_EPOCHS);<br><br>Error in ft_read_header (line 1388)<br>        epochs = fiff_read_epochs(filename);<br><br>Error in ft_preprocessing (line 396)<br>  hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat);</b><br><br></div>Thanks again,<br></div>Laetitia<br><div><div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-07 14:28 GMT+01:00 Alexandre Gramfort <span dir="ltr"><<a href="mailto:alexandre.gramfort@telecom-paristech.fr" target="_blank">alexandre.gramfort@telecom-paristech.fr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hi,<br>
<br>
how do you specify that your fif file is an epochs file and not a raw file?<br>
<br>
epochs files should end with -epo.fif<br>
<br>
calling fiff_setup_read_raw.m suggests that fieldtrip thinks it's a raw file.<br>
<br>
HTH<br>
Alex<br>
<div><div class="h5"><br>
On Wed, Jan 7, 2015 at 1:43 PM, Laetitia Grabot<br>
<<a href="mailto:laetitia.grabot@gmail.com">laetitia.grabot@gmail.com</a>> wrote:<br>
> Thanks Denis for the quick answer!<br>
> My code looks the same than in the tutorial, that's why I don't understand<br>
> the problem. I tried with the latest version of the day of Fieldtrip, but I<br>
> still have the same error.<br>
><br>
> 2015-01-07 12:57 GMT+01:00 Denis-Alexander Engemann<br>
> <<a href="mailto:d.engemann@fz-juelich.de">d.engemann@fz-juelich.de</a>>:<br>
>><br>
>> Hi Laetitia,<br>
>><br>
>> here's a tutorial on integrating Fieldtrip with MNE-Python:<br>
>><br>
>> <a href="http://fieldtrip.fcdonders.nl/development/integrate_with_mne" target="_blank">http://fieldtrip.fcdonders.nl/development/integrate_with_mne</a><br>
>><br>
>> You should make sure to use recent fieldtrip code, the support for reading<br>
>> MNE-Python epochs has been added quite recently to the MNE-Matlab tools used<br>
>> inside Fieldtrip.<br>
>><br>
>> HTH,<br>
>> Denis<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> 2015-01-07 9:57 GMT+01:00 Laetitia Grabot <<a href="mailto:laetitia.grabot@gmail.com">laetitia.grabot@gmail.com</a>>:<br>
>>><br>
>>> Dear all,<br>
>>> I would like to read in fieldtrip a epoch file (.fif) created in<br>
>>> mne-python. As adviced in the website section "integrate fieldtrip and<br>
>>> MNE-Python", I used the following piece of code:<br>
>>><br>
>>> cfg = [];<br>
>>> cfg.dataset = filename;<br>
>>> data1 = ft_preprocessing(cfg);<br>
>>><br>
>>> And I get the following error:<br>
>>><br>
>>> Error using fiff_setup_read_raw (line 89)<br>
>>> No raw data in<br>
>>><br>
>>> /neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fif<br>
>>><br>
>>> Error in fiff_setup_read_raw (line 89)<br>
>>>             error(me,'No raw data in %s',fname);<br>
>>><br>
>>> Error in ft_read_header (line 1157)<br>
>>>         raw = fiff_setup_read_raw(filename);<br>
>>><br>
>>> Error in ft_preprocessing (line 338)<br>
>>>   hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat);<br>
>>><br>
>>> It seems that there is a problem at the level of the header of the file.<br>
>>> Any help would be appreciated if someone already solved this issue. By the<br>
>>> way, this piece of code works well to read an evoked file without error.<br>
>>><br>
>>> Thanks a lot,<br>
>>> Best,<br>
>>> Laetitia G.<br>
>>><br>
>>> _______________________________________________<br>
>>> fieldtrip mailing list<br>
>>> <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
>>> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> ------------------------------------------------------------------------------------------------<br>
>><br>
>> ------------------------------------------------------------------------------------------------<br>
>> Forschungszentrum Juelich GmbH<br>
>> 52425 Juelich<br>
>> Sitz der Gesellschaft: Juelich<br>
>> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498<br>
>> Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher<br>
>> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),<br>
>> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,<br>
>> Prof. Dr. Sebastian M. Schmidt<br>
>><br>
>> ------------------------------------------------------------------------------------------------<br>
>><br>
>> ------------------------------------------------------------------------------------------------<br>
>><br>
>><br>
>> _______________________________________________<br>
>> fieldtrip mailing list<br>
>> <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
>> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> fieldtrip mailing list<br>
> <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
><br>
><br>
</div></div>> The information in this e-mail is intended only for the person to whom it is<br>
> addressed. If you believe this e-mail was sent to you in error and the<br>
> e-mail<br>
> contains patient information, please contact the Partners Compliance<br>
> HelpLine at<br>
> <a href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in<br>
> error<br>
> but does not contain patient information, please contact the sender and<br>
> properly<br>
> dispose of the e-mail.<br>
<div class="HOEnZb"><div class="h5">><br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
</div></div></blockquote></div><br></div>