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


Python AIPSTask.in2seq方法代码示例

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


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

示例1: run_dbcon

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import in2seq [as 别名]
def run_dbcon(entryA, entryB):
    """Combine the data in AIPS with the DBCON task"""
    dbcon = AIPSTask('dbcon')

    # always do firs
    dbcon.indisk = dbcon.outdisk = dbcon.in2disk = DISK_ID
    dbcon.userno = AIPS.userno
    
    file1 = cat.get_entry(entryA)
    dbcon.inname = file1.name
    dbcon.inclass = file1.klass
    dbcon.inseq = file1.seq
    
    file2 = cat.get_entry(entryB)
    dbcon.in2name = file2.name
    dbcon.in2class = file2.klass
    dbcon.in2seq = file2.seq
    
    dbcon.reweight[1] = 0
    dbcon.reweight[2] = 0
    
    print 'combining 1: ', dbcon.inname, dbcon.inclass, dbcon.inseq
    print 'combining 2: ', dbcon.in2name, dbcon.in2class, dbcon.in2seq
    
    dbcon.go()
开发者ID:jfoster17,项目名称:gbt-pipeline,代码行数:27,代码来源:dbcon.py

示例2: len

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import in2seq [as 别名]
    uvlod.datain='PWD:'+thisFile
    print uvlod.datain
    uvlod.outdisk=mydisk
    uvlod.go()

if len(myfiles) > 1:            # if more than 1 file DBCON them

    # always do first 2
    dbcon.indisk=mydisk
    dbcon.outdisk=mydisk
    dbcon.inname = AIPSCat()[mydisk][0].name
    dbcon.inclass = AIPSCat()[mydisk][0].klass
    dbcon.inseq = AIPSCat()[mydisk][0].seq
    dbcon.in2name = AIPSCat()[mydisk][1].name
    dbcon.in2class = AIPSCat()[mydisk][1].klass
    dbcon.in2seq = AIPSCat()[mydisk][1].seq
    dbcon.reweight[1] = 0
    dbcon.reweight[2] = 0
    dbcon.go()

    # and keep adding in one
    for i in range(2,len(myfiles)):
        # end of cat is always most recent dbcon result
        dbcon.inname = AIPSCat()[mydisk][-1].name
        dbcon.inclass = AIPSCat()[mydisk][-1].klass
        dbcon.inseq = AIPSCat()[mydisk][-1].seq
        dbcon.in2name = AIPSCat()[mydisk][i].name
        dbcon.in2class = AIPSCat()[mydisk][i].klass
        dbcon.in2seq = AIPSCat()[mydisk][i].seq
        dbcon.go()
开发者ID:jfoster17,项目名称:gbt-pipeline,代码行数:32,代码来源:imageW51.py

示例3: dbcon

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import in2seq [as 别名]
def dbcon(sys):
    argc = len(sys.argv)
    if argc < 3:
        print ''
        print 'dbcon: Combine all observations into a single dish fits file'
        print 'usage: doImage dbcon.py <aipsNumber> <feeds>'
        print '                        <average> <channels> <display> <rmsflag> <verbose> <baseline-subtract>'
        print '                        <keeptempfiles> <spectra File 1> [<spectra File n>]'
        print 'where <aipsNumber>     Your *PIPELINE* AIPS number (should always be the same)'
        print '      <spectra File 1> One or more calibrated spectra files (*.fits)'
        print '      Combined spectra are placed in catalog slot 1'
        print ''
        quit()
    
    feeds = sys.argv[2].split(',')
    average = sys.argv[3]
    channels = sys.argv[4]
    display_idlToSdfits = sys.argv[5]
    idlToSdfits_rms_flag = sys.argv[6]
    verbose = sys.argv[7]
    idlToSdfits_baseline_subtract = sys.argv[8]
    keeptempfiles = sys.argv[9]
    imfiles = sys.argv[10:]
    
    if not imfiles:
        return
    
    sdf_files = []
    for feed in feeds:
        files = []
        for xx in imfiles:
            if 'feed{num}'.format(num=feed) in xx:
                files.append(xx)
        
        if not files:
            continue
            
        sdf = run_idlToSdfits(files, average, channels, display_idlToSdfits,
                   idlToSdfits_rms_flag, verbose, idlToSdfits_baseline_subtract)
        sdf_files.append(sdf)
        
    AIPS.userno=int(sys.argv[1])    # retrieve AIPS pipeline user number
    mydisk=2                        # choose a good default work disk
    baddisk=1                       # list a disk to avoid (0==no avoidance)
    
    AIPSCat().zap()                 # empty the catalog
    
    uvlod=AIPSTask('uvlod')         # Create structures for AIPS tasks
    uvlod.outdisk=mydisk            # write all input data to a select disk
    fittp=AIPSTask('fittp')
    dbcon=AIPSTask('dbcon')
    uvsrt=AIPSTask('uvsrt')
    mandl=AIPSTask('mandl')
    
    # Need a temporary small file to reserve slot 1
    mandl.outdisk = mydisk
    # create an image that will be deleted at end
    mandl.go()
    
    #
    kount = 0                       # init count of similar input files
    
    for thisFile in sdf_files:        # input all AIPS single dish FITS files
        uvlod.datain='PWD:'+thisFile
        print uvlod.datain
        uvlod.outdisk=mydisk
        uvlod.go()
        spectra = AIPSUVData(AIPSCat()[mydisk][-1].name, AIPSCat()[mydisk][-1].klass, mydisk, AIPSCat()[mydisk][-1].seq)
        nuRef    = spectra.header.crval[2]
        if kount == 0:
            firstNu = nuRef
        if ((firstNu - nuRef) < -1.E5) or ((firstNu - nuRef) > 1.E5):
            print 'Frequencies differ: ',nuRef,' != ',firstNu
            spectra.zap()
        else:
            kount = kount+1
    
    spectra = AIPSUVData(AIPSCat()[mydisk][-1].name, AIPSCat()[mydisk][-1].klass, mydisk, AIPSCat()[mydisk][-1].seq)
    
    # prepare to accumulate source names
    allObjects = ["","","","","","","","","","","","","","","","","","","",
                      "","","","","","","","","","","","","","","","","","",""]
    allObjects[0] = spectra.header.object
    nObjects = 1
    
    if kount > 1:            # if more than 1 file DBCON them
    
        # always do first 2
        dbcon.indisk=mydisk
        dbcon.outdisk=mydisk
        dbcon.in2disk=mydisk
        dbcon.inname = AIPSCat()[mydisk][1].name
        dbcon.inclass = AIPSCat()[mydisk][1].klass
        dbcon.inseq = AIPSCat()[mydisk][1].seq
        dbcon.in2name = AIPSCat()[mydisk][2].name
        dbcon.in2class = AIPSCat()[mydisk][2].klass
        dbcon.in2seq = AIPSCat()[mydisk][2].seq
        print 'combining 1: ', dbcon.inname, dbcon.inclass, dbcon.inseq
        print 'combining 2: ', dbcon.in2name, dbcon.in2class, dbcon.in2seq
        dbcon.reweight[1] = 0
