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