casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
Classes | Functions
partitionhelper Namespace Reference

Classes

class  convertToMMS

Functions

def getMMSScans
def getScanList
def getScanNrows
def getMMSScanNrows
def getSpwIds
def getMMSSpwIds
def getDiskUsage
def getSubtables
def makeMMS

Function Documentation

def partitionhelper.getDiskUsage (   msfile)
Return the size in bytes of an MS or MMS in disk.
   msfile  --> name of the MS
   This function will return a value given by
   the command du -hs

Definition at line 472 of file partitionhelper.py.

def partitionhelper.getMMSScanNrows (   thisdict,
  myscan 
)
Get the number of rows of a scan in an MMS dictionary.
   thisdict  --> output dictionary from listpartition(MMS,createdict=true)
   myscan    --> scan ID (int) 
   Return the number of rows in the given scan. 

Definition at line 390 of file partitionhelper.py.

def partitionhelper.getMMSScans (   mmsdict)
Get the list of scans of an MMS dictionary.
   mmsdict  --> output dictionary from listpartition(MMS,createdict=true)
   Return a list of the scans in this MMS. 

Definition at line 318 of file partitionhelper.py.

References asap.asapmath.keys, and tests.test_imcontsub.list.

def partitionhelper.getMMSSpwIds (   thisdict)
Get the list of spws from an MMS dictionary.
   thisdict  --> output dictionary from listpartition(MMS,createdict=true)
   Return a list of the spw Ids in the dictionary. 

Definition at line 446 of file partitionhelper.py.

References asap.asapmath.keys.

def partitionhelper.getScanList (   msfile,
  selection = {} 
)
Get the list of scans of an MS or MMS. 
   msfile     --> name of MS or MMS
   selection  --> dictionary with data selection
   
   Return a list of the scans in this MS/MMS. 

Definition at line 333 of file partitionhelper.py.

References taskinit.mstool.

def partitionhelper.getScanNrows (   msfile,
  myscan,
  selection = {} 
)
Get the number of rows of a scan in a MS. It will add the nrows of all sub-scans.
   This will not take into account any selection done on the MS.
   msfile     --> name of the MS or MMS
   myscan     --> scan ID (int)
   selection  --> dictionary with data selection
   
   Return the number of rows in the scan.
   
   To compare with the dictionary returned by listpartition, do the following:
   
    resdict = listpartition('file.mms', createdict=True)
    slist = ph.getMMSScans(thisdict)
    for s in slist:
        mmsN = ph.getMMSScanNrows(thisdict, s)
        msN = ph.getScanNrows('referenceMS', s)
        assert (mmsN == msN)

Definition at line 353 of file partitionhelper.py.

References taskinit.mstool.

def partitionhelper.getSpwIds (   msfile,
  myscan,
  selection = {} 
)
Get the Spw IDs of a scan. 
   msfile     --> name of the MS or MMS
   myscan     --> scan Id (int)
   selection  --> dictionary with data selection
   
   Return a list with the Spw IDs. Note that the returned spw IDs are sorted.

Definition at line 405 of file partitionhelper.py.

References taskinit.mstool.

Definition at line 495 of file partitionhelper.py.

References taskinit.tbtool.

Referenced by makeMMS().

def partitionhelper.makeMMS (   outputvis,
  submslist,
  copysubtables = False,
  omitsubtables = [] 
)
Create an MMS named outputvis from the submss in list submslist.
The subtables in omitsubtables are linked instead of copied.

Definition at line 510 of file partitionhelper.py.

References getSubtables(), taskinit.mstool, and taskinit.tbtool.