Changes

Jump to navigation Jump to search
no edit summary
Line 3: Line 3:  
__TOC__
 
__TOC__
   −
When you have created all the [.DocsSectionsBuildingExperiments necessary files] for your experiment, you can run your experiment via BrainStream's [.DocsSectionsGlossary#SecG Grapical User Interface (GUI)].
+
When you have created all the [[BrainStreamBuildingExperiments|necessary files]] for your experiment, you can run your experiment via BrainStream's [[BrainStreamGlossary#SecG|Grapical User Interface (GUI)]].
 
== Startup of the BrainStream GUI ==
 
== Startup of the BrainStream GUI ==
    
The BrainStream GUI can be opened from Matlab with the command <tt>start_brainstream</tt>. If the startup function is used without any input arguments, a popup window will appear containing a list of recently opened experiment files. You can select an experiment from this list or press cancel and select another experiment file via the GUI.
 
The BrainStream GUI can be opened from Matlab with the command <tt>start_brainstream</tt>. If the startup function is used without any input arguments, a popup window will appear containing a list of recently opened experiment files. You can select an experiment from this list or press cancel and select another experiment file via the GUI.
   −
Alternatively, the startup function can be used with one or more input arguments. The settings that can be specified by means of these input arguments can also be selected in the GUI after startup. The following input arguments have to be entered as type [.DocsSectionsGlossary#SecS 'string'].
+
Alternatively, the startup function can be used with one or more input arguments. The settings that can be specified by means of these input arguments can also be selected in the GUI after startup. The following input arguments have to be entered as type [[BrainStreamGlossary#SecS|'string']].
    
<pre>start_brainstream(block_file [,path_fnc, bfiles_path, com_bfiles_path]) </pre>
 
<pre>start_brainstream(block_file [,path_fnc, bfiles_path, com_bfiles_path]) </pre>
   −
<tt>block_file</tt>: filename of a [.DocsSectionsBuildingExperiments#SecBlock block file] (.blk) or [.DocsSectionsBuildingExperiments#SecProjectFile BrainStream Project file] (.bsp or .exp). Include (relative) path name or make sure it can be found on the Matlab path.<br /> <tt>path_fnc</tt> (optional): function that handles setting Matlab path. In general, it is recommended to specify this function in the block file (see [.DocsSectionsBlockFile#TopicExperiment here]) rather than via this input argument.<br /> <tt>bfiles_path</tt> (optional): starting folder for browsing block files<br /> <tt>com_bfiles_path</tt> (optional): starting folder for browsing common block files
+
<tt>block_file</tt>: filename of a [[BrainStreamBuildingExperiments#SecBlock|block file]] (.blk) or [[BrainStreamBuildingExperiments#SecProjectFile|BrainStream Project file]] (.bsp or .exp). Include (relative) path name or make sure it can be found on the Matlab path.<br /> <tt>path_fnc</tt> (optional): function that handles setting Matlab path. In general, it is recommended to specify this function in the block file (see [[BlockFile#TopicExperiment|here]]) rather than via this input argument.<br /> <tt>bfiles_path</tt> (optional): starting folder for browsing block files<br /> <tt>com_bfiles_path</tt> (optional): starting folder for browsing common block files
    
<div id="BrainStreamGUI"></div>
 
<div id="BrainStreamGUI"></div>
Line 33: Line 33:  
1. All block files and common block files included in the experiment are listed in the top right part of the GUI. You can select one of the block files by clicking on it. The information in other fields of the GUI shows the settings specified in the currently selected block file.
 
1. All block files and common block files included in the experiment are listed in the top right part of the GUI. You can select one of the block files by clicking on it. The information in other fields of the GUI shows the settings specified in the currently selected block file.
   −
2. In the Experiment section of the GUI, the datasource, the name of the block, the sample rate and the location of the [.DocsSectionsBuildingExperiments#SecExpDef experiment definition table] are obtained from the block files. A subject's name must be entered manually.
+
2. In the Experiment section of the GUI, the datasource, the name of the block, the sample rate and the location of the [[BrainStreamBuildingExperiments#SecExpDef|experiment definition table] are obtained from the block files. A subject's name must be entered manually.
    
3. Information in the Files section is also automatically obtained from the block files, but can be changed manually by clicking on the buttons on the right. The Out folder is the folder where the recorded data will be saved.
 
3. Information in the Files section is also automatically obtained from the block files, but can be changed manually by clicking on the buttons on the right. The Out folder is the folder where the recorded data will be saved.
Line 39: Line 39:  
4. The block settings of the selected block file are shown in the bottom part of the GUI, where the can be changed. Note that the changed settings will be used when the experiment is started. In this part of the GUI, you can also view Log info, which shows the Log file of the experiment, and Warning info, which shows a list of warning messages.
 
4. The block settings of the selected block file are shown in the bottom part of the GUI, where the can be changed. Note that the changed settings will be used when the experiment is started. In this part of the GUI, you can also view Log info, which shows the Log file of the experiment, and Warning info, which shows a list of warning messages.
   −
5. You can start the experiment by clicking on the Start button at the bottom. You can end the experiment with either the Quit or Exit button. Clicking the Quit button is equivalent to inserting the BS_QUIT marker and clicking the Exit button is equivalent to inserting the BS_EXIT marker (for more information about these markers, click [[DocsSectionsReservedNames#ResMarkers|here]]). In the bottom right corner of the GUI, you can specify the amount of output that is displayed on the screen during the experiment. You can also specify this amount in the block file under topic RunMode and key screenoutputlevel. For more information about the different levels of screen output, click [.DocsSectionsBlockFile#KeyScreenOutput here].
+
5. You can start the experiment by clicking on the Start button at the bottom. You can end the experiment with either the Quit or Exit button. Clicking the Quit button is equivalent to inserting the BS_QUIT marker and clicking the Exit button is equivalent to inserting the BS_EXIT marker (for more information about these markers, click [[DocsSectionsReservedNames#ResMarkers|here]]). In the bottom right corner of the GUI, you can specify the amount of output that is displayed on the screen during the experiment. You can also specify this amount in the block file under topic RunMode and key screenoutputlevel. For more information about the different levels of screen output, click [[BrainStreamBlockFile#KeyScreenOutput|here]].
    
<div id="NoGui"></div>
 
<div id="NoGui"></div>
Line 48: Line 48:  
<tt>start_brainstream_nogui(block_file [,subject,user_folders])</tt>
 
<tt>start_brainstream_nogui(block_file [,subject,user_folders])</tt>
   −
<tt>block_file:</tt> filename of a [.DocsSectionsBuildingExperiments#SecBlock block file] (.blk). Include ([.DocsSectionsPathsFolders#RelativePath relative]) path name or make sure it can be found on the [.DocsSectionsPathsFolders#AddFolders Matlab path]. If more than one (common) block file is required, specify a cell array of block files in order of relevance (settings of block files that appear earlier in this list will overwrite the same settings specified in subsequently listed block files).<br /> <tt>subject (optional):</tt> name of the subject (default = 'test')<br /> <tt>user_folders (optional):</tt> cell array with [.DocsSectionsPathsFolders paths] you need for the experiment. If you need several folders on your Matlab path, you can enter them as a cell array.
+
<tt>block_file:</tt> filename of a [.DocsSectionsBuildingExperiments#SecBlock block file] (.blk). Include ([[BrainStreamPathsFolders#RelativePath|relative]]) path name or make sure it can be found on the [[BrainStreamPathsFolders#AddFolders|Matlab path]]. If more than one (common) block file is required, specify a cell array of block files in order of relevance (settings of block files that appear earlier in this list will overwrite the same settings specified in subsequently listed block files).<br /> <tt>subject (optional):</tt> name of the subject (default = 'test')<br /> <tt>user_folders (optional):</tt> cell array with [[BrainStreamPathsFolders|paths]] you need for the experiment. If you need several folders on your Matlab path, you can enter them as a cell array.
    
The following example shows the command for starting the block bci_example1 for a subject called 'subject'. In addition, folders containing code for cap montage and artefact detection are added to the Matlab path:<br /> <tt>start_brainstream_nogui('bci_example1.blk','subject',{/Volumes/MyCode/CapMontage,/Volumes/MyCode/EpochArtifacts})</tt>.
 
The following example shows the command for starting the block bci_example1 for a subject called 'subject'. In addition, folders containing code for cap montage and artefact detection are added to the Matlab path:<br /> <tt>start_brainstream_nogui('bci_example1.blk','subject',{/Volumes/MyCode/CapMontage,/Volumes/MyCode/EpochArtifacts})</tt>.
Line 57: Line 57:     
The argument 'blocksettings' needs to be available as a Matlab type structure variable. Topics from the block file become fields of this structure and keys become subfields of these fields. You can obtain the blocksettings in two ways:
 
The argument 'blocksettings' needs to be available as a Matlab type structure variable. Topics from the block file become fields of this structure and keys become subfields of these fields. You can obtain the blocksettings in two ways:
# Translate an existing block file into the blocksettings structure using the function <tt>blocksettings = bs_get_blockvalue(blockfile)</tt>, where blockfile is the name of your [.DocsSectionsBuildingExperiments#SecBlock block file] (.blk).
+
# Translate an existing block file into the blocksettings structure using the function <tt>blocksettings = bs_get_blockvalue(blockfile)</tt>, where blockfile is the name of your [[BrainStreamBuildingExperiments#SecBlock|block file]] (.blk).
 
# Manually generate a blocksettings structure. The following example contains the minimally required items to start BrainStream without the GUI:  
 
# Manually generate a blocksettings structure. The following example contains the minimally required items to start BrainStream without the GUI:  
 
<pre>
 
<pre>

Navigation menu