本文整理汇总了Python中AIPSTask.AIPSTask.xparm[2]方法的典型用法代码示例。如果您正苦于以下问题:Python AIPSTask.xparm[2]方法的具体用法?Python AIPSTask.xparm[2]怎么用?Python AIPSTask.xparm[2]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AIPSTask.AIPSTask
的用法示例。
在下文中一共展示了AIPSTask.xparm[2]方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import xparm[2] [as 别名]
#now deal with degrees and/or minutes == 0
if decSign < 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
#sdgrd.aparm[4]=decDeg
#custom edited for Sgr B2 obs
#if cellsize < 2:
#cellsize = 6
sdgrd.cellsize[1] = cellsize
sdgrd.cellsize[2] = cellsize
sdgrd.xparm[1] = 8*cellsize
sdgrd.xparm[2] = 2.5*cellsize
sdgrd.xparm[3] = 2
if imxSize < 10:
imxSize = 150
if imySize < 10:
imySize = 150
sdgrd.imsize[1] = imxSize
sdgrd.imsize[2] = imySize
## The above lines set the default image parameters
## Below override imaging parameters to make uniform images
# RA
sdgrd.aparm[1] = 19
sdgrd.aparm[2] = 23
sdgrd.aparm[3] = 40
# DEC
sdgrd.aparm[4] = 14
示例2:
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import xparm[2] [as 别名]
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:
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:6]
#transfer cellsize
sdgrd.cellsize[1] = cellsize
sdgrd.cellsize[2] = cellsize
# sync/bessel function parameters
sdgrd.xtype=-16
sdgrd.xparm[1] = 4*cellsize
sdgrd.xparm[2] = 2.5*cellsize
sdgrd.xparm[3] = 1.5*cellsize
sdgrd.xparm[4] = 2
# gaussian parameters
sdgrd.xtype=-12
sdgrd.xparm[1] = 4.0*cellsize
sdgrd.xparm[2] = 2.5*cellsize # this parameter sets the gaussian FWHM
sdgrd.xparm[3] = 2
sdgrd.xparm[4] = 0
# always make a circuluar convolving function
sdgrd.ytype=sdgrd.xtype
if imxSize < 30:
imxSize = 50
#prevent error due to large image sizes; temporary
if imxSize > 500:
imxSize = 150
示例3:
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import xparm[2] [as 别名]
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
sdgrd.cellsize[1] = cellsize
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*cellsize
sdgrd.xparm[2] = 2.5*cellsize
sdgrd.xparm[3] = 1.5*cellsize
sdgrd.xparm[4] = 2
sdgrd.reweight[2] = .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.E-6
# always make a circuluar convolving function
sdgrd.ytype=sdgrd.xtype
#prevent error due to large image sizes; temporary
#if imxSize > 700:
# imxSize = 150
示例4: make_cube
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import xparm[2] [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
示例5:
# 需要导入模块: from AIPSTask import AIPSTask [as 别名]
# 或者: from AIPSTask.AIPSTask import xparm[2] [as 别名]
#now deal with degrees and/or minutes == 0
if decSign < 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
#sdgrd.aparm[4]=decDeg
#custom edited for Sgr B2 obs
#if cellsize < 2:
#cellsize = 6
sdgrd.cellsize[1] = cellsize
sdgrd.cellsize[2] = cellsize
sdgrd.xparm[1] = 8*cellsize
sdgrd.xparm[2] = 2*cellsize
sdgrd.xparm[3] = 2
if imxSize < 10:
imxSize = 150
if imySize < 10:
imySize = 150
sdgrd.imsize[1] = imxSize
sdgrd.imsize[2] = imySize
## The above lines set the default image parameters
## Below override imaging parameters to make uniform images
# RA
sdgrd.aparm[1] = 19
sdgrd.aparm[2] = 23
sdgrd.aparm[3] = 40
# DEC
sdgrd.aparm[4] = 14