Difference between revisions of "AnyWave:CLI ICA"

From WikiMEG
Jump to: navigation, search
(Arguments description for plugin ICA)
(using json file)
 
(17 intermediate revisions by one user not shown)
Line 8: Line 8:
 
|-
 
|-
 
|input_file <file>
 
|input_file <file>
|MANDATORY
+
|'''MANDATORY'''
 
|common argument
 
|common argument
 
|-
 
|-
| modality
+
|modality <eeg,eeg,ieeg>
|MANDATORY
+
|'''MANDATORY'''
|channel modality.
+
|channel modality
 
|-
 
|-
|Beurre
+
|comp <value>
|1
+
|'''MANDATORY'''
|5.00
+
|number of components
 
|-
 
|-
!Total
+
|hp <value>
|
+
| OPTIONAL
|15.00
+
|common hp argument.
|}
+
|-
 
+
|lp <value>
{|
+
| OPTIONAL
! style="text-align:left;"
+
|common lp argument.
| argument ! requirement ! description
+
|-
 +
|downsampling <flag>
 +
| OPTIONAL
 +
|Downsampling data before computing. Default is false
 
|-
 
|-
| input_file <file> || MANDATORY || common argument.
+
|infomax_extended <flag>
 +
|OPTIONAL
 +
|Use the extended option for Infomax. Default is false.
 
|-
 
|-
| modality <eeg|meg|ieeg|emg> || MANDATORY || channel modality
+
|skip_bad <flag>
 +
|OPTIONAL
 +
|Skip bad channels. Default is true.
 
|-
 
|-
| comp <value> || MANDATORY||  number of components
+
|skip_markers <marker name>
 +
|OPTIONAL
 +
|common argument. ICA will skip all the data sections marked by the specified marker.
 
|-
 
|-
| Example || Example || Example
+
|use_markers <marker name>
 +
|OPTIONAL
 +
|common argument. ICA will only compute on data sections marked by the specified marker.
 
|-
 
|-
| Example || Example || Example
+
|output_dir <dir>
 +
|OPTIONAL
 +
|common argument. The result file will be placed in the specified directory path.
 
|-
 
|-
| Example || Example || Example
+
|output_prefix <string>
 +
|OPTIONAL
 +
|common argument. The result file will be prefixed using the specified string.
 
|}
 
|}
  
input_file <file>               : MANDATORY: common argument <br />
+
=Examples=
modality <eeg|meg|ieeg|emg>     : MANDATORY: channel modality.<br />
+
run ica on meg data, just 70 components and filtering data in the 1-100Hz band.<br>
comp <value>                    : MANDATORY: number of components.<br />
+
<syntaxhighlight lang='bash'>
downsampling <yes|no|true|false>: OPTIONAL: Downsampling data before computing. Default is no|false.<br />
+
anywave --run ica --input_file d:\data\meg\megdata.meg --modality meg --comp 70 --hp 1 --lp 100
extended <yes|no|true|false>   : OPTIONAL: Use the extended option for Infomax. Default is no|false.<br />
+
</syntaxhighlight>
skip_bad <yes|no|true|false>   : OPTIONAL: skip bad channels. Default is yes|true.<br />
+
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 16: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