Difference between revisions of "AnyWave:CLI H2"
From WikiMEG
(Created page with "=Arguments description for plugin H2= plugin name: '''h2'''<br/> {| ! style="text-align:left;"| argument ! requirement ! description |- |input_file <file> |'''MANDATORY''' ...") |
(→Arguments description for plugin H2) |
||
(6 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
=Arguments description for plugin H2= | =Arguments description for plugin H2= | ||
plugin name: '''h2'''<br/> | plugin name: '''h2'''<br/> | ||
− | |||
{| | {| | ||
− | ! style="text-align: | + | ! style="text-align:center;"| argument |
! requirement | ! requirement | ||
! description | ! description | ||
Line 30: | Line 29: | ||
| OPTIONAL | | OPTIONAL | ||
|common lp argument. | |common lp argument. | ||
− | |||
|- | |- | ||
|algorithm <r2,h2> | |algorithm <r2,h2> | ||
Line 36: | Line 34: | ||
|algorithm method to compute correlation. Default is h2. | |algorithm method to compute correlation. Default is h2. | ||
|- | |- | ||
− | | | + | |downsampling_factor <value> |
| OPTIONAL | | OPTIONAL | ||
− | |Downsampling data before computing. | + | |Downsampling data before computing by factor. ie. if sampling rate is 1024Hz, a factor of 4 will downsample to 256Hz. Default is 1 (no downsampling) |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
|skip_markers <marker name> | |skip_markers <marker name> | ||
Line 68: | Line 58: | ||
run h2 on seeg data, using 1-100Hz band.<br> | run h2 on seeg data, using 1-100Hz band.<br> | ||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
− | anywave --run h2--input_file d:\data\seeg\data.eeg --time_window 4 --step 0.5 --max_lag 0.1 --hp 1 --lp 100 | + | anywave --run h2 --input_file d:\data\seeg\data.eeg --time_window 4 --step 0.5 --max_lag 0.1 --hp 1 --lp 100 |
</syntaxhighlight> | </syntaxhighlight> | ||
run with r2 method:<br/> | run with r2 method:<br/> | ||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
− | anywave --run h2--input_file d:\data\seeg\data.eeg --algorithm r2 --time_window 4 --step 0.5 --max_lag 0.1 --hp 1 --lp 100 | + | anywave --run h2 --input_file d:\data\seeg\data.eeg --algorithm r2 --time_window 4 --step 0.5 --max_lag 0.1 --hp 1 --lp 100 |
+ | </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" : "h2", | ||
+ | "time_window" : 4, | ||
+ | "step" : 0.5, | ||
+ | "max_lag" : 0.1, | ||
+ | "skip_markers" : ["artefacts", "bad", "rejected"] | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | Then the command:<br/> | ||
+ | <syntaxhighlight lang='bash'> | ||
+ | anywave --run param.json --input_file d:\data\seeg\data.eeg --hp 1 --lp 100 | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 16:35, 2 July 2020
Arguments description for plugin H2
plugin name: h2
argument | requirement | description |
---|---|---|
input_file <file> | MANDATORY | common argument |
time_window <value> | MANDATORY | time window in seconds. |
step <value> | MANDATORY | step in seconds. |
max_lag <value> | MANDATORY | maximum lag in seconds. |
hp <value> | OPTIONAL | common hp argument. |
lp <value> | OPTIONAL | common lp argument. |
algorithm <r2,h2> | OPTIONAL | algorithm method to compute correlation. Default is h2. |
downsampling_factor <value> | OPTIONAL | Downsampling data before computing by factor. ie. if sampling rate is 1024Hz, a factor of 4 will downsample to 256Hz. Default is 1 (no downsampling) |
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 h2 on seeg data, using 1-100Hz band.
anywave --run h2 --input_file d:\data\seeg\data.eeg --time_window 4 --step 0.5 --max_lag 0.1 --hp 1 --lp 100
run with r2 method:
anywave --run h2 --input_file d:\data\seeg\data.eeg --algorithm r2 --time_window 4 --step 0.5 --max_lag 0.1 --hp 1 --lp 100
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" : "h2", "time_window" : 4, "step" : 0.5, "max_lag" : 0.1, "skip_markers" : ["artefacts", "bad", "rejected"] }
Then the command:
anywave --run param.json --input_file d:\data\seeg\data.eeg --hp 1 --lp 100