What is the right way to downsample using Fourier method? I want to know what is the right way to downsample a sampled signal using Fourier transform as the implementation in scipy.signal.resample confuses me.

Reading through 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 instead discard the second half of the frequencies?

I already read some related answers but no one seems to address this specific question:

Scipy resample, &quot;fourier method&quot; explanation

Python&#39;s $\tt resample$ vs $\tt resample\_poly$ vs $\tt decimate$
Note that the result of a DFT is inherently periodic, so the second half of the resulting output vector does not correspond to the highest frequencies, but to the negative frequencies. The highest frequency (Nyquist) is in the middle of the vector, after that you get the most negative frequency and the last element is the smallest negative frequency just below DC. That's why when taking out the middle part of the vector you actually remove the highest frequencies.