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


Python AIPSTask.inseq方法代码示例

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


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

示例1: remove_continuum

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import inseq [as 别名]
def remove_continuum(outseq):
    trans = AIPSTask("trans")
    imlin = AIPSTask("imlin")

    entry = cat.get_entry(1)  # get SDGRD entry
    img = cat.get_image(entry)
    nChan = round(img.header.naxis[2])

    # transpose image in order to run IMLIN
    trans.indisk = DISK_ID
    trans.outdisk = DISK_ID
    trans.baddisk[1] = BADDISK
    trans.inname = entry.name
    trans.inclass = "SDGRD"
    trans.inseq = outseq
    trans.transc = "312"
    trans.outcl = "trans"
    trans.go()

    # Run imlin task on trans file
    # remove a spectral baseline.  Output image is in Freq-RA-Dec order
    # (Transcod 312)
    imlin.indisk = DISK_ID
    imlin.outdisk = DISK_ID
    imlin.outcl = "IMLIN"
    last = cat.last_entry()
    imlin.inname = last.name
    imlin.inclass = last.klass
    imlin.inseq = last.seq
    imlin.nbox = 2
    # use only the end channels for the default baseline fits
    imlin.box[1][1] = round(nChan * 0.04)  # 4-12%
    imlin.box[1][2] = round(nChan * 0.12)
    imlin.box[1][3] = round(nChan * 0.81)  # 82-89%
    imlin.box[1][4] = round(nChan * 0.89)

    imlin.order = 0  # polynomial order
    print "IMLIN box", imlin.box
    imlin.go()

    # Run transpose again task on sdgrd file produced by IMLIN
    last = cat.last_entry()
    trans.inname = last.name
    trans.inclass = last.klass
    trans.inseq = last.seq
    trans.transc = "231"
    trans.outdi = DISK_ID
    trans.outcl = "baseli"
    trans.go()
开发者ID:nrao,项目名称:gbt-pipeline,代码行数:51,代码来源:image.py

