Skip to content

Command Line Functions

BIAPT edited this page Feb 18, 2018 · 2 revisions

Command Line Functions:

If for some reasons you wish to use the analysis techniques without having to deal with the graphical user interface you can. To do so you only need to install EEGapp and call functions that are bundled with the package. Beware that no input checking is done before executing the analysis techniques.

Spectrogram and Topographic Map:

errors = spectopo_eegapp(EEG,fp,tso,frequencies,timeBandwidth,numberTaper,windowLength,stepSize)

Input:

  • EEG = eeg structure file coming from eeglab
  • fp = frequency pass, two numbers corresponding to a low pass and an high pass given like this [a b]
  • tso = temporal smoothing median filter order, used to reduce the noise in the spectrogram
  • frequencies = used to plot the topographic map, will plot up to 4 frequencies.
  • timeBandwith and numberTaper = see documentation
  • windowLength = length of the window over which the spectrum will be calculated
  • stepSize = the step length over which to move the window.

Output:

errors = 0 if an error occurred and 1 if not. Will also print a plot of the spectrogram and of the topographic map.

Phase Amplitude Coupling:

errors = pac_eegapp(EEG,channels,window_length,numberOfBin,LFO_bp,HFO_bp)

Input:

  • EEG = eeg structure file coming from eeglab
  • channels = a vector containing all channels to analyze
  • windows_length = length of the windows of data to calculate the pac.
  • numberOfBin = number of bins to categorize the different phases.
  • LFO_bp = Low Frequencies Oscillation bandpass. Two numbers a low pass and an high pass given like this [a b]
  • HFO_bp = High Frequencies Oscillation bandpass. Two numbers a low pass and an high pass given like this [a b]

Output:

errors = 0 if an error occurred and 1 if not. Will also print a plot of the phase amplitude coupling using imagesc.

Coherence:

errors = coherence_eegapp(EEG,from,to,bandpass)

Input:

  • EEG = eeg structure file coming from eeglab
  • from = a vector containing channels number
  • to = a vector containing channels number
  • bandpass = a string: full, alpha, beta, gamma, theta or delta.

Output:

errors = 0 if an error occurred and 1 if not. Will also print a plot of the coherence between channels from and to.

Phase Lag Index:

errors = pli_eegapp(EEG,data_length,permutation,p_value,bandpass,custom_order)

Input:

  • EEG = eeg structure file coming from eeglab
  • data_length = length of the windows of data to calculate the pli.
  • permutation = number of permutation to do the surrogate data analysis.
  • p_value = ranging from 0 to 1.
  • bandpass = a string: full, alpha, beta, gamma, theta or delta.
  • custom_order = a vector containing all channels in a particular ordering

Output:

errors = 0 if an error occurred and 1 if not. Will also print a plot of the pli.

Directed Phase Lag Index:

errors = dpli_eegapp(EEG,data_length,permutation,p_value,bandpass,custom_order)

Input:

  • EEG = eeg structure file coming from eeglab
  • data_length = length of the windows of data to calculate the dpli.
  • permutation = number of permutation to do the surrogate data analysis.
  • p_value = ranging from 0 to 1.
  • bandpass = a string: full, alpha, beta, gamma, theta or delta.
  • custom_order = a vector containing all channels in a particular ordering

Output:

errors = 0 if an error occurred and 1 if not error Will also print a plot of the dpli.

Symbolic Transfer Entropy:

ste_struct = ste_eegapp(EEG,winsize,NumWin,from,to,bandpass,dim,tau)

Input:

  • EEG = eeg structure file coming from eeglab
  • winsize = size of the windows to calculate ste.
  • NumWin = number of windows to calculate ste.
  • from = a vector containing channels number
  • to = a vector containing channels number
  • bandpass = a string: full, alpha, beta, gamma, theta or delta. dim and tau = see documentation.

Output:

ste_struct = structure containing the ste data. Will be equal to 0 if there was an error.

Graph Theory:

graph_struct = graph_eegapp(EEG,network_thresh,win,bandpass)

Input:

  • EEG = eeg structure file coming from eeglab
  • network_thresh = number ranging from 0 to 100, used to construct a binary matrix
  • win = The length in seconds of the each segments that will be used in the analysis.
  • bandpass = a string : full, alpha, beta, gamma, theta or delta.

Output:

graph_struct = a structure containing 5 properties of the graph. Will return a 0 if there was an error.

For more information type help name of the function in MATLAB