Source
ret=tclean(vis="refim_mawproject.ms",field="*",spw="*",datacolumn="corrected",imagename=self.img,imsize=512,cell="10.0arcsec",phasecenter="J2000 19:59:28.500 +40.44.01.50",stokes="I",specmode="cube",gridder="mosaic",psfphasecenter="J2000 19:59:28.520 +40.44.01.51",vptable="",pblimit=0.3,normtype="flatnoise",deconvolver="hogbom",restoration=True,weighting="natural", niter=30,gain=0.1, usemask="user",mask="",restart=True,savemodel="none",calcres=True,calcpsf=True, parallel=self.parallel)
##########################################################################
##########################################################################
#
# Test programs for the refactored imager : test_tclean
#
# Each of the following categories (classes) has a set of tests within it.
#
# test_onefield # basic tests, deconvolution algorithms
# test_iterbot # iteration control options for mfs and cube
# test_multifield # multiple fields of same type and with different shapes/deconvolvers/gridders
# test_stokes # multiple stokes planes, imaging with flagged correlations..
# test_cube # all things cube. Spectral frame setup, handling empty channels, etc
# test_widefield # facets, wprojection, imagemosaic, mosaicft, awproject
# test_mask # input mask options : regridding, mask file, automasking, etc
# test_modelvis # saving models (column/otf), using starting models, predict-only (setjy)
# test_ephemeris # ephemeris tests for gridder standard and mosaic, mode mfs and cubesource
#
# To run from within casa 5:
#
# runUnitTest.main(['test_tclean']) # Run all tests
# runUnitTest.main(['test_tclean[test_onefield]']) # Run tests from test_onefield
# runUnitTest.main(['test_tclean[test_onefield_mtmfs]']) # Run one specific test
# runUnitTest.main(['test_tclean[test_onefield_mtmfs,test_onefield_hogbom]']) # Multiple specific tests
#
# To see the full list of tests : grep "\"\"\" \[" test_tclean.py
#
# These tests need data stored in casatestdata/unittest/tclean
# The datasets are symliked to the above directory. If using cp to copy them locally,
# Use cp -RH
#
# For a developer build, to get the datasets locally
#
# --- Get the test data repo : svn co https://svn.cv.nrao.edu/svn/casatestdata casatestdata
# --- Add a link to casatestdata inside $CASAPATH
# ########################################################################
# SKIPPED TESTS
# More tests were added to skip (as of 2019,04,26)
#
# (as of 2019.02.05 - Seven tests total)
# The following tests are currently skipped as the supports of the particular
# modes are not available in parallel mode yet
# =>
# test_multifield_both_cube_diffshape:
# test_multifield_cube_mfs
# test_multifield_cube_mtmfs
# test_cube_21
#
# The following tests in pricipal should be working but curently broken
# until fixes to test or code are properly made.
# => test_multifield_facets_mfs
# test_multifield_facets_mtmfs
# test_cube_D1
#
# Added to skip at least for 5.5
# test_cube_chanchunks
# test_cube_chanchunks_savemodel (possible race conditions)
# test_modelvis_2 (possible race conditions)
# test_modelvis_3 (possible race conditions)
# test_modelvis_5 (possible race conditions)
# test_modelvis_6 (possible race conditions)
# test_modelvis_7 (possible race conditions)
# test_modelvis_8 (possible race conditions)
# test_modelvis_9 (possible race conditions)
# test_modelvis_10 (possible race conditions)
# test_modelvis_11 (possible race conditions)
# test_startmodel_with_mask_mfs(possible race conditions)
# test_startmodel_with_mask_mtmfs(possible race conditions)
#Ressurected from skipping after some fixes
# test_mask_5
# test_iterbot_cube_2
# test_multifield_both_cube
##########################################################################
#
# Datasets
#
# refim_twochan.ms : 2 channels, one 1Jy point source with spectral index of -1.0
# refim_twopoints_twochan.ms : Two point sources, 1Jy and 5Jy, both with spectral index -1.0. For multifield tests.
# refim_point.ms : 1-2 GHz, 20 channels, 1 spw, one 1Jy point source with spectral index -1.0.
# refim_point_withline.ms : refim_point with a 'line' added into 3 channels (just topo)
# refim_mawproject.ms : Two pointing wideband mosaic with 1 point source in between the two pointings
# refim_mawproject_offcenter.ms : Two pointing wideband mosaic with 1 point source at center of one pointing
# refim_point_stokes.ms : RR=1.0, LL=0.8, RL and LR are zero. Stokes I=0.9, V=0.1, U,Q=0.0
# refim_point_linRL.ms : I=1, Q=2, U=3, V=4 in circular pol basis.
# venus_ephem_test.ms : 7-point mosaic of Venus (ephemeris), Band 6, 1 spw, averaged to 1 chan
#
##########################################################################
from __future__ import absolute_import
from __future__ import print_function
import os