from __future__ import absolute_import
from __future__ import print_function
from casatasks.private.casa_transition import *
from casatasks import casalog
from casatools import ms as mstool
from casatools import table as tbtool
from .mstools import write_history
from .update_spw import join_spws
from .update_spw import subtract_spws
from taskinit import casalog
from taskinit import mstool
from taskinit import tbtool
from mstools import write_history
from update_spw import join_spws
from update_spw import subtract_spws
def __static__(varname, value):
setattr(func, varname, value)
@__static__('state',{'warned': False})
def uvcontsub3(vis, fitspw, combine, fitorder, field, spw,
scan, intent, correlation, observation):
"""Extract the line(s) of an MS."""
casalog.origin('uvcontsub3')
if not uvcontsub3.state['warned']:
uvcontsub3.state['warned'] = True
casalog.post("uvcontsub3 is deprecated and will be removed in an upcoming release, a replacement task is under development", "WARN")
if not ((type(vis) == str) and os.path.isdir(vis)):
casalog.post('Visibility data set not found - please verify the name', 'SEVERE')
outputvis = vis + '.contsub'
if os.path.exists(outputvis):
casalog.post("Output MS " + outputvis + " already exists - will not overwrite.", 'SEVERE')
if combine and combine.lower() != 'spw':
casalog.post("uvcontsub3 deliberately does not support combination by",
casalog.post("anything except spw.", 'SEVERE')
intent = intent.replace(', ', ',')