Skip to content

Using the plugin from the command line

The plugin will requires the following options:

option type description/value
--run spectral MANDATORY name of the plugin
--time_window value MANDATORY length of fft window in s
--overlap value MANDATORY overlap length for next fft window
--windowing type optional a string containing either Hanning, Hamming or None
--modality value optional type of the channels to analyse (eeg, meg, seeg...). The spectrum is computed for one type at a time. Default: the type with the most channels in the input (a warning in the log when the input has several)

This plugin also supports the following common options:

option type
--input_file MANDATORY
--use_markers optional
--skip_markers optional
--output_dir optional
--output_suffix optional
--output_prefix optional
--output_file optional

command line examples

Basic usage

anywave --run spectral --input_file d:\data\myfile.eeg --time_window 1 --overlap 0.5
PSD will be computed for all channels in myfile.eeg, unless there is a myfile.eeg.mtg file.
PSD will be computed on the whole data unless there is a myfile.eeg.mrk file containing markers with durations.
The fft window will be 1s, and the fft overlap will be 0.5s.
The result file will go in d:\data.

force to compute on the whole data

anywave --run spectral --input_file d:\data\myfile.eeg --time_window 1 --overlap 0.5 --use_markers all_data 

avoid artefacts (assuming we have a myfile.eeg.mrk file)

anywave --run spectral --input_file d:\data\myfile.eeg --time_window 1 --overlap 0.5 --skip_markers artefact

Customize output file name

anywave --run spectral --input_file d:\data\myfile.eeg --time_window 1 --overlap 0.5 --output_prefix psd --output_suffix custom
That will generate d:\data\psd_mod-EEG_fftwindow-1024_fftoverlap-512_window-hanning_marker-whole_data_custom.mat (for EEG data sampled at 1024 Hz).

--output_file replaces the name of the data file at the beginning of the result name:

anywave --run spectral --input_file d:\data\myfile.eeg --time_window 1 --overlap 0.5 --output_file mypsd
That will generate d:\data\mypsd_mod-EEG_fftwindow-1024_fftoverlap-512_window-hanning_marker-whole_data.mat.