function get_pt,xaxis,yaxis,xpoint,ypoint,nohighlight=nohighlight, $
            message=message,noinit=noinit
on_error,2

if keyword_set(message) then print,message else print,'Digitize a point: '

if keyword_set(noinit) eq 0 then tvcrs,.5,.5,/norm ; move cursor to window.
cursor,xpt,ypt,/data            ; digitize the point.
index=value_to_index(xaxis,xpt) ; find the index
xpoint=xaxis(index)             ; get the x and y values of the point.
ypoint=yaxis(index)

if keyword_set(nohighlight) eq 0 then $
  plots,[xpoint,xpoint],[ypoint,ypoint],psym=2,symsize=.5,color=2

return,index
end


misspelled function name "get_pt"? in line:
function use_box_avg,img,bsize,xx,yy,pf