[FieldTrip] Problem with FT_DEFINETRIAL

Stephen Politzer-Ahles politzerahless at gmail.com
Sun Mar 25 12:11:28 CEST 2012


Hello Jarmo,

I haven't tried importing Brain Vision files into FieldTrip myself, but
based on the code you sent it looks like the problem may be that you're
missing cfg.trialdef.eventvalue (which is used to tell FieldTrip which
triggers to select), cfg.trialdef.prestim, and cfg.trialdef.poststim . See
the example at
http://fieldtrip.fcdonders.nl/tutorial/preprocessing#reading_and_preprocessing_the_interesting_trials.

If what you are trying to do is import all trials from all triggers in the
file, I think you have to define your own "trialfun" function to do that
(although I haven't tried this myself so I'm not sure).
http://fieldtrip.fcdonders.nl/reference/ft_definetrial has some more
information.

Best,
Steve Politzer-Ahles
University of Kansas


Message: 1
> Date: Thu, 22 Mar 2012 17:14:46 +0100 (CET)
> From: Jarmo Kontinen <Jarmo.Kontinen at ruhr-uni-bochum.de>
> To: <fieldtrip at donders.ru.nl>
> Subject: [FieldTrip] Problem with FT_DEFINETRIAL
> Message-ID:
>        <
> permail-201203221614466509e8c700002494-Jarmo.Kontinen at msgid.mail.ruhr-uni-bochum.de
> >
>
> Content-Type: text/plain; charset=us-ascii
>
> Dear all,
> I am trying to import EEG subject averages into Field Trip. The files are
> exported with the Brainvision Analyzer in binary form
> :subject10_konPro2002.dat and subject10_konPro2002.vhdr.
> I have a problem with turning the data into the Field Trip data-structure.
> I
> am following instructions given on this forum on one similar post. What I
> have
> tried is the following:
>
> cfg=[];
> cfg.trialdef.eventtype='average'
> cfg.dataset='subject10_konPro2002.dat'
>
>  cfg=ft_definetrial(cfg);
>
> Warning: no trialfun was specified, using trialfun_general
> > In ft_definetrial at 123
> evaluating trialfunction 'trialfun_general'
> reading the events from 'subject10_konPro2002.vhdr'
> ??? Error using ==> ft_definetrial at 176
> no trials were defined, see FT_DEFINETRIAL for help
>
> I am grateful for all the help.
> Thanks,
> Jarmo Kontinen
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120325/df4ce70a/attachment-0002.html>


More information about the fieldtrip mailing list