casa
$Rev:20696$
|
00001 # 00002 # This file was generated using xslt from its XML file 00003 # 00004 # Copyright 2009, Associated Universities Inc., Washington DC 00005 # 00006 import sys 00007 import os 00008 from casac import * 00009 import string 00010 from taskinit import casalog 00011 #from taskmanager import tm 00012 import task_tclean 00013 def tclean(vis='', field='', spw='', imagename='', nchan=1, startmodel='', niter=500, threshold=0.0, loopgain=0.1, maxcycleniter=-1, cyclefactor=1.0, minpsffraction=0.05, maxpsffraction=0.8, usescratch=False, clusterdef=''): 00014 00015 """Construct and deconvolve images 00016 00017 This is an empty task. 00018 It is meant only to build/test/maintain the interface for the refactored imaging code. 00019 When ready, it will be offered to users for testing. 00020 00021 00022 """ 00023 00024 # 00025 # The following is work around to avoid a bug with current python translation 00026 # 00027 mytmp = {} 00028 00029 mytmp['vis'] = vis 00030 mytmp['field'] = field 00031 mytmp['spw'] = spw 00032 mytmp['imagename'] = imagename 00033 mytmp['nchan'] = nchan 00034 mytmp['startmodel'] = startmodel 00035 mytmp['niter'] = niter 00036 mytmp['threshold'] = threshold 00037 mytmp['loopgain'] = loopgain 00038 mytmp['maxcycleniter'] = maxcycleniter 00039 mytmp['cyclefactor'] = cyclefactor 00040 mytmp['minpsffraction'] = minpsffraction 00041 mytmp['maxpsffraction'] = maxpsffraction 00042 mytmp['usescratch'] = usescratch 00043 mytmp['clusterdef'] = clusterdef 00044 pathname='file:///'+os.environ.get('CASAPATH').split()[0]+'/share/xml/' 00045 trec = casac.utils().torecord(pathname+'tclean.xml') 00046 00047 casalog.origin('tclean') 00048 if trec.has_key('tclean') and casac.utils().verify(mytmp, trec['tclean']) : 00049 result = task_tclean.tclean(vis, field, spw, imagename, nchan, startmodel, niter, threshold, loopgain, maxcycleniter, cyclefactor, minpsffraction, maxpsffraction, usescratch, clusterdef) 00050 00051 else : 00052 result = False 00053 return result