




loadct,0,/s
;stretch,255,0

ycolors2
red=gt_ycolors2(4,0,0)
green=gt_ycolors2(0,3,0)
green3=gt_ycolors2(0,3,0)
blue=gt_ycolors2(0,0,4)
cyan=gt_ycolors2(0,3,4)
orange=gt_ycolors2(4,2,0)
mag=gt_ycolors2(4,0,4)
black=gt_ycolors2(0,0,0)

;red=gt_ycolors2(4,2,0)
;green=gt_ycolors2(0,4,0)
;green3=gt_ycolors2(0,3,0)
;blue=gt_ycolors2(0,4,4)
;cyan=gt_ycolors2(0,0,4)
;orange=gt_ycolors2(4,0,0)


sdaytim='2011/06/03 00:00'
edaytim='2011/06/11 23:59'
trange=[sdaytim, edaytim]

erne=read_erne(sdaytim, edaytim)
sta=read_stereolethet_genx(trange,'sta')
stb=read_stereolethet_genx(trange,'stb')
goes=read_pchan_genx(trange,sat='g13',/five)

restgen,file='wind_epact_201106.genx', str=epact

for eps=0,0 do begin
xs=18
ys=12
outfil='figure0_dif_v1.ps'
pset, xs=xs, ys=ys, eps=eps, outfil=outfil
!p.thick=3
!p.charsize=1.25


ytitle='Proton [cm!U-2!N s!U-1!N sr!U-1!N MeV!U-1!N]'
xtitle='Start Time ('+trange[0]+')'
yrange=[1e-4,1e3]
yr=yrange
utplot_io, trange, yrange, xs=1, timerange=trange, ys=1, yr=yrange,$
           /nodata, ytitle=ytitle, xtitle=xtitle

ttime='2011/06/04 09:00'
outplot,[ttime,ttime],yr, lines=1

target_time='2011/06/04 17:00'
utplot_xyouts, target_time, 2e1, 'SEP1', charsize=1.0, al=0.5

ttime='2011/06/05 01:00'
outplot,[ttime,ttime],yr, lines=1

target_time='2011/06/05 12:00'
utplot_xyouts, target_time, 1.1e2, 'SEP2', charsize=1.0, al=0.6

ttime='2011/06/07 07:30'
outplot,[ttime,ttime],yr, lines=1

target_time='2011/06/07 12:00'
utplot_xyouts, target_time, 2e-1, 'SEP3', charsize=1.0, al=0


!p.linestyle=0

outplot, erne.daytim, erne.ph1, color=green
outplot, sta.daytim, sta.het_pflux[0], color=orange
outplot, stb.daytim, stb.het_pflux[0], color=cyan



;outplot, goes.daytim, smooth(goes.P1E_COR_FLUX,5), color=green
;outplot, goes.daytim, smooth(goes.P2E_COR_FLUX,5), color=green

outplot, goes.daytim, smooth(goes.P3E_COR_FLUX,3), color=red
outplot, goes.daytim, smooth(goes.P4E_COR_FLUX,3), color=blue

outplot, erne.daytim, erne.ph1, color=green, lines=2

outplot, epact.daytim, epact.p19to28, color=black

;outplot, goes.daytim, smooth(goes.P3E_COR_FLUX,3), color=red, lines=0, thick=1
;outplot, goes.daytim, smooth(goes.P4E_COR_FLUX,3), color=blue, lines=0, thick=1

clip_xyouts, 0.60, 0.90, 'GOES/EPEAD: 9-15 MeV', color=red, charsize=1.1
clip_xyouts, 0.60, 0.85, 'GOES/EPEAD: 15-40 MeV', color=blue, charsize=1.1
clip_xyouts, 0.60, 0.80, 'SOHO/ERNE: 13-16 MeV', color=green, charsize=1.1
clip_xyouts, 0.60, 0.75, 'STA/HET: 13.6-15.1 MeV', color=orange, charsize=1.1
clip_xyouts, 0.60, 0.70, 'STB/HET: 13.6-15.1 MeV', color=cyan, charsize=1.1

target_time='2011/06/05 01:00'
utplot_arrow, [target_time, target_time], [4e0,6e-1], thick=5, hsize=400
utplot_xyouts, target_time, 2e0, ' Spike', charsize=1.3




;outplot, goes.daytim, goes.P3E_COR_FLUX-0.005, color=green, psym=1
;outplot, goes.daytim, smooth(goes.P4E_COR_FLUX,5), color=green
;outplot, sta.daytim, sta.het_rebinned_pflux[0]

pend,/display

endfor;



end
