print_params_col(subkey[j],myf[subkey[j]],obj.description(subkey[j],userval),'spnondef',comment, noerror)
from parameter_dictionary import *
from casa_stack_manip import stack_frame_find
from parameter_check import *
Verify the contents of the most important Measures tables
casadatadir = os.getenv("CASAPATH").split()[0]+'/data'
if not os.path.isdir(casadatadir):
casalog.post('Data repository directory does not exist. Expected at '+casadatadir, 'WARN')
if not os.path.isdir(casadatadir+'/geodetic'):
casalog.post('Data repository sub-directory \"geodetic\" does not exist. Expected at '+casadatadir+'/geodetic', 'WARN')
casalog.post('\n', 'INFO')
casalog.post('Checking measures tables in data repository sub-directory '+casadatadir+'/geodetic', 'INFO')
mytables=['IERSeop2000', 'IERSeop97', 'IERSpredict', 'TAI_UTC']
if not os.path.isdir(casadatadir+'/geodetic/'+mytable):
casalog.post('Measures table '+mytable+' does not exist. Expected at '+casadatadir+'/geodetic/'+mytable, 'WARN')
mytb.open(casadatadir+'/geodetic/'+mytable)
vsdate = mytb.getkeyword('VS_DATE')
mydate = qa.time({'value': mjd[-1], 'unit': 'd'}, form='ymd')[0]
casalog.post(' '+mytable+' (version date, last date in table (UTC)): '+vsdate+', '+mydate, 'INFO')
casalog.post(mytable+' contains no entries.', 'WARN')
""" Execute taskname: """
if taskname==None: taskname=myf['taskname']
if(myf.has_key('taskname')):
oldtaskname=myf['taskname']
taskname=taskname.__name__
parameter_checktype(['taskname'],[taskname],str)
print "go -- TypeError: ",e
fulltaskname=taskname+'()'
print 'Executing: ',fulltaskname
myf['taskname']=oldtaskname
def announce_async_task(taskname):
"""Use the logger to herald the beginning of an asynchronous task."""
casalog.post('###############################################')
casalog.post('### Begin Task: ' + taskname + ' ' * (27 - len(taskname)) + '###')
casalog.post(" tm.retrieve(return_value) # to retrieve the status")
def write_task_obit(taskname):
"""Eulogize the task in the logger."""
casalog.post('### End Task: ' + taskname + ' ' * (29 - len(taskname)) + '###')
casalog.post('###############################################')