Added a function to smooth the fourier output.