n = len(y)
k = np.arange(n)
T = n / Fs
frq = k / T
freq = frq[list(range(n / 2))]
Y = np.fft.fft(y) / n
Y = Y[list(range(n / 2))]
plt.plot(freq, abs(Y), 'r-')
plt.xlabel('freq (Hz)')
plt.ylabel('|Y(freq)|')
plt.show()
FFT normalization with numpy