Figure 1
Interpolating a Bad Electrode From Its Neighbors
Click an electrode to break it, click again to choose how to fix it.
The field is simulated from three smooth sources, and the weights are a Gaussian of great-circle distance rather than the spherical spline that pop_interp fits.
What You Are Looking At
The head in Panel A is seen from above, nose at the top, with a 30-electrode montage similar to the lab's, in standard 10/20 and 10/10 positions. Underneath them the color shows the scalp voltage at the time set by the cursor, built from whatever each electrode is reporting. In the clean recording the map is smooth, because voltage spreads through the skull like a blur and neighboring electrodes always see similar values. Panel B shows the three versions of the selected electrode's waveform: the true signal in gold, what the electrode actually recorded in gray, and the repair in teal.
An electrode goes bad in a few recognizable ways. A lost connection gives a flat line. Poor contact, with high impedance, lets high-frequency noise in. A slowly changing junction between gel and skin produces drift that survives the high-pass filter. In every case the sign is the same. The channel stops resembling its neighbors, which shows in the channel scroll and as a bright spot in an otherwise smooth map. Interpolation replaces the channel with a weighted blend of the good electrodes around it, nearer ones counting more; the line thickness shows each neighbor's weight. The page uses a Gaussian of the great-circle distance, an approximation of the spherical spline that EEGLAB fits (Perrin et al., 1989).
Try This
- Click Cz and choose Flat (lost contact). The scalp map collapses to a hole at the vertex, and the gray trace is a line at zero.
- Click Cz again and choose Interpolate this channel. The map is smooth again and the teal trace sits almost on top of the gold one; read the rms error in the readout.
- Do the same to an edge electrode such as T7 or O1. With neighbors on only one side the error is larger.
- Switch to the 19-channel montage and repeat steps 1 and 2. With the nearest neighbors farther away, the same repair is worse.
- Break four or more channels in the 30-channel montage and click Interpolate all bad channels. The readout passes 10% and the warning appears, the point at which you would consider excluding the participant.
Why It Matters for the Pipeline
The average reference computed in step 7, and the topographic maps and grand averages later on, all assume that every participant has the same electrodes in the same places. Dropping a bad channel would break that. The average reference would be built from a different set of sites for that person, and their scalp maps could not be compared with anyone else's. Interpolating keeps the montage identical. In the lab script the bad channels are listed per participant and repaired with bad_chans = [15 22]; EEG = pop_interp(EEG, bad_chans, 'spherical'); (Delorme & Makeig, 2004).
The repair comes with two cautions. An interpolated channel carries no information of its own; it is a smooth guess made from its neighbors, so it cannot be counted as an independent measurement, and if the effect you care about lives at that site the estimate is only as good as the surrounding coverage. The order also matters. Interpolate before re-referencing. If a flat or noisy channel goes into the average reference, its problem is subtracted from every other channel on the head. The labs teach re-referencing first because it is simpler to see; the final script on the last page puts interpolation ahead of it, and because re-referencing is linear you can also simply re-run pop_reref(EEG, []) after repairing a channel. The usual rule from the lab is to allow up to about 10% interpolated channels, three in a 30-channel montage, and to consider excluding a participant who needs more; ERP CORE excluded, rather than interpolated, participants with many bad channels (Kappenman et al., 2021).
References
Delorme, A., & Makeig, S. (2004). EEGLAB: An open source toolbox for analysis of single-trial EEG dynamics including independent component analysis. Journal of Neuroscience Methods, 134(1), 9–21. https://doi.org/10.1016/j.jneumeth.2003.10.009
Kappenman, E. S., Farrens, J. L., Zhang, W., Stewart, A. X., & Luck, S. J. (2021). ERP CORE: An open resource for human event-related potential research. NeuroImage, 225, Article 117465. https://doi.org/10.1016/j.neuroimage.2020.117465
Perrin, F., Pernier, J., Bertrand, O., & Echallier, J. F. (1989). Spherical splines for scalp potential and current density mapping. Electroencephalography and Clinical Neurophysiology, 72(2), 184–187. https://doi.org/10.1016/0013-4694(89)90180-6