nraonrao
 
NRAO Home > CASA > TaskRef

0.1.35 imsmooth

Requires:

Synopsis Smooth an image or portion of an image Description

Arguments





Inputs

imagename

Name of the input image

allowed:

string

Default:

kernel

Type of kernel to use: gaussian or boxcar.

allowed:

string

Default:

gaussian

major

Major axis for the kernels, default direction is along y-axis.

allowed:

any

Default:

variant 2.0arcsec

minor

Minor axis in gaussian and boxcar kernels

allowed:

any

Default:

variant 2.0arcsec

region

Image Region or name. Use viewer

allowed:

any

Default:

variant

box

Select one or more box regions

allowed:

string

Default:

chans

Select the channel(spectral) range

allowed:

string

Default:

stokes

Stokes params to image (I,IV,IQU,IQUV)

allowed:

string

Default:

mask

mask used for selecting the area of the image to do the smoothing on

allowed:

string

Default:

variant

outfile

Output, smoothed, image file name

allowed:

string

Default:

Returns
any

Example

 
This task performs a Fourier-based convolution to ’smooth’ the  
image. Smoothing is typically performed in order to reduce the noice in  
an image.  
 
Keyword arguments:  
imagename -- Input spectral line image  
Default: none; Example: imagename=’ngc5921_task.im’  
outfile -- Output smoothed image file name  
default: ’imsmooth_results.im’;  
                example: outfile=’my.image.smooth’;  
        kernel -- Type of kernel to use when smoothing.  Currently,  
                only gassian is supported.  
                default: ’gauss’; example: kernel=’gauss’  
                options: gaussian and boxcar  
        major -- Depends on the kernel type, see explanation below.  
        minor -- Depends on the kernel type, see explanation below.  
        mask -- Mask applied to the image before doing the smoothing  
                Default ’’ means no mask;  
                Example: mask=’orion.mask’.  
 
                Full description of the syntax can be found at  
                http://www.astron.nl/aips++/docs/notes/223/node11.html>Aips++ Notes series  
        region -- region file or name.  
                Use the viewer, then region manager to select regions of  
                   the image to process.  Similar to box, but graphical  
                Or the name of a region stored with the image,  
                      use rg.namesintable()  
                to retrieve the list of names.  
                Default: none  
                Example: region=’myimage.im.rgn’  
                         region=’region1’  
box --  A box region on the directional plane  
        ONLY pixel values acceptable at this time.  
Default: none (whole 2-D plane); Example: box=’10,10,50,50’  
chans -- channel numbers go select for the continuum,  
        ONLY channel numbers accepted at this time.  
Default: none (all);  
                  Example: chans=’3~6;>40’  
stokes -- Stokes parameters to image, may or may not be separated  
                by commas but best if you use commas.  
                Default: none (all); Example: stokes=’IQUV’;  
                Options: ’I’,’Q’,’U’,’V’,’RR’,’RL’,’LR’,’LL’,’XX’,’YX’,’XY’,’YY’, ...  
 
Kernel Paramters  
-----------------  
Finally, and most importantly the kernel is specified via the kernel,  
major, and minor parameters.  
 
Gaussian kernel: major and minor are the full width at half maximum  
                 (FWHM) of the Gaussian. Note that the major axis is  
                 along he y-axis (typically longitude)  
Boxcar kernel:   major, length of the box along the y-axis and  
                 minor, length of the box along the x-axis  
 
The major/minor paramters can be specified in one of three ways  
   Quantity -- for example major=qa.quantity(1, ’arcsec’)  
               Note that you can use pixel units, such as  
               major=qa.quantity(1, ’pix’)  
   String -- for example minor=’1pix’ or major=’0.5km’  
             (i.e. a string that the Quanta quantity function accepts).  
   Numeric -- for example major=10.  
              In this case, the units of major and minor are assumed to  
              be in arcsec.  
 
Note: Using pixel units allows you to convolve axes with different units.  
 
 
 
# EXAMPLE 1  
# smoothing with a gaussian kernel 20arseconds by 10 arseconds  
imsmooth( imagename=’my.image’, kernel=’gauss’, major=’10arcsec’, minor=’10arcsec’)  
 
 
# EXAMPLE 2  
# Smoothing using pixel coordinates and a boxcar kernel.  
imsmooth( imagename=’new.image’, major=’20pix’, minor=’10pix’, kernel=’boxcar’)  
 

Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu

Copyright © 2008 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense


Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search

Updated daily during alpha development.