Difference between revisions of "AnyWave::CLI"

From WikiMEG
Jump to: navigation, search
(run a process)
 
(13 intermediate revisions by one user not shown)
Line 2: Line 2:
 
AnyWave can execute some operation without any user interactions. This is also useful to batch some operations. <br/>
 
AnyWave can execute some operation without any user interactions. This is also useful to batch some operations. <br/>
 
==Common options==
 
==Common options==
--input_file <path>  : a path to the input file.<br />
+
{| class="wikitable"
--output_file <path> : the name of the output file.<br />
+
|-
--output_dir <path> : the path to the output folder where the output file will be created.<br />
+
! Option !! Value !! Description
--output_format <vhdr, edf, MATLAB, ADES> : the output file format.<br />
+
|-
--skip_marker <label> : the label of a marker to skip while reading data.<br />
+
| --input_file || file || the file to open.
--hp <value> : The high pass filter value to apply to data.<br/>
+
|-
--lp <value> : The low pass filter value to apply to data.<br />
+
| --output_file || file || The file to create.
--notch <value> : The notch filter to apply to date.<br/>
+
|-
 +
| --output_dir  || folder || The output folder where to place files created by the command.
 +
|-
 +
| --hp || value || The High Pass filter (in Hz) to apply when reading data.
 +
|-
 +
| --lp || value || The Low Pass filter (in Hz) to apply when reading data.
 +
|-
 +
| --notch || value || The notch (in Hz) to apply when reading data.
 +
|}
  
== Convert a file ==
+
== run a process ==
 +
Some of the plugins in AnyWave can be executed from the command line.<br/>
 +
This is the case for example, for the ICA plugin: <br/>
 +
To run a process plugin, you have to create a json file or string and pass it as an option:<br/>
 +
<syntaxhighlight lang="bash">
 +
anywave --run myprocess.json
 +
</syntaxhighlight>
 +
Example for the ica:<br/>
 +
<syntaxhighlight lang="javascript">
 +
{
 +
"plugin" : "ica",
 +
"input_file" : "/path/to/datafile.dat",
 +
"comp" : 50,
 +
"modality" : "MEG"
 +
}
 +
</syntaxhighlight>
 +
Note: the input_file is specified in the json but can also be specified from the command line : <br/>
 +
<syntaxhighlight lang="bash">
 +
anywave --run myprocess.json --input_file /path/to/datafile.dat
 +
</syntaxhighlight>
 +
=== JSON contents ===
 +
at least one key needs to be present:<br/>
 +
* plugin : name of the process to execute.

Latest revision as of 16:34, 12 June 2019

Command Line Options

AnyWave can execute some operation without any user interactions. This is also useful to batch some operations.

Common options

Option Value Description
--input_file file the file to open.
--output_file file The file to create.
--output_dir folder The output folder where to place files created by the command.
--hp value The High Pass filter (in Hz) to apply when reading data.
--lp value The Low Pass filter (in Hz) to apply when reading data.
--notch value The notch (in Hz) to apply when reading data.

run a process

Some of the plugins in AnyWave can be executed from the command line.
This is the case for example, for the ICA plugin:
To run a process plugin, you have to create a json file or string and pass it as an option:

anywave --run myprocess.json

Example for the ica:

{
"plugin" : "ica",
"input_file" : "/path/to/datafile.dat",
"comp" : 50,
"modality" : "MEG"
}

Note: the input_file is specified in the json but can also be specified from the command line :

anywave --run myprocess.json --input_file /path/to/datafile.dat

JSON contents

at least one key needs to be present:

  • plugin : name of the process to execute.