Project Neuromat
Jorge Stolfi Report 2013-11-15

Hi all, this is a short report on what I have been doing in the last few months (up to dec/2013).

I have been looking at the 128-electrode datasets that Claudia uploaded to ~/Dropbox/eeg_sinal_ghislain/ a while ago (S13.raw and S14.raw). I have extracted the runs as separate files, filtered and plotted them.

I have some observations and questions about the data.

On the file format:

On the experimental setup:

Extracting the runs

For each experimental run, I extracted a segment from the original dataset (S13.raw or S14.raw), exactly 7 seconds long, spanning a fixation phase and the following stimulus phase, plus some extra frames at both ends. The length of the two phases varies somewhat, but the extracted files have the fixation-to-stimulus transition always at the same moment, exactly 3.5 seconds after the start of the file.

Removing the electrode offsets

In the original files, the potential of each electrode includes a very large and seemingly arbitrary DC offset (up to 20 mV = 20.000 µV), mostly constant but different for each electrode. This offset seems to vary (gradually or abruptly?) along the session, and from session to session.

Therefore, when extracting the individual runs I had to compute some 'mean' potential of each electrode in each run and subtract it from its data values, just to be able to plot them. Apart from this mean shift, no other processing was done on the raw runs.

Examples of extracted runs

The figures below show three typical extracted runs, with the constant offsets subtracted fromeach electrode. The notation s013_r00209 means subject 13, block 2, run 9, etc.

For each run, the leftmost plot shows all 128 channels as a function of time (seconds) since the start of the file. Next to it are two plots of the power spectra of those channels, one from 0 to 35 Hz, the other from 0 ro 250 Hz (the Nyquist frequency limit). Note that the vertical scale is logarithmic.

s013_r00209



s013_r00805



s014_r00203


These files are available also in ~/Dropbox/eeg_sinal_ghislain/2013-11-15-stolfi/.

Observations on the raw runs

Filtering

After extracting the runs, I passed them through a Fourier-based bandpass filter.

Filter choice

For the low-pass and band-pass stages, I tried the Butterworth filters used in the 20-electrode tests, but I found that they produced substantial "ringing" whenever the input had a spike or a sharp step.

I therefore used Gaussian filters instead. Their transitions from "pass" to "kill" are more gradual but they are free of ringing.

The following plots compare the effects of both filters. The top figure shows some synthetic signals (an impulse, some bell-shaped pulses, a square pulse and a chirp). The next two figures show the output of the Gaussian and Butterworth filters, respectively, on those signals.


synth_p



synth_p_G



synth_p_BUR8


Removing long-period drift

Fourier-based filters assume that the input signal is periodic. This is not a viable assumption when the input includes substantial variations whose period is longer than the signal sample, such as random drift. For the Fourier filter, those long-period variations create a discontinuity in the signal at the end of each period, which gives rise to spurious artifacts near both ends when it is smoothed out by the filter.

Unfortunately, such long-period drifting is conspicuous in many raw runs, as noted above. To reduce the artifacts, I fitted a cubic polynomial (by a robust variant of least squares) to each electrode signal in each run, and subtracted it from the signal, before applying the Gaussian filter.

Examples of filtered runs

Here are some samples of filtered runs, and their power spectra:


s013_r00121



s013_r00209



s013_r00229



s013_r00805



s014_r00203



s014_r00425


These plots show that the filtering succeeded in removing most of the drift and power-line noise, leaving a set of fairly cohrent signals.

General observations on filtered runs

Blinks

Bad news: almost every extracted run contains one or more blink pulses, and most of them may have to be discarded. Good news: the blink pulses have a fairly simple, single-component model. Bad news: there may be significant "sub-blink" muscular signals even when there seem to be no blink pulses:

Few blink-free runs

Presumably blinks are not a problem unless they occur in the "important" part of the run. I arbitrarily assumed the "important" part to be the last 1 second of the fixation phase and the entire 3 seconds of the stimulus phase (4 seconds in total). Even so, I found that most runs would have to be discarded: only 91 runs of subject 013 (36%) and 16 runs of subject 14 (6%) were free of blinks or other accidents in the "important" interval.

Distribution of blinks

Perhaps not surprisingly, I found that blinks are not uniformly distributed in time. The following histograms shows the distribution of the blink's position as a function of the time since the start of the extracted run file, for the two subjects:


s013_blinks_hist   s014_blinks_hist
 

Recall that the fixation-to-stimulus transition occurs at precisely at t=3.5 seconds after the start of each run file. The fixation phase begins around t=0.5 seconds (sometimes a bit earlier) and the stimulus phase ends at t=6.5, usually with the start of another fixation phase.

