1.3: Exercise- Loading and Viewing an EEG File

Applied Event-Related Potential Data Analysis 2e · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-NC 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    1.3: Exercise- Loading and Viewing an EEG File

    We’re now going to start a quick tour of ERPLAB Studio (also called eStudio). In the first exercise, you’ll look at the EEG data and the averaged ERPs from one subject in an N400 experiment that will be described in more detail in the next chapter. 

    If Matlab is not already running, launch it. Then launch eStudio by typing estudio in the Matlab command window (if it is already running, quit it and then launch it again). It’s usually a good idea to reset all of eStudio's settings at the beginning of a chapter. That way, eStudio will be in its default state, and what you see will better match the screenshots in this book. The best way to do this is to click the Reset button under the lower right corner of the plot region, wait for the Reset window to appear, and then click Reset ERPLAB Studio. This is like a "factory reset" that returns all settings to their default values and clears all loaded files. You can also reset settings and clear files for the individual EEG, ERP, and Pattern Classification tabs.

    Now download the Chapter_1 folder from the master folder at https://doi.org/10.18115/D5G045. Note that an underscore is used instead of a space in the folder name. Spaces can sometimes confuse Matlab, so it’s best to use underscores or dashes instead of spaces in your folder names and file names. But don’t use any other non-alphanumeric characters. Set Chapter_1 to be Matlab’s current folder. You can do this either from the main Matlab window or by going to the EEGsets panel in eStudio and clicking Current Folder. The current folder is part of Matlab’s path, and it’s the first place Matlab will look for files and code. Screenshot 1.3 shows what the Matlab GUI should look like once you’ve set the current folder. You’ll see the path to the folder and the contents of the folder.

    Matlab Command Window

    Screenshot 1.3

    There are various ways of changing the current folder, including double-clicking on a folder name within the current folder. Play around with this a bit (googling it if necessary using a search phrase such as “matlab current folder GUI”). You’ll be changing the current folder frequently, so you’ll want to know how to do it efficiently.

    Once you have the correct current folder, go to the EEGsets panel in eStudio and click Load. It will bring up a dialog box, which should show the contents of the Chapter_1 folder. Select and open the file named 1_N400_preprocessed.set. This file is called an EEGset, which means that it contains the EEG data for one participant. [Note that EEGLAB uses the term dataset instead of EEGset, but ERPLAB uses a separate type of file called an ERPset to hold averaged ERPs, so dataset isn't a sufficiently precise term for a file that holds EEG data but not averaged ERPs.]

    As shown in Screenshot 1.4, you should now see 1_N400_preprocessed.set listed in the EEGsets panel and the EEG waveforms in the plot region.

    1_N400 EEG Data

    Screenshot 1.4

    The plot region shows the EEG data from all of the electrode sites for the first five seconds of the recording. If you click the +X button near the bottom left corner of the window, the plot will shift rightward to show you the next 5-second period. The +5X button shifts 25 seconds rightward. If you were to change the Time Range in the Plot Settings panel to 10 (and click Apply), you would see 10 seconds of data per screen, +X would shift the plot rightward by 10 seconds, and +5X would shift by 50 seconds.

    You can also go to a particular time point by typing a number into the box between the -X and +X buttons (and hitting Return/Enter). To see this, type 20 into that box right now (followed by Return/Enter) to show the time period beginning 20 seconds from the start of the recording. You should see something like Screenshot 1.5.

    1_N400 EEG Data at 20 seconds

    Screenshot 1.5

    If you look at the occipital and parietal electrode sites (e.g., Pz in Channel 13), you can see an oscillating wave. Let's take a closer look by restricting the plot to a 1-second period and focusing on the posterior electrode sites. First, change the Time Range to 1 in the Plot Settings panel (and click Apply). Then go to the Channel & IC Selection panel and select Channels 9-13 (and click Apply). You should see something like Screenshot 1.6.

    1_N400 EEG Data at 20 seconds Expanded

    Screenshot 1.6

    Now count the number of positive peaks between 20 and 21 seconds. You should see 11 peaks in this 1-second period. 11 peaks per second means that it’s an 11 Hz oscillation. This is called the alpha wave, which was the very first feature of the human EEG to be described (Berger, 1929). Alpha waves are oscillations between approximately 8 and 12 Hz that are largest over posterior electrode sites and are particularly large when the participant is zoned out or has closed eyes. I like to think of alpha waves as indicating that the participant’s attention is internally focused instead of externally focused. In most experiments, you want the subject to be alert and paying attention externally to the task, so you don’t want to see a lot of alpha activity. However, most ERP experiments are pretty boring, so the participants are often a little sleepy (which makes them internally focused), and they generate quite a bit of alpha. When a participant in my lab produces a lot of alpha, we often give them a short break and/or offer a caffeinated beverage.

    Now let’s look at the vertical scale. If you look near the right edge of the plot region, you should see a vertical scale marker labeled 50 µV. This means that the vertical space indicated by the marker corresponds to 50 µV. The oscillations at the PO7 electrode site are about half as big as this marker, so they're about 25 µV (peak to peak). If we wanted to zoom in closer, we need to do something a little counterintuitive: We'd need to specify a smaller number of µV for the vertical scale. Let's give it a try. Type 25 in the Vertical Scale box in the Plot Settings panel (and click Apply). The scale marker is now the same size (in pixels), but it represents 25 µV instead of 50 µV. The oscillations at the PO7 electrode site are now about the same size as the scale marker.

    The last thing we're going to do in this section is restore all the plotting parameters to their default values. That way, the EEG you see in eStudio will match the screenshots in the subsequent sections. To do this, click the Reset button under the lower right corner of the plot region. After a pause, you will see a small window that allows you to reset the parameters. Make sure that the box for Restore default parameters for EEG tab is checked. We haven't changed any of the ERP panels, so we don't need to reset those. And we don't need to clear any EEGsets or ERPsets. Just click Continue to restore the defaults for the EEG panels.


    This page titled 1.3: Exercise- Loading and Viewing an EEG File was last modified on Thu, 01 Oct 2026 18:52:43 GMT and is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Steven J Luck directly on the LibreTexts platform.