当前位置: 首页>>代码示例>>Python>>正文


Python AIPSTask.AIPSTask类代码示例

本文整理汇总了Python中AIPSTask.AIPSTask的典型用法代码示例。如果您正苦于以下问题:Python AIPSTask类的具体用法?Python AIPSTask怎么用?Python AIPSTask使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了AIPSTask类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: time_sort_data

def time_sort_data():
    """Time-sort data in AIPS with the UVSRT task."""

    print_header("Time-sorting data")

    uvsrt = AIPSTask('uvsrt')
    uvsrt.userno = AIPS.userno

    # -------------------------------------------------------------------------
    #    UVSRT the data
    # -------------------------------------------------------------------------

    # sort data to prevent down stream problems
    uvsrt.indisk = uvsrt.outdisk = DISK_ID
    uvsrt.baddisk[1] = BADDISK
    uvsrt.outcl = 'UVSRT'
    uvsrt.sort = 'TB'
    last = cat.last_entry()
    uvsrt.inname = last.name
    uvsrt.inclass = last.klass
    uvsrt.inseq = last.seq

    # will write to entry 1 because input sdf/uv files were removed
    uvsrt.go()

    nfiles = len(cat)

    for dbcon_entry in range(nfiles-1):
        cat.zap_entry(-1)  # remove the DBCON entries
开发者ID:nrao,项目名称:gbt-pipeline,代码行数:29,代码来源:load.py

示例2: runuvfix

def runuvfix(datafile, inname, indisk, thisdir):
	uvfix = AIPSTask('UVFIX')
	klass = datafile.klass
	uvfix.indata = datafile
	uvfix.outdata = AIPSUVData(datafile.name,'UVFIX',indisk,thisdir)
	uvfix.go()
	datafile.zap()
	datafile = AIPSUVData(inname,'UVFIX',indisk,thisdir)
	datafile.rename(inname, klass, thisdir)
开发者ID:h-ramp,项目名称:pipeline,代码行数:9,代码来源:eMERLIN_tasks.py

示例3: runquickpossm

def runquickpossm(indata, source):
	possm = AIPSTask('POSSM')
	possm.indata = indata
	possm.source[1:] = source
	possm.aparm[9] = 1
	possm.nplots = 6
	possm.solint = 30 # plot every 30min
	possm.stokes = 'HALF'
	possm.flagver = 0
	possm.go()
开发者ID:h-ramp,项目名称:pipeline,代码行数:10,代码来源:eMERLIN_tasks.py

示例4: runsnplt

def runsnplt(indata, inext, invers, sources, nplots, optype, dotv):
	snplt = AIPSTask('SNPLT')
	snplt.indata = indata
	snplt.inext= inext
	snplt.invers = invers
	snplt.sources[1:] = sources
	snplt.nplots = nplots
	snplt.optype = optype
	snplt.dotv = dotv
	snplt.go()
开发者ID:h-ramp,项目名称:pipeline,代码行数:10,代码来源:eMERLIN_tasks.py

示例5: rungetjy

def rungetjy(indata, sources, calsour, bif, eif, snver):
	getjy = AIPSTask('GETJY')
	getjy.indata = indata
	getjy.sources[1:] = sources
	getjy.calsour[1:] = calsour
	getjy.bif = bif
	getjy.eif = eif
	getjy.snver = snver
	getjy.go()
开发者ID:h-ramp,项目名称:pipeline,代码行数:9,代码来源:eMERLIN_tasks.py

示例6: runsetjy

def runsetjy(indata, sources, bif, eif, zerosp, optype):
	setjy = AIPSTask('SETJY')
	setjy.indata = indata
	setjy.sources[1:] = sources
	setjy.bif = bif
	setjy.eif = eif
	setjy.zerosp[1:] = zerosp, 0, 0, 0
	setjy.optype = optype
	setjy.go()
开发者ID:h-ramp,项目名称:pipeline,代码行数:9,代码来源:eMERLIN_tasks.py

示例7: greys

def greys (aipsname, incl, indisk, pmin, pmax, stfac, stvers, logfiledir='./'):
    greys = AIPSTask('greys')
    greys.inname = aipsname
    greys.inclass = incl
    greys.indisk = indisk
    greys.pixrange[1:] = [float(pmin),float(pmax)]
    greys.dotv = -1
    greys.stfac = stfac
    try:
        greys.stvers = stvers  # does not exist in some aips versions
    except:
        pass
    stdout = sys.stdout; sys.stdout = open(logfiledir+aipsname+'.log','a')
    greys.go()
    sys.stdout.close(); sys.stdout = stdout
开发者ID:varenius,项目名称:lofar-lb,代码行数:15,代码来源:lofipi_aips.py

示例8: runfittp

