Go to the documentation of this file.00001 import sys
00002 import os
00003 import string
00004 import time
00005 from locatescript import copydata
00006 from locatescript import locatescript
00007 import inspect
00008
00009 a=inspect.stack()
00010 stacklevel=0
00011 for k in range(len(a)):
00012 if (string.find(a[k][1], 'ipython console') > 0):
00013 stacklevel=k
00014 break
00015 gl=sys._getframe(stacklevel).f_globals
00016
00017 def data():
00018
00019 return ['coma.ms']
00020
00021 def run(fetch=False):
00022
00023
00024 if fetch:
00025 for f in data( ):
00026 copydata( f, os.getcwd( ) )
00027
00028 im=gl['casac'].imager()
00029 me=gl['me']
00030 time1=time.time()
00031 im.open('coma.ms')
00032
00033 im.selectvis(spw=0, field=0);
00034 mydir=me.direction('J2000', '12h30m48', '12d24m0')
00035 im.defineimage(nx=200, ny=200, cellx='30arcsec', celly='30arcsec', phasecenter=mydir);
00036 im.make('outlier1re');
00037 im.defineimage(nx=2000, ny=2000, cellx='30arcsec',celly='30arcsec',phasecenter=0, facets=1);
00038 im.setoptions(ftmachine='wproject',wprojplanes=400, padding=1.2)
00039 im.make('bla1re')
00040
00041 im.clean(algorithm='wfclark',model=['bla1re', 'outlier1re'], image=['bla1re.restored', 'outlier1re.restored'], niter=10000);
00042
00043 im.done()
00044 time2=time.time();
00045 print 'Time taken for wproject= ', (time2-time1)/60,'mins'
00046
00047 return ['bla1re.restored', 'outlier1re.restored']
00048