help with reading .fif files in Fieldtrip

Shtrahman, Matthew shtrahman.matthew at MEDSCHOOL.PITT.EDU
Mon Mar 12 19:35:20 CET 2007


Hello,

I am new to Fieldtrip and I am having difficulty getting the fieldtrip function DEFINETRIAL to read continuous .fif (Neuromag) files. I have installed the MEG-PD toolbox in my matlab path and regularly use it in my own code to read the same .fif files with no errors. I also have tried copying the toolbox files to the fieldtrip/private directory. Regardless of what I do when I use DEFINETRIAL Matlab crashes and I get the following error:

Warning: Error reading fif-file!
terminate called after throwing an instance of 'MathWorks::System::_utException'

I simply adapted the settings for reading a continuous data set from the tutorial:

cfg = [];
cfg.dataset = 'file.fif';
cfg.hearderfile = 'file.fif';
cfg.datatype = 'continuous';

cfg = definetrial(cfg);


I don't know if it makes a difference, but I have also tried specifying the entire path for the file, working as root, and including various configurations for definetrial included in the tutorial (see end of email).

Does any one have any idea why Fieldtrip cannot read my .fif files?

Many thanks,

Matt


cfg.channel = {'0111'};
cfg.trialdef.eventtype  = 'backpanel trigger';
cfg.trialdef.eventvalue = 3;         % trigger for the FIC condition
cfg.trialdef.prestim    = 1;         % time in seconds before trigger
cfg.trialdef.poststim   = 2;         % time in seconds after trigger



More information about the fieldtrip mailing list