fitsdata2=datapath+'N1333_2.UVFITS'

# 3C147 model image for setjy
modelim=pathname+'/data/nrao/VLA/CalModels/3C147_Q.im'

# The testdir where all output files will be kept
testdir='ngc1333_regression'

# The prefix to use for output files.
prefix=testdir+"/"+'n1333_both'
prefix1=testdir+"/"+'n1333_1'
prefix2=testdir+"/"+'n1333_2'

# Make new test directory
# (WARNING! Removes old test directory of the same name if one exists)
tstutl.maketestdir(testdir)

# Start benchmarking
if benchmarking:
    startTime = time.time()
    startProc = time.clock()

#
#=====================================================================
#
# Import the data from FITS to MS
#
print '*** 02 MAY ***'
print '--Import--'

# Safest to start from task defaults
> Using default input values where possible
"""

prefix = regressionDir+'/test'+str(testNum)+'/'
msname = prefix+"ngc4826.tutorial.ms"  
caltableName = prefix+"ngc4826.tutorial.16apr98.gcal"
outputFilename = prefix+'listcal.ngc4826.default.out'
standardFileName = localData + 'listcal.default.out'

# Use existing data or load data from scratch?
if (not lt.resetData([msname,caltableName], automate)):
    print "Using preexisting data." 
    lt.removeOut(outputFilename)
else:
    print "Building data from scratch."
    tstutl.maketestdir(prefix) # create test dir, overwrite preexisting
    load_ngc4826(prefix,msname,caltableName) # Build data from scratch

# Setup listcal input and run
default(listcal)
vis                 =     msname        #  Name of input visibility file
caltable            = caltableName      #  Input calibration table to list
field               =         ''        #  Field name or index; ''==>all
antenna             =         ''        #  Antenna name or index; ''==>all; antenna='3'
spw                 =         ''        #  Spectral window and channel: ''==>all;
                                        #   spw='5:0~10'
listfile            = outputFilename    #  Disk file to write output: ''==>to terminal
pagerows            =         50        #  Rows per page
go(listcal)

# Remove first line of listcal output (contains hard-coded path)
testplot = 'plot'
prevplot = 'prev'
this = "plotxy_regression"

currentdir = os.curdir
curpathlist = os.path.abspath(currentdir).split('/')
startdir = curpathlist[len(curpathlist) - 1]
#print "currentdir:", currentdir
#print "startdir:", startdir
#print "testdir:", testdir

#tstutl.stop("Test stop")
#start the test from the dir name 'plotxy_regression'
if (startdir != testdir):
    #create new testdir
    tstutl.maketestdir(testdir)
    os.chdir(testdir)

#clear all previous plots
tstutl.maketestdir(testplot)

if (not os.path.exists(prevplot)):
    tstutl.maketestdir(prevplot)

if (not os.path.exists(testdata)):
    #create new test data directory
    tstutl.maketestdir(testdata)

# The prefix to use for all output files.
prefix = 'plotxy.'
Beispiel #4
0
prevplot='prev'
this="plotxy_regression"

currentdir=os.curdir
curpathlist=os.path.abspath(currentdir).split('/')
startdir=curpathlist[len(curpathlist)-1]
#print "currentdir:", currentdir
#print "startdir:", startdir
#print "testdir:", testdir


#tstutl.stop("Test stop")
#start the test from the dir name 'plotxy_regression' 
if (startdir!=testdir):
   #create new testdir
   tstutl.maketestdir(testdir)
   os.chdir(testdir)

#clear all previous plots
tstutl.maketestdir(testplot)

if (not os.path.exists(prevplot)):
   tstutl.maketestdir(prevplot)

if (not os.path.exists(testdata)):
   #create new test data directory
   tstutl.maketestdir(testdata)

# The prefix to use for all output files.
prefix='plotxy.'
        outfiles.append(dataname+'Ant'+i+'.im')

    casapath=os.environ['CASAPATH'].split()[0]
    #host=os.environ['CASAPATH'].split()[3]
    import socket
    host=socket.gethostname()
    if host == "minor":
        datapath='/export/home/minor/alma/casatest/ATF/rastermaps/'
        print "host is %s, datapath is %s" % (host, datapath)
    else:
        datapath=casapath+'/data/regression/alma-sd/'
    #datapath=datapath+testdata

    # setup test directory
    curdir=os.getcwd()
    regutl.maketestdir(testdir)
    os.system("cp -r "+datapath+testdata+" "+testdir+"/.")
    if os.path.isfile(datapath+ref_data):
	os.system("cp -r "+datapath+ref_data+" "+testdir+"/.")
    else:
        initial = True
    os.chdir(testdir)
   

    # start regression 
    print "sdtpimaging regression start"
    startTime = time.time();
    startProc = time.clock();

    # Do baseline subtraction first
    default(sdtpimaging)
Beispiel #6
0
        outfiles.append(dataname + 'Ant' + i + '.im')

    casapath = os.environ['CASAPATH'].split()[0]
    #host=os.environ['CASAPATH'].split()[3]
    import socket
    host = socket.gethostname()
    if host == "minor":
        datapath = '/export/home/minor/alma/casatest/ATF/rastermaps/'
        print "host is %s, datapath is %s" % (host, datapath)
    else:
        datapath = casapath + '/data/regression/alma-sd/'
    #datapath=datapath+testdata

    # setup test directory
    curdir = os.getcwd()
    regutl.maketestdir(testdir)
    os.system("cp -r " + datapath + testdata + " " + testdir + "/.")
    if os.path.isfile(datapath + ref_data):
        os.system("cp -r " + datapath + ref_data + " " + testdir + "/.")
    else:
        initial = True
    os.chdir(testdir)

    # start regression
    print "sdtpimaging regression start"
    startTime = time.time()
    startProc = time.clock()

    # Do baseline subtraction first
    default(sdtpimaging)
    infile = testdata