pro boundary,xy,img,bound

;+
; NAME
;    boundary
; PURPOSE
;    To produce an image illustrating the area sampled by
;    radial_avg.pro
; CALLLING SEQUENCE
;    boundary,xy,img [,bound]
; INPUT PARAMETERS
;    xy, the array describing the selected area from radial_avg.
;    img, the image on which you want to superpose the bounday of
;         the xy region(s).  Must be the same size as the image
;         used in radial_avg to get the xy array.
; OUTPUT
;    img, the image with the boundaries drawn with color=255.
; OPTIONAL OUTPUT
;    bound, the array describing the boundary of xy.
; HISTORY
;    LWA - 6 April 1995
;-

siz=size(img)
temp=bytarr(siz(1),siz(2))
temp(xy)=128
wdef,17,siz(1),siz(2),/ur
tv,temp
ocontour,temp,levels=64,color=200
temp=tvrd()
bound=where(temp eq 200)
img(bound)=255
tvscl,img

end
