from __future__ import absolute_import
from casatasks.private.casa_transition import *
from .parallel.parallel_task_helper import ParallelTaskHelper
from casatools import calibrater, quanta
from casatools import table as tbtool
from casatools import ms as mstool
from casatasks import casalog
from .mstools import write_history
from mstools import write_history
from parallel.parallel_task_helper import ParallelTaskHelper
def concat(vislist,concatvis,freqtol,dirtol,respectname,timesort,copypointing,
visweightscale, forcesingleephemfield):
"""concatenate visibility datasets
The list of data sets given in the vis argument are chronologically concatenated
into an output data set in concatvis, i.e. the data sets in vis are first ordered
by the time of their earliest integration and then concatenated.
If there are fields whose direction agrees within the direction tolerance
(parameter dirtol), the actual direction in the resulting, merged output field
will be the one from the chronologically first input MS.
If concatvis already exists (e.g., it is the same as the first input data set),
then the other input data sets will be appended to the concatvis data set.
There is no limit to the number of input data sets.
If none of the input data sets have any scratch columns (model and corrected
columns), none are created in the concatvis. Otherwise these columns are
created on output and initialized to their default value (1 in model column,
data in corrected column) for those data with no input columns.
Spectral windows for each data set with the same chanelization, and within a
specified frequency tolerance of another data set will be combined into one
A field position in one data set that is within a specified direction tolerance
of another field position in any other data set will be combined into one
field. The field names need not be the same---only their position is used.
Each appended dataset is assigned a new observation id (provided the entries
in the observation table are indeed different).
vis -- Name of input visibility files to be combined
default: none; example: vis = ['src2.ms','ngc5921.ms','ngc315.ms']
concatvis -- Name of visibility file that will contain the concatenated data
note: if this file exits on disk then the input files are