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


Python AIPSTask.dataout方法代码示例

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


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

示例1: runfittp

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dataout [as 别名]
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,代码行数:12,代码来源:eMERLIN_tasks.py

示例2: write_fits

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dataout [as 别名]
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,代码行数:16,代码来源:image.py

示例3: AIPSImage

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dataout [as 别名]
# prepare to zap after the copy
image = AIPSImage( AIPSCat()[mydisk][-1].name, \
                   AIPSCat()[mydisk][-1].klass, mydisk, \
                   AIPSCat()[mydisk][-1].seq)

## Use the subim task to rename the output image
subim.indisk=mydisk
subim.inname=AIPSCat()[mydisk][-1].name
subim.inclass=AIPSCat()[mydisk][-1].klass
subim.inseq=AIPSCat()[mydisk][-1].seq
subim.outclass=outName[-6:]
subim.outdi=mydisk
subim.go()

#cleanup
#image.zap()

## and write the last thing now in the catalog to disk
fittp.indisk=mydisk
fittp.inname=AIPSCat()[mydisk][-1].name
fittp.inclass=AIPSCat()[mydisk][-1].klass
fittp.inseq=AIPSCat()[mydisk][-1].seq
outimage = outName+'.fits'
if os.path.exists(outimage):
    os.remove(outimage)
    print 'Removed existing file to make room for new one :',outimage
fittp.dataout='PWD:'+outimage
fittp.go()

开发者ID:jfoster17,项目名称:gbt-pipeline,代码行数:30,代码来源:sumLine.py

示例4: str

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dataout [as 别名]
    lwpla.lpen = 1
    lwpla.outfile = "PWD:Sol_tabl_" + str(itercal) + "iter_" + str(soli) + "sol.ps"
    lwpla.go()

    tasav = AIPSTask("TASAV")
    tasav.indata = uvdata
    tasav.indisk = indisk
    tasav.outname = "MFSC_SN"
    tasav.outclass = "TASAV"
    tasav.outdisk = indisk
    tasav.go()

    fittp = AIPSTask("FITTP")
    fittp.indata = AIPSUVData("MFSC_SN", "TASAV", indisk, 1)
    fittp.indisk = indisk
    fittp.dataout = "PWD:MFSC_corr_" + str(itercal) + "iter_" + str(soli) + "sol.TASAV"
    fittp.go()

    AIPSUVData("MFSC_SN", "TASAV", indisk, 1).zap()
    for i in range(1, itercal + 1):
        uvdata.zap_table("CL", i + 1)
        uvdata.zap_table("SN", i)
    if combinIFLLRR == 1:
        for i in range(1, int(itercal * (math.ceil((noteles * 16) / 9.0))) + 1):
            uvdata.zap_table("PL", i)
    if combinIFLLRR == 2:
        for i in range(1, int(itercal * (math.ceil((noteles * 2) / 9.0))) + 1):
            uvdata.zap_table("PL", i)
    if combinIFLLRR == 3:
        for i in range(1, int(itercal * (math.ceil((noteles * 8) / 9.0))) + 1):
            uvdata.zap_table("PL", i)
开发者ID:jradcliffe5,项目名称:multi_self_cal,代码行数:33,代码来源:multi_source_self_cal_v1.2.py

示例5: AIPSCat

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dataout [as 别名]
image.header.niter=1
image.header.update()

## Write the last Entry in the catalog to disk
fittp.indisk=mydisk
fittp.inname=AIPSCat()[mydisk][-1].name
fittp.inclass=AIPSCat()[mydisk][-1].klass
fittp.inseq=AIPSCat()[mydisk][-1].seq
restFreqName = "_%.0f_MHz" % (restFreqHz * 1.E-6)
outName = AIPSCat()[mydisk][-1].name + restFreqName
outcube = outName+'_cube.fits'
if os.path.exists(outcube):
    os.remove(outcube)
    print 'Removed existing file to make room for new one :',outcube

fittp.dataout='PWD:'+outcube
fittp.go()

# squash the frequency axis to make a continuum image
sqash.indisk=mydisk
sqash.outdisk=mydisk
sqash.inname=AIPSCat()[mydisk][-1].name
sqash.inclass=AIPSCat()[mydisk][-1].klass
sqash.inseq=AIPSCat()[mydisk][-1].seq
sqash.bdrop=3 # squash frequency axis
sqash.go()

print AIPSCat()

## and write the last thing now in the catalog to disk
fittp.indisk=mydisk
开发者ID:jfoster17,项目名称:ramps,代码行数:33,代码来源:mapRAMPS.py

