I have a signal of length 100000 timestamps sampled at a frequency of 25kHz. First I apply a high pass filtering at (300Hz) and then do the Fast Fourier Transformation. Then the absolute values are taken from the returned complex values. Finally, the first half of the returned signal (of length 50000), is downsampled to 1000 samples.

signal_chunk_filtered_new = butter_highpass_filter(signal_chunk, 300, 25000, 3)

downsampled = signal.resample([abs(i) for i in fft(signal_chunk_filtered_new)][:int(chunk_size/2)], 1000)

My current implementation uses the scipy resampling implementation for downsampling which uses the Fourier method. https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.resample.html

I was simply considering the Fourier transformed signal as another signal which needs to be downsampled. But when I think about it in-depth, it is like I'm applying Fourier transform on top of Fourier transform. Is this method wrong? If so which downsampling method should I use?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.