Changes

Jump to: navigation, search

BrainStreamExampleSentences

22 bytes removed, 12:50, 26 September 2018
no edit summary
This is an example of a very simple 'experiment' in which letters will appear on the screen one by one to form sentences. In this experiment, adding a new character to a string is called an ''epoch''. A series of epochs that results in a complete sentence is called a ''sequence''. Subjects can press a button when they are ready for the next sentence (sequence). A flowchart of the experiment is shown below:
[[File:DocsSectionsExampleSentences.FlowchartDocsSectionsExampleSentences_Flowchart.png|841px|235x]]
''Figure 1: Flowchart of the Sentences example experiment''
| BS_INIT || EVENT || bs_send_buffer_marker('init_sequence','eeg',0,'now') || [] || 0 || []
|-
| init_sequence || EVENT || initSequence || put ||| |
|-
| | || | bs_send_buffer_marker('next_sequence','eeg',0,'now') ||| | ||
|-
| next_sequence || EVENT || nextSequence || get || $self+1, get ||
| start_sequence || button_1 || displayString('') || get || get || 0
|-
| | || | bs_send_buffer_marker('next_epoch','eeg',0,'now') ||| | ||
|-
| next_epoch || EVENT || nextEpoch || get || get || $self+1, get
|-
| proc_epoch || EVENT || displayString() ||| | ||
|-
| | || | bs_send_buffer_marker('next_epoch','eeg',0.25,'now') ||| | ||
|-
| <strong>end_sequence</strong> || <strong>EVENT</strong> || <strong>bs_send_buffer_marker('next_sequence','eeg',1,'now')</strong> ||| | ||
|}
|}
We also need a [[BrainStreamBuildingExperiments#SecDataSel |DataSelection table]] to specify the exact time window of data selection. If we want to record one second of data after the onset of each epoch, our DataSelection table looks like this:
{| class="wikitable"
|-
|}
In this experiment, the fourth column ''datasource'' is not absolutely necessary. As only one data source (simulated EEG data, see [.DocsSectionsExampleSentences[BrainStreamExampleSentences#BrainStream.[[DocsSectionsBlockFile]] |blocksettings]) is used, BrainStream will automatically apply all data selection settings to this data source.
=== Creating the Dictionary table ===
The [.DocsSectionsBuildingExperiments[BrainStreamBuildingExperiments#SecDict |Dictionary table]] specifies a marker number for each marker that is used in this experiment. The Dictionary table looks like this:
{| class="wikitable"
|-
|}
In this experiment, the fourth column ''datasource'' is not absolutely necessary. As only one data source (simulated EEG data, see [.DocsSectionsExampleSentences[BrainStreamExampleSentences#BrainStream.[[DocsSectionsBlockFile]] |blocksettings]) is used, BrainStream will automatically apply all marker settings to this data source.
== Testing the experiment ==
The easiest way to create all files that define this experiment is via the [.DocsSectionsBrainStreamEditor BrainStream editor]. You can open the editor by typing <tt>bs_editor</tt> in the Matlab command window (make sure that <tt>brainstream_mds/core</tt> is your current working directory). An experiment file (.exp) has already been created for this example experiment and is located in <tt>/brainstream_mds/examples/blocks/sentences/sentences.exp</tt>. If you open this file in the BrainStream editor, the experiment looks like this:
[[File:DocsSectionsExampleSentences.BS_editorDocsSectionsExampleSentences_BS_editor.png|1054px|658x]]
''Figure 2: The Sentences Experiment in the BrainStream Editor''

Navigation menu