casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
cleanhelper.cleanhelper Class Reference

List of all members.

Public Member Functions

def __init__
def initsinglems
def initmultims
def sortvislist
def defineimages
def definemultiimages
def checkpsf
def makeEmptyimages
def makemultifieldmask
def makemultifieldmask2
def make_mask_from_threshhold
def makemaskimage
def datselweightfilter
def datsel
def datweightfilter
def setrestoringbeam
def convertmodelimage
def readboxfile
def readmultifieldboxfile
def readoutlier
def newreadoutlier
def copymaskimage
def flatten
def getchanimage
def putchanimage
def qatostring
def convertvf
def getfreqs
def setChannelizeDefault
def setChannelizeNonDefault
def convertframe
def setspecframe
def initChaniter
def makeTemplateCubes
def setChaniterParms
def defineChaniterModelimages
def convertAllModelImages_old
def convertAllModelImages
 Multiple models for one field : [ [ 'm0', 'm1' ] ] Multiple taylor terms and one field : [ [ 't0','t1'] ] Multiple models per field : [ [ 'm0f0', 'm1f0' ] , [ 'm0f1', 'm1f1' ] ] Multiple taylor terms per field : [ [ 't0f0','t1f0' ] , [ 't0f1','t1f1' ] ].
def storeCubeImages
def cleanupTempFiles
def convertImageFreqFrame

Static Public Member Functions

def getspwtable
def getOptimumSize

Public Attributes

 maskimages
 finalimages
 usescratch
 dataspecframe
 usespecframe
 end spwindex
 inframe
 srcdir
 sortedvislist
 im
 vis
 sortedvisindx
 phasecenter
 check that start and step have units
 spwindex
 understand spw
 fieldindex
 outputmask
 This goes when those tablerecord goes Make masks from tablerecords.
 csys
 This code to set the maskframe is copied from makemaskimages()
 nimages
 imagelist
 imageids
 if len(imageids) > 1: multifield=True
 skipclean
 csysorder
 paramlist

Private Member Functions

def _selectlistinputs

Private Attributes

 _casalog

Detailed Description

Definition at line 20 of file cleanhelper.py.


Constructor & Destructor Documentation

def cleanhelper.cleanhelper.__init__ (   self,
  imtool = '',
  vis = '',
  usescratch = False,
  casalog = None 
)
Contruct the cleanhelper object with an imager tool
like so:
a=cleanhelper(im, vis)

Definition at line 21 of file cleanhelper.py.

References cleanhelper.cleanhelper.initmultims(), and cleanhelper.cleanhelper.initsinglems().


Member Function Documentation

def cleanhelper.cleanhelper._selectlistinputs (   self,
  nvis,
  indx,
  params 
) [private]
A little private function to do selection and checking for a parameter 
given in list of strings.
It checks nelement in each param either match with nvis or nelement=1
(or a string) otherwise exception is thrown. 

Definition at line 1065 of file cleanhelper.py.

References cleanhelper.cleanhelper.datweightfilter().

def cleanhelper.cleanhelper.checkpsf (   self,
  chan 
)
a check to make sure selected channel plane is not entirely flagged
(for chinter=T interactive clean)

Definition at line 389 of file cleanhelper.py.

References cleanhelper.cleanhelper.finalimages, cleanhelper.cleanhelper.getchanimage(), cleanhelper.cleanhelper.imagelist, and cleanhelper.cleanhelper.skipclean.

def cleanhelper.cleanhelper.cleanupTempFiles (   self,
  tmppath 
)
Remove the directories listed by tmppath.

Definition at line 3089 of file cleanhelper.py.

Referenced by cleanhelper.cleanhelper.defineChaniterModelimages().

def cleanhelper.cleanhelper.convertAllModelImages (   self,
  modelimage,
  mode,
  nterms,
  dochaniter,
  chan,
  tmppath 
)

Multiple models for one field : [ [ 'm0', 'm1' ] ] Multiple taylor terms and one field : [ [ 't0','t1'] ] Multiple models per field : [ [ 'm0f0', 'm1f0' ] , [ 'm0f1', 'm1f1' ] ] Multiple taylor terms per field : [ [ 't0f0','t1f0' ] , [ 't0f1','t1f1' ] ].

Cannot do multiple models per taylor term and per field for now. ....... later... [ [ ['m0t0f0','m1t0f0'],['m0t1f0','m1t1f0'] ] , [ [ ['t0f1'] ],[ ['t1f1'] ] ] ]

wrapper function for convertmodelimage for all different cases

Definition at line 3001 of file cleanhelper.py.

References make_mmsdata.all, cleanhelper.cleanhelper.convertmodelimage(), cleanhelper.cleanhelper.defineChaniterModelimages(), and cleanhelper.cleanhelper.imagelist.

def cleanhelper.cleanhelper.convertAllModelImages_old (   self,
  modelimage,
  mode,
  nterms,
  dochaniter,
  chan,
  tmppath 
)
wrapper function for convertmodelimage for all different cases

Definition at line 2965 of file cleanhelper.py.

References make_mmsdata.all, cleanhelper.cleanhelper.convertmodelimage(), cleanhelper.cleanhelper.defineChaniterModelimages(), and cleanhelper.cleanhelper.imagelist.

def cleanhelper.cleanhelper.convertframe (   self,
  fin,
  frame,
  field 
)
(not in use: its caller is setChannelization...)
convert freq frame in dataframe to specfied frame, assume fin in Hz
retruns converted freq in Hz (value only)

Definition at line 2535 of file cleanhelper.py.

