from __future__ import absolute_import
from casatasks.private.casa_transition import *
from casatools import image, regionmanager
from casatasks import casalog
from .ialib import write_image_history
from ialib import write_image_history
imagename, linefile, contfile, fitorder,
region, box, chans, stokes
casalog.origin('imcontsub')
if ( len( linefile ) > 0 ):
if ( os.path.exists( linefile ) ):
raise ValueError('Error: file ' + linefile
+' already exists, please delete before continuing.',\
casalog.post("The linefile parameter is empty, consequently the"
+" spectral line image will NOT be\nsaved on disk.", \
if ( len( contfile ) > 0 ):
if ( os.path.exists( contfile ) ):
raise ValueError('Error: Unable to continue file '+contfile\
+' already exists, please delete before continuing.')
casalog.post("The contfile parameter is empty, consequently the"
+" continuum image will NOT be\nsaved on disk.", \
mycsys = _myia.coordsys()
if isinstance(box, list):
box = ', '.join([str(b) for b in box])
csys=mycsys.torecord(), shape=_myia.shape(),
box=box, stokes=stokes, stokescontrol="f",
if chans != None and len(chans) > 0:
channels = myrg.selectedchannels(chans, _myia.shape())