Nyquist-Shannon, aliasing and Fourier downsampling

fourier transformsamplingsignal processing

I want to know what is the proper way of downsampling a sampled signal using Fourier transform.

In scipy.signal.resample the code it first converts the signal to frequency domain, then discards the middle half of the frequencies (i.e. second and third quarters), then inverse-transform back to time domain. Therefore it is trying to keep the lowest and highest frequencies of the signal.

Due to Nyquist-Shannon we know that we cannot reconstruct a frequency of $f$ without at least $2f+1$ samples of the signal. Then when downsampling, shouldn't we discard the second half of the frequencies instead?

I already read related answers in dsp.stackexchange but couldn't find a good explanation, so I decided to try math.stackexchange.

https://dsp.stackexchange.com/questions/52941/scipy-resample-fourier-method-explanation

https://dsp.stackexchange.com/questions/45446/pythons-tt-resample-vs-tt-resample-poly-vs-tt-decimate

Best Answer

The answer is in the first post you linked to:

To downsample, it transforms to the frequency domain and deletes the second and third groups of $N/4$ elements (which correspond to the half with the highest frequency components).

So apparently you confused the middle half of the elements as stored in memory with the middle half of the frequencies.

Related Question