PRO create_seeing_psf, fwhm, extent, psf ; ; creat an exp(-(r/r0)^(5/3)) seeing PSF ; ; fwhm in unit of pixel ; extent is size of the created array, in unit of fwhm ; psf is the output seeing PSF, with a peak value of 1.0 ; ; for example, if fwhm = 4, extent = 3, then psf will be a 13*13 array ; array_size = fix(fwhm*extent/2.0) *2 +1 cent_pix = fix(fwhm*extent/2.0) psf = fltarr(array_size , array_size) hwhm=fwhm/2.0d r0 = (alog(2.0))^(-3.0/5) * hwhm FOR i=0.0d,array_size-1.0d DO BEGIN FOR j=0.0d,array_size-1.0d DO BEGIN distance = sqrt((i-cent_pix)^2+(j-cent_pix)^2) psf[i,j] = exp(-(distance/r0)^(5.0/3)) ENDFOR ENDFOR end