Skip to content

Plugins on the command line

This page lists the processing plugins you can run without the interface, with anywave --run <name>. The options that every command accepts (--input_file, --output_dir, --hp, --use_markers...), the way to write a JSON job, the exit codes and the BIDS conversion are described in Command line.

plugin name for --run details
Export data to another file format export below and File exporter
ICA ica ICA
h2 / r2 h2 h2/r2
Spectral (PSD) spectral Spectral
MEG / EEG / SEEG Artifact Detector "MEG Artifact Detector", "EEG Artifact Detector", "SEEG Artifact Detector" Artifact detectors
Imaginary coherence Imaginary-Coherence below
Export ICA components ICA2VHDR below
Write marker values in a 4D/BTi trigger channel trigger_writer below

Names are not case sensitive; quote the ones that contain spaces. MATLAB and Python plugins installed in your plugin folder can be run the same way, with the name given in their desc.txt.

Parameters, switches and flags

A parameter takes a value (--time_window 4), a switch is written alone (--save_comp_traces), a flag takes true or false (--several_result_files true). A flag written without its value takes the next option as its value.

Export data to another file format

anywave --run export --input_file <file> --output_format <vhdr|edf|ades|matlab|fiff> --output_dir <folder>
option type description
--output_format optional vhdr (BrainVision), edf, ades (AnyWave, the default), matlab or fiff
--decimate_factor optional divides the sampling rate by this integer

The file is written in --output_dir (default: next to the input file) under the name given by --output_file, or <input name>_exported when there is none. --hp, --lp, --notch, --use_markers, --skip_markers, --pick_channels, --montage_file... apply as for any plugin. More examples in File exporter.

ICA

anywave --run ica --modality <MEG|SEEG|EEG> --input_file <file> --comp <number of components>

Options, output files and examples: ICA.

h2 / r2

anywave --run h2 --algorithm <h2|r2> --input_file <file> --time_window <s> --step <s> --max_lag <s>

Options, output files and examples: h2/r2.

Imaginary coherence

anywave --run Imaginary-Coherence --input_file <file> --low_freq 8 --high_freq 12
option type description
--low_freq, --high_freq parameter frequency band, in Hz
--fft_window parameter length of the FFT window
--fft_overlap parameter overlap of the FFT windows
--output_file parameter full path of the result .mat file. Default: imaginary_coherence_results.mat in the folder of the data file (--output_dir is not used)

ICA2VHDR

Exports the time courses of the components of an ICA to a BrainVision file (<ICA name>_ic_tc.vhdr): the data file the ICA was computed on is unmixed with the ICA result.

anywave --run ICA2VHDR --input_file <data file> --ica_file <ICA result .mat file> --output_dir <folder>
option type description
--input_file parameter the data file the ICA was computed on
--ica_file parameter the ICA result to export
--export_ica_to_mat flag true writes also the components in a .mat file

Trigger writer

Writes the values of the markers of a .mrk file in the trigger channel of a 4D/BTi MEG recording. The recording is modified.

anywave --run trigger_writer --meg_file <path to the 4D file> --marker_file <.mrk file> [--duration <ms>]
option type description
--meg_file mandatory the 4D/BTi file to modify
--marker_file mandatory the markers to write
--duration optional duration of each trigger value, in milliseconds. Default 20

If --meg_file is missing, the plugin writes the error in the log and AnyWave returns a non zero exit code (AnyWave 2.16.6 and earlier returned 0).