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_sdlist 00013 def sdlist(infile='', antenna=0, scanaverage=False, outfile='', overwrite=False): 00014 00015 """ASAP SD task: list summary of single dish data 00016 Keyword arguments: 00017 infile -- name of input SD dataset 00018 antenna -- antenna name or id (only effective for MS input). 00019 scanaverage -- average integrations within scans 00020 options: (bool) True,False 00021 default: False 00022 example: if True, this happens in read-in 00023 For GBT, set False! 00024 outfile -- Name of output file for summary list 00025 default: '' (no output file) 00026 example: 'mysd_summary.txt' 00027 overwrite -- overwrite the output file if already exists 00028 options: (bool) True,False 00029 default: False 00030 00031 00032 DESCRIPTION: 00033 00034 Task sdlist lists the scan summary of the dataset after importing 00035 as a scantable into ASAP. It will optionally output this summary 00036 as file. 00037 00038 Note that if your PAGER environment variable is set to 'less' and 00039 you have set the 'verbose' ASAP environment variable to True 00040 (the default), then the screen version of the summary will page. 00041 You can disable this for sdlist by setting 00042 sd.rcParams['verbose']=False 00043 before running sdlist. Set it back afterwards if you want lots 00044 of information. 00045 00046 WARNING for the GBT raw SDFITS format data as input: 00047 SDtasks are able to handle GBT raw SDFITS format data since the 00048 data filler is available. However, the functionality is not well 00049 tested yet, so that there may be unknown bugs. 00050 00051 00052 """ 00053 00054 # 00055 # The following is work around to avoid a bug with current python translation 00056 # 00057 mytmp = {} 00058 00059 mytmp['infile'] = infile 00060 mytmp['antenna'] = antenna 00061 mytmp['scanaverage'] = scanaverage 00062 mytmp['outfile'] = outfile 00063 mytmp['overwrite'] = overwrite 00064 pathname='file:///'+os.environ.get('CASAPATH').split()[0]+'/share/xml/' 00065 trec = casac.utils().torecord(pathname+'sdlist.xml') 00066 00067 casalog.origin('sdlist') 00068 if trec.has_key('sdlist') and casac.utils().verify(mytmp, trec['sdlist']) : 00069 result = task_sdlist.sdlist(infile, antenna, scanaverage, outfile, overwrite) 00070 00071 else : 00072 result = False 00073 return result