EEG and ERP Channel Operations

Just as bins can be created and modified with Bin Operations, channels can be created and modified with Channel Operations.  There are separate routines for doing this on the EEG data in a dataset (ERPLAB > EEG Channel Operations) or on the ERP data in an ERPset (ERPLAB > ERP Channel Operations), but these routines work in the same way.

For example, it is often convenient to compute bipolar channels from the monopolar channels in the EEG and apply artifact rejection to the bipolar channels.  For example, one might create a bipolar channel representing the difference between an electrode above the eyes and an electrode below the eyes, which makes it easier to detect blinks.  Alternatively, one might want to re-reference each channel to the average of all the channels (excluding the artifact channels).  The ERPLAB > EEG Channel Operations function that makes these kinds of transformations easy. 

As illustrated in the screenshot below, simple equations are used to define how a channel should be computed from the current dataset or ERPset.  Imagine, for example, that you want to create a new bipolar VEOG channel by computing channel 32 minus channel 31.  If you had 32 channels of data originally, the new channel could be channel 33.  You would specify the new channel as “ch33 = ch32 – ch31 label VEOG”.  This says that ERPLAB should create a new channel 33, defined as channel 32 minus channel 31, and it should be labeled “VEOG”. It is also possible to precede the channels on the right side of the equals sign with coefficients.  For example, you could type “ch33 = 0.5*ch31 + 0.5*ch32 label AVGCHAN” – this would create a new channel 33 that is the average of channels 31 and 32, with the label “AVGCHAN”.

As in Bin Operations, the list of equations can be saved in a file.  In addition, Channel Operations can either modify the current ERPset/dataset or create a new ERPset/dataset.  The channels on the left side of the equals sign are labeled with “ch” or “chan” when you are modifying the current ERPset or dataset, and they are labeled with “nch” or “newchan” or “nchan” when you are creating a new ERPset.  When modifying the current ERPset/dataset, you may want to first make a duplicate and then operate on the duplicate.  For ERPsets, this can be done with ERPLAB > Duplicate or rename current ERPset.  For datasets, you can save the current dataset to disk and then load it again with FILE > Load existing dataset.  It is not necessary to operate on a duplicate, but it can make it easier for you to back up and try again if you make a mistake or change your mind.  This is not generally useful when you are creating a new ERPset/dataset, because the current ERPset/dataset is not changed in this mode.

The following are some examples of equations you might find useful.  If the data were recorded with A1 as the reference, and A2 was recorded with A1 as the reference in channel 15, you could re-reference the first few channels to the average of A1 and A2 by subtracting half of A2 from the other channels:

Ch1 = ch1 – ch15/2 label F3

Ch2 = ch2 – ch15/2 label F4

Ch3 = ch3 – ch15/2 label C3

Ch4 = ch4 – ch15/2 label C4

 

To subtract the average of electrodes 1-13 from the first few channels, you would do something like this:

Ch1 = ch1 – avgchan(1:13) label F3

Ch2 = ch2 – avgchan(1:13) label F4

Ch3 = ch3 – avgchan(1:13) label C3

Ch4 = ch4 – avgchan(1:13) label C4

 

If you have EMG data in channel 16, you could create a rectified version of the data in channel 17 as follows:

Ch17 = abs(ch16) label Rect_EMG

 

To create a channel with the mean global field power of channels 1-13, you would do this (which works on ERPsets but not datasets):

Ch14 = mgfperp(1:13) label MGFP

 

To create a channel with the mahalanobis distance between channels 1 and 2, you would do this:

Ch17 = mahaleeg(ch1, ch2) label MAHAL

           

If you wanted to delete some of the channels, you have two options.  First, you could use the mode in which you create a new ERPset/dataset, specifying the channels you wish to retain, as in the following example of the first few lines of a set of equations that would exclude channels 1 and 2 (F3 and F4):

nch1 = ch3 label C3

nch2 = ch4 label C4

nch3 = ch3 label P3

nch4 = ch4 label P4

 

Alternatively, you could use the mode in which the current ERPset is modified directly, placing the following at the end of your list of equations (this works only for ERPsets):

delerpchan([ 1 2 ])

 

To remove channels from the EEG in a dataset, EEGLAB already has a menu to do this.  Go to EEGLAB>Select data>channel range and click on remove these.

<<Previous Section           Next Section >>


Back to Table of Contents