Overlaying plots with SEM for Time-Frequency time series (Clusters?)

Dear Brainstorm team,

I have an experiment with two conditions. I computed ERPs including standard error and have been able to overlay the plots for the two conditions successfully for a specific sensor using the code:

view_clusters(DataFiles, ClusterLabels, [], ClusterOptions)

where the cluster is defined as a single sensor.

I have also performed a time-frequency analysis on the data. I would like to visualize the gamma activity for the two conditions overlayed with SEM much as I was able to do for the ERP. There seem to be a variety of methods for extracting the gamma band activity from a TF file by averaging across the frequencies or extracting the time course of a single frequency, but the results of all of these processes still produce time-frequency files that do not appear to be accepted by the view_clusters function.

Is there another way to do this within brainstorm? For example, if I have TF files that contain a single time course for each sensor, can these be converted or cast into Data files that would be accepted by view_clusters.m? Or is there some other way to make use of the brainstorm plotting functions for this purpose? Or do I need to extract the gamma signals to Matlab and do all the plotting manually in Matlab?

Many thanks!

Dan

Hi Dan,

There is not a function to cast TimeFreq files to Data, as the resulting files are not properly recordings.

This is a way to obtain such plot:

  1. Use the process Extract > Extract values twice to extract the time series for a given frequency and a given sensor for both of the conditions
  2. Then concatenate the resulting TimeFreq files with process Standardize > Concatenate signals
  3. Right-click in the merged TimeFreq file and > Display time series

Thanks, Raymundo. I have tried this and it mostly works, but it seems I don't get the shaded patch around the time series illustrating SEM despite the fact that the SEM does seem to be included in the output files after running:

% Process: Average+Stderr: Everything
sFiles = bst_process('CallProcess', 'process_average', GroupAFiles, , ...
'avgtype', 1, ... % Everything
'avg_func', 7, ... % Arithmetic average + Standard error
'weighted', 0, ...
'matchrows', 1, ...
'iszerobad', 1);

GroupAFiles are a group of Time-Frequency plots that are grouped into 3 frequency bands, but I selected one of the frequency bands to display the time series.

Should I be able to see the SEM in the time series plots or does this only work for data files?

Many thanks,
Dan