Difference between revisions of "AnyWave:CLI ICA"

From WikiMEG
Jump to: navigation, search
(Arguments descripton for plugin ICA)
(using json file)
 
(31 intermediate revisions by one user not shown)
Line 1: Line 1:
 
=Arguments description for plugin ICA=
 
=Arguments description for plugin ICA=
 
plugin name: '''ica'''<br/>
 
plugin name: '''ica'''<br/>
 +
 
{|
 
{|
|- style="text-align: center; margin: auto;"
+
! style="text-align:left;"| argument
! argument !! description !! expected value
+
! requirement
 +
! description
 
|-
 
|-
| input_file || MANDATORY: common argument || data file path
+
|input_file <file>
 +
|'''MANDATORY'''
 +
|common argument
 
|-
 
|-
| modality || MANDATORY: <eeg|meg|ieeg|emg> || a string
+
|modality <eeg,eeg,ieeg>
 +
|'''MANDATORY'''
 +
|channel modality
 
|-
 
|-
| comp || MANDATORY: <value> || number of components.
+
|comp <value>
 +
|'''MANDATORY'''
 +
|number of components
 
|-
 
|-
| downsampling || OPTIONAL: <yes|no|true|false> || Downsampling data before computing. Default is no|false.
+
|hp <value>
 +
| OPTIONAL
 +
|common hp argument.
 
|-
 
|-
| extended || OPTIONAL: <yes|no|true|false> || use the extended option for Infomax. Default is no|false.
+
|lp <value>
 +
| OPTIONAL
 +
|common lp argument.
 
|-
 
|-
| skip_bad || OPTIONAL: <yes|no|true|false> || skip bad channels. Default is yes|true.
+
|downsampling <flag>
 +
| OPTIONAL
 +
|Downsampling data before computing. Default is false
 +
|-
 +
|infomax_extended <flag>
 +
|OPTIONAL
 +
|Use the extended option for Infomax. Default is false.
 +
|-
 +
|skip_bad <flag>
 +
|OPTIONAL
 +
|Skip bad channels. Default is true.
 +
|-
 +
|skip_markers <marker name>
 +
|OPTIONAL
 +
|common argument. ICA will skip all the data sections marked by the specified marker.
 +
|-
 +
|use_markers <marker name>
 +
|OPTIONAL
 +
|common argument. ICA will only compute on data sections marked by the specified marker.
 +
|-
 +
|output_dir <dir>
 +
|OPTIONAL
 +
|common argument. The result file will be placed in the specified directory path.
 +
|-
 +
|output_prefix <string>
 +
|OPTIONAL
 +
|common argument. The result file will be prefixed using the specified string.
 
|}
 
|}
 +
 +
=Examples=
 +
run ica on meg data, just 70 components and filtering data in the 1-100Hz band.<br>
 +
<syntaxhighlight lang='bash'>
 +
anywave --run ica --input_file d:\data\meg\megdata.meg --modality meg --comp 70 --hp 1 --lp 100
 +
</syntaxhighlight>
 +
run with extended flag and output result to a directory:<br/>
 +
<syntaxhighlight lang='bash'>
 +
anywave --run ica --input_file d:\data\meg\megdata.meg --modality meg --comp 70 --hp 1 --lp 100 --infomax_extended true --output_dir d:\results
 +
</syntaxhighlight>
 +
=using json file=
 +
Sometimes it makes sense to group the plugin's parameters in a json file for further re-use in a batch loop.<br/>
 +
A JSON file also offers the capability to specify more than one value for some arguments like skip_markers, use markers.<br/>
 +
Example of processing while skipping several artifacts parts of the data file:<br/>
 +
json param.json:<br/>
 +
<syntaxhighlight lang='java'>
 +
{
 +
"plugin" : "ica",
 +
"modality" : "meg",
 +
"comp" : 70,
 +
"skip_markers" : ["artefacts", "bad", "rejected"]
 +
}
 +
</syntaxhighlight>
 +
Then the command:<br/>
 +
<syntaxhighlight lang='bash'>
 +
anywave --run param.json --input_file d:\data\meeg\data.meg --hp 1 --lp 100
 +
</syntaxhighlight>

Latest revision as of 15:48, 14 April 2020

Arguments description for plugin ICA

plugin name: ica

argument requirement description
input_file <file> MANDATORY common argument
modality <eeg,eeg,ieeg> MANDATORY channel modality
comp <value> MANDATORY number of components
hp <value> OPTIONAL common hp argument.
lp <value> OPTIONAL common lp argument.
downsampling <flag> OPTIONAL Downsampling data before computing. Default is false
infomax_extended <flag> OPTIONAL Use the extended option for Infomax. Default is false.
skip_bad <flag> OPTIONAL Skip bad channels. Default is true.
skip_markers <marker name> OPTIONAL common argument. ICA will skip all the data sections marked by the specified marker.
use_markers <marker name> OPTIONAL common argument. ICA will only compute on data sections marked by the specified marker.
output_dir <dir> OPTIONAL common argument. The result file will be placed in the specified directory path.
output_prefix <string> OPTIONAL common argument. The result file will be prefixed using the specified string.

Examples

run ica on meg data, just 70 components and filtering data in the 1-100Hz band.

anywave --run ica --input_file d:\data\meg\megdata.meg --modality meg --comp 70 --hp 1 --lp 100

run with extended flag and output result to a directory:

anywave --run ica --input_file d:\data\meg\megdata.meg --modality meg --comp 70 --hp 1 --lp 100 --infomax_extended true --output_dir d:\results

using json file

Sometimes it makes sense to group the plugin's parameters in a json file for further re-use in a batch loop.
A JSON file also offers the capability to specify more than one value for some arguments like skip_markers, use markers.
Example of processing while skipping several artifacts parts of the data file:
json param.json:

{
"plugin" : "ica",
"modality" : "meg",
"comp" : 70,
"skip_markers" : ["artefacts", "bad", "rejected"]
}

Then the command:

anywave --run param.json --input_file d:\data\meeg\data.meg --hp 1 --lp 100