From these plots, it seems that both subjects are much more likely to blink around t=1.0, that is, about 0.5 seconds after the start of the fixation phase. (The timing of those blinks may be even more regular than it seems in the plot, since the peak is somewhat broadened by the variation in the starting time of the fixation phase.)

Conversely, blinking seems to be suppressed during the first 0.5 seconds of the stimulus phase.

Within the stimulus phase, subject 014 is more likely to blink about 1 second into it, whereas subject 013 shows no preference after the initial suppression period.

Blink pulse modeling

The blink pulses vary substantially from subject to subject (or session to session), presumably due to changes in the anatomy, to different "blinking styles" (which muscles are activated in the blink), or simply to different placements of the electrodes.

On the other hand, blink pulses are remarkably similar within the same subject and session. While there is some variation in the duration and amplitude of the blinks, all electrode potentials rise and fall together, in fixed proportions, throughout the blink pulse. In other words, there is a single voltage distribution over the skull that changes only by a common time-varying factor.

To find that pattern I extracted all blink pulses from each session, and ran a principal component analysis on them. The dominant component (the one with largest intensity), for each subject, is shown graphically below:


s013_blinks_P000_eig_b2_f000000   s014_blinks_P000_eig_b2_f000000
 

In these plots, as in my previous animations, lighter and warmer tones are supposed to indicate positive voltages, darker and bluer tones are negative. However, the two patterns above had their polarity accidentally reversed by the PCA algorithm. Thus, during a blink pulse the frontal region becomes positive while the rest of the scalp becomes negative. The latter includes the temporal(?) electrodes (C125 and C128) and the maxilar(?) ones (C126 and C127).

These patterns have surprising bilateral symmetry, and their similarity too is surprsing considering the apparent difference between the plotted pulses of the two subjects.

The 10 Hz component

Another conspicuous feature in the time-base plots of the filtered runs is an irregular oscillation with about 10 cycles per second, affecting almost all channels in synchrony. This oascillation clearly matches the 10 Hz bump in the power spectra, whose width indicates that the frequency varies somewhat along a run.

This 10 Hz oscillation too appears to be due to a single voltage pattern on the skull. That is, all electrode potentials change together, in fixed proportions, by a time-varying factor.

To identify this pattern, I performed a PCA of the blink-free "important" segments of all runs, for each subject. Namely, I extracted from each run that had no "crazy" behavior the last 1 second of the fixation phase and the 3 seconds of the stimuls phase, and discarded those that included any blink pulses (as idenfied previously by visual inspectio, see above). The concatenation of all those segments was then subjected to PCA.

The 10 Hz voltage pattern showed up as the first principal component in both subjects, shown below:


s013_nonblinks_P000_eig_b2_f000000   s014_nonblinks_P000_eig_b2_f000000
 

These diagrams show that the 10 Hz oscillation increases as one moves away from the reference electrode, rather uniformly in every direction. It is as if the source of that pulsation was not inside the skull, nor somewhere on the scalp or face, but in the neck or lower.

The pattern of subject 13 is stronger on the back of the head, suggesting that neck muscles are involved.

The neck component

Separating the two components

I tried to separate the filtered runs into a combination of the two components identified above --- the blink pattern (BL0) and the general 10 Hz oscillation pattern (H10) --- and a residue (RES) that is orthogonal to both patterns. See the figures below.


s013_r00229    
   


s013_r00229_BL0    
 


s013_r00229_H10    
 


s013_r00229_BLH    
   


s013_r00229_RES    
   


s014_r00425    
   


s014_r00425_BL0    
 


s014_r00425_H10    
 


s014_r00425_BLH    
   


s014_r00425_RES    
   

The negative parts of the extracted blink signal (such as in s013_r00229_BL0 between t=2.0 and t=3.0) are not sigificant. The principal component analysis is formulated in such a way that every extracted component has necessarily zero mean value in every electrode. Therefore, the "positive" pulses that correspond to blinks must be compensated by a spurious "negative" signal between blinks. I will try to reformulate the analysis to avoid these artifacts.

Note that the scale of the residual plots (s013_r00229_RES, s014_r00425_RES) is different from the other plots. For most electrodes, the amplitude of the residual signal is about 10 µV.

In the residual plots one can still see events that affect many electrodes together simultaneously. For example, in s014_r00425_RES these events are visible around t=0.5,t=2.0, t=4.0, and several other places. These events presumably are the next significant PCA elements; to be checked.


Last edited on 2013-12-07 16:14:35 by stolfilocal