casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
task_imstat.py
Go to the documentation of this file.
00001 from taskinit import *
00002 
00003 def imstat(
00004     imagename=None, axes=None, region=None, box=None, chans=None,
00005     stokes=None, listit=None, verbose=None, mask=None, stretch=None,
00006     logfile=None, append=None
00007 ):
00008     _myia = iatool()
00009     try:
00010         casalog.origin('imstat')
00011         _myia.open(imagename)
00012         mycsys = _myia.coordsys()
00013         reg = rg.frombcs(
00014             mycsys.torecord(), _myia.shape(),
00015             box, chans, stokes, "a", region
00016         )
00017         retValue = _myia.statistics(
00018             axes=axes, region=reg, list=listit,
00019             verbose=verbose, robust=True, mask=mask,
00020             stretch=stretch, logfile=logfile, append=append
00021         )
00022         _myia.done()
00023         return retValue
00024     except Exception, instance:
00025         _myia.done()
00026         casalog.post( '*** Error ***'+str(instance), 'SEVERE' )
00027         return {}