casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
wideband.py
Go to the documentation of this file.
00001 import sys
00002 import os
00003 import string
00004 from locatescript import copydata
00005 from locatescript import locatescript
00006 import inspect
00007 
00008 a=inspect.stack()
00009 stacklevel=0
00010 for k in range(len(a)):
00011     if (string.find(a[k][1], 'ipython console') > 0):
00012         stacklevel=k
00013         break
00014 gl=sys._getframe(stacklevel).f_globals
00015 
00016 # Short description
00017 def description():
00018     return "Images VLA multi-frequency 3C286 data and creates intensity, spectral-index and spectral-curvature maps."
00019 
00020 # Copy the Data ? Yes. 
00021 def doCopy():
00022     return [1];
00023 
00024 # Input data
00025 def data():
00026     ### return the data files that is needed by the regression script
00027     return ['VLA_multifrequency_3C286.ms']
00028 
00029 # Run the test
00030 def run(fetch=False):
00031 
00032     #####fetch data
00033     if fetch:
00034         for f in data( ):
00035             copydata( f, os.getcwd( ) )
00036     
00037     #####locate the regression script
00038     lepath=locatescript('wideband_regression.py')
00039     print 'Script used is ',lepath
00040     gl['regstate']=True
00041     execfile(lepath, gl)
00042     print 'regstate =', gl['regstate']
00043     if not gl['regstate']:
00044         raise Exception, 'regstate = False'
00045     ### return the images that will be templated and compared in future runs
00046     return []; #'reg_3C286.image.tt0','reg_3C286.image.alpha','reg_3C286.image.beta']
00047