casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
task_msmoments.py
Go to the documentation of this file.
00001 import os
00002 from taskinit import *
00003 
00004 def msmoments( infile, moments, antenna, field, spw, includemask, excludemask, outfile, overwrite):
00005     
00006     retValue=None
00007     casalog.origin('msmoments')
00008 
00009     try:
00010         if ( (not overwrite) and (len(moments) == 1) ):
00011             if ( os.path.exists(outfile) ):
00012                 raise Exception( outfile+" exists." ) 
00013         ms.open( infile ) 
00014         retValue = ms.moments( moments=moments,antenna=antenna,field=field,spw=spw,includemask=includemask,excludemask=excludemask,outfile=outfile,overwrite=overwrite)
00015         ms.close()
00016         return retValue
00017     except Exception, instance:
00018         ms.done()
00019         print '*** Error ***',instance
00020         raise Exception, instance
00021             
00022