本文整理汇总了Python中AIPSTask.AIPSTask.dotv方法的典型用法代码示例。如果您正苦于以下问题:Python AIPSTask.dotv方法的具体用法?Python AIPSTask.dotv怎么用?Python AIPSTask.dotv使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AIPSTask.AIPSTask
的用法示例。
在下文中一共展示了AIPSTask.dotv方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: runkntr
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dotv [as 别名]
def runkntr(image, factor, userno):
imean = AIPSTask('IMEAN')
imean.userid = userno
imean.indata = image
imean()
kntr = AIPSTask('KNTR')
kntr.dogrey = -1
kntr.dovect = -1
kntr.docont = 1
kntr.indata = image
kntr.blc[1:] = 0,0
kntr.trc[1:] = 0,0
# kntr.clev = 3*imean.pixstd
# kntr.levs[1:] = -1,1,2,4,6,8,16,32,64,128
kntr.cbpl = 16
kntr.dotv = -1
kntr.plev = 1
rms = imean.pixstd
peak = image.header.datamax
# Set the kntr levels based on dynamic range
firstlev = factor*abs(rms/peak)*300.
kntr.levs[1] = firstlev * (-1.)
kntr.levs[2] = firstlev
i = 3
while (kntr.levs[i-1]*2. < 100. and i<=30):
kntr.levs[i] = 2 * kntr.levs[i - 1]
i += 1
kntr.go()
示例2: runvplot
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dotv [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()
示例3: runsousp
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dotv [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
示例4: runsnplt
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dotv [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()
示例5: greys
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dotv [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
示例6: runuvplt
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dotv [as 别名]
def runuvplt(indata, sources, stokes, timer, anten, basel, bif, eif, docalib, gainuse, flagver, doband, bpver, aparm, bparm, doweight, refant, dotv):
uvplt = AIPSTask('UVPLT')
uvplt.indata = indata
uvplt.sources = sources
uvplt.stokes = stokes
uvplt.timerang = timer
uvplt.antennas[1:] = anten
uvplt.baseline[1:] = basel
uvplt.bif = bif
uvplt.eif = eif
uvplt.docalib = docalib
uvplt.gainuse = gainuse
uvplt.flagver = flagver
uvplt.doband = doband
uvplt.bpver = bpver
uvplt.aparm[1:] = aparm[1:]
uvplt.bparm[1:] = bparm[1:]
uvplt.doweight = doweight
uvplt.refant = refant
uvplt.dotv = dotv
uvplt.go()
示例7: runuvhgm
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dotv [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 dotv [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 dotv [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: fitld
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dotv [as 别名]
fitld.msgkill = 2
fitld()
assert(uvdata.exists())
tv = AIPSTV()
# Wait a bit to make sure the address used by the AIPS TV can be
# reused again.
time.sleep(30)
try:
tv.start()
uvplt = AIPSTask('uvplt')
uvplt.indata = uvdata
uvplt.dotv = 1
job = uvplt.spawn()
time.sleep(20)
succeed = True
uvplt.abort(job[0], job[1], sig=signal.SIGKILL)
try:
uvdata.zap()
except:
succeed = False
pass
if succeed:
assert("Zapping unexpectedly succeeded")
pass
if not uvdata.exists():
assert("Data unexpectedly disappeared")
示例11: __init__
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dotv [as 别名]
#.........这里部分代码省略.........
calibSelf.in2data = imageClean
calibSelf.indata = uvdata
calibSelf.calsour[1] = self.args["cal"]
calibSelf.docalib = 1
calibSelf.gainuse = clFring
calibSelf.solint = 0.2
calibSelf.soltype = 'L1'
calibSelf.solmode = 'A&P'
if self.args["excludeTelly"]:
calibSelf.antennas[1:] = self.args["excludedTellys"]
calibSelf.ncomp[1] = lastPositive
calibSelf.timer = self.args["time"]
if self.args["doBP"]:
calibSelf.doband = 1
calibSelf.bpver = 1
calibSelf.go()
snVers = snVers + 1
SN = 0
for i in uvdata.tables:
if i[1] == 'AIPS SN' and i[0]>SN:
SN = i[0]
if not SN == snVers:
print("SN = {0} , snVers = {1}".format(SN, snVers))
sys.exit("SN table number missmatch")
print("calibSelf created SN table {0}".format(snVers))
#makes contour plot
kntr = AIPSTask('KNTR')
kntr.indata = imageClean
kntr.levs = AIPSList([-1,1,2,3,4,5,7,10])
kntr.dogrey = -1
kntr.dotv = -1
kntr.dovect = - 1
#kntr.blc[1] = .80*self.args["fitBox"][1]
#kntr.blc[2] = .80*self.args["fitBox"][2]
#kntr.trc[1] = 1.20*self.args["fitBox"][3]
#kntr.trc[2] = 1.20*self.args["fitBox"][4]
kntr.go()
lwmp = AIPSTask('LWPLA')
lwmp.indata = imageClean
lwmp.plver = 1
lwmp.invers = 1
lwmp.outfile = os.getcwd() + '/images_{0}/{1}_time{2}'.format(self.args["date"],self.args["cal"],self.iterNum) + '.ps'
lwmp.go()
print("Running clcal")
clcal.snver = snVers
clcal.inver = snVers
clcal.sources[1] = self.args["cal"]
clcal.calsour[1] = self.args["cal"]
clcal.gainver = clVers
print("clVers = {0}".format(clVers))
clcal.go() #Apply only to cal
clVers = clVers + 1
CL = 0
for i in uvdata.tables:
if i[1] == 'AIPS CL' and i[0]>CL:
CL = i[0]
if not CL == clVers:
sys.exit("CL table number missmatch")
print("clcal created CL table {0}".format(clVers))
示例12: AIPSTask
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dotv [as 别名]
snplt.indata = uvdata
snplt.indisk = indisk
snplt.inext = "SN"
snplt.pixrange[1:] = -180, 180
snplt.invers = i
snplt.nplots = 9
snplt.optype = "PHAS"
if combinIFLLRR == 1:
snplt.opcode = ""
if combinIFLLRR == 2:
snplt.opcode = "ALIF"
if combinIFLLRR == 3:
snplt.opcode = "ALST"
if combinIFLLRR == 4:
snplt.opcode = "ALSI"
snplt.dotv = -1
snplt.go()
clcal.indata = uvdata
clcal.interpol = "AMBG"
clcal.snver = i
clcal.invers = i
clcal.gainver = i
clcal.gainuse = i + 1
clcal.refant = refan
clcal.go()
lwpla = AIPSTask("LWPLA")
lwpla.indata = uvdata
lwpla.indisk = indisk
lwpla.plver = 1
示例13: __init__
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dotv [as 别名]
def __init__(self, clVers, **args):
self.clVers = clVers
self.args = args
self.clVers = 3
AIPS.userno=self.args["user"]
uvdata = AIPSUVData(self.args["name"], 'UVDATA', 1, self.args["inseq"])
t = [] #files t with [day, hour, min, sec, day, hour, min, sec]
with open(self.args["timeList"], 'r') as f:
for l in f.readlines():
t.append(map(str,l.split()[1:9]))
for j in t:
realtime = ''.join([j[i] for i in range(len(j))])[0:7]
imgname = realtime[0:5]
#need to shorten the names for AIPS
imagr = AIPSTask('IMAGR')
imagr.indata = uvdata
imagr.sources[1] = self.args["source"]
imagr.docalib = 1
imagr.gainuse = self.clVers
imagr.bchan = self.args["SCbchan"]
imagr.echan = self.args["SCechan"]
imagr.nchav = (self.args["SCechan"] - self.args["SCbchan"] + 1)
#averages over all channels
if self.args["doBP"]:
imagr.doband = 1
imagr.bpver = 1
if self.args["excludeTelly"]:
imagr.antennas[1:] = self.args["excludedTellys"]
imagr.outname = imgname
imagr.outseq = 1
imagr.cellsize = AIPSList([0.0001,0.0001])
#imagr.imsize = AIPSList([1024,1024])
imagr.imsize = AIPSList([256,256])
imagr.nboxes = 1
imagr.clbox[1] = self.args["fitBox"]
imagr.niter = 1000
imagr.timerang[1:] = [int(j[i]) for i in range(len(j))]#AIPSList(j)
good = True
try:
imagr.go()
except RuntimeError as e:
print("\nSomething went wrong!\n => {0}".format(e))
with open(os.getcwd() + '/images_{0}/badtimes.txt'.format(self.args["date"]), 'a') as out:
out.write("{0}\n".format(imgname))
good = False
if good:
imageClean = AIPSImage(imgname, 'ICL001',1,1)
imageDirty = AIPSImage(imgname, 'IBM001',1,1)
imageClean.clrstat() #makes sure AIPS does not trip
imageDirty.clrstat()
jmfit = AIPSTask('JMFIT')
jmfit.indata = imageClean
jmfit.blc[1] = .80*self.args["fitBox"][1]#fraction to increase box size
jmfit.blc[2] = .80*self.args["fitBox"][2]
jmfit.trc[1] = 1.20*self.args["fitBox"][3]
jmfit.trc[2] = 1.20*self.args["fitBox"][4]
jmfit.niter = 1000
jmfit.doprint = 1 #CHANGED TO doprint!
address = os.getcwd() + '/images_{0}/'.format(self.args["date"]) + realtime
jmfit.fitout = address + '.crd'
jmfit.go()
RA = [None]*4 #holds locations
DEC = [None]*4
with open(address + '.crd', 'r') as f:
for l in f.readlines():
temp = l.split()
#for j in range(len(temp)):
if len(temp)>0:
if temp[0] == 'RA':
RA[0] = int(temp[1])
RA[1] = int(temp[2])
RA[2] = float(temp[3])
RA[3] = float(temp[5])
elif temp[0] =='DEC':
DEC[0] = int(temp[1])
DEC[1] = int(temp[2])
DEC[2] = float(temp[3])
DEC[3] = float(temp[5])
with open(os.getcwd() + '/images_{0}/locations.txt'.format(self.args["date"]), 'a') as out:
out.write("{0}\t{1}\t{2}\t{3:^10}\t{4:^6}\t{5}\t{6}\t{7:^7}\t{8}\n".
format(realtime, RA[0], RA[1], RA[2], RA[3], \
DEC[0], DEC[1], DEC[2], DEC[3]))
#makes contour plot
kntr = AIPSTask('KNTR')
kntr.indata = imageClean
kntr.levs = AIPSList([2,3,4,5,7,10,13,17])
kntr.dogrey = -1
kntr.dotv = -1
kntr.dovect = -1
#kntr.blc[1] .80*self.args["fitBox"][1]
#kntr.blc[2] .80*self.args["fitBox"][2]
#kntr.trc[1] 1.20*self.args["fitBox"][3]
#kntr.trc[2] 1.20*self.args["fitBox"][4]
#.........这里部分代码省略.........
示例14: enumerate
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dotv [as 别名]
for i,t in enumerate([[None,0], [None,0,18,59,30, 1,3,46,30], [None,1,2,1,30, 1,9,0,30], \
[None,1,8,18,30, 1,18,30,0]],start=0):
uvdata.zap_table('PL', -1)
uvplt = AIPSTask('UVPLT')
uvplt.timerang = t
uvplt.indata = uvdata
uvplt.bchan = 1
uvplt.echan = 256
uvplt.nchav = 256
#uvplt.docalib = 1
#uvplt.gainuse = 1
#uvplt.doband = 1
#uvplt.bpver = 1
uvplt.bparm = AIPSList([6, 7])
uvplt.dotv = -1
uvplt.xinc = 20
uvplt.go()
lwpla = AIPSTask('LWPLA')
lwpla.indata = uvdata
lwpla.plver = 1
lwpla.outfile = 'PWD:uvplt_time{0}.ps'.format(i)
lwpla.go()
"""
pwd = os.getcwd()
p = "{0}/uvplt_time*.ps".format(pwd)
print p
call("ps2pdf","uvplt_time*.ps" )
"""
示例15: AIPSTask
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import dotv [as 别名]
#fitld.timer = time
fitld.go()
fring = AIPSTask('FRING')
fring.indata = uvdata
fring.calsour = AIPSList(['J1232-0224'])
fring.docalib = 1
fring.gainuse = 1
fring.timer = time
fring.go()
clcal = AIPSTask('clcal')
clcal.calsour = AIPSList(['J1232-0224'])
clcal.indata = uvdata
clcal.timer = time
clcal.go()
imagr = AIPSTask('IMAGR')
imagr.indata = uvdata
imagr.docal = 1
imagr.gainuse = 2
imagr.sources = AIPSList(['J1232-0224'])
imagr.dotv = 1
imagr.imsize = AIPSList([256,256])
imagr.cellsize = AIPSList([0.0001, 0.0001])
imagr.timer = time
imagr.go()