; $Id: convoltest.pro,v 1.2 2002/01/14 20:59:25 amunter Exp $
pro convolTest,random = random
; This routine is used to debug the
; function HFBS_CONVOL.PRO.
nx = 100
xlo = -5.0 & xhi = 10.0
if n_elements(random) eq 0 then begin
  x = hfbs_makepoints(xlo = xlo,xhi = xhi,npts = nx)
endif else begin
  x = xlo + (xhi-xlo)*randomn(s,nx,/uniform)
endelse
xsort = sort(x)
x = x[xsort]
yfun = hfbs_gaussian(x,area = 2.0,wid = 1.25)
yres = hfbs_gaussian(x,area = 1.0,wid = 0.8); + $
;          hfbs_gaussian(x,area = 0.25,wid = 0.8,cen = 0.85)
yout = hfbs_convol(x,yres,yfun,/double)

centerwindow,xsize = 450,ysize = 400
plot,x,yfun,linestyle = 1,yrange = [0.0,2.0],ystyle = 1
oplot,x,yres,linestyle = 1
oplot,x,yout,psym = 4

end