<div dir="ltr">Dear Lucia and Andreas,<div><br></div><div>> Thus, frequency axis sampling depends on sampling rate. With 5000 Hz you get a frequency sampling point every 4.9 Hz (5000/1024); with 250 Hz you get a frequency sampling point every 0.24 Hz. <br></div><div class="gmail_extra"><br></div><div class="gmail_extra">I believe this Andreas's explanation perfectly clarifies the situation.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Lucia, if you feel like, you might want to file it as a potential problem (due to misleadingness) to EEGLAB bugzilla. We naturally expect EEGLAB auto-rescale the frequency resolution depending on plot range, right?</div><div class="gmail_extra"><a href="https://sccn.ucsd.edu/bugzilla/">https://sccn.ucsd.edu/bugzilla/</a><br></div><div class="gmail_extra">I appreciate your patience and cooperation. Thank you.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Makoto</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 2, 2015 at 3:02 AM, Andreas Widmann <span dir="ltr"><<a href="mailto:widmann@uni-leipzig.de" target="_blank">widmann@uni-leipzig.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Lucia,<br>
<br>
the effects of 40Hz lowpass filtering do not look right/as expected, so I would like to have a look into the issue. Several questions have to be addressed first.<br>
<br>
* Please (always) state EEGLAB version. There have been substantial changes in the resampling function recently and it might be relevant whether you use the old or the new code.<br>
* Please all all spectopo options you used to make the plot (optimally command line version from eegh).<br>
* Please explain what you mean by „introduce many frequencies“/„extra frequencies“.<br>
<br>
Preliminary comments:<br>
(a) spectopo unfortunately uses a fixed length fft (1024). Thus, frequency axis sampling depends on sampling rate. With 5000 Hz you get a frequency sampling point every 4.9 Hz (5000/1024); with 250 Hz you get a frequency sampling point every 0.24 Hz. So, in your Figure 6 the frequency axis is sampled 20 times higher. I case you mean with „extra frequencies“ that you see more details, this is most likely due to the higher frequency axis sampling. (I will try to have a look into the spectopo code in the next weeks to see how difficult it would be to introduce a fft length option).<br>
(b) The (MATLAB implementation of the) pwelch method used in spectopo is susceptible to frequency noise/rounding errors introduced by DC offsets. You might want to try to apply a highpass filter before frequency analysis.<br>
(c) The 40 lowpass filter appears to have no/little effect. I would like to sort out (a) and (b) before looking into this.<br>
<br>
Please highpass filter you raw dataset (e.g. 0.1 Hz) and upload the following plots:<br>
figure, pwelch(EEG.data', [], [], 10240, 5000); xlim([0 0.07]) % or xlim([0 70]) in case the frequency axis is automatically scaled to Hz instead of kHz<br>
and the same figure after lowpass filtering and<br>
figure, pwelch(EEG.data', [], [], 512, 250); xlim([0 70])<br>
after downsampling to 250 Hz.<br>
<br>
Best,<br>
Andreas<br>
<div><div class="h5"><br>
> Am 30.10.2015 um 12:05 schrieb Li, Lucia M <<a href="mailto:lucia.li@imperial.ac.uk">lucia.li@imperial.ac.uk</a>>:<br>
><br>
> Dear EEGlab users & experts,<br>
><br>
> I was hoping someone might be able to shed some light how why downsampling my data appears to introduce many frequencies into it.<br>
><br>
> <a href="http://s8.postimg.org/ah6vqvaut/Screen_Shot_2015_10_30_at_10_59_35.png" rel="noreferrer" target="_blank">http://s8.postimg.org/ah6vqvaut/Screen_Shot_2015_10_30_at_10_59_35.png</a><br>
><br>
> I have acquired some EEG data at 5000Hz (figure 2). I acquired this with Brain Products and exported the data without doing anything to it, to use in eeglab.<br>
> I then lowpass filtered it at 40Hz in eeglab (using the Tools --> filter data --> basic FIR filter (new, default)) (figure 5).<br>
> I then downsampled it to 250Hz (Tools --> change sampling rate) and get the resultant spectral plot (figure 6).<br>
><br>
> I was wondering:<br>
> a) are these extra frequencies indicative of anti-aliasing? If not, what might they indicate?<br>
> b) why am I still getting anti-aliasing effects if I downsampled after a low pass filter?<br>
><br>
> Many thanks in advance for your help!<br>
> Kind regards,<br>
> Lucia<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" rel="noreferrer" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
> To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
> For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a><br>
<br>
_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" rel="noreferrer" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div></div>
</div></div>