Difference between revisions of "Batch Processing"

From BESA® Wiki
Redirect page
Jump to: navigation, search
(Redirected page to BESA Research Batch Processing)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
#REDIRECT [[BESA Research Batch Processing]]
 +
 
{{BESAInfobox
 
{{BESAInfobox
 
|title = Module information
 
|title = Module information
 
|module = BESA Research Basic or higher
 
|module = BESA Research Basic or higher
|version = 5.2 or higher
+
|version = BESA Research 5.2 or higher
 +
 
 
}}
 
}}
  
Line 14: Line 17:
 
*commands for distributed source analysis
 
*commands for distributed source analysis
 
*time-frequency commands
 
*time-frequency commands
 +
 +
 
[[File:BatchMenu.jpg|none|left]]  
 
[[File:BatchMenu.jpg|none|left]]  
 +
 +
 
For example, to automate averaging and to prepare data for statistical analysis, using an experimental paradigm for a number of subjects, a batch could have the following elements:
 
For example, to automate averaging and to prepare data for statistical analysis, using an experimental paradigm for a number of subjects, a batch could have the following elements:
 
*Load the paradigm
 
*Load the paradigm
Line 22: Line 29:
  
 
In batch code, this will look like the following:
 
In batch code, this will look like the following:
[[File:BatchExample.png|none|left]]  
+
 
 +
[[File:BatchExample.png|none|left]]
 +
 
 +
 
 
To add any command, e.g. “Average”, select the command from the list of commands and check the options dialog that appears:
 
To add any command, e.g. “Average”, select the command from the list of commands and check the options dialog that appears:
[[File:BatchExampleAv.png|700px|thumb|left|Left side: Select a command from the list. Right side: AFter selecting, a dialog opens where command options can be defined.]]
+
 
 +
[[File:BatchExampleAv.png|700px|none|left]]
 +
 
 +
Left side: First click the "Add Command" button. Then select a command from the list. Right side: After selecting, a dialog opens where command options can be defined.
  
 
Once the batch is complete, it can run over all open files, over a user-defined file list (simply drag files into the list from Explorer), or just over the current file. Note that these batches are produced without entering any line of code by hand – it is all done using the graphical user interface of the Batch dialog.
 
Once the batch is complete, it can run over all open files, over a user-defined file list (simply drag files into the list from Explorer), or just over the current file. Note that these batches are produced without entering any line of code by hand – it is all done using the graphical user interface of the Batch dialog.
 +
 
== An example batch for Averaging step by step ==
 
== An example batch for Averaging step by step ==
 
The first two commands will load the paradigm file and perform the artifact scan:
 
The first two commands will load the paradigm file and perform the artifact scan:
<tt>
+
 
 +
<pre>
 
Paradigm(%Scripts%\Paradigm\Auditory\AEP_Intensity.PDG)
 
Paradigm(%Scripts%\Paradigm\Auditory\AEP_Intensity.PDG)
 
ArtifactScan(Wait)
 
ArtifactScan(Wait)
</tt>
+
</pre>
[[File:BatchArtScan.png|none|left]]  
+
 
 +
 
 +
[[File:BatchArtScan.png|500px|none|left]]  
 +
 
 
The next command will average over the conditions:
 
The next command will average over the conditions:
<tt>
+
 
 +
<pre>
 
Average(%basename%_av, %Examples%\ERP-Auditory-Intensity\Averages\, NoDefaultName,OverwriteTarget, NoCorrect)
 
Average(%basename%_av, %Examples%\ERP-Auditory-Intensity\Averages\, NoDefaultName,OverwriteTarget, NoCorrect)
</tt>
+
</pre>
[[File:BatchExampleAv2.png|none|left]]
+
 
 +
[[File:BatchExampleAv2.png|500px|none|left]]
 +
 
 +
 
 +
The next commands will loop over the first 5 segments (condition averages) and export them to different ASCII files to be used in further processing in BESA Statistics or other programs:
 +
 
 +
<pre>
 +
MAINFileOpen(%Examples%\ERP-Auditory-Intensity\Averages\%basename%_av.fsg)
 +
GENFor(segm, 1, 5, 1, 1)
 +
MAINMarkBlock(WholeSegment,-,%segm%)
 +
MAINExport(%basename%-export%segm%, \, Segment, ASCvec, Original, FiltOff, NoResample, Replace, -, )
 +
GENEndFor()
 +
</pre>
 +
 
 +
[[File:BatchExampleAv3.png|500px|none|left]]
 +
 
 +
 
 +
Of course, many more options are available – check it out! For example, segments can automatically be sent to Source Analysis to perform automated imaging and export these results for further analysis, too.
 +
 
 +
[[Category:ERP/ERF]]

Latest revision as of 17:46, 5 May 2021