Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D Documentation
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • anywave
  • Documentation
  • Wiki
  • plugin_h2

Last edited by Bruno Colombet Jun 06, 2024
Page history

plugin_h2

  • Description
  • Select channels
  • Run from the Process Menu
  • Run from selected markers
  • Main GUI
  • Select data chunks
  • Frequency bands
  • Results
    • Description of result file
    • Variables in file
  • Visualise the resulting graph
  • Running from the command line

Description

The plugin computes the connectivity between channels using h2/r2 algorithms. h² is a nonlinear correlation.

This plugin can also be run using the command line.

Select channels

Before running the plugin, be sure to select at least 2 channels.
If no channels are selected before launching the process, a warning message will inform the user that the computation will concern all the channels in the current Montage.
As the goal of the plugin is to compare each pair of channels, it could take a lot of time to compute.

Run from the Process Menu

image

Run from selected markers

It is sometimes quicker to manually select the markers (data chunks) on which to compute correlations and launch the process on them.

Select markers in the markers list and right click to launch the plugin:
image

Main GUI

image

NOTE: When launching from selected markers you won't be able to manually select the input data chunks. (it's done already, the selected markers ARE the input data chunks).

Select data chunks

It is highly suggested to compute the correlation on some parts of the data, or data chunks.
This is done using markers.
The user can choose what data chunk to avoid and what data chunk to use by markers respectively in the Markers to SKIP list and Markers to USE lists.

Frequency bands

It is also a common usage to compute on different frequency bands and compare the results.
The right part of the GUI (The Frequency bands section) allows to select/edit the frequency bands.

Results

The results will be stored in a MATLAB file.
The default location is the data file folder.

Description of result file

The computation use a time window (defined in settings) and compute the correlation between pairs of channels on that time window. Then, the window is shifted by the step parameter and another computation is done.
Each iteration of a time window computation is stored in aw_h2 matrix as a slice and the corresponding lag values are stored in the matrix aw_lag.

If more than one data chunks was set as input then when a data chunk is done, the time window will be positioned to the start of the next data chunk and the computation begins again on that data chunk.

Each data chunks (markers) is called a section.
Each sections as a number of iterations (the number of time windows computed before the end of the data was reached).

The plugin will record the total number of time window iterations as total_iterations. m is the number of channels.

Variables in file

variable type description
aw_h2 matrix (m x m x total_iterations) 3D matrix containing all h2 or r2 values for every time window iterations
aw_lag matrix (m x m x total_iterations) 3D matrix containing all lag values for every time window iterations
method string algorithm used
aw_maxLag double the maximum lag parameter
aw_step double the step parameter
aw_windowSize double the time window parameter
samplingRate double sampling rate of data (Hz)
band string name of frequency band
filters vector two elements: lp and hp values of the frequency band
electrode_names cell array of string the ordered list of electrodes labels
aw_start double position in s in the data file of the first iteration.
nb_section int total number of sections (markers)
section_iterations vector of int number of iteration for each sections (markers)
sections cell array of string labels of sections (markers)
time vector of int the positions in samples in data for each iterations.
time_s vector the positions in seconds in the data for each iterations.
day int day of data recording
month int month of data recording
year int year of data recording
hour int hour of the day when data were recorded
minute int minute of the day when data were recorded
second int minute of the day when data were recorded

Visualise the resulting graph

After the computation is complete the h2/r2 graph plugin is launched allowing to visualise the resulting connectivity graph.

Running from the command line

Clone repository
  • Build_AnyWave
  • CLI
  • CLI_List
  • Changes
  • ExportData
  • MATLAB_API
  • MATLAB_BIDS
  • MATLAB_debug
  • MATLAB_functions
  • MATLAB_get_data
  • MATLAB_get_data_ex
  • MATLAB_get_markers
  • MATLAB_get_props
  • MATLAB_init
  • MATLAB_run
View All Pages