definetrial in CTF-file
ole.jensen at FCDONDERS.RU.NL
Thu Jun 30 17:40:30 CEST 2005
I suggest you also have a look at the example in the appendix of the
EventRelatedProcessing.pdf tutorial. There you will find an example on
how to define your own trialfun.m (mytrialfun.m) - it will allow to you
to inspect the events etc (e.g. the event structure/array will have the
info on back/front panel, the available event/stimulus values etc).
J.M. Schoffelen wrote:
>Please have a close look at the documentation of definetrial, by typing help
>definetrial. I think it is quite clearly documented:
>>From about line 28 it reads:
>% Simple trial definitions (e.g. based on a trigger alone) are supported by
>% DEFINETRIAL itself. For this, the general and dataformat-independent way
>% of handling trials is by relying on the READ_FCDC_EVENT function to
>% collect all event information (such as triggers) from your dataset and
>% select trials based on those events. This is implemented in DEFINETRIAL as
>% cfg.trialdef.eventtype = 'string'
>% cfg.trialdef.eventvalue = number, string or list with numbers or strings
>% cfg.trialdef.prestim = 0.300 latency in seconds (optional)
>% cfg.trialdef.poststim = 0.700 latency in seconds (optional)
>So, this is the most up-to-date implementation of the function,
>You have to specify your cfg.trialdef.eventtype as 'frontpanel trigger'.
>In this case it selects the triggers from the frontpanel.
>Then just take cfg.trialdef.eventvalue =  (no ''!). What remains is the
>optional time-window with respect to your relevant trigger. This is not
>necessary if you have a trial-based collection, as far as I know.
>The includeTrigger-field is also usable, but it is only left in for
>Hope this helps,
>From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf
>Of Barbara H ändel
>Sent: Thursday, June 30, 2005 3:56 PM
>To: FIELDTRIP at NIC.SURFNET.NL
>Subject: [FIELDTRIP] definetrial in CTF-file
>I just started today to use fieldtrip with ctf.data but already have a
>Problem I don't seem to be able to solve myself. So if anyone has some
>advice I would be very thankful.
>I tried to execute preprocessing.m however when I define my relevant trials
>I get the error message that no trials are beeing defined.
>Now, looking into the code of definetrial.m in line 407 the variable
>“triggerchan” is defined by triggerChan = read_ctf_trigger(cfg.dataset);
>The problem is that it seems like that only the “backpanel” is extracted
>from read_ctf_trigger however I would need the “frontpanel”. So
>definetrial.m later on only finds “triggerchan” with loads of zeros and can
>not match my defined trigger.
>Is there any reason why only one variable is taken instead of two (as it is
>done at line 455 in definetrial.m)?
>Thankful for any suggestion,
More information about the fieldtrip