too many trials

Robert Oostenveld r.oostenveld at FCDONDERS.RU.NL
Sun Feb 18 12:23:49 CET 2007


Hi Sameer,

On 16 Feb 2007, at 18:12, Sameer Walawalkar wrote:
> I am close to fixing the problem with too many trials, principaly
> by writing another function which takes the cfg output from
> definetrial, discards the trial definitions in cfg.trl and replaces
> it with the correct set based on my reading the trigger channel.

What you have done is that you have created your own 'trialfun'. That
is perfectly acceptable, and actually FT is explicitely designed to
support that. See also http://www2.ru.nl/fcdonders/fieldtrip/doku.php?
id=fieldtrip:documentation:tutorial:preprocessing at the bottom for
an example. Another example is at
http://www2.ru.nl/fcdonders/fieldtrip/doku.php?
id=fieldtrip:documentation:detect_the_muscle_activity_in_an_emg_channel_
and_use_that_as_trial_definition

In custom trialfuns, people can use whatever they want to make the
"trl" structure, and use read_fcdc_event of they wish or not.

You can still use definetrial by
   cfg.trialfun = 'your_function'
Actually the default is
   cfg.trialfun = 'trialfun_general'
and trialfun_general is using the data-independent read_fcdc_event.
Feel free to add your trialfun to the example matlab scripts section
on the documentation wiki.

> But I have left cfg.event untouched.
> My question is, for the proper working of DICS (and other
> processing) once the trials have been defined, do I have to make
> any changes to cfg.event at all or I could proceed.

cfg.event is only stored for later reference by yourself. Other FT
functions (except for "recodeevent", which is not included in the ftp
version sofar) do not use it.

Robert



More information about the fieldtrip mailing list