Source
appendantab(vis=append_data, outvis="secondAppend.ms", antab=evn_antab, overwrite=False, append_tsys=True, append_gc=False)
#########################################################################
# test_task_appendantab.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:
#
#
##########################################################################
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 = "idi1.ms"
evn_antab = os.path.join(datapath, "n14c3.antab")
append_data = "appendedData.ms"
evn_ref = os.path.join(datapath, "appendantab_test.ms")
data_copy = "dataCopy.ms"
vla_vis = os.path.join(datapath, 'tf042b1_try2.ms')
vla_copy = 'vla_copy.ms'
corrected_overwrite = 'corrected_overwrite.ms'
ref_overwrite = os.path.join(datapath, 'vla_appendantab_overwrite_ref.ms')
vla_antab = os.path.join(datapath, 'VLBA_7GHZ_GAINS.ANTAB')
def compareGains(table, ref):
# Compare the gain values
print("-----------------------------")
gains = []
tb.open(table+"/GAIN_CURVE")
for i in range(tb.nrows()):
gains.extend(tb.getcell('GAIN', i))
time_new = tb.getcol('TIME')
tb.close()
ref_gains = []
tb.open(ref+"/GAIN_CURVE")
for i in range(tb.nrows()):