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


Python AIPSTask.inname方法代码示例

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


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

示例1: remove_continuum

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

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

示例3: run_dbcon

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

示例4: lwpla

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

示例5: MergeCal

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

示例6: stars

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

示例7: write_fits

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

示例8: greys

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

示例9: make_average_map

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

示例10: average_channels

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

示例11: open

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import inname [as 别名]
#    uvcop.flagver = 2
#    uvcop.outname = src
#    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
开发者ID:DrWhatson,项目名称:eMERLIN_RFI_flagger,代码行数:33,代码来源:apply_flags.py

示例12:

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import inname [as 别名]
#now calcuate channels from channel width
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()
开发者ID:jfoster17,项目名称:gbt-pipeline,代码行数:31,代码来源:sumLine.py

示例13: len

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import inname [as 别名]
subim=AIPSTask('subim')
sqash=AIPSTask('sqash')

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

示例14: len

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import inname [as 别名]
subim=AIPSTask('subim')

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

示例15: AIPSUVData

# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import inname [as 别名]
        # wtmod.indata = uvdata
        # wtmod.aparm[1] = (maxamplitude(uvname[i])**2)*(10**10)
        # wtmod.outdisk = indisk
        # 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()
开发者ID:jradcliffe5,项目名称:multi_self_cal,代码行数:32,代码来源:multi_source_self_cal_v1.2.py


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