Smoothing power spectrum by convolution with boxcar function
The spectrum is periodic so you need circular convoluioint, not linear convolution
You are smoothing the  complex linear spectrum. Due to the phase of the complex ammplitude you will get significant interference in your smoothing window. Smoothing is typically in the energy domain and the phase is discarded. Complex smoothing is fairly difficult to do.