cngi.image.smooth

smooth(xds, dv='IMAGE', kernel='gaussian', size=[1.0, 1.0, 30.0], current=None, scale=1.0, name='BEAM')[source]

Smooth data along the spatial plane of the image cube.

Computes a correcting beam to produce defined size when kernel=gaussian and current is defined. Otherwise the size or existing beam is used directly.

Parameters
  • xds (xarray.core.dataset.Dataset) – input Image Dataset

  • dv (str) – name of data_var in xds to smooth. Default is ‘IMAGE’

  • kernel (str) – Type of kernel to use:’boxcar’, ‘gaussian’ or the name of a data var in this xds. Default is ‘gaussian’.

  • size (list of floats) – for gaussian kernel, list of three values corresponding to major and minor axes (in arcseconds) and position angle (in degrees). for boxcar kernel, list of two valuess corresponding to l,m bin width. Default is [1., 1., 30.] (for a gaussian)

  • current (list of floats) – same structure as size, a list of three values corresponding to major and minor axes (in arcseconds) and position angle (in degrees) of the current beam applied to the image. Default is None

  • scale (float) – gain factor after convolution. Default is unity gain (1.0)

  • name (str) – dataset variable name for kernel, overwrites if already present

Returns

output Image

Return type

xarray.core.dataset.Dataset