pro quickstray, index_out, data_out, side = side, qstop = qstop, days=days
if n_elements(days) eq 0 then days = -14
if days gt 0 then days = -days
if n_elements(side) eq 0 then side = 512 
wdef,0,side
sfrs=newfiles(/sfr)
infil=sel_filetimes(reltime(days=days),reltime(/now),sfrs)
rd_roadmap,infil,rm
rm1 = rm
ss = where((gt_filta(rm1) eq 2 or gt_filta(rm1) eq 5) $
  and gt_filtb(rm1) eq 1 and $
  gt_percentd(rm1) eq 100 and gt_expmode(rm1) eq 1 and gt_res(rm1) eq 2)
rd_xda,infil,ss,index,data
naban = where(gt_filta(index) eq 2, n_naban)
wdban = where(gt_filta(index) eq 5, n_wdban)
tots = reform(total(total(sxt_decomp(data),1),1))

if n_naban ne 0 then begin
  nagood = where(tots(naban) gt 1e8)
  naother= where(tots(naban) gt 5e7 and tots(naban) lt 1e8, nanumb) ;DMcK 99oct21
endif

if n_wdban ne 0 then begin
  wdgood = where(tots(wdban) gt 3.5e7)
  wdother= where(tots(wdban) gt 2.0e7 and tots(wdban) lt 3.5e7, wdnumb) ;DMcK 99oct21
endif

if n_naban ne 0 then begin
  utplot,index(naban(nagood)),tots(naban(nagood)),index(0),psym=2,$
    yr=[1e8,2e8],tit='Stray light monitor (NABAN)',$
    xr=int2secarr(index)
endif else begin
  utplot,index(wdban(wdgood)),tots(wdban(wdgood)),index(0),psym=-1,$
    yr=[4.5e7,5.5e7],tit='Stray light monitor (WDBAN)',$
    xr=int2secarr(index),lines=1
endelse

index_out = index(wdban(wdgood))
data_out = tots(wdban(wdgood))

;if nanumb ne 0 then $
;  outplot,index(naban(naother)),tots(naban(naother))*1.84,psym=2

;factor = 1.29e8/4.29e7*1.015 ; empirical factor to plot WdBan and NaBan
                             ; on same scale
factor = 3.098  ; updated factor, DMcK 99oct21

;outplot,index(wdban(wdgood)),tots(wdban(wdgood))*factor,psym=1

;if wdnumb ne 0 then $
  outplot,index(wdban(wdother)),tots(wdban(wdother))*1.717*factor,psym=1
; 1.717 is empirical factor to bring two channels of the
; WdBan trifurcation onto the same plotting scale...DMcK 99oct21

timestamp
if n_elements(qstop) ne 0 then stop
end