示例2: run_dbcon

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import inseq [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

示例3: time_sort_data

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

示例4: MergeCal

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import inseq [as 别名]
def MergeCal(inUV, err, \
             GCver=1, TYver=1, PCver=1, outVer=0, timeTol=1.0):
    """ Fix up VLBA screwed up calibration

    Merges redundant entries in VLBA GC, TY and PC tables
    Translated from the AIPSish MERGECAL (requires AIPS task TAMRG)
    inUV     = UV data object to fix, MUST be in AIPS format
    err      = Python Obit Error/message stack
    GCver    = Version number of GC table to be fixed.
    TYver    = Version number of TY table to be fixed.
    PCver    = Version number of PC table to be fixed.
    outVer   = Version number of output tables
               (same for all three table types). 
    timeTol  = Tolerance for time comparisons in seconds.
               Records will not be merged if their times differ
               by more than this amount.
    """
    ################################################################
    if inUV.FileType!='AIPS':
        raise RuntimeError,"Can ONLY handle AIPS data"
    # Set up
    tamrg = AIPSTask("tamrg")
    tamrg.inname   = inUV.Aname
    tamrg.inclass  = inUV.Aclass
    tamrg.indisk   = inUV.Disk
    tamrg.inseq    = inUV.Aseq

    # GC table
    tamrg.inext     = "GC"
    tamrg.invers    = GCver
    tamrg.outvers   = outVer
    tamrg.aparm[1:] = [1.,1.,2.,1.,3.,1.,0.,0.,0.,0.]
    tamrg.bparm[1:] = [1.,2.,3.,0.,0.,0.,0.,0.,0.,0.]
    tamrg.cparm[1:] = [0.,0.,0.,0.,0.,0.,0.,0.,0.,0.]
    tamrg.dparm[1:] = [0.,0.,0.,0.,0.,0.,0.,0.,0.,0.]
    tamrg.g
    
    # TY table
    tamrg.inext     = "TY"
    tamrg.invers    = TYver
    tamrg.outvers   = outVer
    tamrg.aparm[1:] = [1.,1.,4.,1.,5.,1.,6.,1.,0.,0.]
    tamrg.bparm[1:] = [1.,3.,4.,5.,6.,0.,0.,0.,0.,0.]
    tamrg.cparm[1:] = [timeTol/(24.*60.*60.),0.,0.,0.,0.,0.,0.,0.,0.,0.]
    tamrg.dparm[1:] = [0.,0.,0.,0.,0.,0.,0.,0.,0.,0.]
    tamrg.g
    
    # PC table
    tamrg.inext     = "PC"
    tamrg.invers    = PCver
    tamrg.outvers   = outVer
    tamrg.aparm[1:] = [1.,1.,4.,1.,5.,1.,6.,1.,0.,0.]
    tamrg.bparm[1:] = [1.,3.,4.,5.,6.,0.,0.,0.,0.,0.]
    tamrg.cparm[1:] = [timeTol/(24.*60.*60.),0.,0.,0.,0.,0.,0.,0.,0.,0.]
    tamrg.dparm[1:] = [0.,0.,0.,0.,0.,0.,0.,0.,0.,0.]
    tamrg.g
开发者ID:kernsuite-debian,项目名称:obit,代码行数:58,代码来源:MergeCal.py

示例5: write_fits

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import inseq [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

示例6: make_average_map

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

示例7: average_channels

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import inseq [as 别名]
def average_channels(binsize):
    if binsize > 1:
        print "Averaging ", binsize, " Spectral Channels"
    else:
        print "Not Averaging Spectral Channels"
        return

    avspc = AIPSTask("avspc")

    last = cat.last_entry()
    spectra = cat.get_uv(last)
    nChan = round(spectra.header.naxis[2])
    print spectra.header.naxis, nChan

    # now average channels to reduce the image plane data volumn
    avspc.indisk = avspc.outdisk = DISK_ID
    avspc.outclass = ""
    avspc.inname = last.name
    avspc.inclass = last.klass
    avspc.inseq = last.seq
    avspc.channel = binsize
    avspc.ichansel[1][1] = 1
    avspc.ichansel[2][1] = nChan
    avspc.ichansel[3][1] = 1
    avspc.avoption = "SUBS"
    avspc.outcl = "avg"
    avspc.go()

    # now have fewer channels, with broader frequencies
    spectra.header.naxis[2] = round(nChan / binsize)  # write back to header
    print "naxis", spectra.header.naxis
    print "cdelt", spectra.header.cdelt
    dNu = spectra.header.cdelt[2]
    dNu = binsize * dNu  # write back to header !!!
    print "cdelt", spectra.header.cdelt, "dNu", dNu, "binsize", binsize

    refChan = spectra.header.crpix[2]
    print "refChan", refChan, "crpix", spectra.header.crpix
    refChan = refChan / binsize  # write back to header !!!
    print "refChan", refChan, "crpix", spectra.header.crpix
    return
开发者ID:nrao,项目名称:gbt-pipeline,代码行数:43,代码来源:image.py

示例8: open

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import inseq [as 别名]
#    uvcop.outclass = 'UVCOPY'
#    uvcop.outseq = 1
#    uvcop.outdisk = 2
#    uvcop.go()

    lev_file = flag_dir+f[:-4]+'pic'
    pf = open(lev_file,'rb')
    lev0 = pic.load(pf)
    lev1 = pic.load(pf)
    pf.close()

    nbas = 21

    clip.inname = src
    clip.inclass = 'UVCOPY'
    clip.inseq = 1
    clip.indisk = 2
    
    # Go through baselines and clip those visibilies that
    # still get through at > 4x the mean clean level 

    for ib in np.arange(1,nbas):
        ant1 = base_ant[ib][0]
        ant2 = base_ant[ib][1]

        clip.antennas[1] = ant1
        clip.antennas[2] = 0

        clip.baseline[1] = ant2
        clip.baseline[2] = 0
开发者ID:DrWhatson,项目名称:eMERLIN_RFI_flagger,代码行数:32,代码来源:apply_flags.py

示例9: AIPSImage

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import inseq [as 别名]
bChan = lineChan - lineWidthChan
eChan = lineChan + lineWidthChan
if bChan < 1:
    bChan = 1
if bChan > nChan:
    bChan = 1
if eChan > nChan:
    eChan = nChan
if eChan < 1:
    eChan = nChan
#Run momnt task
momnt.indisk=mydisk
momnt.outdisk=mydisk
momnt.inname=AIPSCat()[mydisk][-1].name
momnt.inclass='IMLIN'
momnt.inseq=1
momnt.icut=-10000.
momnt.flux=-.00001
momnt.outclass='0'
momnt.cellsize[1] = 0
momnt.cellsize[2] = 0
momnt.blc[1]=bChan
momnt.blc[2]=0
momnt.blc[3]=0
momnt.trc[1]=eChan
momnt.trc[2]=0
momnt.trc[3]=0
momnt.go()

# prepare to zap after the copy
image = AIPSImage( AIPSCat()[mydisk][-1].name, \
开发者ID:jfoster17,项目名称:gbt-pipeline,代码行数:33,代码来源:sumLine.py

示例10: len

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import inseq [as 别名]
for thisFile in myfiles:        # input all AIPS single dish FITS files
    print thisFile
    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
开发者ID:jfoster17,项目名称:gbt-pipeline,代码行数:32,代码来源:imageW51.py

示例11: AIPSUVData

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import inseq [as 别名]
        # wtmod.go()

        # 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
开发者ID:jradcliffe5,项目名称:multi_self_cal,代码行数:33,代码来源:multi_source_self_cal_v1.2.py

示例12: make_cube

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import inseq [as 别名]
def make_cube(args):

    print_header("Making image cube")

    average_channels(args.average)

    sdgrd = AIPSTask("sdgrd")

    # Now make an image using the last entry in the catalog
    sdgrd.indisk = DISK_ID
    sdgrd.outdisk = DISK_ID
    sdgrd.baddisk[1] = BADDISK
    last = cat.last_entry()
    sdgrd.inname = last.name
    sdgrd.inclass = last.klass
    sdgrd.inseq = last.seq
    sdgrd.optype = "-GLS"
    sdgrd.reweight[1] = 0

    spectra = cat.get_uv(last)
    if "center" in args and args.center:
        raDeg, decDeg = args.center
    else:
        raDeg, decDeg = spectra.header.crval[3], spectra.header.crval[4]

    # must break up RA into hours minutes seconds
    hh, mm, ss = ra_deg2hms(raDeg)
    sdgrd.aparm[1] = hh
    sdgrd.aparm[2] = mm
    sdgrd.aparm[3] = ss

    # now break up degrees, but must preserve sign
    decSign = 1
    if decDeg < 0:
        decSign = -1
        decDeg = -1 * decDeg

    hh, mm, ss = dec_deg2hms(decDeg)
    sdgrd.aparm[4] = hh
    sdgrd.aparm[5] = mm
    sdgrd.aparm[6] = ss

    # deal with degrees and/or minutes == 0
    if decSign < 0.0:
        sdgrd.aparm[4] = -1 * sdgrd.aparm[4]
        if sdgrd.aparm[4] == 0:
            sdgrd.aparm[5] = -1 * sdgrd.aparm[5]
            if sdgrd.aparm[5] == 0:
                sdgrd.aparm[6] = -1 * sdgrd.aparm[6]

    print raDeg, decDeg, "->", sdgrd.aparm[1:7]

    # transfer cellsize
    cellsize = round(spectra.header.cdelt[4] * 3600.0)
    sdgrd.cellsize[1] = sdgrd.cellsize[2] = cellsize

    # sdgrd.xtype=-16         # sync/bessel convolving type
    sdgrd.xtype = -12  # gaussian convolving type

    # sync/bessel function parameters
    if sdgrd.xtype == -16:
        sdgrd.xparm[1] = 3.0 * cellsize
        sdgrd.xparm[2] = 2.5 * cellsize
        sdgrd.xparm[3] = 1.5 * cellsize
        sdgrd.xparm[4] = 2
        sdgrd.reweight[2] = 0.01

    # gaussian parameters
    if sdgrd.xtype == -12:
        sdgrd.xparm[1] = 5.0 * cellsize
        sdgrd.xparm[2] = 1.5 * cellsize  # Parameter sets Gaussian FWHM
        sdgrd.xparm[3] = 2
        sdgrd.xparm[4] = 0
        sdgrd.reweight[2] = -1.0e-6

    # always make a circuluar convolving function
    sdgrd.ytype = sdgrd.xtype

    if "size" in args and args.size:
        imxSize, imySize = args.size
    else:
        imxSize = (2 * round(spectra.header.crpix[3] / 1.95)) + 20
        imySize = (2 * round(spectra.header.crpix[4] / 1.95)) + 20

    print "Ra, Dec          : {0}, {1}".format(raDeg, decDeg)
    print "Image size (X,Y) : {0}, {1}".format(imxSize, imySize)
    print "Cell size        : {0}".format(cellsize)

    sdgrd.imsize[1] = imxSize
    sdgrd.imsize[2] = imySize
    sdgrd.go()

    seqno, restFreqHz = update_header(args)
    outcube = write_image_cube(restFreqHz, args.uniqueid)

    return seqno, restFreqHz, outcube
开发者ID:nrao,项目名称:gbt-pipeline,代码行数:98,代码来源:image.py

示例13: len

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

if len(myfiles) > 1:
    # must DBCON

    # 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
开发者ID:jfoster17,项目名称:gbt-pipeline,代码行数:33,代码来源:imNH3-11.py

示例14: dbcon

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import inseq [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


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