Source
xxxxxxxxxx
#clean(vis="n3ddat.ms",imagename="ttt",outlierfile="",field="0",spw="*",selectdata=False,timerange="",uvrange="",antenna="",scan="",mode="mfs",gridmode="widefield",wprojplanes=200,facets=1,cfcache="cfcache.dir",painc=360.0,epjtable="",interpolation="nearest",niter=6000,gain=0.1,threshold=0.0,psfmode="clark",imagermode="csclean",ftmachine="mosaic",mosweight=False,scaletype="SAULT",multiscale=[],negcomponent=-1,smallscalebias=0.6,interactive=False,mask=[],nchan=1,start=0,width=1,imsize=[3000, 3000],cell=['30arcsec', '30arcsec'],phasecenter="",restfreq="",stokes="I",weighting="natural",robust=0.0,uvtaper=False,outertaper=[],innertaper=[],modelimage="",restoringbeam=[''],pbcor=False,minpb=0.1,calready=False,noise="1.0Jy",npixels=0,npercycle=100,cyclefactor=3,cyclespeedup=-1,nterms=1,reffreq="")
import os
import time
# Enable benchmarking?
benchmarking = True
usedasync = False
#
# Set up some useful variables
#
# Get path to CASA home directory by stipping name from '$CASAPATH'
pathname=os.environ.get('CASAPATH').split()[0]
# This is where the NGC5921 UVFITS data will be
fitsdata=pathname+'/data/demo/3DDAT.fits'
os.system('rm -rf n3ddat*')
# Start benchmarking
if benchmarking:
startTime = time.time()
startProc = time.clock()
#
#=====================================================================
#
# Import the data from FITS to MS
#
print '--Import--'
# Safest to start from task defaults
default('importuvfits')
prefix='n3ddat'
# Set up the MS filename and save as new global variable
msfile = prefix + '.ms'
# Use task importuvfits
fitsfile = fitsdata
vis = msfile
antnamescheme = 'new'
importuvfits()
# Note that there will be a ngc5921.ms.flagversions
# containing the initial flags as backup for the main ms flags.
# Record import time
if benchmarking:
importtime = time.time()
flagdata(vis=msfile, mode='manual', antenna='VA10', spw='*', field='0')
print '--Widefield--'
default('widefield')
# Pick up our split source data
vis = msfile
# Make an image root file name
imname = prefix + '.clean'
imagename = imname
# Set up the output image cube
mode = 'mfs'
# This is a single-source MS with one spw
field = '0'
spw = '*'
selectdata=True
#uvrange='0.15~10000 klambda'
# Standard gain factor 0.1
gain = 0.1
# Set the output image size and cell size (arcsec)
imsize = [3000,3000]
# Do a simple Clark clean
psfmode = 'clark'
cell = ['30arcsec','30arcsec']
# Fix maximum number of iterations
niter = 6000
# Also set flux residual threshold (in mJy)
threshold=0.0
# Set up the weighting