Go to the documentation of this file.00001
00002 import sys
00003 import os
00004 import string
00005 from locatescript import copydata
00006 from locatescript import locatescript
00007 import inspect
00008
00009
00010 def description():
00011 return "Test of the importasdm and exportasdm tasks, ASDM <-> MS data conversion, including simple analysis"
00012
00013 pass_on = { "asdm_dataset_name" : "uid___X5f_X18951_X1",
00014 "ms_dataset_name" : "M51.ms",
00015 "asdm_dataset2_name" : 'uid___X02_X56142_X1',
00016 "wvr_correction_file" : 'N3256_B6_0.WVR'
00017 }
00018
00019 a=inspect.stack()
00020 stacklevel=0
00021 for k in range(len(a)):
00022 if (string.find(a[k][1], 'ipython console') > 0):
00023 stacklevel=k
00024 break
00025 gl=sys._getframe(stacklevel).f_globals
00026
00027 def data():
00028
00029 return [pass_on["asdm_dataset_name"],
00030 pass_on["ms_dataset_name"],
00031 pass_on["asdm_dataset2_name"],
00032 pass_on["wvr_correction_file"]
00033 ]
00034
00035 def doCopy():
00036
00037
00038
00039
00040
00041
00042 return [0,0,0,0]
00043
00044 def run( fetch=False ):
00045
00046
00047 if fetch:
00048 for f in data( ):
00049 copydata( f, os.getcwd( ) )
00050
00051
00052 try:
00053 lepath=locatescript('alma_asdm+reimported-asdm_sf.py')
00054 print 'Script used is ',lepath
00055 execfile(lepath, gl, pass_on)
00056 except:
00057 print 'execution failed: ', sys.exc_info()
00058 raise
00059
00060 return []