[Eeglablist] anti-aliasing with downsampling?

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Fri Nov 27 13:39:19 PST 2015


Dear Lucia and Andreas,

> 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.

I believe this Andreas's explanation perfectly clarifies the situation.

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?
https://sccn.ucsd.edu/bugzilla/
I appreciate your patience and cooperation. Thank you.

Makoto

On Mon, Nov 2, 2015 at 3:02 AM, Andreas Widmann <widmann at uni-leipzig.de>
wrote:

> Hi Lucia,
>
> 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.
>
> * 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.
> * Please all all spectopo options you used to make the plot (optimally
> command line version from eegh).
> * Please explain what you mean by „introduce many frequencies“/„extra
> frequencies“.
>
> Preliminary comments:
> (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).
> (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.
> (c) The 40 lowpass filter appears to have no/little effect. I would like
> to sort out (a) and (b) before looking into this.
>
> Please highpass filter you raw dataset (e.g. 0.1 Hz) and upload the
> following plots:
> 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
> and the same figure after lowpass filtering and
> figure, pwelch(EEG.data', [], [], 512, 250); xlim([0 70])
> after downsampling to 250 Hz.
>
> Best,
> Andreas
>
> > Am 30.10.2015 um 12:05 schrieb Li, Lucia M <lucia.li at imperial.ac.uk>:
> >
> > Dear EEGlab users & experts,
> >
> > I was hoping someone might be able to shed some light how why
> downsampling my data appears to introduce many frequencies into it.
> >
> > http://s8.postimg.org/ah6vqvaut/Screen_Shot_2015_10_30_at_10_59_35.png
> >
> > 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.
> > I then lowpass filtered it at 40Hz in eeglab (using the Tools --> filter
> data --> basic FIR filter (new, default)) (figure 5).
> > I then downsampled it to 250Hz (Tools --> change sampling rate) and get
> the resultant spectral plot (figure 6).
> >
> > I was wondering:
> > a) are these extra frequencies indicative of anti-aliasing? If not, what
> might they indicate?
> > b) why am I still getting anti-aliasing effects if I downsampled after a
> low pass filter?
> >
> > Many thanks in advance for your help!
> > Kind regards,
> > Lucia
> >
> >
> > _______________________________________________
> > Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> > To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> > For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu




-- 
Makoto Miyakoshi
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20151127/6c41f3f5/attachment.html>


More information about the eeglablist mailing list