本文整理汇总了Python中AIPSTask.AIPSTask.aparm[1]方法的典型用法代码示例。如果您正苦于以下问题:Python AIPSTask.aparm[1]方法的具体用法?Python AIPSTask.aparm[1]怎么用?Python AIPSTask.aparm[1]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AIPSTask.AIPSTask
的用法示例。
在下文中一共展示了AIPSTask.aparm[1]方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: runselfcalib
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import aparm[1] [as 别名]
def runselfcalib(indata, in2data, calsour, timer, uvrang, docalib, gainuse, flagver, doband, bpver, cmethod, refant, solint, aparm, doflag, soltype, solmode, minamper, minphser, cparm, snver, antwt, weightit):
# CALIB procedure for self-calibration
calib = AIPSTask('CALIB')
calib.indata = indata
calib.in2data = in2data
calib.calsour[1:] = calsour
calib.timer[1:] = timer[1:]
calib.uvrange[1:] = uvrang[1:]
calib.docalib = docalib
calib.gainuse = gainuse
calib.flagver = flagver
calib.doband = doband
calib.bpver = bpver
calib.cmethod = cmethod
calib.refant = refant
calib.solint = solint
# calib.aparm[1:] = aparm[1:]
if(solmode == 'P'):
calib.aparm[1] = 3
else:
calib.aparm[1] = 4
calib.aparm[6] = 3
calib.aparm[7] = 5
calib.cparm[1] = 10
calib.doflag = doflag
calib.soltype = soltype
calib.solmode = solmode
calib.minamper = minamper
calib.minphser = minphser
calib.cparm[1:] = cparm[1:]
calib.snver = snver
calib.antwt[1:] = antwt[1:]
calib.weightit = weightit
calib.go()
示例2: runsplat
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import aparm[1] [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()
示例3: float
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import aparm[1] [as 别名]
# 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
clip.stokes = 'RR'
clip.aparm[1] = float(lev0[ib]*4)
clip.aparm[2] = float(lev0[ib]*4)
clip.aparm[3] = 0.0
clip.aparm[4] = 0.0
clip.go()
clip.stokes = 'LL'
clip.aparm[1] = float(lev1[ib]*4)
clip.aparm[2] = float(lev1[ib]*4)
clip.aparm[3] = 0.0
clip.aparm[4] = 0.0
clip.go()
# uvdata = AIPSUVData(src,'UVCOPY',dsk,1)
# uvdata.rename(klass='UVDATA')
示例4:
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import aparm[1] [as 别名]
dNu = nAverage*dNu
refChan = refChan/nAverage
# Now make an image using the last entry in the catalog
sdgrd.indisk=mydisk
sdgrd.outdisk=mydisk
sdgrd.inname=AIPSCat()[mydisk][-1].name
sdgrd.inclass=AIPSCat()[mydisk][-1].klass
sdgrd.inseq=AIPSCat()[mydisk][-1].seq
sdgrd.optype='-GLS'
sdgrd.xtype=-12
sdgrd.ytype=-12
sdgrd.reweight[1] = 0
sdgrd.reweight[2] = 0.025
# must break up RA into hours minutes seconds
sdgrd.aparm[1]=math.floor(raDeg/15.)
sdgrd.aparm[2]=math.floor(((raDeg/15.)-sdgrd.aparm[1])*60.)
sdgrd.aparm[3]=round(((((raDeg/15.)-sdgrd.aparm[1])*60.)-sdgrd.aparm[2])*60.)
#now break up degrees, but must preserve sign
decSign = 1.
if decDeg < 0.:
decSign = -1.
decDeg = -1. * decDeg
sdgrd.aparm[4]=math.floor(decDeg)
sdgrd.aparm[5]=math.floor((decDeg-sdgrd.aparm[4])*60.)
sdgrd.aparm[6]=round((((decDeg-sdgrd.aparm[4])*60.)-sdgrd.aparm[5])*60.)
#now deal with degrees and/or minutes == 0
if decSign < 0.:
sdgrd.aparm[4] = -1. * sdgrd.aparm[4]
if sdgrd.aparm[4] == 0:
示例5: make_cube
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import aparm[1] [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
示例6: imean
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import aparm[1] [as 别名]
imean()
uvsub = AIPSTask('UVSUB') #Divide visibilites by clean model!
uvsub.indata = uvdata
uvsub.nmaps = 1
uvsub.in2data = imagedatacl
uvsub.inver = 1
uvsub.outdisk = 2
uvsub.ncomp[1] = -1000000
uvsub.opcode = 'DIV'
uvsub.go()
uvdata = AIPSUVData(uvname[i],'UVSUB',2,1)
wtmod = AIPSTask('WTMOD') #change weight relative to amplitude adjustments
wtmod.indata = uvdata
wtmod.aparm[1] = (maxamplitude(uvname[i])**2)*(10**10)
wtmod.outdisk = 2
wtmod.go()
uvdata = AIPSUVData(uvname[i],'WTMOD',2,1)
uvdata2 = WizAIPSUVData(uvname[i], 'WTMOD',2,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',2,1)
dbapp.inname = 'COMBO'
dbapp.inclass = 'UV'
示例7: N
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import aparm[1] [as 别名]
subim.inseq=AIPSCat()[mydisk][-1].seq
subim.outclass='22'
subim.outdi=mydisk
subim.go()
#make a unit image for later use
comb.outdisk=mydisk
comb.indisk=mydisk
comb.inname=AIPSCat()[mydisk][-1].name
comb.inclass=AIPSCat()[mydisk][-1].klass
comb.inseq=AIPSCat()[mydisk][-1].seq
comb.in2disk=mydisk
comb.in2name=AIPSCat()[mydisk][-1].name
comb.in2class=AIPSCat()[mydisk][-1].klass
comb.in2seq=AIPSCat()[mydisk][-1].seq
comb.aparm[1]=1.
comb.aparm[2]=-1.
comb.aparm[3]=1.
comb.opcode='SUM'
comb.outcl='ONE'
comb.go()
#make a N(2,2) image
comb.aparm[1] = cLightKmS*(6./4.)*1.55e14/(restFreq22*restFreq22*1.E-9)
comb.aparm[2] = 1.E-10
comb.aparm[3] = 0
comb.aparm[4] = 0
comb.outcl='N(2,2)'
comb.opcode='SUM'
comb.go()