casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
sim_testcomp.py
Go to the documentation of this file.
00001 # simulation tasks regression
00002 #
00003 #  components only
00004 #  multiple pointings
00005 #  single interferometric measurement
00006 #  no noise
00007 
00008 import os, time, string, sys, inspect
00009 from locatescript import locatescript
00010 
00011 a=inspect.stack()
00012 stacklevel=0
00013 for k in range(len(a)):
00014     if (string.find(a[k][1], 'ipython console') > 0):
00015         stacklevel=k
00016         break
00017 gl=sys._getframe(stacklevel).f_globals
00018 
00019 
00020 # Short description
00021 def description():
00022     return "Simulates a mosaic 12m ALMA pointings from a components list. No noise, imaged."
00023 
00024 
00025 def data():
00026     ### return the data files that is needed by the regression script
00027     return []
00028 
00029 
00030 def run(fetch=False):
00031     #####locate the regression script
00032     lepath=locatescript('testcompsim.py')
00033     print 'Script used is ',lepath
00034     gl['regstate']=True
00035     execfile(lepath, gl)
00036     print 'regstate =', gl['regstate']
00037     if not gl['regstate']:
00038         raise Exception, 'regstate = False'
00039 ###return the images that will be templated and compared in future runs
00040     return ['cltest/cltest.alma.cycle0.extended.ms','cltest/cltest.alma.cycle0.extended.image','cltest/cltest.alma.cycle0.extended.diff']
00041