References cleanhelper.cleanhelper.dataspecframe, cleanhelper.cleanhelper.sortedvisindx, cleanhelper.cleanhelper.srcdir, and cleanhelper.cleanhelper.vis.

def cleanhelper.cleanhelper.convertImageFreqFrame (   self,
  imlist 
)
Convert output images to proper output frame
(after im.clean() executed)

Definition at line 3099 of file cleanhelper.py.

References cleanhelper.cleanhelper.dataspecframe, and cleanhelper.cleanhelper.usespecframe.

def cleanhelper.cleanhelper.convertmodelimage (   self,
  modelimages = [],
  outputmodel = '',
  imindex = 0 
)
Convert model inputs to a model image

Keyword arguments:
modleimages -- input model list
outputmodel -- outout modelimage name
imindex     -- image name index (corresponding to imagelist) 
       for multi field hanlding

Definition at line 1187 of file cleanhelper.py.

References cleanhelper.cleanhelper.imagelist, cleanhelper.cleanhelper.makemaskimage(), irc_cs_task_regression.max, and cleanhelper.cleanhelper.outputmask.

Referenced by cleanhelper.cleanhelper.convertAllModelImages(), cleanhelper.cleanhelper.convertAllModelImages_old(), and cleanhelper.cleanhelper.defineChaniterModelimages().

def cleanhelper.cleanhelper.convertvf (   self,
  vf,
  frame,
  field,
  restf,
  veltype = 'radio' 
)
returns doppler(velocity) or frequency in string
currently use first rest frequency
Assume input vf (velocity or fequency in a string) and 
output are the same 'frame'.

Definition at line 1883 of file cleanhelper.py.

References cleanhelper.cleanhelper.dataspecframe, cleanhelper.cleanhelper.sortedvisindx, and cleanhelper.cleanhelper.vis.

Referenced by cleanhelper.cleanhelper.setChannelizeDefault(), and cleanhelper.cleanhelper.setChannelizeNonDefault().

def cleanhelper.cleanhelper.copymaskimage (   self,
  maskimage,
  shp,
  outfile 
)
Copy mask image

Keyword arguments:
maskimage -- input maskimage 
shp       -- shape of output image 
outfile   -- output image name

Definition at line 1749 of file cleanhelper.py.

References cleanhelper.cleanhelper.csys.

def cleanhelper.cleanhelper.datsel (   self,
  field,
  spw,
  timerange,
  uvrange,
  antenna,
  scan,
  observation,
  usescratch,
  nchan = -1,
  start = 0,
  width = 1 
)
def cleanhelper.cleanhelper.datselweightfilter (   self,
  field,
  spw,
  timerange,
  uvrange,
  antenna,
  scan,
  wgttype,
  robust,
  noise,
  npixels,
  mosweight,
  innertaper,
  outertaper,
  usescratch,
  nchan = -1,
  start = 0,
  width = 1 
)
Make data selection 
(not in use, split into datsel and  datweightfileter)

Definition at line 970 of file cleanhelper.py.

References cleanhelper.cleanhelper.datsel(), cleanhelper.cleanhelper.fieldindex, and cleanhelper.cleanhelper.vis.

def cleanhelper.cleanhelper.datweightfilter (   self,
  field,
  spw,
  timerange,
  uvrange,
  antenna,
  scan,
  wgttype,
  robust,
  noise,
  npixels,
  mosweight,
  uvtaper,
  innertaper,
  outertaper,
  usescratch,
  nchan = -1,
  start = 0,
  width = 1 
)
Apply weighting and tapering 

Definition at line 1097 of file cleanhelper.py.

Referenced by cleanhelper.cleanhelper._selectlistinputs(), and cleanhelper.cleanhelper.makeTemplateCubes().

def cleanhelper.cleanhelper.defineChaniterModelimages (   self,
  modelimage,
  chan,
  tmppath 
)
def cleanhelper.cleanhelper.defineimages (   self,
  imsize,
  cell,
  stokes,
  mode,
  spw,
  nchan,
  start,
  width,
  restfreq,
  field,
  phasecenter,
  facets = 1,
  outframe = '',
  veltype = 'radio' 
)
Define image parameters -calls im.defineimage.
for processing a single field 
(also called by definemultiimages for multifield) 

Definition at line 165 of file cleanhelper.py.

References cleanhelper.cleanhelper.dataspecframe, cleanhelper.cleanhelper.definemultiimages(), cleanhelper.cleanhelper.phasecenter, cleanhelper.cleanhelper.sortedvisindx, cleanhelper.cleanhelper.spwindex, cleanhelper.cleanhelper.usespecframe, and cleanhelper.cleanhelper.vis.

Referenced by cleanhelper.cleanhelper.sortvislist().

def cleanhelper.cleanhelper.definemultiimages (   self,
  rootname,
  imsizes,
  cell,
  stokes,
  mode,
  spw,
  nchan,
  start,
  width,
  restfreq,
  field,
  phasecenters,
  names = [],
  facets = 1,
  outframe = '',
  veltype = 'radio',
  makepbim = False,
  checkpsf = False 
)
Define image parameters - multiple field version
This fucntion set "private" variables (imagelist and imageids),
and then calls defineimages for ecah field. 

Definition at line 302 of file cleanhelper.py.

Referenced by cleanhelper.cleanhelper.defineimages(), and cleanhelper.cleanhelper.makeTemplateCubes().

def cleanhelper.cleanhelper.flatten (   self,
  l 
)
A utility function to flatten nested lists 
but allow nesting of [[elm1,elm2,elm3],[elm4,elm5],[elm6,elm7]]
to handle multifield masks.
This does not flatten if an element is a list of int or float. 
And also leave empty list as is.

