casa
$Rev:20696$
|
00001 # 00002 # This file was generated using xslt from its XML file 00003 # 00004 # Copyright 2009, Associated Universities Inc., Washington DC 00005 # 00006 import sys 00007 import os 00008 from casac import * 00009 import string 00010 from taskinit import casalog 00011 #from taskmanager import tm 00012 import task_plotants 00013 def plotants(vis='', figfile=''): 00014 00015 """Plot the antenna distribution in the local reference frame: 00016 Plot the antenna distribution in the local reference frame: 00017 00018 The location of the antennas in the MS will be plotted with 00019 X-toward local east; Y-toward local north. 00020 00021 Keyword arguments: 00022 vis -- Name of input visibility file. 00023 default: none. example: vis='ngc5921.ms' 00024 00025 figfile -- Save the plotted figure in this file. 00026 default: ''. example: figfile='myFigure.png' 00027 00028 The name of each antenna (egs. vla=antenna number) is 00029 shown next to its respective location. 00030 00031 DO NOT use the buttons on the Mark Region line. These are 00032 not implemented yet and might abort CASA. 00033 00034 You can zoom in by pressing the magnifier button (bottom, 00035 third from left) and making a rectangular region with 00036 the mouse. Press the home button (left most button) to 00037 remove zoom. 00038 00039 A hard-copy of this plot can be obtained by pressing the 00040 button on the right at the bottom of the display. This 00041 produces a png format file. 00042 00043 """ 00044 00045 # 00046 # The following is work around to avoid a bug with current python translation 00047 # 00048 mytmp = {} 00049 00050 mytmp['vis'] = vis 00051 mytmp['figfile'] = figfile 00052 pathname='file:///'+os.environ.get('CASAPATH').split()[0]+'/share/xml/' 00053 trec = casac.utils().torecord(pathname+'plotants.xml') 00054 00055 casalog.origin('plotants') 00056 if trec.has_key('plotants') and casac.utils().verify(mytmp, trec['plotants']) : 00057 result = task_plotants.plotants(vis, figfile) 00058 00059 else : 00060 result = False 00061 return result