Source
fringefit(vis=self.msfile, caltable=self.manualdefault, refant='0', docallib=True, callib=self.testcallib, paramactive=[True,True,False])
#########################################################################
# test_task_fringefit.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.fringefit.html
#
##########################################################################
import os
import sys
import shutil
import unittest
import itertools
import numpy as np
# For information about parameters that are unexpectedly zero, set
# VERBOSE to true. Currently there are none, so this is for developers
# only
VERBOSE = False
from casatools import ms, ctsys, table
from casatasks import fringefit, flagmanager, flagdata
from casatestutils import testhelper as th
ctsys_resolve = ctsys.resolve
tblocal = table()
datapath = ctsys.resolve('unittest/fringefit/')
class Fringefit_tests(unittest.TestCase):
prefix = 'n08c1'
msfile = prefix + '.ms'
uvfile = 'gaincaltest2copy.ms'
def setUp(self):
shutil.copytree(os.path.join(datapath, self.msfile), self.msfile)
shutil.copytree(os.path.join(datapath, 'gaincaltest2.ms'), self.uvfile)
def tearDown(self):
shutil.rmtree(self.msfile)
shutil.rmtree(self.prefix + '.sbdcal', True)
shutil.rmtree(self.prefix + '-zerorates.sbdcal', True)
shutil.rmtree(self.prefix + '.mbdcal', True)
# shutil.rmtree(self.prefix + '.mbdcal2', True)
shutil.rmtree(self.uvfile, True)
shutil.rmtree('uvrange_with.cal', True)
def test_sbd(self):
sbdcal = self.prefix + '.sbdcal'
fringefit(vis=self.msfile, caltable=sbdcal, refant='EF')
reference = os.path.join(datapath, sbdcal)