from __future__ import absolute_import
from casatasks.private.casa_transition import *
from casatools import ms as mstool
from casatools import calibrater
from casatasks import casalog
from .mstools import write_history
from .parallel.parallel_task_helper import ParallelTaskHelper
from .parallel.parallel_data_helper import ParallelDataHelper
from taskinit import casalog, cbtool, mstool
from mstools import write_history
from parallel.parallel_task_helper import ParallelTaskHelper
from parallel.parallel_data_helper import ParallelDataHelper
def delmod(vis=None,otf=None,field=None,scr=None):
if ParallelDataHelper.isMMSAndNotServer(vis):
helper = ParallelTaskHelper('delmod', locals())
if ((type(vis)==str) & (os.path.exists(vis))):
_cb.open(vis,addcorr=False,addmodel=False)
_cb.delmod(otf=otf,field=field,scr=scr)
raise ValueError('Visibility data set not found - please verify the name')
param_names = delmod.__code__.co_varnames[:delmod.__code__.co_argcount]
param_vals = [vars[p] for p in param_names]
param_vals = [eval(p) for p in param_names]
write_history(mstool(), vis, 'delmod', param_names,
except Exception as instance:
casalog.post("*** Error \'%s\' updating HISTORY" % (instance),