Badly resample signal_ Magnitude clipping

External Email - Use Caution

Dear Phillip,

I resampled a signal that originally sampled at 1000Hz to a different frequency (i.e., 1000Hz, 800Hz, 100Hz). The three figures that attached with this email showed different sampling rate results in different magnitude for the signal at the same time.

I understand from your explanation that this is expected where resampling will result in lose of temporal resolution, so fast, high amplitude deviations are lost. But I notice from my experimentation; the amplitude deviation occurs throughout the resampled signal. Because of this, I am concern whether I performed the whole procedure properly or not. FYI, I would like to resample the signal into 100Hz.

The figure can be reproduced using the notebook that accessible from this link<https://github.com/balandongiv/EyeCloseOpen/blob/master/HelpImportDownsample_EDF.ipynb>

Dear Sebastion
Thanks for the reply. Yes, it is about Nyquist Theorem. Thanks for the explanation, I really appreciate it.

Regards
Rodney

External Email - Use Caution

Yes, this is expected behavior -- downsampling is not decimating.

When you discretely sample a continuous signal, you have your sample
frequency sf (e.g. 1000 Hz) and your sample duration, which is basically
assumed to be just 1/sf. There is no such thing as an instantaneous
sample. So when you resample you try to approximate what would have
happened had your original samples been bigger/slower. This is not the
same as just dropping all the samples in the intervening intervening
interval (which is also why resampling can take a little bit of time).

I think you've been assuming that you're resampling is like decimating.
In decimating, you do just drop all the intervening data points. Many
MNE objects support decimating. So if you want to go from an sf of 1000
Hz to 100Hz, then you decimate by a factor of 10, i.e. take only every
tenth sample. Note that this generally a bad idea because it's very
susceptible to aliasing and all sorts of other artefacts.

https://mne.tools/stable/overview/faq.html?highlight=faq#resampling-and-decimating-data

Best,

Phillip