function smooth

Smooths X by multiplying with a gaussian of width FWHM in fourier space. The total flux is kept constant. This is equivalent to reass(fft(fft(X)*fft(gauss(naxis1(X)/2+1,naxis2(X)/2+1,FWHM))))

result = smooth(X, FWHM [,/x | /y | /z | /xy])

X:   A matrix.
FWHM:   The full width at half maximum of the gaussian used for smoothing.

/x:   Smooth along the first axis
/y:   Smooth along the second axis
/z:   Smooth along the third axis
/xy:   2D Smooth along the first and second axes (default)

Smooth each spectrum in a 3D cube (if the spectra are along the 3rd dimension):
   result = smooth(cube, /z)

See also
function boxcar