TWiki> BrainStreamDocs Web>BrainStreamDocs? >DocsSectionsBuildingExperiments (revision 2)EditAttach

Building Experiments

An experiment in BrainStream consists of experiment definition tables, block files and common block files, and, in some instances, user defined functions. In the following, each of these components will be discussed.

Experiment definition tables

The experiment definition tables (.edt) form the core of your BCI experiment. In these tables is specified which actions need to be executed at what time. For each experiment, three different tables are needed: the Actions table, the Data Selection table and the Dictionary table. Together, the experiment definition tables are called the experiment definition file. Brainstream has its own internal editor for creating the tables, however, for backwards compatibility reasons it also supports excel files (.xls extensions only) where each table is put in a different sheet, or a set of separate text files (.txt), one for each table. In the following, the experiment definition tables will be discussed in more detail.

Actions table

Table 1 is an example of an Actions table:

marker time function feval looptick client var1 ........ varN
mrk1 EVENT fnc1,fnc2       get,put ........ $self+1
mrk2 2 fnc3       [],put ........ get,put

Table 1: Actions table

The first three columns in an Actions table are reserved to specify marker, time, and function. The three following columns feval, client, and looptick are optional and will be discussed later. Although the order of these first columns in the table is arbitrary, it is best to keep it as described here. All subsequent columns are free to use for an arbitrary number of user specified variables (stored internally in BrainStream's user state, i.e. the global variables).

The first column of the Actions table is the marker column. The marker column contains all markers that elicit the execution of certain actions. For example, marker mrk1 in table 1 could mark a response made by the participant. Perhaps the experimenter wants the response to be followed by feedback about the response. In that case, marker mrk1 should be in the marker column of the actions table.

The second column (time) specifies at which timepoints, relative to the time of the incoming marker, actions should be executed. The exact timing of execution can be specified in several ways. The action can be executed directly at marker onset (EVENT), when a certain amount of data becomes available (DATA), some time after the marker, or when another marker arrives (see table 2). For example, table 1 specifies that certain actions are executed at the onset of marker mrk1 and two seconds after marker mrk2.

EVENT
DATA
a number
another mrk
Executed at marker onset
Executed as data becomes available
Executed number seconds after marker onset
Executed at onset of marker mrk

Table 2: specifying time of action execution

The third column (function) can contain one or more functions that will be executed after the specified marker and at the specified time. In table 1, fnc1 and fnc2 will be executed (in that order) as soon as marker mrk1 arrives. Two seconds after the onset of marker mrk2, fnc3 is executed. A number of BrainStream functions can be specified in the function column. Alternatively, you can write your own user defined functions, which will be discussed below.

Edit | Attach | Print version | History: r35 | r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 21 Sep 2011 - 08:37:12 - MarjoleinVanDerWaal
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback