;+
; NAME:
;     QUICK_DPE
; PURPOSE:
;     Show the last few DPE values for checking
; CATEGORY:
; CALLING SEQUENCE:
;     quick_dpe
; INPUTS:
; OPTIONAL (KEYWORD) INPUT PARAMETERS:
;     deltat, the look-back time limit (default 10,000 sec)
; OUTPUTS:
; COMMON BLOCKS:
; SIDE EFFECTS:
; RESTRICTIONS:
; MODIFICATION HISTORY:
;     15-Oct-99, written by HSH with JIK, LF consultation
;      8-Nov-99, fixed UTPLOT mistake (HSH)
;     15-nov-99, (PGS) modified logic test for n_elements(dag_f) gt 0 
;                and n_elements(dag_h)
;     10-jan-99, (PGS) modified file_list to sort on two digit year, y2k.
;     21-Apr-00, (BNH) added a time stamp to the plot and titled the 
;                X-ray flux graph.
;-
pro quick_dpe, deltat=deltat, qstop=qstop
if n_elements(deltat) eq 0 then deltat = 1e4
!p.multi=[0,1,2]
sprs_t = file_list('$DIR_SITE_NEWDATA','spr*',/cd)
sprs   = sprs_t(sort(file2time(sprs_t))) ;y2k (pgs)
nn = n_elements(sprs)
infil = sprs([nn-2,nn-1])
rd_roadmap,infil,rr
if max(int2secarr(rr) gt deltat) then infil = infil(1)
rd_roadmap,infil,rr
fmt_timer,rr,t1,t2,/quiet
dag_f = where(gt_filtb(rr) eq 3 and gt_dp_mode(rr) ne 9 and gt_res(rr) eq 0, num_dag_f) 
dag_h = where(gt_filtb(rr) eq 3 and gt_dp_mode(rr) ne 9 and gt_res(rr) eq 1, num_dag_h) 
if (num_dag_f gt 0) then begin
  utplot,rr(dag_f),gt_dpe(rr(dag_f)),psym=2,$
    title='AlMg DPE values: * = Full, + = Half',xr=[t1,t2],rr(0)
  fem_grid
  if (num_dag_h gt 0) then outplot,rr(dag_h),gt_dpe(rr(dag_h)),psym=1
endif else begin
  utplot,rr(dag_h),gt_dpe(rr(dag_h)),psym=2,title='AlMg DPE values',$
    xr=[t1,t2],rr(0)
endelse
rd_gxd,t1,t2,gxd,/goes10
utplot_io,gxd,gxd.lo,xr=[t1,t2], title = 'GOES X-ray flux'
fem_grid
timestamp
;plot_goes,t1,t2,/quiet,/fem,xr=[t1,t2]
!p.multi=0
if keyword_set(qstop) then stop
end

