casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
task_imfit.py
Go to the documentation of this file.
00001 from taskinit import *
00002 
00003 def imfit(
00004     imagename=None, box=None, region=None, chans=None, stokes=None,
00005     mask=None, includepix=None, excludepix=None, residual=None,
00006     model=None, estimates=None, logfile=None, append=None,
00007     newestimates=None, complist=None, overwrite=None, dooff=None,
00008     offset=None, fixoffset=None, stretch=None
00009 ):
00010     casalog.origin('imfit')
00011     myia = iatool()
00012     try:
00013         if (not myia.open(imagename)):
00014             raise Exception, "Cannot create image analysis tool using " + imagename
00015         result_dict = myia.fitcomponents(
00016             box=box, region=region, chans=chans, stokes=stokes,
00017             mask=mask, includepix=includepix, excludepix=excludepix,
00018             residual=residual, model=model, estimates=estimates,
00019             logfile=logfile, append=append, newestimates=newestimates,
00020             complist=complist, overwrite=overwrite, dooff=dooff,
00021             offset=offset, fixoffset=fixoffset, stretch=stretch
00022         )
00023         myia.done()
00024         return result_dict
00025     except Exception, instance:
00026         if (myia):
00027             myia.done()
00028         casalog.post( str( '*** Error ***') + str(instance), 'SEVERE')
00029         raise instance
00030