FUNCTION wimtf,n ;produces convolution window MTF*Wiener to degrade the WL resolution ;down to the IR one ; PARAMETERS ------------------------------------------------------------ ; n= SIZE (pixels in x,y) OF ARRAY STP=0.1658 ; STEP OF RESTORED IMAGES (arcsec/pix) lambda=1.5542d-4 ; WORKING WAVELENGTH (cm) d=49. ; d = DIAMETER OF THE TELESCOPE (cm) cc=20. ; Wiener filter parameter C ; 1-D calculation ------------------------------------------------------- mtf=dblarr(n) c=lambda*2.06265d5/(d*n*STP) ss=0 for i=1,n do begin omega=c*(i-1) if omega lt 1.d0 then begin TT=acos(omega)-omega*sqrt(1.-omega^2) endif else begin ss=ss+1 if ss eq 1 then print,'cutoff: ',i-1 tt=0.d0 endelse mtf(i-1)=2.*tt/3.141592654d0 endfor ; creating the 1-D Wiener filter ---------------------------------------- t1=(cc+1)*mtf/(cc*mtf*mtf+1) t1=float(t1*mtf) ; multiplying Wiener filter with MTF ; transition to 2-D --------------------------------------- t=fltarr(n,n) f1=fltarr(n/2+1,n/2+1) cros0=min(where(t1 le 0)) ; zero crossing point of t1, ; i.e. we can compute only for j=0,cros0 do begin ; the non-zero part. The rest for i=0,cros0 do begin ; are zeros by definition. ii=float(i) jj=float(j) r=sqrt(ii*ii+jj*jj) r1=fix(r) if r1 ge cros0 then begin f1(i,j)=0. endif else begin f1(i,j)=t1(r1)+(t1(r1+1)-t1(r1))*(r-r1) endelse endfor endfor f2=reverse(f1(1:n/2-1,*),1) t(0:n/2,0:n/2)=f1 ; t - 2-D filter t(n/2+1:n-1,0:n/2)=f2 t(n/2+1:n-1,n/2+1:n-1)=reverse(f2(*,1:n/2-1),2) t(0:n/2,n/2+1:n-1)=reverse(f1(*,1:n/2-1),2) RETURN,t END