Question: I would like to smooth my FFT graphs that are obtained at 200Hz (I capture 500 points at the moment) so that the representative peaks would be shown close to [THIS](https://i.stack.imgur.com/FXqSV.png).

This is my code:

```
N = 500
T = 5/1000
y1 = np.array(data_Ax)
yf1 = scipy.fftpack.fft(y1)
xf1 = np.linspace(0.0, 1.0/(2.0*T), N/2)
yfft1 = 2.0/N * np.abs(yf1[:N//2])

plt.figure(figsize=(20, 3), dpi= 100, facecolor='w', edgecolor='k')
plt.plot(xf1, yfft1, 'g-', label ="FFT for Ax")
plt.xlabel('Frequency [Hz]')
plt.legend(loc=1)

```

For smoothing I tried to use this:

```
rft = np.fft.rfft(yfft1)
y_smooth = np.fft.irfft(rft)

```

But it didn't have any effect.

I'm well aware that 200Hz is a low sampling frequency and 500 measurements aren't much, but it is just to get the hang of the program. Here is the obtained graph:
[![enter image description here](https://i.stack.imgur.com/6yoWE.png)](https://i.stack.imgur.com/6yoWE.png)

I would like to know:

1. how to smooth the graph?
2. how to remove the peaks at 0Hz (High pass filter)?
3. From the theoretical point of view, is there a minimum number requirement of measurements for a representative FFT graph?

Thank you for any given help!

L

Answer: 
First of all I would suggest you get significantly more than 500 samples. That is only 2.5 periods

Using Welch's method should help get a smoother graph.

[doc scipy](https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.signal.welch.html)
Have you tried using the gaussian filter of the scipy module. Give it a try: <https://docs.scipy.org/doc/scipy-0.16.1/reference/generated/scipy.ndimage.filters.gaussian_filter.html>