definetrial in CTF-file

Barbara H ändel barbara.haendel at UNI-TUEBINGEN.DE
Thu Jun 30 20:15:43 CEST 2005


Thank you for you replies,

I probably was too eager to start and looking at the definetrial.m code I just
saw that one can define trials by the stimulus channel so I just went for it
(unfortunately ignoring the read_fcdf_event.m option).

mytrialfun.m works just perfect!

Cheers,
Barbara










Ole Jensen <ole.jensen at FCDONDERS.RU.NL> schrieb:

> Dear Barbara,
>
> 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).
>
> Bests,
>
> Ole
>
>
>
>
> J.M. Schoffelen wrote:
>
> >Dear Barbara,
> >
> >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 = [6] (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
> >backward-compatibility.
> >
> >
> >Hope this helps,
> >
> >Yours,
> >
> >Jan-Mathijs
> >
> >-----Original Message-----
> >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
> >
> >Hi anyone,
> >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
> >using
> >
> >cfg.trialdef.includeTrigger=['6'];
> >
> >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,
> >Barbara
> >
> >
> >
>



--
---------------------------
Barbara Händel
Kognitive Neurologie
Universitätsklinikum Tübingen
Hoppe-Seyler-Str. 3
D72076 Tuebingen

Tel. +49(0)7071-29 82060
Fax +49(0)7071-29 5326




More information about the fieldtrip mailing list