# Smoothing Images

Miriad offers tasks to convolve images by Gaussians (convol and smooth) and also to convolve images by other images (convol). It can also bin up (or block) an image (imbin).

• The fastest way to convolve an image by a Gaussian is with an FFT-based algorithm. This is implemented in task convol. In the example below we convolve an image by an elliptical Gaussian.

Note that FFT based algorithms cannot correctly deal with blanked pixels. If your image has a blanked pixels, convol pretends that they are zero when it does the convolution. However, the corresponding pixels are blanked in the output image.

 CONVOL map=1331-09.icln Input image beam Unset fwhm=10,20 FWHM of Gaussian pa=45 Position angle of Gaussian out=1331-09.icln2 Convolved image

Task generally convol does its best to scale the output pixels so that the output image units are Jy/beam. If you are convolving an image which is already in Jy/beam by Gaussian, then convol needs the beam parameters (bmaj, bmin, bpa) to be in the dataset header to correctly determine the scale factor, and the output effective beam parameters. It will give you messages about what it thinks its doing as far as scaling factors go. If you know better than convol, you can give your own scale factor, via the `scale` keyword.

Often you know the output resolution that you want, rather than the resolution of the Gaussian that you want to convolve with. In this case using `options=final` causes convol to treat the parameters given by the `fwhm` and `pa` keywords as the desired final resolution, and to work backwards to determine the Gaussian that it needs to convolve with to achieve this result. Again, convol needs to know the beam parameters (bmaj, bmin, bpa), and does its best to maintain the intensity units in Jy/beam.

• If your image does in fact contain a blanking mask and it is important that they do not take part in the convolution, then you could convolve your image by a Gaussian (or a boxcar if you so desired) with task smooth. This task will be significantly slower than convol for any but the smallest images because it operates entirely in the image domain.

As with convol, the scale of the output image is adjusted so that it is in units of Jy/beam - and you can override this by setting `scale` yourself.

 SMOOTH in=1331-09.icln Input image out=1331-09.icln2 Convolved image fwhm=10,20 FWHM of Gaussian pa=45 Position angle of Gaussian options Unset scale Unset for auto scaling

• If you wish to convolve one image by another, you should use task convol. Again scaling is as with the above two descriptions.

 CONVOL map=1331-09.icln Input image beam=1331-09.icln2 Convolving image region Unset for full image out=1331-09.convol Output image sigma Unset

• Finally, there is imbin; it doesn't smooth an image, rather, it bins up (averages) an image (like the keyword xybin in the cg suite of programs. You can bin up pixels, and/or pick out every Nth pixel along any of the first three axes; this is controlled by the keyword bin.

In the first example, we bin up the first three dimensions of an image by a factor of 2 along the x axis, a factor of 4 along the y axis and a factor of 3 along the z axis.

 IMBIN in=gc.icln Input image region Unset for full image bin=2,2,4,4,3,3 Bin and increments for each axis out=gc.icln-rebin Output image

In the second example, we pick out every 4th pixel along the z axis.

 IMBIN in=gc.xyv Input image region=quarter Only write out inner quarter bin=1,1,1,1,1,4 Pick out every 4th pixel along third axis out=gc-2.xyv Output image