Changes

Jump to navigation Jump to search
no edit summary
Line 15: Line 15:  
The Actions table specifies the actions that should be executed for each marker. Table 1 is an example of an Actions table:
 
The Actions table specifies the actions that should be executed for each marker. Table 1 is an example of an Actions table:
   −
{| border="1"
+
{| class="wikitable"
 
|-
 
|-
 
| <strong>marker</strong> || <strong>time</strong> || <strong>function</strong> || <strong>feval</strong> || <strong>looptick</strong> || <strong>client</strong>  
 
| <strong>marker</strong> || <strong>time</strong> || <strong>function</strong> || <strong>feval</strong> || <strong>looptick</strong> || <strong>client</strong>  
Line 45: Line 45:  
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 <tt>next_trial</tt> event or <tt>next_sequence</tt> event based on the current state of the <tt>num_acquired_trials</tt> variable. Table 3 demonstrates corresponding 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 <tt>next_trial</tt> event or <tt>next_sequence</tt> event based on the current state of the <tt>num_acquired_trials</tt> variable. Table 3 demonstrates corresponding Trigger table.
   −
{| border="1"
+
{| class="wikitable"
 
|-
 
|-
 
| <strong>marker</strong> || <strong>time</strong> || <strong>fire</strong> || <strong>datasource</strong> || <strong>delay</strong>  || <strong>condition</strong>  || <strong>triggeraction</strong>  
 
| <strong>marker</strong> || <strong>time</strong> || <strong>fire</strong> || <strong>datasource</strong> || <strong>delay</strong>  || <strong>condition</strong>  || <strong>triggeraction</strong>  
Line 71: Line 71:  
The DataSelection table consists of a marker column, a begindata column, and an enddata column. Data selection may start before or after onset of the marker, indicated by negative and positive numbers respectively. The end of data selection can be before or after the onset of the marker specified in the marker column, when a new marker arrives (with or without extra timing), or when nothing happens for a specified period of time (timeout). If multiple endtimes, seperated by a comma, are specified, the one that happens first will end the data selection.
 
The DataSelection table consists of a marker column, a begindata column, and an enddata column. Data selection may start before or after onset of the marker, indicated by negative and positive numbers respectively. The end of data selection can be before or after the onset of the marker specified in the marker column, when a new marker arrives (with or without extra timing), or when nothing happens for a specified period of time (timeout). If multiple endtimes, seperated by a comma, are specified, the one that happens first will end the data selection.
   −
{| border="1"
+
{| class="wikitable"
 
|-
 
|-
 
| <strong>marker</strong> || <strong>begintime</strong> || <strong>endtime</strong> || <strong>datasource</strong>  
 
| <strong>marker</strong> || <strong>begintime</strong> || <strong>endtime</strong> || <strong>datasource</strong>  
Line 100: Line 100:  
The datasource column is optional. If multiple data sources are used in the experiment, the datasource column specifies for which data source the dictionary information is meant. If only one datasource is involved, this column can be left out and BrainStream will apply the definitions to the single data source.
 
The datasource column is optional. If multiple data sources are used in the experiment, the datasource column specifies for which data source the dictionary information is meant. If only one datasource is involved, this column can be left out and BrainStream will apply the definitions to the single data source.
   −
{| border="1"
+
{| class="wikitable"
 
|-
 
|-
 
| <strong>marker</strong> || <strong>type</strong> || <strong>value</strong> || <strong>datasource</strong>  
 
| <strong>marker</strong> || <strong>type</strong> || <strong>value</strong> || <strong>datasource</strong>  
Line 128: Line 128:  
If a function needs a user defined variable, you first need to get it from the [[BrainStreamImportantConcepts#SecVariables|global variables]]. This is done by putting a &lsquo;get&rsquo; statement in the corresponding cell. For example, consider the following Actions table:
 
If a function needs a user defined variable, you first need to get it from the [[BrainStreamImportantConcepts#SecVariables|global variables]]. This is done by putting a &lsquo;get&rsquo; statement in the corresponding cell. For example, consider the following Actions table:
   −
{| border="1"
+
{| class="wikitable"
 
|-
 
|-
 
| <strong>marker</strong> || <strong>time</strong> || <strong>function</strong> || <strong>feval</strong> || <strong>looptick</strong> || <strong>client</strong> || <strong>var1</strong> || <strong>........</strong> || <strong>varN</strong>  
 
| <strong>marker</strong> || <strong>time</strong> || <strong>function</strong> || <strong>feval</strong> || <strong>looptick</strong> || <strong>client</strong> || <strong>var1</strong> || <strong>........</strong> || <strong>varN</strong>  
Line 154: Line 154:     
In the ''feval'' column, you can specify functions that do not process any of the user defined variables. Examples are Matlab's <tt>[[Http://www.mathworks.nl/help/techdoc/ref/tic.htmlTic|http://www.mathworks.nl/help/techdoc/ref/tic.html tic]]/[[Http://www.mathworks.nl/help/techdoc/ref/toc.htmlToc|http://www.mathworks.nl/help/techdoc/ref/toc.html toc]]</tt> or [[Http://www.mathworks.nl/help/techdoc/ref/disp.htmlDisp|http://www.mathworks.nl/help/techdoc/ref/disp.html disp]] functions. In the example below, <tt>tic</tt> and <tt>toc</tt> are used to evaluate the time it takes to execute function my_fnc1:
 
In the ''feval'' column, you can specify functions that do not process any of the user defined variables. Examples are Matlab's <tt>[[Http://www.mathworks.nl/help/techdoc/ref/tic.htmlTic|http://www.mathworks.nl/help/techdoc/ref/tic.html tic]]/[[Http://www.mathworks.nl/help/techdoc/ref/toc.htmlToc|http://www.mathworks.nl/help/techdoc/ref/toc.html toc]]</tt> or [[Http://www.mathworks.nl/help/techdoc/ref/disp.htmlDisp|http://www.mathworks.nl/help/techdoc/ref/disp.html disp]] functions. In the example below, <tt>tic</tt> and <tt>toc</tt> are used to evaluate the time it takes to execute function my_fnc1:
{| border="1"
+
{| class="wikitable"
 
|-
 
|-
 
| <strong>marker</strong> || <strong>time</strong> || <strong>function</strong> || <strong>feval</strong>  
 
| <strong>marker</strong> || <strong>time</strong> || <strong>function</strong> || <strong>feval</strong>  
Line 167: Line 167:     
In the following table, the execution time of multiple functions will be measured:
 
In the following table, the execution time of multiple functions will be measured:
{| border="1"
+
{| class="wikitable"
 
|-
 
|-
 
| <strong>marker <br /></strong> || <strong>time <br /></strong> || <strong>function <br /></strong> || <strong>feval <br /></strong>  
 
| <strong>marker <br /></strong> || <strong>time <br /></strong> || <strong>function <br /></strong> || <strong>feval <br /></strong>  
Line 182: Line 182:     
Functions specified in the feval column can take user defined variables as input arguments, as in the following example:
 
Functions specified in the feval column can take user defined variables as input arguments, as in the following example:
{| border="1"
+
{| class="wikitable"
 
|-
 
|-
 
| <strong>marker <br /></strong> || <strong>time <br /></strong> || <strong>function <br /></strong> || <strong>feval <br /></strong> || <strong>Var1 <br /></strong>  
 
| <strong>marker <br /></strong> || <strong>time <br /></strong> || <strong>function <br /></strong> || <strong>feval <br /></strong> || <strong>Var1 <br /></strong>  

Navigation menu