Definition at line 1799 of file cleanhelper.py.

References cleanhelper.cleanhelper.flatten(), and tests.test_imcontsub.list.

Referenced by cleanhelper.cleanhelper.flatten(), and cleanhelper.cleanhelper.makemultifieldmask2().

def cleanhelper.cleanhelper.getchanimage (   self,
  cubeimage,
  outim,
  chan 
)
Create a slice of channel image from cubeimage

Keyword arguments:
cubeimage -- input image cube
outim     -- output sliced image
chan      -- nth channel

Definition at line 1823 of file cleanhelper.py.

Referenced by cleanhelper.cleanhelper.checkpsf(), cleanhelper.cleanhelper.defineChaniterModelimages(), and parallel.parallel_cont.imagecont.imagechan_new().

def cleanhelper.cleanhelper.getfreqs (   self,
  nchan,
  spw,
  start,
  width,
  dummy = False 
)
(not in used - currently commented out in its caller, initChaniter()) 
returns a list of frequencies to be used in output clean image
if width = -1, start is actually end (max) freq 

Definition at line 1956 of file cleanhelper.py.

References cleanhelper.cleanhelper.dataspecframe, cleanhelper.cleanhelper.getspwtable(), cleanhelper.cleanhelper.sortedvisindx, and cleanhelper.cleanhelper.vis.

def cleanhelper.cleanhelper.getOptimumSize (   size) [static]
This returns the next largest even composite of 2, 3, 5, 7

Definition at line 3121 of file cleanhelper.py.

def cleanhelper.cleanhelper.getspwtable (   visname = '') [static]
def cleanhelper.cleanhelper.initChaniter (   self,
  nchan,
  spw,
  start,
  width,
  imagename,
  mode,
  tmpdir = '_tmpimdir/' 
)
initialize for channel iteration in interactive clean
--- create a temporary directory, get frequencies for
mode='channel'
       
Keyword arguments:
nchan -- no. channels
spw   -- spw 
start -- start modified after channelization function 
width -- width modified after channelization function
imagename -- from task input 
mode  -- from task input
tmpdir -- temporary directory name to store channel images

returns: 
frequencies in a list
frequency increment
newmode -- force to set mode to frequency
tmppath -- path for the temporary directory

Definition at line 2638 of file cleanhelper.py.

References cleanhelper.cleanhelper.makeTemplateCubes().

def cleanhelper.cleanhelper.initmultims (   self,
  imtool,
  vislist,
  usescratch 
)
def cleanhelper.cleanhelper.initsinglems (   self,
  imtool,
  vis,
  usescratch 
)
initialization for single ms case

Definition at line 64 of file cleanhelper.py.

Referenced by cleanhelper.cleanhelper.__init__().

def cleanhelper.cleanhelper.make_mask_from_threshhold (   self,
  imagename,
  thresh,
  outputmask = None 
)
Makes a mask image with the same coords as imagename where each
pixel is True if and only if the corresponding pixel in imagename
is >= thresh.

The mask will be named outputmask (if provided) or imagename +
'.thresh_mask'.  The name is returned on success, or False on failure.

Definition at line 722 of file cleanhelper.py.

Create empty images (0.0 pixel values) for 
image, residual, psf
must run after definemultiimages()
and it is assumed that definemultiimages creates 
empty images (self.imagelist). 

Definition at line 416 of file cleanhelper.py.

References cleanhelper.cleanhelper.imagelist, and cleanhelper.cleanhelper.nimages.

def cleanhelper.cleanhelper.makemaskimage (   self,
  outputmask = '',
  imagename = '',
  maskobject = [],
  slice = -1 
)
This function is an attempt to convert all the kind of 'masks' that
people want to throw at it and convert it to a mask image to be used
by imager...For now 'masks' include

a)set of previous mask images
b)lists of blc trc's
c)record output from rg tool for e.g

* for a single field 

Definition at line 759 of file cleanhelper.py.

References cleanhelper.convert_numpydtype(), cleanhelper.cleanhelper.csys, and cleanhelper.cleanhelper.imagelist.

Referenced by cleanhelper.cleanhelper.convertmodelimage(), and cleanhelper.cleanhelper.makemultifieldmask2().

def cleanhelper.cleanhelper.makemultifieldmask (   self,
  maskobject = '' 
)
This function assumes that the function definemultiimages has been run and thus
self.imagelist is defined
if single image use the single image version
(this is not up to date for current mask handling but used in task_widefield,
 to be removed after task_widefield is gone)

Definition at line 433 of file cleanhelper.py.

References cleanhelper.cleanhelper.imageids, cleanhelper.cleanhelper.imagelist, cleanhelper.cleanhelper.maskimages, and cleanhelper.cleanhelper.readmultifieldboxfile().

def cleanhelper.cleanhelper.makemultifieldmask2 (   self,
  maskobject = '',
  slice = -1,
  newformat = True,
  interactive = False 
)
Create mask images for multiple fields (flanking fields) 
This new makemultifieldmask to accomodate different kinds of masks supported
in clean with flanking fields.

Keyword arguments:
maskobject -- input mask, a list (of string or of list(s)) or a string 
slice      -- channel slice (to handle chaniter mode): default = -1 (all)
newformat  -- if mask is read from new format text file: default = True 

Prerequiste: definemultiimages has already ran so that imagelist is defined 
       
Notes: 
* It makes empty mask images at begenning, calls makemaskimage, and if no
  mask to be specified, the corresponding empty mask image is removed
  
