PRO create_gauss_beam, fwhm, extent, beam ; ; creat gaussian beam ; ; fwhm in unit of pixel ; extent is size of the created array, in unit of fwhm ; beam is the output gaussian beam, with peak value of 1.0 ; ; for example, if fwhm = 4, extent = 3, beam will be a 13*13 array ; array_size = fix(fwhm*extent/2.0) *2 +1 cent_pix = fix(fwhm*extent/2.0) beam = fltarr(array_size , array_size) factor=alog(2.0) hwhm=fwhm/2.0d FOR i=0.0d,array_size-1.0d DO BEGIN FOR j=0.0d,array_size-1.0d DO BEGIN beam[i,j] = exp(-factor*((i-cent_pix)^2+(j-cent_pix)^2)/(hwhm*hwhm)) ENDFOR ENDFOR end