Source
xxxxxxxxxx
## if ( not os.path.exists( 'cont_test_cont1' ) or not os.path.exists( 'cont_test_line1' ) or not results ):
########################################################################3
# imcontsub_test.py
#
#
# Copyright (C) 2008, 2009
# Associated Universities, Inc. Washington DC, USA.
#
# This scripts 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.
#
# You should have received a copy of the GNU Library General Public License
# along with this library; if not, write to the Free Software Foundation,
# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
#
# Correspondence concerning AIPS++ should be adressed as follows:
# Internet email: aips2-request@nrao.edu.
# Postal address: AIPS++ Project Office
# National Radio Astronomy Observatory
# 520 Edgemont Road
# Charlottesville, VA 22903-2475 USA
#
# <author>
# Shannon Jaeger (University of Calgary)
# </author>
#
# <summary>
# Test suite for the CASA imcontsub Task
# </summary>
#
# <reviewed reviwer="" date="" tests="" demos="">
# </reviewed
#
# <etymology>
# imcontsub_test stands for image momemnts test
# </etymology>
#
# <synopsis>
# imcontsub_test.py is a Python script that tests the correctness
# of the imcontsub task in CASA.
#
# The tests include:
# 1. Incorrect input for each paramter. Incorrect input includes
# one input of the incorrect data type, out-of-bounds (where
# applicable, and correct data type but non-sensical.
# 2. A set of sample continuum subtractions with expected
# output
# 3. Calculating one example for each allowed fitorder
# 4. Continuum subtraction with region selection on the sky,
# channels, and stokes values, as well as using an input
# region file.
#
# In the imcontsub task a specified continuum channel is subtracted
# from spectral line data.
#
# The expected input is a spectral line image. Both a continuum
# image and a continuum-subtracted spectral line are created as