def runfittp(uvdata, fittpdir, fittpfile):
	fittp = AIPSTask('FITTP')
	fittp.indata = uvdata
	fittp.doall = -1
	fittp.intype = ''
	fittp.outtape = 1
	srcname = re.sub(r"\s+", '-', fittpfile)
	fittp.dataout = os.path.join(fittpdir, srcname)
	print "Saving to disk: ", uvdata.name, uvdata.klass, uvdata.seq
	fittp.go()
开发者ID:h-ramp,项目名称:pipeline,代码行数:10,代码来源:eMERLIN_tasks.py

示例9: runsousp

def runsousp(indata, sources):
	sousp = AIPSTask('SOUSP')
	sousp.indata = indata
	sousp.sources[1:] = sources
	sousp.order = 1
	sousp.dotv = -1
	sousp.go()
	return sousp.specindx
开发者ID:h-ramp,项目名称:pipeline,代码行数:8,代码来源:eMERLIN_tasks.py

示例10: make_average_map

def make_average_map(restfreq, uniqueid):
    print_header("Making average map")
    sqash = AIPSTask("sqash")

    # squash the frequency axis to make a continuum image
    sqash.indisk = DISK_ID
    sqash.outdisk = DISK_ID
    last = cat.last_entry()
    sqash.inname = last.name
    sqash.inclass = last.klass
    sqash.inseq = last.seq
    sqash.bdrop = 3  # squash frequency axis
    sqash.go()

    outcont = write_average_map(restfreq, uniqueid)
    return outcont
开发者ID:nrao,项目名称:gbt-pipeline,代码行数:16,代码来源:image.py

示例11: lwpla

def lwpla (aipsname,incl,indisk,outfile,logfiledir='./'):
    lwpla = AIPSTask('lwpla')
    lwpla.inname = aipsname
    lwpla.inclass = incl
    lwpla.indisk = indisk
    lwpla.outfile = outfile
    stdout = sys.stdout; sys.stdout = open(logfiledir+aipsname+'.log','a')
    lwpla.go()
    sys.stdout.close(); sys.stdout = stdout
开发者ID:varenius,项目名称:lofar-lb,代码行数:9,代码来源:lofipi_aips.py

示例12: stars

def stars (aipsname, incl, indisk, intext='./starsfile',logfiledir='./'):
    stars = AIPSTask('stars')
    stars.inname = aipsname
    stars.inclass = incl
    stars.indisk = indisk
    try:
        stars.stvers = 0    # does not exist in some AIPS versions
    except:
        pass
    stars.intext = './starsfile'
    stdout = sys.stdout; sys.stdout = open(logfiledir+aipsname+'.log','a')
    stars.go()
    sys.stdout.close(); sys.stdout = stdout
开发者ID:varenius,项目名称:lofar-lb,代码行数:13,代码来源:lofipi_aips.py

示例13: load_into_aips

def load_into_aips(myfiles):
    """Load files into AIPS with UVLOD task."""
    uvlod = AIPSTask('uvlod')
    uvlod.outdisk = DISK_ID            # write all input data to a select disk
    uvlod.userno = AIPS.userno

    first_file = True   # to help determine center freq to use

    for this_file in myfiles:        # input all AIPS single dish FITS files
        print 'Adding {0} to AIPS.'.format(this_file)
        uvlod.datain = 'PWD:' + this_file
        uvlod.go()
    
        # get the center frequency of the sdf file that was just loaded
        last = cat.last_entry()
        spectra = cat.get_uv(last)
        center_freq = spectra.header.crval[2]
    
        # if this is the first file loaded, look for
        # the same frequency in the next ones
        if first_file:
            expected_freq = center_freq
            first_file = False
        
        # if frequency of sdf file just loaded and 1st file differ by
        # more than 100 kHz, do not use the current file
        if abs(expected_freq - center_freq) > 1e5:
            print 'Frequencies differ: {0} != {1}'.format(center_freq, expected_freq)
            print '  Rejecting {0}'.format(this_file)
            spectra.zap()
开发者ID:jfoster17,项目名称:gbt-pipeline,代码行数:30,代码来源:dbcon.py

示例14: runmsort

def runmsort(indata):
	print 'Running MSORT.'
	msort = AIPSTask('MSORT')
	msort.indata = indata
	msort.outdata = indata
	msort.sort = 'TB'
	msort.go()
开发者ID:h-ramp,项目名称:pipeline,代码行数:7,代码来源:eMERLIN_tasks.py

示例15: write_fits

def write_fits(outname):
    fittp = AIPSTask("fittp")

    # Write the last Entry in the catalog to disk
    fittp.indisk = DISK_ID
    last = cat.last_entry()
    fittp.inname = last.name
    fittp.inclass = last.klass
    fittp.inseq = last.seq
    if os.path.exists(outname):
        os.remove(outname)
        print "Removed existing file to make room for new one :", outname
    fittp.dataout = "PWD:" + outname
    fittp.go()
开发者ID:nrao,项目名称:gbt-pipeline,代码行数:14,代码来源:image.py


注:本文中的AIPSTask.AIPSTask类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。