本文整理汇总了Python中AIPSTask.AIPSTask.sources[1:]方法的典型用法代码示例。如果您正苦于以下问题:Python AIPSTask.sources[1:]方法的具体用法?Python AIPSTask.sources[1:]怎么用?Python AIPSTask.sources[1:]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AIPSTask.AIPSTask
的用法示例。
在下文中一共展示了AIPSTask.sources[1:]方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: runvplot
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import sources[1:] [as 别名]
def runvplot(indata, sources, stokes, timer, anten, basel, bif, eif, bchan, echan, docalib, gainuse, flagver, doband, bpver, aparm, bparm, refant, dotv, nplots):
vplot = AIPSTask('VPLOT')
vplot.indata = indata
vplot.sources[1:] = sources
vplot.stokes = stokes
vplot.timerang[1:] = timer
vplot.antennas[1:] = anten
vplot.baseline[1:] = basel
vplot.bchan = bchan
vplot.echan = echan
vplot.avgchan = 1
vplot.bif = bif
vplot.eif = eif
vplot.docalib = docalib
vplot.gainuse = gainuse
vplot.flagver = flagver
vplot.doband = doband
vplot.bpver = bpver
vplot.aparm[1:] = aparm
vplot.bparm[1:] = bparm
vplot.crowded = 0
vplot.refant = refant
vplot.dotv = dotv
vplot.xinc = 1
vplot.nplots = nplots
vplot.go()
示例2: runsousp
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import sources[1:] [as 别名]
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
示例3: rungetjy
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import sources[1:] [as 别名]
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()
示例4: runsetjy
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import sources[1:] [as 别名]
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()
示例5: runsnplt
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import sources[1:] [as 别名]
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()
示例6: runclcal
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import sources[1:] [as 别名]
def runclcal(indata, sources, calsour, opcode, interpol, snver, inver, gainver, gainuse, refant):
clcal = AIPSTask('CLCAL')
clcal.indata = indata
clcal.sources[1:] = sources
clcal.calsour[1:] = calsour
clcal.opcode = opcode
clcal.interpol = interpol
clcal.snver = snver
clcal.inver = inver
clcal.gainver = gainver
clcal.gainuse = gainuse
clcal.refant = refant
clcal.go()
示例7: runuvhgm
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import sources[1:] [as 别名]
def runuvhgm(indata, sources, anten, basel, SEFDbif, SEFDeif, SEFDbchan, SEFDechan):
uvhgm = AIPSTask('UVHGM')
uvhgm.indata = indata
uvhgm.sources[1:] = sources
uvhgm.antennas[1:] = anten
uvhgm.baseline[1:] = basel
uvhgm.bif = SEFDbif
uvhgm.eif = SEFDeif
uvhgm.flagver = 0
uvhgm.stokes ='HALF'
uvhgm.bchan = SEFDbchan
uvhgm.echan = SEFDechan
uvhgm.doall = 1
uvhgm.axtype ='H'
uvhgm.timerang[1:] = 0, 0, 0, 0, 0, 0, 0, 0
# uvhgm.timerang[1:] = 0, 0, 0, 0, 3, 0, 0, 0
# uvhgm.pixrange[1:] = -20, 20
uvhgm.dotv = -1
uvhgm.docal = 1
uvhgm.gainuse = 0
uvhgm.pixrange[1:] = -10, 10
uvhgm.doband = -1
uvhgm.nboxes = 1000
uvhgm.go()
示例8: runimagr
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import sources[1:] [as 别名]
def runimagr(indata, sources, docalib, gainuse, flagver, doband, bpver, bchan, echan, nchav, chinc, cellsiz, imsiz, niter, dotv, outdisk):
imagr = AIPSTask('IMAGR')
imagr.indata = indata
imagr.sources[1:] = sources
source = str(sources[0])
if len(source)>12 :
source = source[0:12]
imagr.outname = source
imagr.outdisk = outdisk
imagr.docalib = docalib
imagr.gainuse = gainuse
imagr.flagver = flagver
imagr.doband = doband
imagr.bpver = bpver
imagr.bchan = bchan
imagr.echan = echan
imagr.nchav = nchav
imagr.chinc = chinc
imagr.cellsize[1:] = cellsiz
imagr.imsize[1:] = imsiz
imagr.niter = niter
imagr.dotv = dotv
imagr.inp()
imagr.go()
示例9: runpossm
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import sources[1:] [as 别名]
def runpossm(indata, sources, timer, anten, basel, aparm, bparm, bif, eif, docalib, gainuse, flagver, stokes, doband, bpver, codetype, solint, nplots, dotv, freqid):
possm = AIPSTask('POSSM')
possm.indata = indata
possm.sources[1:] = sources
possm.timer[1:] = timer
possm.aparm[1:] = aparm[1:]
possm.aparm[9] = 1
possm.bparm[1:] = bparm[1:]
possm.antennas[1:] = anten
possm.baseline[1:] = basel
possm.bif = bif
possm.eif = eif
possm.docalib = docalib
possm.gainuse = gainuse
possm.flagver = flagver
possm.stokes = stokes
possm.doband = doband
possm.bpver = bpver
possm.codetype = codetype
possm.solint = solint
possm.nplots = nplots
possm.dotv = dotv
possm.freqid = 1
possm.go()
示例10: flagmask
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import sources[1:] [as 别名]
def flagmask(uvdata):
"Function to apply flags from a mask of known bad frequencies, derived by the e-MERLIN team."
afile = 'flagmask512.fg'
if os.path.isfile(afile) :
flagfile = open(afile, "r")
else :
print "Error:" + afile + "does not exist, don't know what to flag."
print "Error: If you do not have this file, ask the e-MERLIN team."
sys.exit()
start = 0
space = re.compile(r'\s')
newline = re.compile(r'\n')
uvflg = AIPSTask('UVFLG')
fqtab=uvdata.table('FQ',1)
band_strt = uvdata.header.crval[2]
nchan = uvdata.header.naxis[2]
if uvdata.header.naxis[3] > 1:
ifstep = fqtab[0].total_bandwidth[0]
band_stop = uvdata.header.crval[2] + (len(fqtab[0].total_bandwidth) * ifstep)
chan_wdth = fqtab[0].total_bandwidth[0] / nchan
else:
ifstep = fqtab[0].total_bandwidth
band_stop = uvdata.header.crval[2] + ifstep
chan_wdth = fqtab[0].total_bandwidth / nchan
for line in flagfile:
line = newline.sub(r'', line)
if start == 0:
print line
if line == "***BEGIN*PASS***":
start = 1
elif line == "***END*PASS***":
print line
start = 0
elif start == 1:
freq1 = float(space.sub(r'', line[87:98]))
#print freq1, band_strt, band_stop, chan_wdth, ifstep
if (freq1 >= band_strt) and (freq1 <= band_stop):
ant1 = int(space.sub(r'', line[50:52]))
if uvdata.header.naxis[3] > 1:
ifs1 = int( 1 + ((freq1 - uvdata.header.crval[2]) / ifstep) )
chans1 = int( (freq1 - (band_strt + (ifstep * (ifs1 - 1)))) / chan_wdth)
else:
ifs1 = 1
chans1 = int( (freq1 - band_strt) / chan_wdth)
start = 2
print line[0:49], str(ant1).rjust(2), line[53:76], str(ifs1).rjust(2), line[81:86], str(chans1).rjust(12), line[99:140]
pass
elif start == 2:
freq2 = float(space.sub(r'', line[87:98]))
if (freq2 >= band_strt) and (freq2 <= band_stop):
ant2 = int(space.sub(r'', line[50:52]))
if uvdata.header.naxis[3] > 1:
ifs2 = int( 1 + ((freq2 - uvdata.header.crval[2]) / ifstep) )
chans2 = int( (freq2 - (band_strt + (ifstep * (ifs2 - 1)))) / chan_wdth)
if chans2 == 0:
chans2 = nchan
else:
ifs2 = 1
chans2 = int( (freq2 - band_strt) / chan_wdth)
# Deal with commands which cross a band edge
if chans2 < chans1 :
print line[0:49], str(ant2).rjust(2), line[53:76], str(ifs1).rjust(2), line[81:86], str(nchan).rjust(12), line[99:140]
print line[0:49], str(ant1).rjust(2), line[53:76], str(ifs2).rjust(2), line[81:86], str(1).rjust(12), line[99:140]
print line[0:49], str(ant2).rjust(2), line[53:76], str(ifs2).rjust(2), line[81:86], str(chans2).rjust(12), line[99:140]
uvflg.indata = uvdata
uvflg.sources[1:] = ''
uvflg.timerang[1:] = 0,0,0,0,999,23,59,59
uvflg.bchan = chans1
uvflg.echan = nchan
uvflg.bif = ifs1
uvflg.eif = ifs1
uvflg.antennas[1] = ant1
uvflg.baseline[1] = ant2
uvflg.opcode = 'FLAG'
uvflg.reason = 'e-MERLIN flag mask'
uvflg.go()
uvflg.indata = uvdata
uvflg.sources[1:] = ''
uvflg.timerang[1:] = 0,0,0,0,999,23,59,59
uvflg.bchan = 1
uvflg.echan = chans2
uvflg.bif = ifs2
uvflg.eif = ifs2
uvflg.antennas[1] = ant1
uvflg.baseline[1] = ant2
uvflg.opcode = 'FLAG'
uvflg.reason = 'e-MERLIN flag mask'
#.........这里部分代码省略.........