casa
$Rev:20696$
|
00001 # 00002 # This file was generated using xslt from its XML file 00003 # 00004 # Copyright 2007, Associated Universities Inc., Washington DC 00005 # 00006 import os 00007 from taskinit import * 00008 00009 def uvsub(vis=None,reverse=False): 00010 00011 """Subtract model from the corrected visibility data 00012 00013 uvsub(vis='ngc5921.ms', reverse=false) 00014 00015 This function subtracts model visibility data from corrected visibility 00016 data leaving the residuals in the corrected data column. If the 00017 parameter 'reverse' is set true, the process is reversed. 00018 00019 Keyword arguments: 00020 vis -- Name of input visibility file (MS) 00021 default: none; example: vis='ngc5921.ms' 00022 reverse -- Reverse the operation (add rather than subtract) 00023 default: false; example: reverse=true 00024 00025 uvsub(vis='ngc5921.ms', reverse=false) 00026 00027 """ 00028 00029 #Python script 00030 # 00031 try: 00032 casalog.origin('uvsub') 00033 if ((type(vis)==str) & (os.path.exists(vis))): 00034 ms.open(thems=vis,nomodify=False) 00035 else: 00036 raise Exception, 'Visibility data set not found - please verify the name' 00037 return 00038 ms.uvsub(reverse) 00039 ms.close() 00040 return 00041 except Exception, instance: 00042 print '*** Error ***',instance 00043 return