mne epochs to fieldtrip

Hello,

I try to import mne epochs file in fieldtrip.
fiff_file = 'ttt-epo.fif');
cfg = [];
cfg.dataset = fiff_file;
data1 = ft_preprocessing(cfg);

It worked before, but with the current versions of MNE/fieldtrip I get an
error:
Reference to non-existent field 'FIFFB_EPOCHS'.

Could somebody help to fix this problem?

Elena
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20161024/77baa008/attachment.html

hi Elena,

we don't maintain the fieldtrip reader for mne files just the
mne-matlab toolbox.

you should post an issue on the fieldtrip github page.

maybe we can help but we'll need enough info to replicate the bug.

Alex

Hi Elena

I suspect it to be an error in the MNE Matlab code, as FieldTrip itself does not use the FIFFB_EPOCHS field.

mac011> cd /Users/roboos/matlab/fieldtrip/fileio/
mac011> grep FIFFB_EPOCHS *.m
mac011> grep FIFFB_EPOCHS private/*.m
[both empty]

mac011> cd /Users/roboos/matlab/fieldtrip/external/mne
mac011> grep FIFFB_EPOCHS *.m
fiff_define_constants.m:FIFF.FIFFB_EPOCHS = 122;
fiff_read_epochs.m:ep = fiff_dir_tree_find(meas, FIFF.FIFFB_EPOCHS);

Could you follow this up by posting the detailled error message on https://github.com/mne-tools/mne-matlab, i.e. create an issue there on github and post details of the error message? Please do mention @robertoostenveld and @agramfort in the issue, then we?ll both get notified.

Oh, and prior to that: could you check that you are using the latest version of the mne-matlab toolbox? One version is included in fieldtrip/external/mne, but that might not be the latest one, and it might also not be the one you are actually using.

Robert

I did. Hopefully it worked.
I add the text here in case it did not.

Elena

Hello,
CC @robertoostenveld <https://github.com/robertoostenveld>, @agramfort
<https://github.com/agramfort>

This seems to be MNE-Fieldtrip format compatibility issue.

I tried to import -epo.fif file created in MNE python, latest version on
today (v13) using fieldtrip cookbook:

%%%%%%%%%%%%%%%%%%%%%%%
fiff_file = '/MYPATH/myfile-epo.fif';
cfg = []
cfg.dataset = fiff_file;
data1 = ft_preprocessing(cfg);
%%%%%%%%%%%%%%%%%%%%%%%

I got en error:
Reference to non-existent field 'FIFFB_EPOCHS'.

Error using fiff_read_epochs (line 46)
Could not find epochs data

Error in fiff_read_epochs (line 46)
error(me,'Could not find epochs data');

Error in ft_read_header (line 1665)
epochs = fiff_read_epochs(filename);

Error in ft_preprocessing (line 397)
hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat,
'coordsys', cfg.coordsys, 'coilaccuracy', cfg.coilaccuracy);

I use the latest Fieldtrip version fieldtrip-lite-20161024. It seems that
something is wrong with the data structure...?

Elena Orekhova