Difference: DocsSectionsBuildingExperiments (31 vs. 32)

Revision 3217 Nov 2014 - Main.PhilipVanDenBroek

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
<---Start1--->

Building Experiments

Line: 12 to 12
 

Experiment definition tables

Changed:
<
<
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 DataSelection 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 where each table is put in a different sheet. In the following, the experiment definition tables will be discussed in more detail.
>
>
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, four different tables are needed: the Actions table, the DataSelection table, the Dictionary table, and Trigger 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 where each table is put in a different sheet. In the following, the experiment definition tables will be discussed in more detail.
 

Actions table

Line: 40 to 40
  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 defined variables (more on this later).
Added:
>
>

Trigger table

While actions give meaning to the events, the Trigger table implements the logic of the experiment program flow. It defines how each event possibly triggers the execution of other events. Conditional expressions implement runtime dependent triggered events, made possible by allowing global variables to be used in these expressions. An example would be to either trigger the next_trial event or next_sequence event based on the current state of the num_acquired_trials variable. Table 3 demonstrates corresponding Trigger table.

marker time fire datasource delay condition
trial EVENT next_trial eeg 0 num_acquired_trials <= 10
trial EVENT next_sequence eeg 0 num_acquired_trials > 10

Table 4: Trigger table

As long as the number of acquired trials doesn't exceed 10, a next_trial event is triggered by the trial event, otherwise a next_sequence event is triggered. If no conditional expression is specified, corresponding event will always be triggered. Optionally, a delay can be specified, which value is default referenced relatively against the events timepoint time that triggers it. If it should be referenced against actual moment of execution of the event, instead specify for the delay: 0,'now'. The datasource is only relevant if corresponding triggered event defines data (it has a DATA timepoint) in order to collect the correct data epochs. For example useful if a single marker triggers periodic data collection or a limited number of data epochs as determined by logic incorporated in the conditional expression.

 

DataSelection table

Line: 53 to 65
 
mrk2 0.5 mrk3+1  
mrk4 0 mrk4, mrk5, 3  
Changed:
<
<
Table 3: DataSelection table
>
>
Table 4: DataSelection table
  The table above shows an example of a data selection table. The data selection of mrk1 will start half a second before onset of the marker and end 2 seconds after the onset.The data selection of mrk2 will start half a second after the onset of mrk2 and will end one second after marker mrk3 arrives. Marker mrk4 will start data selection immediately and this will end when a new marker mrk4 arrives. In other words, after the first occurrence of marker mrk4, every new marker mrk4 will both end the previous period of data selection and start a new period. This sequence ends when marker mrk5 arrives or when no markers come in for 3 seconds. Note that if ending markers do not set the end of data selection and no timeout is specified, corresponding actions (with timepoint DATA) will never be executed.
Line: 81 to 93
 

Preventing conflicts with imported tables

Changed:
<
<
BrainStream supports the use of imported tables. An example of an imported table is the import-table for bad channel detection. Alternatively, it is possible to build your own imported table.
>
>
BrainStream supports the use of imported tables. Alternatively, it is possible to build your own imported table.
  When BrainStream is started, all experiment definition tables that are used in the experiment - including the imported tables - are combined in a process called table expansion. This means that all Action tables will be integrated into a single Action table, and the same is true for the DataSelection and Dictionary tables. Importantly, the information in the individual tables should not conflict. For example, you should prevent double definitions of marker names or numbers in the Dictionary tables.
 
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