pro ploty, bcs, hxt, sxt, wbs, $
		sxt_filt=sxt_filt, $
		zoom=zoom, option=option, flare=flare, big=big, $
		infil=infil, $
		xmin=xmin, xmax=xmax, psym=psym, sxtpsym=sxtpsym
;
;+
;NAME:
;	ploty
;PURPOSE:
;	To make a light curve plot of all instruments with the same time range
;CALLING SEQUENCE:
;	ploty, bcs, hxt, sxt, wbs
;	ploty, bcs, w_h, sxtp, w_h
;	ploty, brmap, hrmap, srmap, wrmap
;	ploty, '8-may-92 15:00', '8-may-92 18:40'
;	ploty, infil=infil
;	ploty, infil=infil, xmin='15-nov-91 22:20', xmax='15-nov-91 22:45'
;INPUT:
;	bcs	- The BCS roadmap, index or observing log structure array
;	hxt	- The HXT roadmap, index or observing log structure array
;	sxt	- The SXT roadmap, index or observing log structure array
;	wbs	- The WBS roadmap, index or observing log structure array
;OPTIONAL KEYWORD INPUT:
;	zoom	- Allow user to interactively zoom in on time range
;	option	- FUTURE USE - different plotting items
;	flare	- FUTURE USE - only plot flare portion of time range or data
;	sxt_filt- Integer array of 2 filters to plot the light curve for.  Default
;		  is filtb = 2,4 = thin aluminum and Be
;		  Values 1-6 are filter B 1-6, and 11-16 are filter A 1-6
;	infil	- input a sample file name, and it will read the
;		  roadmaps for those files
;	big	- If set and device is 'X' window, make it 900x900
;	xmin	- The starting time to plot
;	xmax	- The ending time to plot
;	psym	- The IDL PLOT PSYM value to use
;HISTORY:
;	Written 7-Jul-92 by M.Morrison
;Ver 1.1 6-Oct-92 (MDM) - Added CLEAR_UTPLOT call and modified header info.
;-
;
strver = 'PLOTY.PRO  Ver 1.1
;
p_save = !p
x_save = !x
y_save = !y
;
!p.charsize = 1.5
!x.style = 1
;
if (keyword_set(infil)) then begin
    break_file, infil, dsk_log, dir, filnam, ext
    fileid = strmid(filnam, 3, 6) + ext
    rd_roadmap, concat_dir(dir, 'wda'+fileid), wbs	& if ((get_nbytes(wbs) le 1) or (n_elements(wbs) le 1)) then return
    rd_roadmap, concat_dir(dir, 'bda'+fileid), bcs	& if ((get_nbytes(bcs) le 1) or (n_elements(bcs) le 1)) then return
    rd_roadmap, concat_dir(dir, 'hda'+fileid), hxt	& if ((get_nbytes(hxt) le 1) or (n_elements(hxt) le 1)) then return
    rd_roadmap, concat_dir(dir, 'spr'+fileid), sxt	& if ((get_nbytes(sxt) le 1) or (n_elements(sxt) le 1)) then return
end
;
siz = size(bcs)
typ = siz( siz(0) + 1)
if (typ eq 7) then begin
    sttim = bcs
    entim = hxt
    rd_obs, sttim, entim, bcs, sxtf, sxt, wbs
    hxt = wbs
end
;
ref_time = wbs(0)
;
xrange = fltarr(2)
xx = [int2secarr(bcs, ref_time), int2secarr(hxt, ref_time), int2secarr(sxt, ref_time), int2secarr(wbs, ref_time)]
xrange(0) = min(xx)
xrange(1) = max(xx)
if (keyword_set(xmin)) then xrange(0) = int2secarr( anytim2ints(xmin), ref_time )
if (keyword_set(xmax)) then xrange(1) = int2secarr( anytim2ints(xmax), ref_time )
xrange0 = xrange
;
if (n_elements(sxt_filt) eq 0) then sxt_filt = [2,4]
if (n_elements(sxtpsym) eq 0) then sxtpsym = -2
if (n_elements(psym) eq 0) then psym = 10
if (keyword_set(big) and (!d.name eq 'X')) then window, xsiz=900, ysiz=900
qhard = 0
qzoom = keyword_set(zoom)
qdone = 0
while (not qdone) do begin
    case keyword_set(option) of
	0: begin
		!p.multi = [0,2,6]
		utplot, hxt, gt_sum_l(hxt, tit=tit), ref_time, xrange=xrange, tit=tit, psym=psym
		;utplot, hxt, gt_sum_m1(hxt, tit=tit), ref_time, xrange=xrange, tit=tit, psym=psym
		utplot, hxt, gt_sum_m2(hxt, tit=tit), ref_time, xrange=xrange, tit=tit, psym=psym
		utplot, hxt, gt_sum_h(hxt, tit=tit), ref_time, xrange=xrange, tit=tit, psym=psym
		;
		utplot, wbs, gt_sxs1(wbs, tit=tit), ref_time, xrange=xrange, tit=tit, psym=psym
		utplot, wbs, gt_hxs(wbs, tit=tit), ref_time, xrange=xrange, tit=tit, psym=psym
		;utplot, wbs, gt_grs1(wbs, tit=tit), ref_time, xrange=xrange, tit=tit, psym=psym
		utplot, wbs, gt_rbmsd(wbs, tit=tit), ref_time, xrange=xrange, tit=tit, psym=psym

		utplot, bcs, gt_total_cnts(bcs, 4, tit=tit), ref_time, xrange=xrange, tit=tit, psym=psym
		utplot, bcs, gt_total_cnts(bcs, 3, tit=tit), ref_time, xrange=xrange, tit=tit, psym=psym
		utplot, bcs, gt_total_cnts(bcs, 2, tit=tit), ref_time, xrange=xrange, tit=tit, psym=psym
		utplot, bcs, gt_total_cnts(bcs, 1, tit=tit), ref_time, xrange=xrange, tit=tit, psym=psym
		;
		y = sxt_lcur(sxt)
		for i=0,1 do begin
		    if (sxt_filt(i) gt 10) then begin
			tit = 'SXT Filter ' + gt_filta(sxt_filt(i), /str)
			ss = where(gt_filta(sxt) eq sxt_filt(i)-10)
		    end else begin
			tit = 'SXT Filter ' + gt_filtb(sxt_filt(i), /str)
			ss = where(gt_filtb(sxt) eq sxt_filt(i))
		    end
		    if (ss(0) ne -1) then utplot, sxt(ss), y(ss), ref_time, xrange=xrange, tit = tit, psym=sxtpsym
		end
	   end
    endcase

    plottime, 0, 0, strver
    plottime

    qdone = 1
    qdone = 1
    qavoid = ((!d.name eq 'PS') and (not qhard))        ;user set device to 'PS' outside of routine
    if (qzoom and (not qavoid)) then begin
        if (qhard) then begin
            lprint
            set_plot, save_dev
            qhard = 0
        end
        ss=plot_lcur(wbs, gt_dp_mode(wbs), ref_tim, /noplot, qblowup=qblowup, qhard=qhard, qreset=qreset, $
										xsel=xsel, ysel=ysel, /nomultiset)
        qdone = (not qhard and not qblowup and not qreset)
        if (qblowup) then xrange=int2secarr(wbs([ss(0), ss(n_elements(ss)-1)]), ref_tim)
        if (qreset) then begin
	    xrange = xrange0
	end
        if (qhard) then begin
            save_dev = !d.name
            set_plot,'ps
            device, /land
        end
    end
end
;
clear_utplot		;MDM added 6-Oct-92
!p = p_save
!x = x_save
!y = y_save
end
