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 a complete ALMA SV data analysis (2 ASDMs from Sept 2011)"
00012
00013 pass_on = { "asdm_dataset_name" : "uid___A002_X2a5c2f_X54",
00014 "asdm_dataset2_name" : "uid___A002_X2a5c2f_X220",
00015 "tsys_table" : 'cal-tsys_X54.fdm',
00016 "tsys_table2" : 'cal-tsys_X220.fdm',
00017 "mask1" : 'M100cont-orig.mask',
00018 "mask2" : 'M100line-orig.mask',
00019 "mask3" : 'test-M100line-orig.mask'
00020 }
00021
00022 a=inspect.stack()
00023 stacklevel=0
00024 for k in range(len(a)):
00025 if (string.find(a[k][1], 'ipython console') > 0):
00026 stacklevel=k
00027 break
00028 gl=sys._getframe(stacklevel).f_globals
00029
00030 def data():
00031
00032 return [pass_on["asdm_dataset_name"],
00033 pass_on["asdm_dataset2_name"],
00034 pass_on["tsys_table"],
00035 pass_on["tsys_table2"],
00036 pass_on["mask1"],
00037 pass_on["mask2"],
00038 pass_on["mask3"]
00039 ]
00040
00041 def doCopy():
00042
00043
00044
00045
00046
00047
00048 return [0,0,1,1,1,1,1]
00049
00050 def run( fetch=False ):
00051
00052
00053 if fetch:
00054 for f in data( ):
00055 copydata( f, os.getcwd( ) )
00056
00057
00058 try:
00059 lepath=locatescript('alma-m100-analysis-regression.py')
00060 print 'Script used is ',lepath
00061 execfile(lepath, gl, pass_on)
00062 except:
00063 print 'execution failed: ', sys.exc_info()
00064 raise
00065
00066 return []