* When clean is executed in commnad line style (e.g. clean(vis='..', ..))
  it is possible to have mask parameter consists of a mix of strings and int lists
  (i.e. mask=[['newreg.txt',[55,55,65,70]],['outliermask.rgn']]), and this function
  should be able to parse these properly. - although this won't work for the task execution
  by go() and tends to messed up inp() after such execution 
 
* Currently it is made to handle old outlier text file format and boxfile-style
  mask box specification for backward compartibility. But it is planned to
  be removed for 3.4.

* This is a refactored version of the previous makemultifieldmask2
  and  calls makemaskimage() for each field. 
  this was called makemultifieldmask3 in CASA 3.3 release but now renamed 
  makemultifieldmask2 as the previous makemultifieldmask2 was removed.

Definition at line 499 of file cleanhelper.py.

References make_mmsdata.all, nf_regression.append, cleanhelper.cleanhelper.csys, cleanhelper.cleanhelper.dataspecframe, cleanhelper.cleanhelper.flatten(), cleanhelper.cleanhelper.imageids, cleanhelper.cleanhelper.imagelist, cleanhelper.cleanhelper.makemaskimage(), cleanhelper.cleanhelper.maskimages, cleanhelper.cleanhelper.outputmask, cleanhelper.cleanhelper.readmultifieldboxfile(), pCASA.remove(), and cleanhelper.cleanhelper.usespecframe.

def cleanhelper.cleanhelper.makeTemplateCubes (   self,
  imagename,
  outlierfile,
  field,
  spw,
  selectdata,
  timerange,
  uvrange,
  antenna,
  scan,
  observation,
  mode,
  facets,
  cfcache,
  interpolation,
  imagermode,
  localFTMachine,
  mosweight,
  locnchan,
  locstart,
  locwidth,
  outframe,
  veltype,
  imsize,
  cell,
  phasecenter,
  restfreq,
  stokes,
  weighting,
  robust,
  uvtaper,
  outertaper,
  innertaper,
  modelimage,
  restoringbeam,
  usescratch,
  noise,
  npixels,
  padding 
)
def cleanhelper.cleanhelper.newreadoutlier (   self,
  outlierfile 
)
Read a outlier file (both old and new format) 
 
The new format consists of a set of task parameter inputs.
imagename="outlier1" imsize=[128,128] phasecenter="J2000 hhmmss.s ddmmss.s" 
imagename="outlier2" imsize=[128,128] phasecenter="J2000 hhmmss.s ddmmss.s"
mask=['viewermask.rgn','box[[50,60],[50,60]]'] ...

Currently supported paramters are:
imagename (required: used to delinate a paramater set for each field)
imsize (required)
phasecenter (required)
mask (optional)
modelimage (optional) 
* other parameters can be included in the file but not parsed

For the old format, readoutlier() is called internally currently. But
the support will be removed by CASA3.4. 

Returns:
lists of imageids, imsizes, phasecenters, masks, 
and modelimages, and a dictionary contains all the parameters,
and a boolean to indicate read file is in the new format. 

Definition at line 1584 of file cleanhelper.py.

References asap.asapmath.keys, and cleanhelper.cleanhelper.readoutlier().

Referenced by cleanhelper.cleanhelper.makeTemplateCubes().

def cleanhelper.cleanhelper.putchanimage (   self,
  cubimage,
  inim,
  chan 
)
Put channel image back to a pre-exisiting cubeimage
 
Keyword arguments:
cubimage -- image cube
inim     -- input channel image 
chan     -- nth channel

Definition at line 1846 of file cleanhelper.py.

Referenced by parallel.parallel_cont.imagecont.cleanupcubeimages(), parallel.parallel_cont.imagecont.cleanupmodelimages(), parallel.parallel_cont.imagecont.cleanupresidualimages(), parallel.parallel_cont.imagecont.cleanuprestoredimages(), and cleanhelper.cleanhelper.storeCubeImages().

def cleanhelper.cleanhelper.qatostring (   self,
  q 
)
A utility function to return a quantity in string
(currently only used in setChannelization which is deprecated)

Definition at line 1874 of file cleanhelper.py.

def cleanhelper.cleanhelper.readboxfile (   self,
  boxfile 
)
Read a file containing clean boxes (compliant with AIPS BOXFILE)

Format is:
#FIELDID BLC-X BLC-Y TRC-X TRC-Y
0       110   110   150   150 
or
0       hh:mm:ss.s dd.mm.ss.s hh:mm:ss.s dd.mm.ss.s

Note all lines beginning with '#' are ignored.

Definition at line 1301 of file cleanhelper.py.

References cleanhelper.cleanhelper.csys, and cleanhelper.cleanhelper.csysorder.

def cleanhelper.cleanhelper.readmultifieldboxfile (   self,
  boxfiles 
)
Read boxes and circles in text files in the 
AIPS clean boxfile format.

Keyword arguments:
boxfiles -- text files in boxfile format

returns:
circles -- dictionary containing circles      
boxes   -- dictionary conatining boxes ([blc, trc])
oldfileformats -- a list of boolean if the input textfiles
   are boxfile format. 

Definition at line 1466 of file cleanhelper.py.

References nf_regression.append, and cleanhelper.cleanhelper.imageids.

Referenced by cleanhelper.cleanhelper.makemultifieldmask(), and cleanhelper.cleanhelper.makemultifieldmask2().

def cleanhelper.cleanhelper.readoutlier (   self,
  outlierfile 
)
Read a file containing clean boxes (kind of
compliant with AIPS FACET FILE)
    
Format is:
 col0    col1   col2  col3 col4 col5 col6 col7  col8   col9
  C    FIELDID SIZEX SIZEY RAHH RAMM RASS DECDD DECMM DECSS      
