[FieldTrip] Read mne-python epochs file in fieldtrip

Laetitia Grabot laetitia.grabot at gmail.com
Wed Jan 7 16:20:21 CET 2015


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:

My code:




*%testfilename =
'/neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epoch_test_LG-epo.fif' ;cfg =
[];cfg.dataset = filename;data1 = ft_preprocessing(cfg);*

The error:









*Reference to non-existent field 'FIFFB_EPOCHS'.Error in fiff_read_epochs
(line 43)ep = fiff_dir_tree_find(meas, FIFF.FIFFB_EPOCHS);Error in
ft_read_header (line 1388)        epochs = fiff_read_epochs(filename);Error
in ft_preprocessing (line 396)  hdr = ft_read_header(cfg.headerfile,
'headerformat', cfg.headerformat);*

Thanks again,
Laetitia


2015-01-07 14:28 GMT+01:00 Alexandre Gramfort <
alexandre.gramfort at telecom-paristech.fr>:

> hi,
>
> how do you specify that your fif file is an epochs file and not a raw file?
>
> epochs files should end with -epo.fif
>
> calling fiff_setup_read_raw.m suggests that fieldtrip thinks it's a raw
> file.
>
> HTH
> Alex
>
> On Wed, Jan 7, 2015 at 1:43 PM, Laetitia Grabot
> <laetitia.grabot at gmail.com> wrote:
> > Thanks Denis for the quick answer!
> > My code looks the same than in the tutorial, that's why I don't
> understand
> > the problem. I tried with the latest version of the day of Fieldtrip,
> but I
> > still have the same error.
> >
> > 2015-01-07 12:57 GMT+01:00 Denis-Alexander Engemann
> > <d.engemann at fz-juelich.de>:
> >>
> >> Hi Laetitia,
> >>
> >> here's a tutorial on integrating Fieldtrip with MNE-Python:
> >>
> >> http://fieldtrip.fcdonders.nl/development/integrate_with_mne
> >>
> >> You should make sure to use recent fieldtrip code, the support for
> reading
> >> MNE-Python epochs has been added quite recently to the MNE-Matlab tools
> used
> >> inside Fieldtrip.
> >>
> >> HTH,
> >> Denis
> >>
> >>
> >>
> >>
> >>
> >> 2015-01-07 9:57 GMT+01:00 Laetitia Grabot <laetitia.grabot at gmail.com>:
> >>>
> >>> Dear all,
> >>> I would like to read in fieldtrip a epoch file (.fif) created in
> >>> mne-python. As adviced in the website section "integrate fieldtrip and
> >>> MNE-Python", I used the following piece of code:
> >>>
> >>> cfg = [];
> >>> cfg.dataset = filename;
> >>> data1 = ft_preprocessing(cfg);
> >>>
> >>> And I get the following error:
> >>>
> >>> Error using fiff_setup_read_raw (line 89)
> >>> No raw data in
> >>>
> >>>
> /neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fif
> >>>
> >>> Error in fiff_setup_read_raw (line 89)
> >>>             error(me,'No raw data in %s',fname);
> >>>
> >>> Error in ft_read_header (line 1157)
> >>>         raw = fiff_setup_read_raw(filename);
> >>>
> >>> Error in ft_preprocessing (line 338)
> >>>   hdr = ft_read_header(cfg.headerfile, 'headerformat',
> cfg.headerformat);
> >>>
> >>> It seems that there is a problem at the level of the header of the
> file.
> >>> Any help would be appreciated if someone already solved this issue. By
> the
> >>> way, this piece of code works well to read an evoked file without
> error.
> >>>
> >>> Thanks a lot,
> >>> Best,
> >>> Laetitia G.
> >>>
> >>> _______________________________________________
> >>> fieldtrip mailing list
> >>> fieldtrip at donders.ru.nl
> >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >>
> >>
> >>
> >>
> >>
> >>
> ------------------------------------------------------------------------------------------------
> >>
> >>
> ------------------------------------------------------------------------------------------------
> >> Forschungszentrum Juelich GmbH
> >> 52425 Juelich
> >> Sitz der Gesellschaft: Juelich
> >> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
> >> Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
> >> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
> >> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
> >> Prof. Dr. Sebastian M. Schmidt
> >>
> >>
> ------------------------------------------------------------------------------------------------
> >>
> >>
> ------------------------------------------------------------------------------------------------
> >>
> >>
> >> _______________________________________________
> >> fieldtrip mailing list
> >> fieldtrip at donders.ru.nl
> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >
> >
> >
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >
> >
> > The information in this e-mail is intended only for the person to whom
> it is
> > addressed. If you believe this e-mail was sent to you in error and the
> > e-mail
> > contains patient information, please contact the Partners Compliance
> > HelpLine at
> > http://www.partners.org/complianceline . If the e-mail was sent to you
> in
> > error
> > but does not contain patient information, please contact the sender and
> > properly
> > dispose of the e-mail.
> >
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150107/69d2e0a9/attachment.html>


More information about the fieldtrip mailing list