sdgrd.imsize[2] = imySize ## The above lines set the default image parameters ## Below, override imaging center coordinate # RA #sdgrd.aparm[1] = 04 #hours #sdgrd.aparm[2] = 41 #minutes #sdgrd.aparm[3] = 15.0 #seconds # DEC #sdgrd.aparm[4] = 25 #degrees #sdgrd.aparm[5] = 50 #arcmins #sdgrd.aparm[6] = 00 #arcseconds 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 #print image.header 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
image = AIPSImage(name, 'ICLN', 1, 1) if image.exists(): image.zap() pass assert (not image.exists()) fitld = AIPSTask('fitld') fitld.datain = file fitld.outdata = image fitld.go() assert (image.exists()) try: image = WizAIPSImage(image) parangle = image.keywords['PARANGLE'] image.keywords['PARANGLE'] *= 2 image.keywords['PI'] = math.pi image.keywords['ARRNAM'] = 'EVN' image.keywords.update() image = AIPSImage(image) assert (image.keywords['PARANGLE'] == 2 * parangle) assert (abs(image.keywords['PI'] - math.pi) < 1e-7) arrnam = image.keywords['ARRNAM'] assert (arrnam.strip() == 'EVN') finally: image.zap()