[FieldTrip] error in reading epoched fif files

Bushra Riaz Syeda bushra.riaz at gu.se
Thu Mar 24 13:38:07 CET 2016


Hello,
I found the problem with reading epoched fif files


This code snippet


cfg = [];

cfg.dataset = Epochfilename;

epoch1= ft_preprocessing(cfg);


was giving the following error


Error using fiff_read_epochs (line 46)

Could not find epochs data

This error was caused by this line of code (line 43 in fiff_read_epochs)

ep = fiff_dir_tree_find(meas, FIFF.FIFFB_EPOCHS);

because the returned structure ep was empty

The value of this constant FIFF.FIFFB_EPOCHS is 122 , and in meas there was no block with such id therefore ep was empty

The epoched data was in the block with the id 373

By changing line 43 in fiff_read_epochs by this
ep = fiff_dir_tree_find(meas, 373);
I am able to load the epoched data

Kind regards
Bushra Riaz


?
________________________________
From: Bushra Riaz Syeda
Sent: Monday, March 14, 2016 7:30 AM
To: fieldtrip at science.ru.nl
Subject: [FieldTrip] error in reading epoched fif files


My bad. I should have explained the problem

I am using this code to read epoched fif files created with latest version of mne-python as was explained in fieldtrip tutorial (http://www.fieldtriptoolbox.org/development/integrate_with_mne)

The sample epoched file can be downloaded from this link

https://www.dropbox.com/s/3wy7clqu8o4a6wp/test-epo.fif?dl=0?



cfg = [];

cfg.dataset = Epochfilename;

epoch1= ft_preprocessing(cfg);


and I am getting the following error


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 1601)

        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);


Kind regards

Bushra Riaz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160324/427efcb8/attachment-0001.html>


More information about the fieldtrip mailing list