Source
######################################################################
# #
# Use Case Script for NGC 5921 #
# #
# Converted by STM 2007-05-26 #
# Updated STM 2007-06-15 (Alpha Patch 1) #
# Updated STM 2007-09-05 (Alpha Patch 2+) #
# Updated STM 2007-09-18 (Alpha Patch 2+) #
# Updated STM 2007-09-18 (Pre-Beta) add immoments #
# Updated STM 2007-10-04 (Beta) update #
# Last Updated STM 2007-10-10 (Beta) add export #
# #
######################################################################
import time
import os
#
# Set up some useful variables
#
# Get to path to the CASA home and stip off the name
pathname=os.environ.get('CASAPATH').split()[0]
# This is where the NGC5921 UVFITS data will be
fitsdata=pathname+'/data/demo/NGC5921.fits'
# The prefix to use for all output files
prefix='ngc5921.usecase'
# Clean up old files
os.system('rm -rf '+prefix+'*')
#
#=====================================================================
#
# Import the data from FITS to MS
#
print '--Import--'
# Safest to start from task defaults
default('importuvfits')
# Set up the MS filename and save as new global variable
msfile = prefix + '.ms'
# Use task importuvfits
fitsfile = fitsdata
vis = msfile
importuvfits()
#
# Note that there will be a ngc5921.usecase.ms.flagversions
# there containing the initial flags as backup for the main ms
# flags.
#
#=====================================================================
#
# List a summary of the MS
#
print '--Listobs--'
# Don't default this one and make use of the previous setting of
# vis. Remember, the variables are GLOBAL!