;+
; NAME:
;     QUICKSTRAY
; PURPOSE:
;     look at last few days of SLS data for new leaks
; CATEGORY:
; CALLING SEQUENCE:
;     main program
; INPUTS:
; OPTIONAL (KEYWORD) INPUT PARAMETERS:
; OUTPUTS:
; COMMON BLOCKS:
; SIDE EFFECTS:
;     makes a plot in the current window
; RESTRICTIONS:
; MODIFICATION HISTORY:
;     5-mar-98, written (HSH)
;    18-jul-98, converted to procedure (HSH)
;    13-aug-98, changed hard paths to environment paths (DA)
;    22-aug-98, revised same (HSH)
;-
pro quickstray, side = side
if n_elements(side) eq 0 then side = 512
wdef,0,side
;infil = findfile('/yd3/reformat/sfr*')
;infil = findfile('$DIR_GEN_NEWDATA/sfr*')
infil = findfile('$DIR_SITE_NEWDATA*/sfr*')
tstart = anytim2ints(!stime,offset=-3600.*14*24)
rd_roadmap,infil,rm
tt = tim2dset(rm,tstart)
rm1 = rm
ss = where(gt_filta(rm1) eq 2 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
utplot,index,reform(total(total(sxt_decomp(data),1),1)),psym=-1,$
  lines=1,yr=[4e7,2e8],tit='Recent stray-light level'
timestamp
end
