As we all know, Fourier transform of the sinc(t) is rect(f).
Simple python script to discover signal after fft
and ifft
with random normal noise.
import matplotlib.pyplot as plt
import numpy as np
np.random.seed(1234)
peak=np.fft.fft(np.sinc(np.linspace(-4, 4, 200)))
peak_ifft=np.fft.ifft(peak)
n=200
noise=np.random.normal(loc=0, scale=np.sqrt(2)/2, size=(n, 2)).view(np.complex128)
signal=noise+np.reshape(np.asarray(peak),(-1,1))
plt.figure()
plt.subplot(2,2,1)
plt.plot(np.abs(signal))
plt.title('power vs freq')
plt.subplot(2,2,2)
signal_ifft=np.fft.ifft(signal)
plt.plot(signal_ifft)
plt.title('should appear sinc,but not')
plt.subplot(2,2,3)
plt.plot(peak_ifft)
plt.title('should be sinc,and yes')
plt.show()
As x(t)+y(t)<->X(f)+Y(f)
,np.fft.ifft(np.fft(signal))
go back to origin signal
,why cannot np.fft.ifft(np.fft(signal+noise))
?
np.concatenate
, and that you have indeed read and understood it's documentation? $\endgroup$