# 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))))
**Syntax**

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

X: | A matrix. |

FWHM: | The full width at half maximum of the gaussian used for smoothing. |

**Switches**

/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) |

**Examples**

Smooth each spectrum in a 3D cube (if the spectra are along the 3rd dimension):

*result*= smooth(cube, /z)**See also**

function boxcar