Plotting Standard Deviations on Clusters

Hi Francois,


See two uploaded pictures. When I plot clusters that have average plus std deviation, if I use the "stacked" plot arrangement, the patch for the standard deviation is correctly included to indicate +/- standard deviations around the line. But when I press the button to make an "overlay" or "butterfly" plot, the figure is missing the patch for the std. deviations. From what I can tell, it's a simple omission. I used matlab's properties feature, and the overlay plot simply does not have the patches for the std. dev, while the stacked plot does. Is this a simple fix, or are we missing some concept?

  • John

Hi John,

I don't understand how you obtained this... There was nothing to display clusters for averaged files that where computed with mean+standard error.

I added some prevention tests and treatments to handle this a bit better, both when plotting them from the Cluster tab and when using the process "Extract clusters time series":

@MartinC Maybe this will break some of the code you committed previously (https://github.com/brainstorm-tools/brainstorm3/commit/6583f382d0688fd4bd9c3b2c12036b751cf6452c#diff-b62ef3b24e74a4b09f6709aa32aeb9f2), I didn't test everything thoroughly... sorry...

What Martin added before:
The option to compute the mean+std across multiple electrodes of any file.

What I added now:
The option to display correctly an averaged file that was computed with the option Mean+Std.
This works only if a cluster includes only one sensor, which was John's initial request. Otherwise I wouldn't know how to average the standard deviation across multiple sensors...

Thanks François, it did not break anything on my end!

Hi Francois, it looks fixed now.

Steps I took, building on what you showed me last week about displaying colored averages and standard deviations. Using, for example, the Neuromag Tutorial data:

Average+Std Dev of Left and Right data in the process box. Plot the magnetometer time series for each condition, select a waveform, such as this:

From the Cluster Tab, select "New Selection" defaulted as "c1". Check on "overlay files". Plot c1.

Result is now fixed (August 1, 2019)!

Stacked:

Overlay now shows Std Deviation patch:

Thanks!

  • John