How to plot the RMS of the time course of each vertex element on the cortical surface?

Hi all,

I am using Brainstorm to do source localization on resting-state EEG, and I would like to view the time-averaged cortical activity, i.e., I want to plot the RMS of the time course of each vertex element on the cortical surface. To be clear, I do not have epochs or trials, just one long resting segment. I want to average across all time points in this segment. Right now, I only see options to plot activity on the cortical surface at each discrete time point. Is there an option for what I'd like to do, and if so, how do I do it in Brainstorm?

Thanks,
Joel

Hi Joel,

I checked if there was an easy way from the pipeline. It doesn't seem like there is. What you could do is:

  • calculate your sources
  • export the sources*time matrix to Matlab
  • calculate the RMS for all the sources and overwrite the sources matrix with your RMS value, you could just copy it with repmat to have it on every time point
    -import your source matrix back into matlab, so you have your RMS values as "sources"

Hope that helps.

Kind regards,
Steven

1 Like

You could also use the process "Pre-process > Run Matlab command", this does the export-import for you and you just have to type in the Matlab code you'd like to execute on the source values.
https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting#Custom_processing

Note that this might not be a very relevant measure of activity.
For processing resting state, a measure of power by frequency bands might be more interesting.
Make sure you follow this tutorial before going further in your analysis:
https://neuroimage.usc.edu/brainstorm/Tutorials/RestingOmega

2 Likes

Thank you Francois. In fact, looking at the resting power on the cortical surface does make more sense. My original idea was to filter the resting scalp EEG in the delta band, and to then look at the RMS of each vertex element. But yes, of course, I can also just do source localization on the broadband signals and then do a frequency transform on the sources and look at delta power on the cortical surface.

Best wishes,
Joel

This is very similar conceptually, and ideally you would be able to make similar observations. In practice, it would give different results, especially if you have important sources of noise in frequency bands other than delta.

If you filter the signals before source estimation, make sure you also use the filtered data to compute the noise covariance matrix. And don't forget to recompute the noise covariances and inverse models if you change the frequency band at which you filter your EEG signal.

1 Like

Thank you Francois, I'll let you know if I have more questions.