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_imreframe 00013 def imreframe(imagename='', output='', outframe='lsrk', epoch='', restfreq=''): 00014 00015 """Change the frame in which the image reports its spectral values 00016 00017 imagename -- name of casa image file to process on 00018 output -- name of output image '' means modify the input image itself 00019 default: ''; 00020 outframe -- new spectral frame in which the frequency or 00021 velocity will be reported for. 00022 Options: 'lsrk','lsrd','bary','geo','topo','galacto', 00023 'lgroup','cmb' 00024 default: 'lsrk' 00025 >>> 00026 epoch -- when outframe is 'topo' or 'geo' a time in UTC is needed 00027 to decide when to do the frequency conversion. '' is to use 00028 the epoch of the input image 00029 default= '' 00030 00031 restfreq -- Specify rest frequency to use for output image 00032 default=''; '' means use the restfrequency already in input image 00033 For example for 00034 NH_3 (1,1) put restfreq='23.694496GHz' 00035 00036 00037 """ 00038 00039 # 00040 # The following is work around to avoid a bug with current python translation 00041 # 00042 mytmp = {} 00043 00044 mytmp['imagename'] = imagename 00045 mytmp['output'] = output 00046 mytmp['outframe'] = outframe 00047 mytmp['epoch'] = epoch 00048 mytmp['restfreq'] = restfreq 00049 pathname='file:///'+os.environ.get('CASAPATH').split()[0]+'/share/xml/' 00050 trec = casac.utils().torecord(pathname+'imreframe.xml') 00051 00052 casalog.origin('imreframe') 00053 if trec.has_key('imreframe') and casac.utils().verify(mytmp, trec['imreframe']) : 00054 result = task_imreframe.imreframe(imagename, output, outframe, epoch, restfreq) 00055 00056 else : 00057 result = False 00058 return result