示例6: str

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dataout [as 别名]
	lwpla.lpen = 1
	lwpla.outfile = 'PWD:Sol_tabl_' + str(itercal) + 'iter_' +str(soli)+ 'sol.ps'
	lwpla.go()

	tasav = AIPSTask('TASAV')
	tasav.indata = uvdata
	tasav.indisk = 2
	tasav.outname = 'MFSC_SN'
	tasav.outclass = 'TASAV'
	tasav.outdisk = 2
	tasav.go()

	fittp = AIPSTask('FITTP')
	fittp.indata = AIPSUVData('MFSC_SN','TASAV',2,1)
	fittp.indisk = 2
	fittp.dataout = 'PWD:MFSC_corr_' + str(itercal) + 'iter_' +str(soli)+ 'sol.TASAV'
	fittp.go()
	
	AIPSUVData('MFSC_SN','TASAV',2,1).zap()
	for i in range(1,itercal+1):
		uvdata.zap_table('CL',i+1)
		uvdata.zap_table('SN',i)
	if combinIFLLRR == 1:
		for i in range(1,int(itercal*(math.ceil((noteles*16)/9.0)))+1):
			uvdata.zap_table('PL',i)
	if combinIFLLRR == 2:
		for i in range(1,int(itercal*(math.ceil((noteles*2)/9.0)))+1):
			uvdata.zap_table('PL',i)
	if combinIFLLRR == 3:
		for i in range(1,int(itercal*(math.ceil((noteles*8)/9.0)))+1):
			uvdata.zap_table('PL',i)
开发者ID:jradcliffe5,项目名称:multi_self_cal,代码行数:33,代码来源:multi_source_self_cal.py

示例7: dbcon

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dataout [as 别名]

#.........这里部分代码省略.........
            for iii in range(0,nObjects):
                if (allObjects[iii] == spectra.header.object):
                    notFound = False
            # if not in the list add to list and increment count
            if (notFound):
                allObjects[nObjects] = spectra.header.object
                nObjects = nObjects+1
            spectra.zap()
    
    #print nObjects,' Object(s) Observed: ', allObjects
    objectName = allObjects[0]
    for iii in range(1,nObjects):
        if len(allObjects[iii]) > 0:
            objectName = objectName + '+' + allObjects[iii]
    
    print nObjects,' Object(s) Observed: ', objectName
    
    if nObjects > 2:
        objectName = allObjects[0] + '+' + str( nObjects-1)
    
    # Extract the observations summary
    spectra = AIPSUVData(AIPSCat()[mydisk][-1].name, AIPSCat()[mydisk][-1].klass, mydisk, AIPSCat()[mydisk][-1].seq)
    
    # Read parameters passed inside the spectra data header
    nChan    = round(spectra.header.naxis[2])
    cellsize = round(spectra.header.cdelt[4] * 3600.)
    refChan  = spectra.header.crpix[2]
    imxSize  = 2*round(spectra.header.crpix[3]/1.5 )
    imySize  = 2*round(spectra.header.crpix[4]/1.5 )
    raDeg    = spectra.header.crval[3]
    decDeg   = spectra.header.crval[4]
    nuRef    = spectra.header.crval[2]
    dNu      = spectra.header.cdelt[2]
    
    print "Ra,Dec:", raDeg, decDeg, "Image:", imxSize, imySize, cellsize, 
    #print spectra.header
    
    #now free up slot 0
    image = WizAIPSImage(AIPSCat()[mydisk][0].name, \
                         AIPSCat()[mydisk][0].klass, \
                         mydisk, AIPSCat()[mydisk][0].seq)
    image.zap()
    
    # sort data to prevent down stream probelms
    uvsrt.indisk=mydisk
    uvsrt.outdisk=mydisk
    uvsrt.baddisk[1]=baddisk
    uvsrt.outcl='UVSRT'
    uvsrt.sort='TB'
    uvsrt.inname=AIPSCat()[mydisk][-1].name
    if kount < 2:
        uvsrt.inclass=AIPSCat()[mydisk][-1].klass
        uvsrt.inseq=kount    
    else:
        uvsrt.inclass='DBCON'
        uvsrt.inseq=kount - 1
    uvsrt.go()
    
    # now clean up the last of the input files
    spectra.zap()
    
    ## and write the last thing now in the catalog to disk
    fittp.indisk=mydisk
    fittp.inname=AIPSCat()[mydisk][-1].name
    fittp.inclass=AIPSCat()[mydisk][-1].klass
    fittp.inseq=AIPSCat()[mydisk][-1].seq
    outName = os.path.splitext(sdf_files[0])[0]
    # Trim out the source name
    iUnder = outName.find("_")
    if iUnder > 0:
        outName = outName[iUnder+1:]
    # Trim out the beam number
    iUnder = outName.find("_")
    if iUnder > 0:
        outName = outName[iUnder+1:]
    # Trim out the first scan number
    iUnder = outName.find("_")
    if iUnder > 0:
        outName = outName[iUnder+1:]
    # Trim out the sampler number
    iUnder = outName.rfind("_")
    if iUnder > 0:
        outName = outName[0:iUnder]
    #Now prepend the objects
    lObjectName = len(objectName)
    if lObjectName > 40:
        objectName = objectName[:40]
    outimage = objectName+'_'+outName+'_dbcon.fits'
    if os.path.exists(outimage):
        os.remove(outimage)
        print 'Removed existing file to make room for new one :',outimage
    
    fittp.dataout='PWD:'+outimage
    fittp.go()

    if keeptempfiles != '1':
        [os.unlink(xx) for xx in sdf_files]
        if os.path.isdir('summary'):
            [os.unlink('summary/'+xx) for xx in os.listdir('summary')]
            os.rmdir('summary')
开发者ID:jfoster17,项目名称:gbt-pipeline,代码行数:104,代码来源:make_sdf_and_dbcon.py


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