コード例 #1
0
ファイル: casa_in_py.py プロジェクト: schiebel/casa
# cannot do this because taskinit contain
# other functions the engines do not need
# we load tools and tasks explicitly

##
## finally load tools
####

# jagonzal: Import tasks but don't load task manager and dbus
os.environ['CASA_ENGINE']="YES"
from tasks import *

casalog = casac.logsink()
casalog.setglobal(True)
quanta = casac.quanta()
measures = casac.measures()
imager = casac.imager()
calibrater = casac.calibrater()
ms = casac.ms()
tableplot = casac.tableplot()
msplot = casac.msplot()
calplot = casac.calplot()
table = casac.table()
#flagger = casac.flagger()
agentflagger = casac.agentflagger()
image = casac.image()
imagepol = casac.imagepol()
simulator = casac.simulator()
componentlist = casac.componentlist()
coordsys = casac.coordsys()
regionmanager = casac.regionmanager()
コード例 #2
0
#
# Correspondence concerning AIPS++ should be addressed as follows:
#        Internet email: [email protected].
#        Postal address: AIPS++ Project Office
#                        National Radio Astronomy Observatory
#                        520 Edgemont Road
#                        Charlottesville, VA 22903-2475 USA
#
# $kgolap$
import dateutil
from datetime import datetime
import numpy as np
import pylab as pl
from casac import casac
qa=casac.quanta()
me=casac.measures()
def specframeconvert(val='344.84e9Hz',   inframe='TOPO', indoppler='RADIO', restfreq='1.410GHz', timebeg='2011/5/28/01h00m00', timeend='', direction='J2000 12h01m51 -18d52m00', observatory='VLA',  outframe='LSRK', npoints=100, doplot=False):
    """
    val= frequency or velocity quantity (e.g '113GHz' or '-25km/s')
    inframe=frame of input value (e.g 'TOPO', 'GEO', BARY')
    indoppler=doppler velocity definition if val is velocity ('RADIO', 'OPTICAL', 'Z' etc)
    restfrequency=line rest frequency if val is in velocity units
    timebeg=start of time range in UTC e.g '2012/12/25/00h00m00'
    timeend=end of time range in UTC or '' if only one value is needed
    direction=Source direction of interest (e.g 'J2000 12h01m51 -18d52m00')
    observatory=name of observatory to know where on earth this calculation is for
    outframe=frame of the output frequencies for the time range requested
    npoints= number of points to have values calculated in time range
    doplot=True or False (if Frequecy v/s Time plot is needed)
    """
    me.doframe(me.observatory(observatory))