mst_local.sort('mms_sorted.ms',['OBSERVATION_ID','ARRAY_ID','SCAN_NUMBER','FIELD_ID','DATA_DESC_ID','ANTENNA1','ANTENNA2','TIME'])
from casatestutils import testhelper as th
from casatasks.private.casa_transition import is_CASA6
from casatasks import listobs, listpartition, flagdata, flagmanager, partition, setjy, split
from casatools import ctsys, msmetadata, ms, agentflagger, table
from casatasks.private import partitionhelper as ph
msmdt_local = msmetadata()
msmdt_local2 = msmetadata()
aft_local = agentflagger()
datapath = ctsys.resolve('unittest/partition/')
from tasks import partition, flagdata, flagmanager, split, setjy, listpartition, listobs
from taskinit import msmdtool, mstool, aftool, tbtool
from parallel.parallel_task_helper import ParallelTaskHelper
import partitionhelper as ph
msmdt_local2 = msmdtool()
datapath = os.environ.get('CASAPATH').split()[0] + \
"/casatestdata/unittest/partition/"
from casatestutils import testhelper as th
''' Unit Tests for task partition'''
if 'BYPASS_PARALLEL_PROCESSING' in os.environ:
ParallelTaskHelper.bypassParallelProcessing(1)
class test_base(unittest.TestCase):
self.msfile = self.prefix + '.ms'
self.mmsfile = self.prefix + '.mms'
fpath = os.path.join(datapath,self.msfile)
if not os.path.exists(self.msfile):
shutil.copytree(fpath, self.msfile, symlinks=True)
print('MS is already around, no need to copy it.')
def setUp_fourants(self):
self.prefix = 'Four_ants_3C286'
self.msfile = self.prefix + '.ms'
self.mmsfile = self.prefix + '.mms'
fpath = os.path.join(datapath,self.msfile)
if not os.path.exists(self.msfile):
shutil.copytree(fpath, self.msfile, symlinks=True)
print('MS is already around, no need to copy it.')
def setUp_floatcol(self):
self.prefix = "SDFloatColumn"
self.msfile = 'SDFloatColumn.ms'