Source
appendantab(vis=data_copy, outvis=append_data, antab=evn_antab, overwrite=False, append_tsys=False, append_gc=True)
#########################################################################
# test_task_gencal.py
# Copyright (C) 2018
# Associated Universities, Inc. Washington DC, USA.
#
# This script is free software; you can redistribute it and/or modify it
# under the terms of the GNU Library General Public License as published by
# the Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
# License for more details.
#
#
# Based on the requirements listed in casadocs found here:
# https://casadocs.readthedocs.io/en/stable/api/tt/casatasks.calibration.gencal.html
#
##########################################################################
import os
import shutil
import unittest
from unittest.mock import patch
import numpy as np
from casatestutils import testhelper as th
from casatasks import appendantab
from casatools import ctsys, table
tb = table()
datapath = ctsys.resolve('/unittest/appendantab/')
# input data
evn_data = "evnData.ms"
evn_antab = "evn.antab"
append_data = "appendedData.ms"
evn_ref = "evnRef.ms"
data_copy = "dataCopy.ms"
def compare_tsys(res, ref):
# get all the cols from result
tb.open(res + "/SYSCAL")
res_cols = tb.colnames()
# get all the cols from ref table
#compare the two table
return True
class appendantab_test(unittest.TestCase):
def setUpClass(cls):
pass
def setUp(self):
if os.path.exists(data_copy):
shutil.rmtree(data_copy)
shutil.copytree(os.path.join(datapath, evn_data), data_copy)