# Runs almasimmos for each configuration, putting the results for each config # in its own directory. # # The ppdisk image is scaled for each config so its width is a constant # number of PSF widths across. # Assumes ptgs_to_ann.py and suggestalmaconfig.py have been loaded. from psfsize import psfsize from ptgs_to_ann import ptgs2ann import glob, os # Location of antennalists. config_fn_root = '/export/data_1/sims/configs/almaconfig' #config_files = glob.glob(config_fn_root + '.out28') + glob.glob(config_fn_root + '.*new*[0-9]') config_files = glob.glob(config_fn_root + '.out27') # Name of root input model. rootinpmod = 'input672GHz_50pc.image' centfreq = 672.0 # GHz pbfwhm = '9.3548557165196602arcsec' # pbsize(672.0) spacing = "9arcsec" rootpsffwhm = psfsize(config_fn_root + '.out21', 672.0) rootcell = 0.00311 # arcsec rootimsize = [512, 512] #startdir = os.getcwd() for cfgfile in config_files: cfg = cfgfile.split('.')[1] # out01, etc. # Make cfg dir and cd to it. if not os.path.isdir(cfg): os.mkdir(cfg) os.chdir(cfg) # Match the cell size to the PSF width. The input model will then be # scaled accordingly. pixelsize = rootcell * psfsize(cfgfile, centfreq) / rootpsffwhm cellsize = "%farcsec" % pixelsize # Precalculate the pointing pattern just so we'll have a record of it # handy. nptgs, ptgs = calc_pointings("J2000 18h00m00.03s -22d59m59.6s", spacing, rootimsize, cellsize) ptgs2ann(ptgs, pbfwhm, 'ppdisk_' + cfg + '.ann') # Avoid rewriting problems for "../../" + rootinpmod. os.symlink("../../" + rootinpmod, "./" + rootinpmod) almasimmos(project = "robust0_nonoise", modelimage = "./" + rootinpmod, ignorecoord = True, complist = "../../star672GHz.cl", antennalist = cfgfile, direction = ptgs, pointingspacing = spacing, relmargin = 0.5, refdate = "2012/06/21/03:25:00", totaltime = "1080s", integration = "10s", mode = "continuum", alg = "clark", niter = 40, nchan = 1, startfreq = "668.0GHz", chanwidth = "8.0GHz", cell = cellsize, imsize = rootimsize, stokes = "I", weighting = "briggs", rmode = "norm", robust = 0.0, display = False) os.chdir('..')