#.........这里部分代码省略.........
开发者ID:jfoster17,项目名称:gbt-pipeline,代码行数:103,代码来源:make_sdf_and_dbcon.py

示例4: AIPSUVData

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import in2seq [as 别名]
        # uvdata = AIPSUVData(uvname[i],'WTMOD',2,1)
        uvdata2 = WizAIPSUVData(uvname[i], "UVSUB", indisk, 1)
        uvdata2.header["crval"][4] = pointcenRA
        uvdata2.header.update()
        uvdata2.header["crval"][5] = pointcenDEC
        uvdata2.header.update()
        uvdata.rename(name="COMBO", klass="UV", seq=0)
    if len(uvname) > 1:
        dbapp = AIPSTask("DBAPP")
        uvdata = AIPSUVData("COMBO", "UV", indisk, 1)
        dbapp.inname = "COMBO"
        dbapp.inclass = "UV"
        dbapp.indisk = indisk
        dbapp.inseq = 2
        dbapp.in2seq = len(uvname)
        dbapp.outdata = uvdata
        dbapp.outdisk = indisk
        dbapp.go()

    uvsrt = AIPSTask("UVSRT")
    uvsrt.sort = "TB"
    uvsrt.indata = uvdata
    uvsrt.outdata = uvdata
    uvsrt.outdisk = indisk
    uvsrt.go()

    uvdata.zap_table("CL", 1)
    indxr = AIPSTask("INDXR")
    indxr.indata = uvdata
    indxr.cparm[1] = 360
开发者ID:jradcliffe5,项目名称:multi_self_cal,代码行数:32,代码来源:multi_source_self_cal_v1.2.py

示例5: N

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import in2seq [as 别名]
subim.inclass=AIPSCat()[mydisk][-1].klass
subim.inseq=AIPSCat()[mydisk][-1].seq
subim.outclass='22'
subim.outdi=mydisk
subim.go()

#make a unit image for later use
comb.outdisk=mydisk
comb.indisk=mydisk
comb.inname=AIPSCat()[mydisk][-1].name
comb.inclass=AIPSCat()[mydisk][-1].klass
comb.inseq=AIPSCat()[mydisk][-1].seq
comb.in2disk=mydisk
comb.in2name=AIPSCat()[mydisk][-1].name
comb.in2class=AIPSCat()[mydisk][-1].klass
comb.in2seq=AIPSCat()[mydisk][-1].seq
comb.aparm[1]=1.
comb.aparm[2]=-1.
comb.aparm[3]=1.
comb.opcode='SUM'
comb.outcl='ONE'
comb.go()

#make a N(2,2) image
comb.aparm[1] = cLightKmS*(6./4.)*1.55e14/(restFreq22*restFreq22*1.E-9)
comb.aparm[2] = 1.E-10
comb.aparm[3] = 0
comb.aparm[4] = 0
comb.outcl='N(2,2)'
comb.opcode='SUM'
comb.go()
开发者ID:jfoster17,项目名称:gbt-pipeline,代码行数:33,代码来源:tempNH3_1122.py


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