casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
task_feather.py
Go to the documentation of this file.
00001 import os
00002 from taskinit import *
00003 
00004 
00005 def feather(imagename=None,highres=None,lowres=None, sdfactor=None, effdishdiam=None, showplot=None):
00006         """ Feathering: Combine two images using the Fourier Addition:
00007         
00008         The algorithm converts each image to the gridded visibility
00009         plane, combines them, and reconverts them into an combined
00010         image.  The images must have a well-defined beam shape (clean beam),
00011         given in the image, in order for feathering to work well.
00012         The two images must be on the same grid and have the same
00013         flux density normalization scale.
00014 
00015         Keyword arguments:
00016         imagename -- Name of output feathered image
00017                 default: none; example: imagename='orion_combined'
00018         highres -- Name of high resolution (interferometer) image
00019                 default: none; example: imagename='orion_vla.im'
00020              This image is often a clean image obtained from synthesis
00021                 observations.
00022         lowres -- Name of low resolution (single dish) image
00023                 default: none; example: imagename='orion_gbt.im'
00024              This image is often a image from a single-dish observations
00025                 or a clean image obtained from a lower resolution synthesis
00026                 observations.
00027 
00028         """
00029         casalog.origin('feather')
00030 
00031         try:
00032                 imFea=imtool()
00033                 imFea.setvp(dovp=True)
00034                 imFea.setsdoptions(scale=sdfactor)
00035                 imFea.feather(image=imagename,highres=highres,lowres=lowres, effdishdiam=effdishdiam,  showplot=showplot)
00036                 imFea.done()
00037                 del imFea
00038         except Exception, instance:
00039                 print '*** Error ***',instance
00040