11.6: Exercise- The ALLEEG Variable and Refreshing the ERPLAB Studio GUI
Opening the book…
When you have multiple EEGsets in the EEGsets panel, this means that those EEGsets have been loaded into memory. The current EEGset is stored in the EEG variable. All of the EEGsets (including a copy of the current EEGset) are stored in a variable named ALLEEG, which is just an array of EEG variables. When you go to the EEGsets panel, you’re seeing a list of the EEGsets stored in ALLEEG. This is one reason why changing the name of EEG.setname didn’t cause a change in the EEGsets panel. That is, we changed the name of this field in the EEG variable, but not in the ALLEEG variable that is used for the EEGsets panel.
Let’s fix that by typing ALLEEG(1) = EEG; on the command line (including the semicolon so that it doesn’t print the new value in the Command Window). Now type ALLEEG(1).setname (without a semicolon), and you’ll see that the first (and only) EEG structure in ALLEEG has the new name ('My First Custom Dataset').
However, if you look in the EEGsets panel, you still won’t see the new name for the EEGset. This is because the ERPLAB Studio GUI doesn’t “know” that the ALLEEG variable has changed. That is, the GUI only updates the names listed in the panel when it thinks that something has changed. You can tell ERPLAB Studio that there has been a change in the EEG or ALLEEG data by clicking the Refresh button in the EEGsets panel. Try this, and then look at the EEGsets panel. Now you should see the updated name (My First Custom Dataset). Note that there’s also a Refresh button in the ERPsets panel for updating the names of the ERPsets in this panel.
Now let’s see what happens when we have two EEGsets loaded in ERPLAB Studio. To make the second dataset, filter the EEGset you already have loaded by going to the Filtering panel (in the EEG tab) and specifying a high-pass cutoff at 0.1 Hz, a low-pass cutoff at 30 Hz, and a roll-off of 12 dB/octave. Name the resulting EEGset 01_N170_filt. You should now see two EEGsets in the EEGsets panel.
If you look at the EEG tab in the Variables pane, you will see that EEG.setname is now 01_N170_filt. This is because the EEG variable always holds the currently active EEGset (which is the filtered EEGset you just created). If you double-click on ALLEEG in the Workspace pane to see it in the Variables pane, you’ll see that ALLEEG now has a size of 1 x 2 because we have two datasets loaded. If you type ALLEEG(1).setname, you’ll see the name of the first dataset. If you type ALLEEG(2).setname, you’ll see the name of the second dataset.
Leave these two datasets loaded for the next exercise.