00001
00002
00003
00004
00005
00006
00007
00008
00009 from sys import version_info
00010 if version_info >= (2,6,0):
00011 def swig_import_helper():
00012 from os.path import dirname
00013 import imp
00014 fp = None
00015 try:
00016 fp, pathname, description = imp.find_module('_imagertask', [dirname(__file__)])
00017 except ImportError:
00018 import _imagertask
00019 return _imagertask
00020 if fp is not None:
00021 try:
00022 _mod = imp.load_module('_imagertask', fp, pathname, description)
00023 finally:
00024 fp.close()
00025 return _mod
00026 _imagertask = swig_import_helper()
00027 del swig_import_helper
00028 else:
00029 import _imagertask
00030 del version_info
00031 try:
00032 _swig_property = property
00033 except NameError:
00034 pass
00035 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
00036 if (name == "thisown"): return self.this.own(value)
00037 if (name == "this"):
00038 if type(value).__name__ == 'SwigPyObject':
00039 self.__dict__[name] = value
00040 return
00041 method = class_type.__swig_setmethods__.get(name,None)
00042 if method: return method(self,value)
00043 if (not static):
00044 self.__dict__[name] = value
00045 else:
00046 raise AttributeError("You cannot add attributes to %s" % self)
00047
00048 def _swig_setattr(self,class_type,name,value):
00049 return _swig_setattr_nondynamic(self,class_type,name,value,0)
00050
00051 def _swig_getattr(self,class_type,name):
00052 if (name == "thisown"): return self.this.own()
00053 method = class_type.__swig_getmethods__.get(name,None)
00054 if method: return method(self)
00055 raise AttributeError(name)
00056
00057 def _swig_repr(self):
00058 try: strthis = "proxy of " + self.this.__repr__()
00059 except: strthis = ""
00060 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
00061
00062 try:
00063 _object = object
00064 _newclass = 1
00065 except AttributeError:
00066 class _object : pass
00067 _newclass = 0
00068
00069
00070 class imagertask(_object):
00071 """Proxy of C++ casac::imagertask class"""
00072 __swig_setmethods__ = {}
00073 __setattr__ = lambda self, name, value: _swig_setattr(self, imagertask, name, value)
00074 __swig_getmethods__ = {}
00075 __getattr__ = lambda self, name: _swig_getattr(self, imagertask, name)
00076 __repr__ = _swig_repr
00077 def __init__(self):
00078 """__init__(self) -> imagertask"""
00079 this = _imagertask.new_imagertask()
00080 try: self.this.append(this)
00081 except: self.this = this
00082 __swig_destroy__ = _imagertask.delete_imagertask
00083 __del__ = lambda self : None;
00084 def clean(self, *args, **kwargs):
00085 """
00086 clean(self, vis=string("Unknown"), alg=string("clark"), niter=1000, gain=0.1, threshold=0.0,
00087 residual=std::vector< string >(1, ""), image=std::vector< string >(1, ""),
00088 model=std::vector< string >(1, ""), mask=std::vector< string >(1, ""), mode=string(""),
00089 nchan=initialize_vector(1, (int)1), start=initialize_vector(1, (int)1),
00090 width=initialize_vector(1, (int)1), step=initialize_vector(1, (int)1),
00091 imsize=initialize_vector(2,(int)128, (int)128), cell=initialize_vector(2,(int)1, (int)1),
00092 stokes=string("I"), fieldid=initialize_vector(1, (int)1),
00093 spwid=initialize_vector(1, (int)1), weighting=string("uniform"), rmode=string("none"),
00094 robust=0.0)
00095
00096 Summary
00097 Perform clean operations
00098
00099 Input Parameters:
00100 vis name of input visibility file (MS) Unknown
00101 alg Algorithm to use (clark, hogbom, csclean, csfast). Default is clark. clark
00102 niter Number of iterations. Default=1000. 1000
00103 gain The minor iteration loop gain. Default is 0.1. 0.1
00104 threshold Threshold flux level at which to stop cleaning (in Jy). Default is 0.Jy. 0.0
00105 residual name of residual image. Default is model name concatenated with '.residual'. residual
00106 image name of restored image. Default is model name concatenated with '.restored'. restored
00107 model name of model image. No value.
00108 mask name of mask image. No value.
00109 mode Type of processing (channel or velocity)
00110 nchan With mode, this defines the number of channels for mapping of visibilities to image channels 1
00111 start With mode, this defines the starting channel for mapping of visibilities to image channels 1
00112 width With mode, this defines the width of channels for mapping of visibilities to image channels 1
00113 step With mode, this defines the step of channels for mapping of visibilities to image channels 1
00114 imsize The size of the output image (pixels). 128 128
00115 cell The image cell size (arcseconds). 1 1
00116 stokes Stokes params to image. Default is 'I'. Allowed: I, IV, IQU, IQUV I
00117 fieldid Field IDs to include. Default is 1. Allows a vector of available field ids. 1
00118 spwid Spectral Window IDs to include. Default is 1. Allows a vector of available spectral window ids. 1
00119 weighting Type of weighting (natural, uniform, briggs, radial). Default is uniform. uniform
00120 rmode Mode of Briggs weighting ('norm', 'abs', 'none'). Default is 'none'. none
00121 robust Parameter in briggs weighting. Range -2.0 to 2.0. Default is 0.0. 0.0
00122
00123 --------------------------------------------------------------------------------
00124
00125 """
00126 return _imagertask.imagertask_clean(self, *args, **kwargs)
00127
00128 def feather(self, *args, **kwargs):
00129 """
00130 feather(self, vis=string(""), featherimage=string(""), highres=string(""), lowres=string(""), lowpsf=string(""))
00131
00132 Summary
00133 Perform feather operation
00134
00135 Input Parameters:
00136 vis name of input visibility file (MS)
00137 featherimage name of output image
00138 highres name of high resolution (interferometer) image
00139 lowres name of low resolution (single dish) image
00140 lowpsf image of the single dish beam
00141
00142 --------------------------------------------------------------------------------
00143
00144 """
00145 return _imagertask.imagertask_feather(self, *args, **kwargs)
00146
00147 def invert(self, *args, **kwargs):
00148 """
00149 invert(self, vis=string(""), map=string(""), beam=string(""), mode=string(""), nchan=initialize_vector(1, (int)1),
00150 start=initialize_vector(1, (int)1), width=initialize_vector(1, (int)1),
00151 step=initialize_vector(1, (int)1), imsize=initialize_vector(2,(int)128, (int)128),
00152 cell=initialize_vector(2,(int)1, (int)1), stokes=string("I"),
00153 fieldid=initialize_vector(1, (int)1), spwid=initialize_vector(1, (int)1),
00154 weighting=string("uniform"), rmode=string("none"), robust=0.0)
00155
00156 Summary
00157 Perform invert operation
00158
00159 Input Parameters:
00160 vis name of input visibility file (MS)
00161 map name of output dirty map (image)
00162 beam name of output beam file (image)
00163 mode Type of processing (channel or velocity)
00164 nchan With mode, this defines the number of channels for mapping of visibilities to image channels 1
00165 start With mode, this defines the starting channel for mapping of visibilities to image channels 1
00166 width With mode, this defines the width of channels for mapping of visibilities to image channels 1
00167 step With mode, this defines the step of channels for mapping of visibilities to image channels 1
00168 imsize The size of the output image (pixels). 128 128
00169 cell The image cell size (arcseconds). 1 1
00170 stokes Stokes params to image. Default is 'I'. Allowed: I, IV, IQU, IQUV I
00171 fieldid Field IDs to include. Default is 1. Allows a vector of available field ids. 1
00172 spwid Spectral Window IDs to include. Default is 1. Allows a vector of available spectral window ids. 1
00173 weighting Type of weighting (natural, uniform, briggs, radial). Default is uniform. uniform
00174 rmode Mode of Briggs weighting ('norm', 'abs', 'none'). Default is 'none'. none
00175 robust Parameter in briggs weighting. Range -2.0 to 2.0. Default is 0.0. 0.0
00176
00177 --------------------------------------------------------------------------------
00178
00179 """
00180 return _imagertask.imagertask_invert(self, *args, **kwargs)
00181
00182 def mosaic(self, *args, **kwargs):
00183 """
00184 mosaic(self, vis=string(""), alg=string("mfclark"), niter=1000, gain=0.1, threshold=0.0, residual=std::vector< string >(1, ""),
00185 image=std::vector< string >(1, ""), model=std::vector< string >(1, ""),
00186 mask=std::vector< string >(1, ""), mode=string(""),
00187 gridfn=string("SF"), grid=string("mosaic"), nchan=initialize_vector(1, (int)1),
00188 start=initialize_vector(1, (int)1), width=initialize_vector(1, (int)1),
00189 step=initialize_vector(1, (int)1), imsize=initialize_vector(2,(int)128, (int)128),
00190 cell=initialize_vector(2,(int)1, (int)1), stokes=string("I"),
00191 fieldid=initialize_vector(1, (int)1), reffieldid=1, spwid=initialize_vector(1, (int)1),
00192 weighting=string("uniform"), mosweight=string("T"), rmode=string("none"),
00193 robust=0.0, minpb=0.1, scaletype=string("NONE"), stoplargenegatives=-1,
00194 cyclefactor=1.5, cyclespeedup=2.0)
00195
00196 Summary
00197 Perform mosaic operation
00198
00199 Input Parameters:
00200 vis name of input visibility file (MS)
00201 alg Algorithm to use (mfclark,mfhogbom). Default is 'mfclark'. mfclark
00202 niter Number of iterations. Default=1000. 1000
00203 gain The minor iteration loop gain. Default is 0.1. 0.1
00204 threshold Threshold flux level at which to stop cleaning (in Jy). Default is 0.Jy. 0.0
00205 residual name of residual image. Default is model name concatenated with '.residual'. residual
00206 image name of restored image. Default is model name concatenated with '.restored'. restored
00207 model name of model image. No value.
00208 mask name of mask image. No value.
00209 mode Type of processing (channel or velocity)
00210 gridfn Type of gridding function (spheroidal wave, box car, primary beam SF
00211 grid Type of gridding mosaic or ft (standard interferometry) mosaic
00212 nchan With mode, this defines the number of channels for mapping of visibilities to image channels 1
00213 start With mode, this defines the starting channel for mapping of visibilities to image channels 1
00214 width With mode, this defines the width of channels for mapping of visibilities to image channels 1
00215 step With mode, this defines the step of channels for mapping of visibilities to image channels 1
00216 imsize The size of the output image (pixels). 128 128
00217 cell The image cell size (arcseconds). 1 1
00218 stokes Stokes params to image. Default is 'I'. Allowed: I, IV, IQU, IQUV I
00219 fieldid Field IDs to include. Default is 1. Allows a vector of available field ids. 1
00220 reffieldid Reference Field IDs to use. Default is 1. 1
00221 spwid Spectral Window IDs to include. Default is 1. Allows a vector of available spectral window ids. 1
00222 weighting Type of weighting (natural, uniform, briggs, radial). Default is uniform. uniform
00223 mosweight Type of weighting used for the mosaic. T means that each field will be weighted individually. T
00224 rmode Mode of Briggs weighting ('norm', 'abs', 'none'). Default is 'none'. none
00225 robust Parameter in briggs weighting. Range -2.0 to 2.0. Default is 0.0. 0.0
00226 minpb Minimum PB level to use. Default is 0.1. 0.1
00227 scaletype Image plane flux scale type ('NONE', 'SAULT'). Default is 'NONE'. NONE
00228 stoplargenegatives Stop large negatives. Default=-1. -1
00229 cyclefactor Cycle factor. Default=1.5. 1.5
00230 cyclespeedup Cycle speedup. Default=2. 2.0
00231
00232 --------------------------------------------------------------------------------
00233
00234 """
00235 return _imagertask.imagertask_mosaic(self, *args, **kwargs)
00236
00237 imagertask_swigregister = _imagertask.imagertask_swigregister
00238 imagertask_swigregister(imagertask)
00239
00240
00241
00242