Automating scout time series extraction pipeline

Greetings,

I’ve been trying this software for some weeks now and I have learnt how to compute and isolate activity in specific sources, using the GUI. I only have 16-channel EEG recordings available and I want to extract activity present only in the precentral and postcentral cortices. The recordings correspond to periods where subjects were listening to music, as well as the 5 seconds prior to stimulus onset (as baseline). In particular, I followed the following steps:

  • created a default anatomy (to be used by all subjects, since no subject-specific anatomy information is available):
    • imported ICBM152 MRI
    • generated head surface data
  • created a subject:
    • imported 16-channel EEG data (pre-stimulus baseline and stimulus recording)
    • generated electrode positions by importing them using electrode names (from ICBM152 Generic 10-10 positions)
    • computed head model (cortex surface, OpenMEEG BEM)
    • computed noise covariance based on pre-stimulus baseline data (is this appropriate?)
    • computed sources (sLORETA, unconstrained)
    • selected some scouts from the Desikan-Killiany list
    • generated time series for the scouts

Please, correct me if there’s any wrong or missing step.

Now I would like to learn to automate all of this, that is, have a script that, given an EEG file, outputs the time series of the sources (always the same locations) I’m interested in. I have some MATLAB knowledge but I am clueless as to how to chain all of these steps programatically and was hoping someone can point me to the easiest way for doing this…

Thanks for the attention,
Francisco

Hello,

Your processing pipeline looks good, but you have to be aware that you cannot expect much from source imaging with 16 electrodes… It might be better for you to work only at the source level.

For scripting, you can start by reading this tutorial:
https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting

Then you can look for inspiration on the example scripts available for the various online tutorials:
https://neuroimage.usc.edu/brainstorm/Tutorials/Epilepsy#Scripting
https://neuroimage.usc.edu/brainstorm/Tutorials/VisualSingle#Scripting
https://neuroimage.usc.edu/brainstorm/Tutorials/VisualGroup#Scripting

“you have to be aware that you cannot expect much from source imaging with 16 electrodes”
is this equally true, regardless of source space resolution? right now, i have scouts covering many source locations. if I reduce source resolution, i.e., if I have less source locations to estimate, do the source imaging techniques work better with few sensors?

“It might be better for you to work only at the source level”
you mean “sensor” level, right? if so, I guess you are suggesting me to use the sensors closest to the cortices I want to focus on. However, aren’t all sensor readings an aggregation of everything that goes on electrically in your body? I agree that those sensors would be the most correlated with the sources I want, but they will still be very different from those same sources…

“you have to be aware that you cannot expect much from source imaging with 16 electrodes”
is this equally true, regardless of source space resolution? right now, i have scouts covering many source locations. if I reduce source resolution, i.e., if I have less source locations to estimate, do the source imaging techniques work better with few sensors?

Source imaging techniques have been developed, tested and used on high-resolution research EEG systems. Do you have reference articles for source analysis with 16-electrode sets in your research field?

you mean “sensor” level, right?

Sensor of course, sorry for the confusion.

if so, I guess you are suggesting me to use the sensors closest to the cortices I want to focus on

No, I’m suggesting you to stay close to methods described in the articles you used to formulate your hypotheses.

However, aren’t all sensor readings an aggregation of everything that goes on electrically in your body?

This is a well discussed question in EEG. This is why we re-reference them in a way that subtracts a lot of this body noise. For enhancing topography contrasts, you can also techniques like the “scalp current density” (available in Brainstorm through a fieldtrip function).