;+
;
; NAME: 
;       PEAK_MARK
;
; PURPOSE:
;
;
; CATEGORY:
;       BATSE
;
; CALLING SEQUENCE:
;
;
; CALLS:
;	none
;
; INPUTS:
;       none explicit, only through commons;
;
; OPTIONAL INPUTS:
;	none
;
; OUTPUTS:
;       none explicit, only through commons;
;
; OPTIONAL OUTPUTS:
;	none
;
; KEYWORDS:
;	none
; COMMON BLOCKS:
;	none
;
; SIDE EFFECTS:
;	none
;
; RESTRICTIONS:
;	none
;
; PROCEDURE:
;	none
;
; MODIFICATION HISTORY:
;
;-
pro peak_mark,peak_time,sec_arr0,abort
;
; Call Cursor procedure to plot a cross bar at the point selected by the
; operator and print the coordinates of this point at the crossbar.
;
; Based on Point.pro by s.k.
;
; Shelby Kennard                         28Feb1991
;****************************************************************************
xi = !x.s
abort = 0
;
; Get x and y window limits.
;
l = !x.window(0)
r = !x.window(1)
b = !y.window(0)
t = !y.window(1)
;
;
;
start:
cursor, x, y, /data
;
; Determine if 'Q' was press. If so, abort.
;
if !err eq 81 or !err eq 113 then begin
    abort = 1
    goto,finish
endif
;
if !err lt 65 or !err gt 122 then begin
    goto,start
endif
;
crossbar, x, y
;
; Determine if x and y values should be printed to the left or right of the
; cross bar.
;
nx = xi(0) + xi(1)*x
offs = .02
if nx gt .65 then offs = -.26
nxo = nx + offs
;
dx = (nxo-xi(0)) / xi(1)
;
cy = string(y)
cy = strtrim(cy,2)
cx = atime(x+sec_arr0,/hxr)
cx = strmid(cx,10,11)
xyouts,dx,y,'('+cx+', '+cy+')',/data
;
peak_time = x
peak_rate = y
;
finish:
;
return&end