why first column has to have C ... because its should
not to be A or B ...now D would be a totally different thing.

'C' as in AIPS BOXFILE format indicates the file specify the coordiates
for field center(s). 

Note all lines beginning with '#' are ignored.
(* Lines with first column other than C or c are also ignored)

Definition at line 1541 of file cleanhelper.py.

Referenced by cleanhelper.cleanhelper.newreadoutlier().

def cleanhelper.cleanhelper.setChaniterParms (   self,
  finalimagename,
  spw,
  chan,
  start,
  width,
  freqs,
  finc,
  tmppath 
)
Set parameters for channel by channel iterations
returns:
start and width to define each channel image plane

Definition at line 2868 of file cleanhelper.py.

References cleanhelper.cleanhelper.maskimages.

def cleanhelper.cleanhelper.setChannelizeDefault (   self,
  mode,
  spw,
  field,
  nchan,
  start,
  width,
  frame,
  veltype,
  phasec,
  restf,
  obstime = '' 
)
Determine appropriate values for channelization
parameters when default values are used
for mode='velocity' or 'frequency' or 'channel'
This makes use of ms.cvelfreqs.

Definition at line 2071 of file cleanhelper.py.

References cleanhelper.cleanhelper.convertvf(), cleanhelper.cleanhelper.dataspecframe, cleanhelper.cleanhelper.getspwtable(), cleanhelper.cleanhelper.inframe, cleanhelper.cleanhelper.setChannelizeNonDefault(), cleanhelper.cleanhelper.sortedvisindx, cleanhelper.cleanhelper.sortedvislist, cleanhelper.cleanhelper.usespecframe, and cleanhelper.cleanhelper.vis.

def cleanhelper.cleanhelper.setChannelizeNonDefault (   self,
  mode,
  spw,
  field,
  nchan,
  start,
  width,
  frame,
  veltype,
  phasec,
  restf 
)
Determine appropriate values for channelization
parameters when default values are used
for mode='velocity' or 'frequency' or 'channel'
This does not replaces setChannelization and make no use of ms.cvelfreqs.

Definition at line 2334 of file cleanhelper.py.

References cleanhelper.cleanhelper.convertvf(), cleanhelper.cleanhelper.getspwtable(), tests.test_imcontsub.list, irc_cs_task_regression.max, cleanhelper.cleanhelper.sortedvisindx, and cleanhelper.cleanhelper.vis.

Referenced by cleanhelper.cleanhelper.setChannelizeDefault().

def cleanhelper.cleanhelper.setrestoringbeam (   self,
  restoringbeam 
)
Set restoring beam

Definition at line 1157 of file cleanhelper.py.

def cleanhelper.cleanhelper.setspecframe (   self,
  spw 
)
set spectral frame for mfs to data frame based
on spw selection 
(part copied from setChannelization)

Definition at line 2590 of file cleanhelper.py.

References cleanhelper.cleanhelper.dataspecframe, cleanhelper.cleanhelper.getspwtable(), cleanhelper.cleanhelper.sortedvisindx, and cleanhelper.cleanhelper.vis.

def cleanhelper.cleanhelper.sortvislist (   self,
  spw,
  mode,
  width 
)
sorting user input vis if it is multiple MSes based on
frequencies (spw). So that in sebsequent processing such
as setChannelization() correctly works.
Returns sorted vis. name list

Definition at line 102 of file cleanhelper.py.

References cleanhelper.cleanhelper.defineimages(), cleanhelper.cleanhelper.getspwtable(), irc_cs_task_regression.max, cleanhelper.cleanhelper.sortedvisindx, cleanhelper.cleanhelper.sortedvislist, and cleanhelper.cleanhelper.vis.

def cleanhelper.cleanhelper.storeCubeImages (   self,
  cubeimageroot,
  chanimageroot,
  chan,
  imagermode 
)
Put channel images back into CubeImages for chaniter=T mode

Keyword arguments:
cubeimageroot -- root name for output cube image
chanimageroot -- root name for channel image
chan          -- channel plane index
imagermode    -- imagermode  

Definition at line 3057 of file cleanhelper.py.

References cleanhelper.cleanhelper.nimages, and cleanhelper.cleanhelper.putchanimage().


Member Data Documentation

Definition at line 52 of file cleanhelper.py.

Referenced by setjy_helper.ss_setjy_helper.setSolarObjectJy().

This code to set the maskframe is copied from makemaskimages()

don't know what to do with this

Can be a file name, or an explicit region-string

Definition at line 82 of file cleanhelper.py.

Referenced by cleanhelper.cleanhelper.copymaskimage(), cleanhelper.cleanhelper.initmultims(), cleanhelper.cleanhelper.makemaskimage(), cleanhelper.cleanhelper.makemultifieldmask2(), and cleanhelper.cleanhelper.readboxfile().

Definition at line 854 of file cleanhelper.py.

Referenced by cleanhelper.cleanhelper.readboxfile().

Definition at line 39 of file cleanhelper.py.

Referenced by cleanhelper.cleanhelper.checkpsf().

Definition at line 43 of file cleanhelper.py.

Referenced by cleanhelper.cleanhelper.setChannelizeDefault().

This goes when those tablerecord goes Make masks from tablerecords.

okay if outputmask exists then we need to do an "and" with the sdmask one

Make masks from region dictionaries Make masks from text files Make masks from inline lists of pixel coordinates Make masks from inline region-strings Make mask from an image-mask

Definition at line 81 of file cleanhelper.py.

Referenced by cleanhelper.cleanhelper.convertmodelimage(), cleanhelper.cleanhelper.initmultims(), and cleanhelper.cleanhelper.makemultifieldmask2().

