Return to Epilepsy Center Website
Johns Hopkins Neurology/Neurosurgery | Johns Hopkins Medicine


     
        


OUR CURRENT METHODS

The method used in this study to calculate wavelet correlation follows that of Mizuno-Matsumoto et al. with some minor changes to improve calculation speed. We use the discreet approximation to the continuous wavelet function, given in Equ. 1. The real part of the Gabor function, which is a cosine wave with an exponential taper, was chosen as the basic wavelet. Three example Gabor wavelets are shown above. The complex Gabor function was not used, in order to save processing speed, with no significant loss of information.

where:
Wr(a,b) = Real part of Discreet Approximation for the Continuous Gabor Wavelet function.
X(t) = EEG data samples.
t = Sample index (time = t / sample rate in seconds)
a = Frequency scale (Frequency of scale = sample rate / a)
b = Wavelet position in samples with respect to EEG data samples
Lw = 2.2 periods of frequency scale a.

The Gabor function is of infinite length, however the absolute value of the function approaches very small values after a few cycles of the base frequency. In the discreet approximation it is then only necessary to evaluate the sum in Equ.1 over a few cycles of the base frequency as larger summations only consume more computer time but do not significantly change the numerical result. This saves considerable processor time particularly for the higher frequency scales which have shorter periods compared to fixed length calculations. In this study we chose to evaluate the wavelet function over +/- Lw = 2.2 cycles of the given scale, as the Gabor wavelet function is less than 1% of its maximum vale at that point.

where:
WCrxy(a,t) = Normalized Wavelet Cross Correlation between EEG channels X and Y, as a function of scale a, and time lag τ. Range is -1.0 to +1.0
LE = Epoch length of Wrx, Wry. (i.e. 400 samples for 2 second epochs)
t = Sample index
τ = Time lag between EEG channels X and Y

At any given scale Gabor wavelet will produce a narrow band sine wave like output. Correlating such signals can produce ambiguous maxima for absolute time lags greater than half a period of the given wavelet base frequency. In the case of two pure sine waves of equal frequency the cross correlation is a sine wave of the same frequency, with a maxima occurring at every period of time delay shift. As a consequence it is misleading to evaluate the wavelet cross- correlation for absolute time lags greater half the period of the given scale at which the wavelet is being evaluated.

The wavelet cross-correlation (WCC) function WCrxy(a,τ) was evaluated for two second, adjacent, non overlapping epochs for all channels pairs in a set of data obtained from subdural electrode recordings, for a range of frequency scales. The epoch length was set at two seconds because we felt that this was a reasonable compromise between conflicting requirements. One the one hand longer epochs would improve the average estimate of WCC. However shorter epochs would be less likely to miss changes in WCC that result for the non stationary nature of the EEG.

The discreet values were chosen in a logarithmic fashion so that at any given scale the interval i.e. increment to the next scale in the sequence was a fixed proportion of the scale value itself. This arrangement gives constant proportional resolution in scale space. We chose each scale to be 7.18% higher the previous scale in the sequence. This gives 10 scale value in each octave, i.e. the scale value doubles every 10 steps. For this study, seven scales in the frequency range 5 Hz to 8 Hz were use specifically: 7.69, 7.18, 6.70, 6.25, 5.83, 5.44 and 5.08 Hz. This range was chosen to cover the frequencies of ADs seen in earlier studies.

WCC can generate larger number of results. For instance only calculating the maximum WCC (MaxWCC) for a single 2 second epoch of data from 20 channels of EEG and a mere 7 scales generate 1330 values (7 scale time 190 channel pairs). If the whole frequency range is used i.e 50 scales ( 5 octaves at 10 scales per octave) then the number of calculated values, 9500, exceeds the number of EEG data samples, 4000, by more than a factor of two. This is the data explosion problem. One solution to this problem is to display the results graphically but this produces very tangled, complex displays if the graph is based on the original electrode positions. Another solution is to just take the average of all the results, however some detail is lost. More information is preserved if a histogram of the MaxWCC values is used instead, as in an earlier study in our laboratory. Our current work is directed towards refining this technique.