Hello, my name is Arnaud Delorme
and I'm the main software architect for the EEGLAB software
for processing electroencephalographic data.
This is part 5: single subject processing pipeline.
And this part is another view of EEGLAB capabilities.
It's by no mean a tutorial to show you how to process data, more to give you a broad view of what is possible.
So there's two parts.
This part is about single subject, and the next part we'll talk about multi subject and advanced analysis using scripting.
So when you import data from a subject, there's different steps.
First you have to import the raw binary data.
Then you have to pre-process the data, reject artifacts
extract data epochs if you have events
visualize your data
perform ICA decomposition
and look a bit more in-depth at your data.
So the first step is to install EEGLAB.
Once you have installed EEGLAB, you would type "eeglab" on the command line, and then the main EEGLAB interface pops up.
And there are some instructions about what to do first, for instance to create or load a new data set.
So here we'll just assume you want to import raw data
that's just coming out of the amplifier.
So there [are] many functions in EEGLAB to do that.
There [are] also two additional interfaces, one is called FILE I/O, and one is called BIOSIG.
So there [are] many ways to import raw data from many different formats.
There's a wiki page that describes all the data which can be imported.
There is also a huge collection of plugins to import other types of data which might not be supported directly by EEGLAB.
So once you've imported your data, you might want to import event information.
For instance, if you collected your data and presented some images, using Presentation or E-Prime
you might want to fuse your EEG data with these events.
So this is the way to do it here.
You can also import events from data channels.
Sometimes you have one channel that contains event information, so you might want to import it in from there.
The next step is to look at your data.
So there is a option to scroll your data.
And you can see the vertical bars, here, indicate events which happened during the recording.
And you can scroll through this EEG data.
Then the next step is to import your channel locations.
This is an example of a 256 channel montage.
You might have a different montage.
If you don't have channel locations associated with your electrodes, then EEGLAB can assign template ones if you have standard names for the electrodes.
For instance, if you have 10-20 names EEGLAB will automatically find some template locations from these electrodes.
But if you have scanned the electrodes, you can also import them using this menu (Edit -> Channel locations) and plot them.
The next step is to pre-process the data.
So there [are] different types of pre-processing.
First you can edit the information: the dataset information, the event information, the channel information as we just saw.
And then you have different menus on the right to preprocess your data.
So changing the sampling rates.
If your sampling rate is relatively high, it's going to take a long time and a lot of memory to process your data, so you might want to change the sampling rate.
You can also filter your data (sometimes there is drift in continuous data)
change the reference that the data was recorded with, interpolate electrodes, [and] reject continuous data by eye.
So here's an example of rejecting continuous data by eye.
It's the same scrolling window that we just saw before.
If you drag your mouse, you can select bad portions of data and reject these portions.
If it's an event related task, you might want to extract data epochs.
And when you extract data epochs, you typically provide the name of an event (eg. "square") and epoch limit.
And then what EEGLAB will do is that it's gonna go in the continuous data and slice your data around the event of interest.
Then it removes the portion so that when the data epochs are represented in the contiguous fashion, and then you can reject bad epochs by using different methods.
So there is a menu here, "Reject data epochs."
And here we have three colors, the red, the purple, and the green, which indicate three different methods for rejecting bad data.
You can also see the channels are in red, which means they're flagged for rejection.
So here we have five epochs, and epoch number two was rejected by three different methods.
So this one is clearly an artifact.
And you have other methods to reject data, so it's just an example.
Once you've rejected the the bad data, you can start looking at your ERP.
So as in any other software, you can look at the ERP.
This is the standard plot to look at ERP.
When you click on an individual ERP it will zoom in for this specific channel.
You can also plot ERPs in 2D or in 3D.
So here on the top it's 2D, on the bottom it's 3D.
You can also plot the spectrum.
For instance, if you just have that task with no events (eyes open, eyes close) you might want to look at the spectrum.
And this is the spectrum with scalp topography at 6, 10 and 22 Hz.
And each of the lines indicate a channel.
And then you can also plot what we call ERP image.
So in one of the first lectures I described how to create this kind of image.
We'll go through that in more depth when we deal with plotting the data.
Once you've looked a little bit at your data you might want to run ICA
both to reject artifacts and try to identify sources which will be relevant for further processing.
So to run ICA (independent component analysis)
(and we have a series of lectures on ICA, so this is just a teaser)
you press the button "Run ICA" and then you can select which ICA you want to run.
And typically you get a collection of scalp topography.
Here we had 32 channels so we get 32 components.
Once you click on one of the buttons, it shows you the details about that component
its activity through time (this is a blink component), its power spectrum.
So that's a way to look at the components.
Then to see which components are relevant, first you might want to try to localize these components.
So we have this plugin that's included by default with EEGLAB, called DIPFIT.
And then you can localize.
For each component you can find a dipole, or you can also do distributed source modeling using Loreta.
Once you've identified the components you're interested in, the goal is to look at your ERP and see which component(s) contributed the most to that ERP.
So that's why we have this menu here.
This is called F topo.
It's the component ERP with the component map so it's which component contribute the most to the ERP.
So here we can see that [for] the peak of the ERP at about 300ms
it's component number one that contributes the most to this peak, so we might want to look in more detail at this component.
If you don't have events, you might want to look at which components contribute the most to the spectrum.
So for instance, these are the components which contribute the most to 10 Hz.
So here's a scalp topography at 10 Hz
and then the components which contribute the most at 10 Hz.
And the scalp topography of the components is slightly different.
It's squared because this is the power of the component.
With components, you can also look at time frequency decompositions.
And there is lecture also describing time frequency decomposition.
Of course, you can also look at the channel time frequency decomposition.
So this this was an overview of what you can do on single subjects with components.