from __future__ import absolute_import
from casatasks.private.casa_transition import *
from casatools import regionmanager, image
from casatasks import casalog
from .ialib import write_image_history
from ialib import write_image_history
imagename, outfile, box, region, chans, stokes, mask, dropdeg,
overwrite, verbose, stretch, keepaxes
casalog.origin('imsubimage')
if (not myia.open(imagename)):
raise RuntimeError("Cannot create image analysis tool using " + imagename)
raise ValueError("outfile must be specified.")
if (type(region) != type({})):
tmp_csys = myia.coordsys()
csys=tmp_csys.torecord(), shape=myia.shape(), box=box,
chans=chans, stokes=stokes, stokescontrol="a", region=region
outfile=outfile, region=xregion, mask=mask, dropdeg=dropdeg,
overwrite=overwrite, list=verbose, stretch=stretch, keepaxes=keepaxes
param_names = imsubimage.__code__.co_varnames[:imsubimage.__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')