本文整理汇总了Python中AIPSTask.AIPSTask.outseq方法的典型用法代码示例。如果您正苦于以下问题:Python AIPSTask.outseq方法的具体用法?Python AIPSTask.outseq怎么用?Python AIPSTask.outseq使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AIPSTask.AIPSTask
的用法示例。
在下文中一共展示了AIPSTask.outseq方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: runsplat
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import outseq [as 别名]
def runsplat(uvdata, outchan, tint, sbandl, sbandu, smootha, smoothb, smoothc, indisk):
splat = AIPSTask('SPLAT')
splat.indata = uvdata
splat.outname = uvdata.name
splat.outdisk = indisk
splat.outclass = 'SPLAT'
splat.outseq = uvdata.seq
splat.solint = 0
if outchan != -1 :
aparm1 = 3
splat.channel = uvdata.header['naxis'][2] / outchan
splat.chinc = uvdata.header['naxis'][2] / outchan
if tint != -1 :
splat.solint = tint / 60
splat.bif = sbandl # SBLANL -- Lower sub-band for extraction
splat.eif = sbandu # SBANDU - Upper sub-band for extraction
splat.douvcomp = -1
splat.aparm[1] = 3
splat.aparm[2] = 1
# Smoothing options!?!?
splat.smooth[1] = smootha # 1 = hanning default
splat.smooth[2] = smoothb # 4 = hanning default
splat.smooth[3] = smoothc # 1 = hanning default
splat.flagver = 0
splat.go()
示例2: runtasav
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import outseq [as 别名]
def runtasav(uvdata, fittpdir, fittpfile, indisk):
# Backup the FG tables after flagging
tasav = AIPSTask('TASAV')
tasavfil = AIPSUVData(uvdata.name, 'TASAV', indisk, uvdata.seq)
tasav.indata = uvdata
tasav.outdata = tasavfil
tasav.outseq = uvdata.seq
print "Saving tables for ", uvdata.name, uvdata.klass, uvdata.seq
tasav.go()
runfittp(tasavfil, fittpdir, fittpfile)
tasavfil.zap()
示例3: __init__
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import outseq [as 别名]
def __init__(self, iterNum, **args):
self.iterNum = iterNum
self.args = args
AIPS.userno=self.args["user"]#username
snInit = 0
clInit = 1
AIPSTask.msgkill = -5 #makes the output less verbose
uvdata = AIPSUVData(self.args["name"], 'UVDATA', 1, self.args["inseq"])
cleaninseq = iterNum
imageClean = AIPSImage(self.args["name"], 'ICL001', 1, cleaninseq)
imageDirty = AIPSImage(self.args["name"], 'IBM001', 1, cleaninseq)
imageCleanSC = AIPSImage(self.args["source"], 'ICL001', 1, 1)
imageDirtySC = AIPSImage(self.args["source"], 'IBM001', 1, 1)
flag = AIPSUVData(self.args["name"], 'TASAV', 1, 100)
if uvdata.exists() and iterNum == 1:
print("Data is already present")
ans1 = raw_input('\033[33mDo you want to zap the data (yes/no)? \033[0m').upper()
if ans1 == 'YES':
print("Zapping data and reloading.")
uvdata.clrstat()
uvdata.zap()
fitld = AIPSTask('fitld')
fitld.datain = self.args["dataPath"]
fitld.outname = self.args["name"]
fitld.outseq = self.args["inseq"]
fitld.ncount = self.args["fileCount"]
fitld.doconcat = 1
#fitldFL = AIPSTask("FITLD")
#fitldFL.datain = args["flagPath"]
#fitldFL.outname = self.args["name"]
#fitldFL.outseq = 100
#fitldFL.ncount = 1
#fitldFL.go()
snVers = 0
clVers = 1
fitld.go()
else:
ans2 = raw_input('\033[33mDo you want to zap the tables and images(yes/no)? \033[0m').upper()
if ans2 == 'YES':
print("Zapping tables/images.")
uvdata.clrstat()
uvdata.zap_table('SN', -1)
uvdata.zap_table('FL', -1)
tablesToDelete = 0
for i in uvdata.tables:
if i[1] == 'AIPS CL' and i[0]>tablesToDelete:
tablesToDelete = i[0]
for k in range(tablesToDelete,1,-1):
uvdata.zap_table('CL', k)
snVers = 0
clVers = 1
else:
print("Going direclty to imaging.")
"""
snVers = 0
clVers = 0
for i in uvdata.tables:
if i[1] == 'AIPS SN' and i[0] > snVers:
snVers = i[0]
if i[1] == 'AIPS CL' and i[0] > clVers:
clVers = i[0]
"""
clVers = int(raw_input("What cl table would you like to use? "))
loc = location_finder.Location_finder(clVers, **self.args)
sys.exit()
elif not uvdata.exists():
print("Loading data")
fitld = AIPSTask('fitld')
fitld.datain = self.args["dataPath"]
fitld.outname = self.args["name"]
fitld.outseq = self.args["inseq"]
fitld.ncount = self.args["fileCount"]
fitld.doconcat = 1
fitld.go()
#fitldFL = AIPSTask("FITLD")
#fitldFL.datain = args["flagPath"]
#fitldFL.outname = self.args["name"]
#fitldFL.outseq = 100
#fitldFL.ncount = 1
#fitldFL.go()
snVers = 0
clVers = 1
else:
snVers = 0
clVers = 0
for i in uvdata.tables:
if i[1] == 'AIPS SN' and i[0] > snVers:
snVers = i[0]
if i[1] == 'AIPS CL' and i[0] > clVers:
clVers = i[0]
print("Deleting tables.")
#.........这里部分代码省略.........
示例4: __init__
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import outseq [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]
#.........这里部分代码省略.........