Tutorial 19: Clusters of sensors

Authors: Francois Tadel, Elizabeth Bock, Sylvain Baillet

In EEG, most of the analysis can be done directly on the electrode values. This tutorial explains how to group sensors in a cluster and overlay channels from different conditions in the same graph.

In MEG, we tend to avoid working at the sensor level because the signals are ambiguous, we work mostly in the source space, which is the topic of the next tutorials. If you are planning to work only with MEG recordings, you may skip this tutorial.

Cluster tab

The Cluster tab is not shown by default in the Brainstorm interface.

Creating clusters

A cluster is a group of one or multiple channels. There are two ways for creating a new one.

Displaying clusters

We now have two clusters available in the list. The second one contains only one channel, displaying it corresponds to displaying the channel time series. The first one contains multiple channels, we need to apply a function to group them into one signal only.

From the database explorer

Once the clusters are defined, you can apply them to any number of files in the database in one click.

Processes

Extract > Clusters time series: The process computes the clusters signals and save them in a new file in the database. Select the files of interest in Process1, and select the option "Concatenate" if you want the cluster signals from all the input files to be saved in the matrix file. If the option is not selected, the process creates one new matrix file for each input file.

cluster_process.gif

Import > Channel file > Import clusters of channels: The process allows to automate the loading of the same clusters for multiple datasets. In Process1, select at least one data file in each folder in which you want to import the clusters (it will only add it once per channel file, even if you have many data files from the same folder in input), then select the cluster file to import. This cluster file can be generated from the Cluster tab: select one or more clusters and click on the [Save] button.

cluster_import.gif

Scripting

The function db_set_clusters.m allows adding clusters to multiple channels programmatically. Read the header of the function for help with the parameters. Here are some examples:

Add the clusters defined in array of structures 'sClusters' to the channel file of folder pointed by iStudy:

db_set_clusters([], iStudy, sClusters);

Copy all the clusters from a channel file to all the other channel files in the same subject:

db_set_clusters(ChannelFile, 'AllConditions');

Remove all the clusters from all the channel files in the database.

db_set_clusters([], 'AllSubjects', []);

Get a structure template for sCluster:

sCluster = db_template('cluster');

Copy the clusters selected in the Clusters tab of the Brainstorm figure to specific studies:

panel_cluster('CopyClusters', iStudies);








Feedback: Comments, bug reports, suggestions, questions
Email address (if you expect an answer):


Tutorials/ChannelClusters (last edited 2023-02-17 10:34:10 by FrancoisTadel)