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_plotweather 00013 def plotweather(vis='', seasonal_weight=0.5, doPlot=True, plotName=''): 00014 00015 """Plot elements of the weather table; estimate opacity. 00016 Generates opacity estimates from both the weather data and a seasonal model; intended for VLA use only. 00017 By default the returned opacity is the mean of these predictions, but this can be adjusted with seasonal_weight. 00018 00019 These methods and models are described in detail in EVLA Memo 143, VLA Test Memo 232, VLA Scientific Memo 176, and references therein. 00020 00021 Saves the plot to the following default file: MS name + .plotweather.png 00022 Custom plot filenames must end in one of: .png, .pdf, .ps, .eps or .svg 00023 00024 If run as a function, will return the mean zenith opacity per spectral window 00025 00026 Written by Josh Marvil, revised 02/06/12 00027 Please direct questions/comments/bug reports to: jmarvil@aoc.nrao.edu 00028 00029 00030 example: 00031 myTau = plotweather(vis='myMS.ms',seasonal_weight=0.5, doPlot=True) 00032 00033 """ 00034 00035 # 00036 # The following is work around to avoid a bug with current python translation 00037 # 00038 mytmp = {} 00039 00040 mytmp['vis'] = vis 00041 mytmp['seasonal_weight'] = seasonal_weight 00042 mytmp['doPlot'] = doPlot 00043 mytmp['plotName'] = plotName 00044 pathname='file:///'+os.environ.get('CASAPATH').split()[0]+'/share/xml/' 00045 trec = casac.utils().torecord(pathname+'plotweather.xml') 00046 00047 casalog.origin('plotweather') 00048 if trec.has_key('plotweather') and casac.utils().verify(mytmp, trec['plotweather']) : 00049 result = task_plotweather.plotweather(vis, seasonal_weight, doPlot, plotName) 00050 00051 else : 00052 result = False 00053 return result