from ialib import write_image_history
imagename, outfile, mode, start, end, center, length, pa, width,
unit, overwrite, region, chans, stokes, mask, stretch
raise Exception, "outfile must be specified."
if mymode.startswith('c'):
if len(start) == 0 or len(end) == 0:
raise Exception, "When mode='coords', start and end must both be specified."
elif mymode.startswith('l'):
not isinstance(length, (int, long, float))
raise Exception, "When mode='length', center, length, and pa must all be specified."
raise Exception, "Unsupported value for mode."
if (not myia.open(imagename)):
raise Exception, "Cannot create image analysis tool using " + imagename
outfile=outfile, start=start, end=end, center=center,
length=length, pa=pa, width=width, unit=unit,
overwrite=overwrite, region=region, chans=chans,
stokes=stokes, mask=mask, stretch=stretch, wantreturn=True
param_names = impv.func_code.co_varnames[:impv.func_code.co_argcount]
param_vals = [eval(p) for p in param_names]
outia, sys._getframe().f_code.co_name,
param_names, param_vals, casalog
except Exception, instance:
casalog.post("*** Error \'%s\' updating HISTORY" % (instance), 'WARN')
except Exception, instance:
casalog.post( str( '*** Error ***') + str(instance), 'SEVERE')