[Eeglablist] Filtering before or after Averaging ... does it make a difference ?

Arnaud Delorme arno at sccn.ucsd.edu
Thu Sep 18 19:07:06 PDT 2003


>
>
>Does someone know if filtering (ie. bandpass filter eg. alpha band) EEG
>waveforms before averaging (eg. to detect an ERP) is equivalent to
>filtering after averaging ? 
>
Yes, it is the same as long as you use a linear filter. EEGLAB only uses 
linear filtering to preserve the phase information across frequencies 
(note that absolute phase is also retained because we use forward and 
reverse digital filtering (filtfilt() Matlab function)).

% matlab exemple
a = rand(1, 1000, 100); % 100 trials with 1000 points (1000 Hz)
smoothdata  = eegfilt(a(:,:),    1000, 0, 30); % highpass at 30Hz
smoothdata2 = eegfilt(mean(a,3), 1000, 0, 30);
figure;
subplot(1,2,1);
smoothdata = reshape(smoothdata, 1, 1000, 100);
subplot(1,2,1); plot(mean(smoothdata(1,:,:),3)); yl = ylim;
title('filtered then averaged');
subplot(1,2,2); plot(smoothdata2); ylim(yl);
title('averaged then filtered');

--

*Arnaud Delorme, Ph.D.*
Computational Neurobiology Lab, Salk Institute
10010 North Torrey Pines Road
La Jolla, CA 92037 USA

*Tel* : /(+1)-858-458-1927 ext 15/
*Fax* : /(+1)-858-458-1847/
*Web page *: www.sccn.ucsd.edu/~arno <http://www.sccn.ucsd.edu/%7Earno>


-- 

* Arnaud Delorme <http://www.sccn.ucsd.edu/%7Earno>, Ph.D.* , SCCN, 
UCSD, San Diego, USA

*SCCN main page:* www.sccn.ucsd.edu <http://www.sccn.ucsd.edu/>
*EEGLAB main page:* www.sccn.ucsd.edu/eeglab/ 
<http://www.sccn.ucsd.edu/eeglab>
*EEGLAB documentation:* www.sccn.ucsd.edu/eeglab/eeglabdocs.html 
<http://www.sccn.ucsd.edu/eeglab/eeglabdocs.html>
*EEGLAB FAQ page:* www.sccn.ucsd.edu/eeglab/eeglabfaq.html 
<http://www.sccn.ucsd.edu/eeglab/eeglabfaq.html>
*EEGLAB mailing lists:* www.sccn.ucsd.edu/eeglab/eeglabmail.html 
<http://www.sccn.ucsd.edu/eeglab/eeglabmail.html>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20030918/3ecc5f4b/attachment.htm


More information about the Eeglablist mailing list