casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
listfits.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_listfits
00013 def listfits(fitsfile=''):
00014 
00015         """List the HDU and typical data rows of a fits file:
00016 
00017         The HDU and typical data rows in a fits file are listed in the logger.
00018 
00019         Keyword arguments:
00020         fitsfile -- Name of input fits file 
00021                 default: none; example: fitsfile='ngc5921.uvfits'
00022         async -- Run asynchronously 
00023                 default = False; do not run asychronously
00024  
00025         """
00026 
00027 #
00028 #    The following is work around to avoid a bug with current python translation
00029 #
00030         mytmp = {}
00031 
00032         mytmp['fitsfile'] = fitsfile
00033         pathname='file:///'+os.environ.get('CASAPATH').split()[0]+'/share/xml/'
00034         trec = casac.utils().torecord(pathname+'listfits.xml')
00035 
00036         casalog.origin('listfits')
00037         if trec.has_key('listfits') and casac.utils().verify(mytmp, trec['listfits']) :
00038             result = task_listfits.listfits(fitsfile)
00039 
00040         else :
00041           result = False
00042         return result