casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
cvel_test2.py
Go to the documentation of this file.
00001 # wrapper script for the cvel regression test
00002 import sys
00003 import os
00004 import string
00005 from locatescript import locatescript
00006 import inspect
00007 
00008 # Short description
00009 def description():
00010     return "Test of the cvel() and clean() tasks v2: spectral regridding and transformation"
00011 
00012 pass_on = { "dataset_name" : "W3OH_MC.UVFITS" }
00013 
00014 a=inspect.stack()
00015 stacklevel=0
00016 for k in range(len(a)):
00017     if (string.find(a[k][1], 'ipython console') > 0):
00018         stacklevel=k
00019         break
00020 gl=sys._getframe(stacklevel).f_globals
00021 
00022 
00023 def run():
00024     #####locate the regression script
00025     try: 
00026         lepath=locatescript('cvel_regression2.py')
00027         print 'Script used is ',lepath
00028         execfile(lepath, gl, pass_on)
00029     except:
00030         print 'execution failed: ', sys.exc_info()
00031         raise
00032 ###return the images that will be templated and compared in future runs
00033     return []
00034 
00035 def data():
00036     ### return the data files that are needed by the regression script
00037     return [pass_on["dataset_name"]]
00038 
00039 def doCopy():
00040     ### return a list of the same length as that returned by data()
00041     ###   containing 0 if the corresponding file should be just linked
00042     ###   (i.e. is read-only)
00043     ###   or 1 if the corresponding file should be really copied to
00044     ###   the work directory
00045 
00046     return [0]