[Eeglablist] spatial filtering in EEGLAB?

Arnaud Delorme arno at salk.edu
Fri Nov 2 10:06:16 PDT 2007


Dear Andrew,

the topoplot() function of EEGLAB can plot and interpolate 
electro-corticograms. For smoothing, we indeed do not have such 
function. One possibility is to use the griddata function to interpolate 
the activity, then perform spatial filtering in 2 dimensions. Here is 
how to plot a grid from the EEG structure

pot = mean(EEG.data(:,100,:),3); % potential at specific time (sample 
point 100)
x = [ EEG.chanlocs.X ];
y = [ EEG.chanlocs.Y ];
xi = linspace(-100, 100, 10);
yi = linspace(-100, 100, 10);
[tmp1 tmp2 zi] = gridata(x,y,pot',xi',yi,'invdist');
figure; imagesc(xi, yi, zi);

you may convolve the resulting matrix with a Gaussian filter:

g = gauss2d(5,5); % this is an EEGLAB function
res = conv2(zi, g, 'same');
figure; imagesc(xi, yi, res);

The fft2 and ifft2 can also help you perform spacial filtering although 
I have not carefully thought how.

Best,

Arno

Andrew Richard Dykstra wrote:
>    I'm trying to smooth data (across channels rather than across time or 
> epochs) from a linear intracortical electrode array, and I don't see this 
> functionality built into EEGLAB.  Does anyone know how to do this?
>   



More information about the eeglablist mailing list