Source
#immoments(imagename = 'M100_SD_cube_PM_03_04.image',moments = [1],axis = 'spectral',chans = '1~24',outfile = 'M100_SD_cube_PM_03_04.image.mom1')
# Regression Tests of M100 SV data
# Measurementset version (2016/10/03) updated from ASAP one
#
# ASDM: uid___A002_X6218fb_X264
# Position-Switching observation of M100
# Tsys SPW: 1, 3, 5, 7
# Science SPW: 9, 11, 13, 15
#
# Task Sequence:
# importasdm
# plotms
# flagdata
# sdcal
# sdbaseline
# plotms
# sdimaging
# immoments
# exportfits
# imstat
#
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()
# Check CASA Version #
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."