Source
xxxxxxxxxx
fitspw='*:1412665073.7687755~1412787144.0812755Hz;1413104526.8937755~1413226597.2062755Hz',
#########################################################################
# test_task_uvcontsub_old.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.manipulation.uvcontsub_old.html
#
#
##########################################################################
import os
import numpy
import sys
import shutil
import unittest
from casatools import ctsys, table
from casatasks import uvcontsub_old
from casatasks.private.parallel.parallel_task_helper import ParallelTaskHelper
tb = table( )
ctsys_resolve = ctsys.resolve
'''
Unit tests for task uvcontsub_old.
Features tested:
1. uvcontsub_old will use DATA if CORRECTED_DATA is absent.
2. It gets the right answer for a known line + 0th order continuum.
3. It gets the right answer for a known line + 4th order continuum.
4. It gets the right answer for a known line + 0th order continuum,
even when fitorder = 4.
'''
#uvcdatadir = 'uvcontsub'
datapath = 'unittest/uvcontsub/'
# Pick up alternative data directory to run tests on MMSs
testmms = False
if 'TEST_DATADIR' in os.environ:
testmms = True
DATADIR = str(os.environ.get('TEST_DATADIR'))
if os.path.isdir(DATADIR):
datapath = DATADIR
if 'BYPASS_PARALLEL_PROCESSING' in os.environ:
ParallelTaskHelper.bypassParallelProcessing(1)
#Commented out for refactoring (eliminated test_split dependence)
#class UVContChecker(SplitChecker):