Definition at line 1018 of file cleanhelper.py.

Definition at line 339 of file cleanhelper.py.

Referenced by cleanhelper.cleanhelper.checkpsf().

understand spw

Definition at line 79 of file cleanhelper.py.

Referenced by cleanhelper.cleanhelper.defineimages(), and cleanhelper.cleanhelper.initmultims().

Definition at line 46 of file cleanhelper.py.

Referenced by cleanhelper.cleanhelper.convertframe().

Definition at line 40 of file cleanhelper.py.

Definition at line 71 of file cleanhelper.py.

Referenced by cleanhelper.cleanhelper.convertframe(), cleanhelper.cleanhelper.convertvf(), cleanhelper.cleanhelper.datselweightfilter(), cleanhelper.cleanhelper.defineimages(), cleanhelper.cleanhelper.getfreqs(), cleanhelper.cleanhelper.initmultims(), cleanhelper.cleanhelper.setChannelizeDefault(), cleanhelper.cleanhelper.setChannelizeNonDefault(), setjy_helper.ss_setjy_helper.setSolarObjectJy(), cleanhelper.cleanhelper.setspecframe(), tests.test_agentflagger.test_base.setUp_4Ants(), tests.test_flagcmd.test_base.setUp_bpass_case(), tests.test_flagdata.test_base.setUp_bpass_case(), tests.test_agentflagger.test_base.setUp_CAS_4052(), tests.test_flagcmd.test_base.setUp_data4rflag(), tests.test_flagdata.test_base.setUp_data4tfcrop(), tests.test_flagcmd.test_base.setUp_evla(), tests.test_flagcmd.test_base.setUp_flagdatatest_alma(), tests.test_flagdata.test_base.setUp_flagdatatest_alma(), tests.test_listpartition.test_base.setUp_MMSdata1(), tests.test_listpartition.test_base.setUp_MMSdata2(), tests.test_listpartition.test_base.setUp_MMSdata3(), tests.test_flagcmd.test_base.setUp_multi(), tests.test_flagdata.test_base.setUp_multi(), tests.test_flagdata.test_base.setUp_ngc5921(), tests.test_flagcmd.test_base.setUp_shadowdata(), tests.test_flagdata.test_base.setUp_shadowdata2(), tests.test_agentflagger.test_base.setUp_tsys_case(), tests.test_flagdata.test_base.setUp_tsys_case(), cleanhelper.cleanhelper.sortvislist(), tests.test_pcasa.pcasa_test.tearDown(), tests.test_simplecluster.test_flagdata_mms.tearDown(), tests.test_simplecluster.test_setjy_mms.tearDown(), tests.test_simplecluster.test_applycal_mms.tearDown(), tests.test_simplecluster.test_uvcont_mms.tearDown(), tests.test_flagdata.test_statistics_queries.test021(), tests.test_pcasa.pcasa_test.test1(), tests.test_flagdata.test_statistics_queries.test10(), tests.test_flagdata.test_statistics_queries.test11(), tests.test_flagdata.test_statistics_queries.test12(), tests.test_flagdata.test_statistics_queries.test13(), tests.test_simplecluster.test_applycal_mms.test1_applycal_fluxscale_gcal_bcal(), tests.test_simplecluster.test_flagdata_mms.test1_flagdata_list_return(), tests.test_simplecluster.test_setjy_mms.test1_setjy_scratchless_mode_single_model(), tests.test_simplecluster.test_uvcont_mms.test1_uvcont_single_spw(), tests.test_flagdata.test_flagmanager.test1m(), tests.test_simplecluster.test_setjy_mms.test2_setjy_scratchless_mode_multiple_model(), tests.test_flagdata.test_flagmanager.test2m(), tests.test_simplecluster.test_setjy_mms.test3_setjy_scratch_mode_single_model(), tests.test_simplecluster.test_setjy_mms.test4_setjy_scratch_mode_multiple_model(), tests.test_simplecluster.test_simplecluster.test7_bypassParallelProcessing(), tests.test_simplecluster.test_simplecluster.test8_IgnoreNullSelectionError(), tests.test_flagdata.test_statistics_queries.test9(), tests.test_flagdata.test_selections_alma.test_abs_all(), tests.test_flagdata.test_selections_alma.test_abs_i(), tests.test_flagdata.test_selections_alma.test_abs_wvr(), tests.test_flagdata.test_selections.test_action(), tests.test_flagdata.test_shadow.test_addantenna(), tests.test_flagdata.test_CASA_4_0_bug_fix.test_alias(), tests.test_flagdata.test_msselection.test_amp(), tests.test_flagdata.test_selections.test_antenna(), tests.test_flagdata.test_selections.test_array(), tests.test_flagcmd.test_manual.test_autocorr(), tests.test_flagdata.test_msselection.test_autocorr1(), tests.test_flagdata.test_msselection.test_autocorr2(), tests.test_flagdata.test_msselection.test_autocorr3(), tests.test_flagdata.test_bandpass.test_caltable_flagbackup(), tests.test_flagdata.test_statistics_queries.test_CAS2021(), tests.test_flagdata.test_statistics_queries.test_CAS2212(), tests.test_flagdata.test_shadow.test_CAS2399(), tests.test_flagcmd.test_shadow.test_CAS2399(), tests.test_flagdata.test_flagmanager.test_CAS2701(), tests.test_flagdata.test_CASA_4_0_bug_fix.test_CAS_4200(), tests.test_flagdata.test_CASA_4_0_bug_fix.test_CAS_4270(), tests.test_flagdata.test_CASA_4_0_bug_fix.test_CAS_4312(), tests.test_flagdata.test_statistics_queries.test_chanavg0(), tests.test_flagdata.test_statistics_queries.test_chanavg1(), tests.test_flagdata.test_statistics_queries.test_chanavg2(), tests.test_flagdata.test_statistics_queries.test_chanavg3(), tests.test_flagdata.test_tsys.test_channel_selection(), tests.test_flagdata.test_tsys.test_clip_fparm_all(), tests.test_flagdata.test_tsys.test_clip_fparm_error_absall(), tests.test_flagdata.test_tsys.test_clip_fparm_sol1(), tests.test_flagdata.test_tsys.test_clip_fparm_sol1sol2(), tests.test_flagdata.test_tsys.test_clip_fparm_sol2(), tests.test_flagdata.test_bandpass.test_clip_minmax_cparam_all_for_bpass(), tests.test_agentflagger.test_bpass.test_clip_minmax_cparam_for_bpass(), tests.test_agentflagger.test_tsys.test_clip_minmax_fparm_all(), tests.test_agentflagger.test_tsys.test_clip_minmax_fparm_error_case_absall(), tests.test_agentflagger.test_tsys.test_clip_minmax_fparm_sol1(), tests.test_agentflagger.test_tsys.test_clip_minmax_fparm_sol1_2(), tests.test_agentflagger.test_tsys.test_clip_minmax_fparm_sol1_extension(), tests.test_agentflagger.test_tsys.test_clip_minmax_fparm_sol1sol2(), tests.test_agentflagger.test_tsys.test_clip_minmax_fparm_sol2(), tests.test_flagdata.test_bandpass.test_clip_minmax_snr_all_for_bpass(), tests.test_agentflagger.test_bpass.test_clip_minmax_snr_all_for_bpass_CalTable(), tests.test_agentflagger.test_tsys.test_clip_minmax_snr_all_for_tsys_CalTable(), tests.test_flagdata.test_bandpass.test_clip_nan_and_inf_cparam_all_for_bpass(), tests.test_agentflagger.test_tsys.test_clip_nan_and_inf_fparm_all(), tests.test_flagdata.test_tsys.test_clip_nans_fparm_all(), tests.test_flagcmd.test_cmdbandpass.test_clip_one_list(), tests.test_flagdata.test_bandpass.test_clip_one_list(), tests.test_flagdata.test_tsys.test_clip_snr_all(), tests.test_agentflagger.test_tsys.test_clip_zeros_fparm_all(), tests.test_flagdata.test_clip.test_clipzeros(), tests.test_flagcmd.test_alma.test_cmd(), tests.test_flagcmd.test_manual.test_compatibility(), tests.test_flagdata.test_selections.test_correlation(), tests.test_flagcmd.test_cmdbandpass.test_default_cparam(), tests.test_flagdata.test_bandpass.test_default_cparam(), tests.test_agentflagger.test_bpass.test_default_cparam_bpass(), tests.test_flagdata.test_tsys.test_default_fparam(), tests.test_agentflagger.test_display.test_display_cal_tables(), tests.test_agentflagger.test_display.test_display_data_different_corrs_per_spw(), tests.test_agentflagger.test_display.test_display_data_multiple_channel_selection(), tests.test_agentflagger.test_display.test_display_data_single_channel_selection(), tests.test_flagdata.test_tfcrop.test_extendfreq(), tests.test_flagdata.test_tfcrop.test_extendpols(), tests.test_flagdata.test_tfcrop.test_extendtime(), tests.test_flagcmd.test_alma.test_extract(), tests.test_flagdata.test_selections.test_field(), tests.test_flagdata.test_list_file.test_file1(), tests.test_flagdata.test_list_file.test_file2(), tests.test_flagdata.test_list_file.test_file3(), tests.test_flagdata.test_list_file.test_file4(), tests.test_flagdata.test_list_file.test_file5(), tests.test_flagdata.test_list_file.test_file6(), tests.test_flagcmd.test_cmdbandpass.test_flagbackup(), tests.test_flagcmd.test_alma.test_intent(), tests.test_flagdata.test_elevation.test_interval(), tests.test_flagdata.test_tsys.test_invalid_corr(), tests.test_flagdata.test_tsys.test_invalid_datacol(), tests.test_flagdata.test_bandpass.test_invalid_datacol(), tests.test_flagdata.test_tsys.test_invalid_scan(), tests.test_flagcmd.test_savepars.test_list1(), tests.test_flagcmd.test_actions.test_list1(), tests.test_flagdata.test_list_list.test_list1(), tests.test_flagcmd.test_actions.test_list2(), tests.test_flagdata.test_list_list.test_list2(), tests.test_flagdata.test_list_list.test_list3(), tests.test_flagdata.test_list_list.test_list4(), tests.test_flagdata.test_list_list.test_list5(), tests.test_flagdata.test_bandpass.test_list_antenna_Selection_for_bpass(), tests.test_flagcmd.test_cmdbandpass.test_list_field_Selection_for_bpass(), tests.test_flagdata.test_bandpass.test_list_field_Selection_for_bpass(), tests.test_flagdata.test_tsys.test_list_fparm_sol1_extension(), tests.test_flagdata.test_elevation.test_lower(), tests.test_agentflagger.test_bpass.test_manual_antenna_msSelection_layer_for_bpass_CalTable(), tests.test_agentflagger.test_tsys.test_manual_antenna_msSelection_layer_for_tsys_CalTable(), tests.test_flagdata.test_tsys.test_manual_antenna_selection(), tests.test_agentflagger.test_bpass.test_manual_antenna_selection_agent_layer_for_bpass_CalTable(), tests.test_agentflagger.test_tsys.test_manual_antenna_selection_agent_layer_for_tsys_CalTable(), tests.test_agentflagger.test_tsys.test_manual_antenna_selection_agent_layer_for_tsys_CalTable2(), tests.test_flagdata.test_bandpass.test_manual_antenna_selection_for_bpass(), tests.test_agentflagger.test_bpass.test_manual_field_msSelection_layer_for_bpass_CalTable(), tests.test_agentflagger.test_tsys.test_manual_field_msSelection_layer_for_tsys_CalTable(), tests.test_flagdata.test_tsys.test_manual_field_selection(), tests.test_agentflagger.test_bpass.test_manual_field_selection_agent_layer_for_bpass_CalTable(), tests.test_agentflagger.test_tsys.test_manual_field_selection_agent_layer_for_tsys_CalTable(), tests.test_flagcmd.test_cmdbandpass.test_manual_field_selection_for_bpass(), tests.test_flagdata.test_bandpass.test_manual_field_selection_for_bpass(), tests.test_flagcmd.test_XML.test_missing_corr(), tests.test_flagdata.test_selections.test_missing_corr_product(), tests.test_agentflagger.test_tsys.test_mixed_agents_tsys(), tests.test_flagdata.test_tsys.test_mixed_list(), tests.test_flagcmd.test_cmdbandpass.test_MS_flagcmds(), tests.test_flagdata.test_bandpass.test_nullselections(), tests.test_flagcmd.test_manual.test_observation(), tests.test_flagdata.test_selections2.test_observation1(), tests.test_flagdata.test_selections2.test_observation2(), tests.test_flagcmd.test_actions.test_plot(), tests.test_flagdata.test_list_file.test_reason1(), tests.test_flagdata.test_list_file.test_reason2(), tests.test_flagdata.test_list_file.test_reason3(), tests.test_flagdata.test_list_list.test_reason_list(), tests.test_flagdata.test_rflag.test_rflag1(), tests.test_flagdata.test_rflag.test_rflag2(), tests.test_flagdata.test_rflag.test_rflag3(), tests.test_flagdata.test_rflag.test_rflag4(), tests.test_agentflagger.test_bpass.test_rflag_cparam_sol2(), tests.test_flagdata.test_bandpass.test_rflag_cparam_sol2_for_bpass(), tests.test_flagcmd.test_rflag.test_rflagauto(), tests.test_flagcmd.test_rflag.test_rflaginputs(), tests.test_flagcmd.test_cmdbandpass.test_save_cal(), tests.test_flagdata.test_selections.test_scan(), tests.test_flagdata.test_selections_alma.test_scanitent(), tests.test_flagdata.test_msselection.test_simple(), tests.test_flagdata.test_selections.test_spw(), tests.test_flagdata.test_selections_alma.test_spw(), tests.test_flagdata.test_CASA_4_0_bug_fix.test_spw_freq1(), tests.test_flagdata.test_CASA_4_0_bug_fix.test_spw_freq2(), tests.test_flagdata.test_CASA_4_0_bug_fix.test_spw_freq3(), tests.test_flagdata.test_selections.test_spw_list(), tests.test_flagdata.test_tsys.test_spw_selection(), tests.test_flagdata.test_tfcrop.test_tfcrop1(), tests.test_flagdata.test_tfcrop.test_tfcrop2(), tests.test_flagdata.test_bandpass.test_tfcrop_cparam_all_for_bpass(), tests.test_agentflagger.test_bpass.test_tfcrop_cparam_sol1_extension(), tests.test_flagdata.test_bandpass.test_tfcrop_cparam_sol1_extension_for_bpass(), tests.test_flagdata.test_selections.test_timerange(), tests.test_flagcmd.test_unapply.test_umanualflag(), tests.test_flagdata.test_tsys.test_unsupported_elevation(), tests.test_agentflagger.test_tsys.test_unsupported_elevation_tsys(), tests.test_flagcmd.test_cmdbandpass.test_unsupported_mode_in_list(), tests.test_flagdata.test_bandpass.test_unsupported_modes(), tests.test_flagdata.test_tsys.test_unsupported_shadow(), tests.test_flagdata.test_elevation.test_upper(), tests.test_flagcmd.test_unapply.test_uquack(), tests.test_flagcmd.test_unapply.test_uscans(), tests.test_flagcmd.test_unapply.test_utfcrop(), tests.test_flagdata.test_selections.test_uvrange(), tests.test_flagdata.test_selections_alma.test_wvr(), tests.test_flagcmd.test_XML.test_xml1(), tests.test_flagcmd.test_XML.test_xml2(), tests.test_listpartition.test_MMS_mix.testmix1(), tests.test_listpartition.test_MMS_mix.testmix2(), tests.test_listpartition.test_MMS_mix.testmix3(), tests.test_listpartition.test_MMS_mix.testmix4(), tests.test_listpartition.test_MS.testMS1(), tests.test_listpartition.test_MS.testMS2(), tests.test_listpartition.test_MS.testMS3(), tests.test_listpartition.test_MMS_scan.testscan1(), tests.test_listpartition.test_MMS_scan.testscan2(), tests.test_listpartition.test_MMS_scan.testscan3(), tests.test_listpartition.test_MMS_scan.testscan4(), tests.test_listpartition.test_MMS_spw.testspw1(), tests.test_listpartition.test_MMS_spw.testspw2(), tests.test_listpartition.test_MMS_spw.testspw3(), and tests.test_agentflagger.test_base.unflag_table().


The documentation for this class was generated from the following file: