from casatasks.private.casa_transition import is_CASA6
from casatasks import casalog
from casatools import ms as mstool
from casatools import quanta, table, mstransformer
from .mstools import write_history
from .parallel.parallel_data_helper import ParallelDataHelper
from .update_spw import update_spwchan
from taskinit import mttool as mstransformer
from taskinit import mstool as mstool
from taskinit import tbtool as table
from taskinit import qatool as quanta
from taskinit import casalog
from mstools import write_history
from parallel.parallel_data_helper import ParallelDataHelper
from update_spw import update_spwchan
if timebin.upper() in ['ALL', '']:
timebin = set_timebin_all() + 's'
active_datacolumn = use_alternative_column(infile, datacolumn)
if (len(antenna) != 0) and (not('&' in antenna)):
antenna = antenna + '&&&'
if ('scan' in timespan) and ('state' in timespan):
msg = '\n'.join(["Explicitly both 'scan' and 'state' were specified in 'timespan'.",
" If 'state' distinguishes OBSERVE_TARGET#ON_SOURCE / OBSERVE_TARGET#OFF_SOURCE,",
" these two states are mixed, and unexpectedly averaged results might be generated.",
"(Suggestion) Please specify timespan = 'scan'",
" to separate OBSERVE_TARGET#ON_SOURCE and OBSERVE_TARGET#OFF_SOURCE."])
casalog.post(msg, 'WARN')