Source
# 1a. No explicit spw selection
##########################################################################
# test_task_gaincal.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.
#
# [Add the link to the JIRA ticket here once it exists]
#
# Based on the requirements listed in plone found here:
# https://casadocs.readthedocs.io/en/stable/api/tt/casatasks.calibration.gaincal.html
#
#
##########################################################################
import sys
import os
import unittest
import shutil
import numpy as np
import pylab as pl
import casatools
from casatasks import gaincal, mstransform, casalog, flagdata, gencal
tb = casatools.table()
from casatestutils import testhelper as th
rootpath = casatools.ctsys.resolve('unittest/gaincal/')
datapath = rootpath + 'gaincaltest2.ms'
compCal = rootpath + 'gaincaltest2.ms.G0'
tCal = rootpath + 'gaincaltest2.ms.T0'
# Reference Cals
combinedRef = rootpath + 'genDataCombine.G0'
preTRef = rootpath + 'genDataPreT.G0'
preGRef = rootpath + 'genDataPreG.T0'
calModeP = rootpath + 'calModeTest.G0'
calModeA = rootpath + 'calModeTest.G1'
typeCalK = rootpath + 'gaintypek.G0'
typeCalSpline = rootpath + 'gaintypeSpline.G0'
spwMapCal = rootpath + 'spwMap.G0'
# From merged test
merged_dataset1 = rootpath + 'ngc5921.ms'
merged_refcal1 = rootpath + 'ngc5921.ref1a.gcal'
merged_refcal2 = rootpath + 'ngc5921.ref2a.gcal'
merged_dataset2 = rootpath + 'ngc4826.ms'
merged_refcal3 = rootpath + 'ngc4826.ref1b.gcal'
fullRangeCal = 'testgaincal.cal'
maxScanCal = 'testScan.cal'
int70Cal = 'int70.cal'
int30Cal = 'int30.cal'
tempCal = 'temp.cal'