Exemple #1
0
bmaj = image.header.bmaj
#assume no smoothing in convolving function (sdgrd.xtype = -16)
newBmaj = bmaj
if sdgrd.xtype == -12:
    convolveMaj = sdgrd.xparm[2]/3600. # convolving function FWHM in degrees
#Convolved image resolution adds in quadrature
    newBmaj = math.sqrt( (bmaj*bmaj) + (convolveMaj*convolveMaj))
    print 'Gaussian Convolving function:'
    print bmaj*3600., convolveMaj*3600., '->',newBmaj*3600.
if sdgrd.xtype == -16:
#Convolved image resolution adds in quadrature
    newBmaj = bmaj
    print 'Sync Bessel Convolving function FWHM :', newBmaj
image.header.bmaj = newBmaj
image.header.bmin = newBmaj
image.update()                  # This step does not seem to work!
                                # Work-around: write file, update header, read.
## keep track of the latest cube squence for later processing
outseq = AIPSCat()[mydisk][-1].seq

gridType = image.header.ctype[0]

#transfer coordinate back after gridding
print 'Data Coordinate type: ', xType, yType
xlen = len(xType)
if (xlen < 2):
    xType = xType + '-'
if (xlen < 3):
    xType = xType + '-'
if (xlen < 4):
    xType = xType + '-'
Exemple #2
0
sdgrd.aparm[4] = 14
sdgrd.aparm[5] = 31
sdgrd.aparm[6] = 30
# Imsize
sdgrd.imsize[1] = 100
sdgrd.imsize[2] = 110
sdgrd.go()

from Wizardry.AIPSData import AIPSImage as WizAIPSImage
image = WizAIPSImage(AIPSCat()[mydisk][-1].name, \
                     AIPSCat()[mydisk][-1].klass, \
                     mydisk, AIPSCat()[mydisk][-1].seq)

image.header.niter = 1          # Allow down stream IMSTATs to sum correctly
image.header.update()
image.update()

## and write the last thing now in the catalog to disk
fittp.indisk=mydisk
fittp.inname=AIPSCat()[mydisk][-1].name
fittp.inclass=AIPSCat()[mydisk][-1].klass
fittp.inseq=AIPSCat()[mydisk][-1].seq
outimage = os.path.splitext(myfiles[0])[0]+'_cube.fits'
if os.path.exists(outimage):
    os.remove(outimage)
    print 'Removed existing file to make room for new one :',outimage

fittp.dataout='PWD:'+outimage
fittp.go()

print 'Wrote',outimage
bmaj = image.header.bmaj
#assume no smoothing in convolving function (sdgrd.xtype = -16)
newBmaj = bmaj
if sdgrd.xtype == -12:
    convolveMaj = sdgrd.xparm[2] / 3600.  # convolving function FWHM in degrees
    #Convolved image resolution adds in quadrature
    newBmaj = math.sqrt((bmaj * bmaj) + (convolveMaj * convolveMaj))
    print 'Gaussian Convolving function:'
    print bmaj * 3600., convolveMaj * 3600., '->', newBmaj * 3600.
if sdgrd.xtype == -16:
    #Convolved image resolution adds in quadrature
    newBmaj = bmaj
    print 'Sync Bessel Convolving function FWHM :', newBmaj
image.header.bmaj = newBmaj
image.header.bmin = newBmaj
image.update()  # This step does not seem to work!
# Work-around: write file, update header, read.
## keep track of the latest cube squence for later processing
outseq = AIPSCat()[mydisk][-1].seq

gridType = image.header.ctype[0]

#transfer coordinate back after gridding
print 'Data Coordinate type: ', xType, yType
xlen = len(xType)
if (xlen < 2):
    xType = xType + '-'
if (xlen < 3):
    xType = xType + '-'
if (xlen < 4):
    xType = xType + '-'