[Eeglablist] Resampling "artefacts" 512-500 Hz
Ziereis, Annika Carina
annika.ziereis at uni-goettingen.de
Mon Jul 15 03:20:38 PDT 2019
Dear all,
I received some answers to my post about the artefacts after downsampling from 512 to 500 Hz (see message below)- thank you for that! Especially to
Andreas Widmann who suggested to remove the DC offset (remove baseline) and/or highpass filtering before resampling.
Indeed, both methods reduced the artefacts so I am very thankful for that recommendation!
I'd still be interested what happens during resampling and produces these harmonic peaks - so if somebody has an explanation for it, I'd be more than happy to learn about it!
In general it was recommended to avoid downsampling if not needed, especially for non- integer ratios (like I did).
I provided examples (plots) for three different datasets and different preprocessing steps:
- Version 1: Resampling
- Version 2: Removing the baseline and then resampling
- Version 3: High-pass filtering and then resampling
They can be found here (incl. script):
https://github.com/aziereis/eegquestions/blob/master
Additionally I provide one raw data file (03.bdf; size= 455 MB) here: https://osf.io/4cn7j/
General information:
EEG was recorded from 64 Electrodes (Biosemi). Signals were recorded at a sampling rate of 512 Hz and a bandwidth of
102.4 Hz. I rereferenced to average reference.
I did not start/stop the recording in between - so the whole time range of the experiment is recorded.
Thank you!
Best
Annika
Von: Ziereis, Annika Carina
Gesendet: Donnerstag, 4. Juli 2019 18:06
An: 'eeglablist at sccn.ucsd.edu' <eeglablist at sccn.ucsd.edu>
Betreff: Resampling "artefacts" 512-500 Hz
Dear all,
(I'd like to say beforehand that I am a total beginner in signal processing... so if you have an idea why this happened I'd be very happy if you'd consider it in your explanation)
For the EEG recording we use a sampling rate of 512 Hz which we want to down-sample to 500 Hz (we do simultaneous eye-tracking which records with 500 Hz and we want to do a co-registration).
During the pre-processing I looked at the power spectral density and found a power increase for the harmonics of 12 Hz (so peaks at 12, 24, 36 ... Hz) after resampling to 500 Hz. These peaks were not visible in the power spectral density plot of the raw data.
It was especially pronounced for participants with a higher alpha power and not so much for those with low alpha power.
I played with some resampling frequencies to check how it looks like for 499 Hz, 501 Hz 497 Hz... and 256 Hz (to compare to a integer ratio).
The "artefacts" only occur for 499, 500 and 501 Hz-showing each the harmonics of the difference in Hz
e.g. for 499 Hz (which would be 13Hz less than the original sampling rate) I get the harmonic peaks for 13, 26 and so on.
It disappears for Frequencies that are not in the alpha range (e.g. 15 Hz, for resampling to 497 Hz).
Then I read that one could do low-pass filtering to avoid aliasing effects (which I have to admit- I don' t understand very well). So I tried to low-pass filtering of 40 Hz (I just used 40 Hz because we did so in another study) and do the resampling again. This resulted in the same harmonics and super strange peaks in the filtered out frequencies.
I uploaded a pdf with pictures here (hopefully, it makes it more clear what I mean): https://github.com/aziereis/eegquestions/blob/master/downsampling.pdf
Has anybody encountered this problem before?
Is this artefact problematic?
Thank you very much for your help!!
Best
Annika
---
Annika Carina Ziereis
Georg-Elias-Müller Institute for Psychology
- Affective Neuroscience and Psychophysiology -
University Göttingen
Goßlerstr. 14
37073 Göttingen
Phone +49 551 39 20623
Email: annika.ziereis at uni-goettingen.de<mailto:annika.ziereis at uni-goettingen.de>
More information about the eeglablist
mailing list