from __future__ import absolute_import
from casatasks.private.casa_transition import *
from casatools import image
from casatasks import casalog
from .ialib import write_image_history
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 ValueError("When mode='coords', start and end must both be specified.")
elif mymode.startswith('l'):
not isinstance(length, (int, float))
raise ValueError("When mode='length', center, length, and pa must all be specified.")
raise ValueError("Unsupported value for mode.")
if (not myia.open(imagename)):
raise RuntimeError("Cannot create image analysis tool using %s" % 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.__code__.co_varnames[:impv.__code__.co_argcount]
param_vals = [vars[p] for p in param_names]
param_vals = [eval(p) for p in param_names]
outia, sys._getframe().f_code.co_name,
param_names, param_vals, casalog
except Exception as instance:
casalog.post("*** Error \'%s\' updating HISTORY" % (instance), 'WARN')