Functions | |
def | get_global_namespace |
def | check_param_types |
def update_myf(myf): """ Fills unfilled parameters with defaults, and handles globals or user override of arguments. | |
def | startlog |
def | endlog |
Functions used in converting other functions into tasks. Use: import taskutil
def recipes.taskutil.check_param_types | ( | taskname, | |
arg_desc | |||
) |
def update_myf(myf): """ Fills unfilled parameters with defaults, and handles globals or user override of arguments.
"""
myf['update_params'](func=myf['taskname'], printtext=False) #Handle globals or user over-ride of arguments function_signature_defaults=dict(zip(radplot.func_code.co_varnames, radplot.func_defaults)) for item in function_signature_defaults.iteritems(): key,val = item keyVal = eval(key) if (keyVal == None): pass # user hasn't set it - use global/default else: myf[key] = keyVal # user has set it - use over-ride
Checks the values of taskname's arguments against their allowed types. Suitable for tasks without any menu parameters. Returns None if everything seems OK, and the exception otherwise (after printing an error message).
Definition at line 41 of file taskutil.py.
References parameter_check.parameter_checktype().
def recipes.taskutil.endlog | ( | casalog, | |
taskname | |||
) |
Finishes an entry in casalogger for taskname.
Definition at line 73 of file taskutil.py.
def recipes.taskutil.get_global_namespace | ( | ns_label = 'ipython console' | ) |
Returns a dictionary of the globals in the lowest stacklevel containing ns_label in its label.
Definition at line 9 of file taskutil.py.
Referenced by recipes.make_labelled_ms.label_itered_ms(), and recipes.make_labelled_ms.make_labelled_ms().
def recipes.taskutil.startlog | ( | casalog, | |
taskname | |||
) |
Starts an entry in casalogger for taskname.
Definition at line 63 of file taskutil.py.