<HTML><FONT FACE=arial,helvetica><FONT  COLOR="#0000ff" SIZE=2 PTSIZE=10 FAMILY="SANSSERIF" FACE="Arial" LANG="0">Kevin,
<BR>It appears to me that your ringing problem is a classic effect of having a rectangular window (aka "boxcar" function) for the EEG data prior to doing an FT on it.  I'd suggest applying a partial raised cosine taper window to the data <B>prior</B> to sending it into the FT.  (I'm presuming that the EEGLAB FT filter function does not apply any windows or perform any other preprocessing to the data prior to the FT.  If there is a window function applied, then there is no need to apply another window.)
<BR>
<BR>The partial raised cosine taper window function is as follows:
<BR>
<BR>        0.5[1-cos (</FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SERIF" FACE="Symbol" LANG="0">p</FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SANSSERIF" FACE="Arial" LANG="0">x/d)]        for 0 </FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SERIF" FACE="Symbol" LANG="0">£</FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SANSSERIF" FACE="Arial" LANG="0"> x </FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SERIF" FACE="Symbol" LANG="0">£</FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SANSSERIF" FACE="Arial" LANG="0"> d
<BR>u (x) = 1                              for d </FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SERIF" FACE="Symbol" LANG="0">£</FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SANSSERIF" FACE="Arial" LANG="0"> x </FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SERIF" FACE="Symbol" LANG="0">£</FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SANSSERIF" FACE="Arial" LANG="0"> 1-d
<BR>        0.5[1-cos (</FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SERIF" FACE="Symbol" LANG="0">p</FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SANSSERIF" FACE="Arial" LANG="0">(1-x)/d)]          for 1-d </FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SERIF" FACE="Symbol" LANG="0">£</FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SANSSERIF" FACE="Arial" LANG="0"> x </FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SERIF" FACE="Symbol" LANG="0">£</FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SANSSERIF" FACE="Arial" LANG="0"> 1  where 0 </FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SERIF" FACE="Symbol" LANG="0">£ </FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SANSSERIF" FACE="Arial" LANG="0">d</FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SERIF" FACE="Symbol" LANG="0"> £ </FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SANSSERIF" FACE="Arial" LANG="0">0.5
<BR>
<BR>I found d = 0.1 to be useful (i.e., taper the first 10% and the last 10% of the signal while leaving the remainder unaffected).  I wrote a short MAT function which you can use that is set up for d = 0.1.  (I have the SP Toolbox and still needed to write this function.  It's cheap and well worth the investment.)
<BR>
<BR>In case the special characters in the above equation get screwed up, I'm attaching a short narrative in MS Word with the reference cited.
<BR>
<BR>One final note, AOL automatically zips multiple attachments, so if your institution filters zip file attachments from emails please advise and I can send each separately to you.
<BR>
<BR>Hope this is helpful.
<BR>Thomas J. Collins III
<BR>
<BR>
<BR>In a message dated 2/10/05 11:20:30 AM Central Standard Time, arno@salk.edu writes:
<BR>
<BR></FONT><FONT  COLOR="#004000" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SANSSERIF" FACE="Arial" LANG="0">
<BR></FONT><FONT  COLOR="#000000" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SANSSERIF" FACE="Arial" LANG="0"><BLOCKQUOTE TYPE=CITE style="BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px">Subj:<B>Re: [Eeglablist] filtering data</B>
<BR>Date:2/10/05 11:20:30 AM Central Standard Time
<BR><I>From:    arno@salk.edu (Arnaud Delorme)
<BR>Sender:    eeglablist-bounces@sccn.ucsd.edu
<BR>To:    guisek1@mail.montclair.edu (Kevin Guise)
<BR>CC:    eeglablist@sccn.ucsd.edu
<BR></I>
<BR>
<BR>
<BR></FONT><FONT  COLOR="#004000" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SANSSERIF" FACE="Arial" LANG="0">
<BR>
<BR><BLOCKQUOTE TYPE=CITE style="BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px">I am trying to band pass filter my eeg data between 1 and 30 Hz.  I noticed that EEGlab uses a fourier transoform and what appears to be an ideal band pass filter. I have some experience using such a method to filter digital images for stimuli, and found that I get 'ringing' in the image using ideal filter functions.  Might this be the case while filtering one dimensional eeg data?  Might it be advisable to use a butterworth function? Basically what I am wondering is this: does eeglab use the fourier filter because I do not have matlab's signal processing toolbox? </BLOCKQUOTE>
<BR></FONT><FONT  COLOR="#0000ff" BACK="#ffffff" style="BACKGROUND-COLOR: #ffffff" SIZE=2 PTSIZE=10 FAMILY="SANSSERIF" FACE="Arial" LANG="0">Yes 
<BR>it does. I programmed this filter because it was a better alternative than no 
<BR>filtering at all for users who do not have the signal processing toolbox. I 
<BR>observed that with this type of filter the signal drop-off was not as high as 
<BR>with standard FIR filtering. I do not know about ringing. The best alternative 
<BR>to it might be to buy the signal processing toolbox?
<BR>Arno
<BR></BLOCKQUOTE>
<BR>
<BR></FONT></HTML>