import time
import os
import filltsys
import numpy
from recipes.almahelpers import tsysspwmap
import shutil
rawname = 'uid___A002_X6218fb_X264'
msname = rawname + '.ms'
listname = msname + '.listobs.txt'
blname = rawname + '.ms_bl'
target_spws = ['9', '11', '13', '15']
for name in [rawname, listname, msname, blname]:
if os.path.exists(name):
if os.path.isdir(name): shutil.rmtree(name)
else: os.remove(name)
casapath = os.environ['CASAPATH']
datapath = casapath.split()[0]+'/data/regression/alma-sd/M100/'+rawname
print 'Copying ASDM from '+datapath
shutil.copytree(datapath, rawname)
startTime=time.time()
startProc=time.clock()
print "You are using " + cu.version_info( )
if (cu.compare_version('<',[4,3,0])):
print "YOUR VERSION OF CASA IS TOO OLD FOR THIS GUIDE."
print "PLEASE UPDATE IT BEFORE PROCEEDING."
else:
print "Your version of CASA is appropriate for this guide."
basename = [rawname]
print '--Import--'
importasdm(asdm = rawname, vis=msname, overwrite=True)
importproc=time.clock()
importtime=time.time()
default(listobs)
vis = msname
listfile = listname
listobs()