print "Input ", a2.fm.tasks[at].bdp_in[0].taskid print "\n\n" print "Conn map ", a.fm._connmap print "Conn map ", a2.fm._connmap print "\n\n" print "Conn map ", a.fm._depsmap print "Conn map ", a2.fm._depsmap print "\n\n" for at in a.fm.tasks: for i in a.fm.tasks[at].bdp_out: if (i.xmlFile == a2.fm.tasks[at].bdp_out[0].xmlFile): print "File ", i.xmlFile print "File ", a2.fm.tasks[at].bdp_out[0].xmlFile print "\n\nPASS\n" print "running a2 again:" a2.run() return print "\n\nFAIL\n" if __name__ == "__main__": import sys argv = ad.casa_argv(sys.argv) if len(argv) > 1: print "Working on ", argv[1] run(argv[1])
print "Input ",a2.fm.tasks[at].bdp_in[0].taskid print "\n\n" print "Conn map ",a.fm._connmap print "Conn map ",a2.fm._connmap print "\n\n" print "Conn map ",a.fm._depsmap print "Conn map ",a2.fm._depsmap print "\n\n" for at in a.fm.tasks: for i in a.fm.tasks[at].bdp_out : if(i.xmlFile == a2.fm.tasks[at].bdp_out[0].xmlFile): print "File ",i.xmlFile print "File ",a2.fm.tasks[at].bdp_out[0].xmlFile print "\n\nPASS\n" print "running a2 again:" a2.run() return print "\n\nFAIL\n" if __name__ == "__main__": import sys argv = ad.casa_argv(sys.argv) if len(argv) > 1: print "Working on ",argv[1] run(argv[1])
# Before command line parsing, attempt to find 'admit_vars.py' with variables to override the admit vars here # this doesn't work yet, since CASA modifies the python environment try: print 'Trying admit_vars' import admit_vars book = get_admit_vars('admit_vars') for key,val in book.iteritems(): # print "ADMIT_VAR: ",key,val,type(key),type(val) exec(key + '=' + repr(val)) except: print "No admit_vars.py found, and that's ok." # allow a command line argument to be the fits file name argv = admit.casa_argv(sys.argv) if len(argv) > 1: file = argv[1] alias = "" if len(argv) > 2: file = argv[1] alias = argv[2] if len(argv) > 3: file = argv[1] alias = argv[2] cont = argv[3] #----------------------------------------------------------------------------------------------------------------------- #------------------------------------------------------- start of script ----------------------------------------------- # announce version