casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
msview.py
Go to the documentation of this file.
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_msview
00013 def msview(infile='', displaytype='raster', channel=0, zoom=1, outfile='', outscale=1.0, outdpi=300, outformat='jpg', outlandscape=False, gui=True):
00014 
00015         """View a visibility data set
00016 
00017         examples of usage:
00018 
00019         msview
00020         msview "mymeasurementset.ms"
00021         msview "myrestorefile.rstr"
00022         
00023         Keyword arguments:
00024         infile -- Name of file to visualize
00025                 default: ''
00026                 example: infile='my.ms'
00027                 If no infile is specified the Load Data window
00028                 will appear for selecting data.
00029         displaytype -- (optional): method of rendering data
00030                 visually (raster, contour, vector or marker).  
00031                 You can also set this parameter to 'lel' and
00032                 provide an lel expression for infile (advanced).
00033                 default: 'raster'
00034 
00035         Note: there is no longer a filetype parameter; typing of
00036         data files is now done automatically.
00037                 example:  msview infile='my.ms'
00038                 obsolete: msview infile='my.ms', filetype='ms'
00039 
00040         
00041         """
00042 
00043 #
00044 #    The following is work around to avoid a bug with current python translation
00045 #
00046         mytmp = {}
00047 
00048         mytmp['infile'] = infile
00049         mytmp['displaytype'] = displaytype
00050         mytmp['channel'] = channel
00051         mytmp['zoom'] = zoom
00052         mytmp['outfile'] = outfile
00053         mytmp['outscale'] = outscale
00054         mytmp['outdpi'] = outdpi
00055         mytmp['outformat'] = outformat
00056         mytmp['outlandscape'] = outlandscape
00057         mytmp['gui'] = gui
00058         pathname='file:///'+os.environ.get('CASAPATH').split()[0]+'/share/xml/'
00059         trec = casac.utils().torecord(pathname+'msview.xml')
00060 
00061         casalog.origin('msview')
00062         if trec.has_key('msview') and casac.utils().verify(mytmp, trec['msview']) :
00063             result = task_msview.msview(infile, displaytype, channel, zoom, outfile, outscale, outdpi, outformat, outlandscape, gui)
00064 
00065         else :
00066           result = False
00067         return result