FUNCTION SOMB,X,Y ;+ ; Z=SOMB(X,Y) ; Computes the sombrero function for the arrays X and Y, ; See Gaskill, page 72. NOTE: Gaskill uses the radius R ; as the input. This function uses the rectulangular arrays ; X and Y. Internally, R is computed from X and Y. ; ; X and Y must be arrays that are of the same size. ; ; USAGE ; Compute X and Y arrays using MESHDOM ; s=FINDGEN(101)/10 -5 ; t=FINDGEN(101)/10 -5 ; MESHDOM,s,t,X,Y ; Z=SOMB(X/2,Y/3) ; SURFACE,Z,X/2,Y/3 ; ; HISTORY ; Written by Harvey Rhody, September 1997 ;- R=SQRT(X^2+Y^2) Z=0.*X I0=WHERE(R EQ 0.) IF MIN(I0) GE 0 THEN Z(I0)=1.0 I1=WHERE(R NE 0.) Z(I1)=2*BESELJ(!PI*R(I1),1)/(!PI*R(I1)) RETURN,Z END