Difference between revisions of "AnyWave:ICA"
(→ICA arguments) |
|||
(17 intermediate revisions by one user not shown) | |||
Line 21: | Line 21: | ||
=Batch mode= | =Batch mode= | ||
This plugin can run in command line or batch mode.<br/> | This plugin can run in command line or batch mode.<br/> | ||
− | == | + | Here are the recognized command line arguments:<br/> |
− | + | ==ICA arguments== | |
− | <syntaxhighlight lang=" | + | {| class="wikitable" style="text-align:center" |
+ | |- | ||
+ | ! key !! description !! requirement !! default behavior | ||
+ | |- | ||
+ | | plugin || Name of plugin || MANDATORY || this is a required key when using a json file. Not applicable without a json file. | ||
+ | |- | ||
+ | | modality || channel modality (MEG, EEG, ...) || MANDATORY || n/a | ||
+ | |- | ||
+ | | downsampling || enable/disable downsampling of data || OPTIONAL || default is true | ||
+ | |- | ||
+ | | comp || number of expected components (PCA applied if comp < n channels) || OPTIONAL || if not specified, comp will be the number of channels of the modality. | ||
+ | |- | ||
+ | | skip_bad || true if ignoring bad channels || OPTIONAL || default is true | ||
+ | |} | ||
+ | <br/> | ||
+ | |||
+ | ==Common arguments== | ||
+ | {| class="wikitable" style="text-align:center" | ||
+ | |- | ||
+ | ! key !! description !! requirement !! default behavior | ||
+ | |- | ||
+ | | input_file || file to process || MANDATORY || n/a | ||
+ | |- | ||
+ | | output_dir || output directory full path || OPTIONAL || default is to output in data file's directory. | ||
+ | |- | ||
+ | | output_file || filename to generate || OPTIONAL || default is to create a filename based on data file name and add suffixes to it. | ||
+ | |- | ||
+ | | ouput_prefix || prefix the name of the output file (useful for BIDS operation) || OPTIONAL || No prefix set as default. | ||
+ | |- | ||
+ | | hp || high pass filter || OPTIONAL || is not specified operates on raw data. | ||
+ | |- | ||
+ | | lp || low pass filter || OPTIONAL || is not specified operates on raw data. | ||
+ | |} | ||
+ | ==Examples== | ||
+ | Using a json file to call the plugin:<br/> | ||
+ | <syntaxhighlight lang="javascript"> | ||
{ | { | ||
+ | "plugin": "ica", | ||
+ | "comp" : 50, | ||
+ | "downsampling" : false, | ||
+ | "modality" : "MEG", | ||
+ | "use_markers" : [ "selection1", "selection2"], | ||
+ | "skip_markers" : [ "artefact", "artefacted" ] | ||
} | } | ||
+ | </syntaxhighlight> | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | anywave --run ica.json --hp 1 --lp 70 --input_file /path_to_file/myfile.dat | ||
+ | </syntaxhighlight> | ||
+ | <br/> | ||
+ | Not using json file:<br/> | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | anywave --run ica --modality MEG --comp 50 --downsampling false --hp 1 --lp 70 --input_file /path_to_file/myfile.dat --skip_bad false | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 10:47, 22 May 2020
Contents
ICA Plug-in
This plugin will extract Independent Components from signals.
The algorithm used is the Infomax algorithm.
This plug-in will run in the background, doing the computation and then a file will be created containing the resulting matrices: (mixing and unmixing matrices).
The only user interface is the one which let the user set all the settings before the computation is done.
Algorithm
The plug-in was designed to implement several algorithms but only infomax is implemented so far.
Filtering
The user can specify a frequency bandwidth to use by defining a low pass and a high pass filtering.
Note that decimation will be applied depending on the low pass filtering, to shorten the calculation time and minimize the memory usage.
Data Input
The user must choose on what type of signal the computation will be done (EEG or MEG).
By default, bad channels are excluded.
Finally, markers can be used to remove bad part of the signals (artifacts, etc.), the user must first add markers by itself or using another plug-in with an explicit name.
Data Output
The number of components is by default limited to 50 but all the components can be extracted at the cost of a longer calculation.
By default, a result file will be created in the data folder. This file can be imported afterward in AnyWave by using the Load ICA Components feature.
Batch mode
This plugin can run in command line or batch mode.
Here are the recognized command line arguments:
ICA arguments
key | description | requirement | default behavior |
---|---|---|---|
plugin | Name of plugin | MANDATORY | this is a required key when using a json file. Not applicable without a json file. |
modality | channel modality (MEG, EEG, ...) | MANDATORY | n/a |
downsampling | enable/disable downsampling of data | OPTIONAL | default is true |
comp | number of expected components (PCA applied if comp < n channels) | OPTIONAL | if not specified, comp will be the number of channels of the modality. |
skip_bad | true if ignoring bad channels | OPTIONAL | default is true |
Common arguments
key | description | requirement | default behavior |
---|---|---|---|
input_file | file to process | MANDATORY | n/a |
output_dir | output directory full path | OPTIONAL | default is to output in data file's directory. |
output_file | filename to generate | OPTIONAL | default is to create a filename based on data file name and add suffixes to it. |
ouput_prefix | prefix the name of the output file (useful for BIDS operation) | OPTIONAL | No prefix set as default. |
hp | high pass filter | OPTIONAL | is not specified operates on raw data. |
lp | low pass filter | OPTIONAL | is not specified operates on raw data. |
Examples
Using a json file to call the plugin:
{ "plugin": "ica", "comp" : 50, "downsampling" : false, "modality" : "MEG", "use_markers" : [ "selection1", "selection2"], "skip_markers" : [ "artefact", "artefacted" ] }
anywave --run ica.json --hp 1 --lp 70 --input_file /path_to_file/myfile.dat
Not using json file:
anywave --run ica --modality MEG --comp 50 --downsampling false --hp 1 --lp 70 --input_file /path_to_file/myfile.dat --skip_bad false