help with reading .fif files in Fieldtrip

Lauri Parkkonen lauri at NEURO.HUT.FI
Mon Mar 12 21:23:18 CET 2007


Hi Matthew,

Which Matlab version you're using? With a 7.x Matlab and the newest
meg-pd (a.k.a FiffAccess) toolbox you should be able to read fif-files
without extra configurations, however, the older 6.x Matlabs with the
older meg-pd toolbox require setting the LD_ASSUME_KERNEL environment
variable before starting Matlab. Using a 7.x Matlab with the older
meg-pd package is likely to give the error messages you're quoting in
your email.

Best regards,
Lauri


Shtrahman, Matthew wrote:
> 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