def dclean(vis, mapname, beamname, modelname): clean = mirexec.TaskClean() clean.map = mapname clean.beam = beamname clean.niters = 100000000 os.system('rm -r ' + modelname) clean.out = modelname tout = clean.snarf()
def clean(settings, fname): clean = mirexec.TaskClean() clean.map = settings.map #clean.region = settings.clean_region; clean.beam = settings.beam clean.out = settings.model clean.cutoff = round(settings.cutoff, 10) clean.niters = settings.niters tout = clean.snarf() acos.taskout(clean, tout, fname)
def clean(vis, cutoff, i): # Remove the old model #cmd = 'rm -r '+vis.replace('.uv', '.model'+str(i)) #os.system(cmd) clean = mirexec.TaskClean() clean.vis = vis clean.beam = vis.replace('.uv', '.beam' + str(i)) clean.map = vis.replace('.uv', '.map' + str(i)) clean.out = vis.replace('.uv', '.model' + str(i)) clean.cutoff = cutoff tout = clean.snarf() acos.taskout(clean, tout, 'clean.txt')
def clean_deeper(settings, fname, df=3): ''' Runs clean using the mask. The settings.cutoff is divided by df. ''' clean = mirexec.TaskClean() clean.map = settings.map clean.beam = settings.beam clean.region = 'mask(' + settings.mask + ')' clean.out = settings.m4s clean.cutoff = settings.cutoff clean.niters = settings.niters tout = clean.snarf() acos.taskout(clean, tout, fname)
def clean(mapname, beamname, modelname, maskname=None, cutoff=0.0): clean = mirexec.TaskClean() clean.map = mapname clean.beam = beamname clean.cutoff = cutoff if maskname != None: clean.region = 'mask(' + maskname + ')' clean.niters = 10000000 else: clean.niters = 1000 os.system('rm -r ' + modelname) clean.out = modelname tout = clean.snarf()
def clean(params): clean = mirexec.TaskClean() clean.map = params.map clean.beam = params.beam clean.cutoff = params.cutoff if params.mask != None: clean.region = 'mask(' + params.mask + ')' clean.niters = params.niters else: clean.niters = 1000 shrun('rm -r ' + params.model) clean.out = params.model tout = clean.snarf() return tout
def clean(params): clean = mirexec.TaskClean() clean.map = params.map clean.beam = params.beam clean.cutoff = params.cutoff if params.mask != None: clean.region = 'mask(' + params.mask + ')' clean.niters = 100000 else: clean.niters = 1000 shrun('rm -r ' + params.model) clean.out = params.model tout = clean.snarf() #print ("\n".join(map(str, tout[0]))) return tout
def clean(params): clean = mirexec.TaskClean()