def __init__(self, ftmachine='ft', wprojplanes=10, facets=1, pixels=[3600, 3600], cell=['3arcsec', '3arcsec'], spw='', field='', phasecenter='', weight='natural', robust=0.0, stokes='I', npixels=0, uvtaper=False, outertaper=[], timerange='', uvrange='', baselines='', scan='', observation='', gain=0.1, numthreads=-1, pbcorr=False, minpb=0.2, cyclefactor=1.5, painc=360., pblimit=0.1, dopbcorr=True, applyoffsets=False, cfcache='cfcache.dir', epjtablename='',mterm=True,wbawp=True,aterm=True,psterm=True,conjbeams=True): self.im=casac.imager() self.imperms={} self.dc=casac.deconvolver() self.ft=ftmachine self.origms='' self.wprojplanes=wprojplanes self.facets=facets print 'cell', cell self.pixels=pixels self.cell=cell if(spw==''): spw='*' self.spw=spw self.field=field self.phCen=phasecenter self.weight=weight self.imageparamset=False self.robust=robust self.weightnpix=npixels self.stokes=stokes self.numthreads=numthreads self.imagetilevol=1000000 self.visInMem=False self.cyclefactor=cyclefactor self.novaliddata={} self.gain=gain self.uvtaper=uvtaper self.outertaper=outertaper self.timerange=timerange self.uvrange=uvrange self.baselines=baselines self.scan=scan self.observation=observation self.pbcorr=pbcorr self.minpb=minpb ###a default common cube coordsys self.cubecoordsys=casac.coordsys().torecord() self.painc=painc; self.pblimit=pblimit; self.dopbcorr=dopbcorr; self.applyoffsets=applyoffsets; self.cfcache=cfcache; self.epjtablename=epjtablename; self.mterm=mterm; self.aterm=aterm; self.psterm=psterm; self.wbawp=wbawp; self.conjbeams=conjbeams;
def cleancont(self, niter=100, alg='clark', thr='0.0mJy', psf='newmodel.psf', dirty='newmodel.dirty', model='newmodel.model', mask='', scales=[0]): dc=casac.deconvolver() dc.open(dirty=dirty, psf=psf) if((alg=='hogbom') or (alg == 'msclean') or (alg == 'multiscale')): sca=scales if ((alg=='msclean') or (alg=='multiscale')) else [0] dc.setscales(scalemethod='uservector', uservector=sca) alg='fullmsclean' retval={} if(alg=='clark'): retval=dc.fullclarkclean(niter=niter, gain=self.gain, threshold=thr, model=model, mask=mask) else: retval=dc.clean(algorithm=alg, gain=self.gain, niter=niter, threshold=thr, model=model, mask=mask) dc.done() del dc return retval
ms = casac.ms() tableplot = casac.tableplot() msplot = casac.msplot() calplot = casac.calplot() table = casac.table() #flagger = casac.flagger() agentflagger = casac.agentflagger() image = casac.image() imagepol = casac.imagepol() simulator = casac.simulator() componentlist = casac.componentlist() coordsys = casac.coordsys() regionmanager = casac.regionmanager() spectralline = casac.spectralline() utils = casac.utils() deconvolver = casac.deconvolver() vpmanager = casac.vpmanager() vlafillertask = casac.vlafillertask() atmosphere = casac.atmosphere() cu = casac.utils() mstransformer = casac.mstransformer() #plotms = __plotmshome__.create( ) from imstat_pg import imstat_pg as imstat from flagdata_pg import flagdata_pg as flagdata from flagcmd_pg import flagcmd_pg as flagcmd from importevla_pg import importevla_pg as importevla from split_pg import split_pg as split from split2_pg import split2_pg as split2