pro dothewarp,results_file,option,oldim,newim,im_title,hardcopy,alpha ; Modified 6/9/97 (B. Rizk) to allow disable windows ; v3 allows run-time control of the cubic-convolution 2D warping parameter ; alpha ; v1 7/29/01 paradoxically the latest of versions 0,1,2,3, it reads and ; fully uses the nwarp parameter from the warping results file openr,ol,results_file,/get_lun readf,ol,nwarp kx=fltarr(nwarp+1,nwarp+1) ky=fltarr(nwarp+1,nwarp+1) readf,ol,kx readf,ol,ky s=size(oldim) numx=s(1) numy=s(2) if hardcopy eq 0 then begin window,0,xsize=numx,ysize=numy,xpos=500,title='Original '+im_title+' image.' p1=congrid(oldim,numx,numy,cubic=-0.6) p1(0,0)=4095 tvscl,p1 endif m=max(oldim)/10. newim = poly_2d(oldim,kx,ky,option,missing=m,cubic=alpha) if hardcopy eq 0 then begin tn=congrid(newim,numx,numy,cubic=-0.6) window,3,xsize=numx,ysize=numy,xpos=800,title='New '+im_title+' image.' tvscl,tn endif close,/all return end