8. Interpolation

Interpolation (or ‘oops the eye electrode fell off my participant’s face’) #


Intro

Whilst taking a look at your data, you may notice that certain electrodes that seem particularly noisy (i.e., fuzzy or making unpredictable leaps and falls). If this is the case, you may wish to interpolate them. Interpolation - put simply - involves recreating one electrode from its surrounding electrodes. As a function in EEGLAB, interpolation is fairly simple to carry out.

drift

It’s easy to see why interpolation is useful. However, let’s exemplify the pitfalls of interpolation through an example:

Imagine you are a researcher interested in measuring the N400 response to a target. You collect data from a participant, and note that whilst the data overall is of very good quality, a number of electrodes have broken or lost connection during the testing session. These electrodes are Cz, C2, CP1, CPz, and CP2.

In theory you could interpolate these electrodes. But you need to think critically about the dataset this would leave you with. There are two problems here. 1. The electrodes that require interpolation are clustered together in a group. This means that rather than rebuilding the signal from immediately surrounding electrodes, any signal that forms part of the reconstructed electrode will need to come from outside of this bad electrode cluster. The more bad electrodes you have in close proximity, the less accurately interpolation can rebuild something close to the true signal that would have been recorded at the electrode site. Problem 2 pertains to your experiment design. If my intention is to measure the N400, the electrodes in my bad cluster are critical. The N400 - as a typically centroparietal component, is typically recorded from central, centroparietal and (sometimes) frontal or parietal sites. If the vast majority of these electrodes bad (i.e., requiring interpolation), you need to consider whether it’s reasonable to retain a dataset in your grand average for which 5 integral electrodes have been interpolated. The long and short of it is, use interpolation to your advantage, but make sure the way you use it is reasonable.


Video

Code
   EEG = pop_interp(EEG, [SPECIFY ELECTRODE NUMBER HERE], 'spherical');

Script

Script #5 (download).

Script #5 (view).

Note that to run this script you should use Dataset #7. From this step onwards we will use Dataset #7 which has been pre-cleaned (ready for ICA), as opposed to Dataset #1.


Datasets

To run this operation via the user interface, the example dataset (used in the above video) can be downloaded here, along with an additional dataset for scripting practice.


Activity

Have a go at interpolating electrodes manually via the UI, and via the attached scripts. Note that the scripts provided here enables you to run through interpolation for all participants whilst specifying ‘bad’ electrodes at the beginning of the code. This is because most participants will need different electrodes interpolating, so specifying a given electrode won’t work if you want to use the script to pre-process en-mass. To practise with the script, enter the electrode that you want to interpolate for a given participant in the curly brackets that follows that participant’s ID, e.g.:

   badchans.participant_01 = {'Cz'}; 

Then note how this creates a ‘badchans’ list for each participant. See if you can get the script running for the two provided datasets, interpolating whichever electrodes you like.


Write-up

COMING SOON


FAQ