rbsp_efw_init
!rbsp_efw.user_agent = ''
probe = 'a'
date = '2012-10-13'
duration = 1
timespan, date, duration
integration=0
get_support_data = 0
suffix = ''
type='calibrated'
rbsp_load_efw_xspec,$
probe=probe,$
type=type,$
get_support_data=get_support_data,$
integration=integration
rbsp_load_efw_burst_times,probe=probe
options,'rbsp'+probe+'_efw_vb1_available','colors',0
options,'rbsp'+probe+'_efw_vb2_available','colors',0
speclist = tnames('*_xspec*')
rbsp_add_fce2spec,speclist,probe,period=period
suffix = '_fce'
bins = '64'
charsz_plot = 0.8
charsz_win = 1.2
!p.charsize = charsz_win
tplot_options,'xmargin',[20.,15.]
tplot_options,'ymargin',[3,6]
tplot_options,'xticklen',0.08
tplot_options,'yticklen',0.02
tplot_options,'xthick',2
tplot_options,'ythick',2
tplot_options,'labflag',-1
tplot_options,'title','rbsp'+probe +' Xspec - ' + date+mess
tplot,['rbsp'+probe+'_efw_xspec_'+bins+'_xspec0_src1'+suffix,$
'rbsp'+probe+'_efw_xspec_'+bins+'_xspec0_src2'+suffix,$
'rbsp'+probe+'_efw_xspec_'+bins+'_xspec0_phase'+suffix,$
'rbsp'+probe+'_efw_xspec_'+bins+'_xspec0_coh'+suffix,$
'rbsp'+probe+'_efw_vb1_available',$
'rbsp'+probe+'_efw_vb2_available']
tplot_options,'title','rbsp'+probe +' Xspec - ' + date+mess
tplot,['rbsp'+probe+'_efw_xspec_'+bins+'_xspec1_src1'+suffix,$
'rbsp'+probe+'_efw_xspec_'+bins+'_xspec1_src2'+suffix,$
'rbsp'+probe+'_efw_xspec_'+bins+'_xspec1_phase'+suffix,$
'rbsp'+probe+'_efw_xspec_'+bins+'_xspec1_coh'+suffix,$
'rbsp'+probe+'_efw_vb1_available',$
'rbsp'+probe+'_efw_vb2_available']
tplot_options,'title','rbsp'+probe +' Xspec - ' + date+mess
tplot,['rbsp'+probe+'_efw_xspec_'+bins+'_xspec2_src1'+suffix,$
'rbsp'+probe+'_efw_xspec_'+bins+'_xspec2_src2'+suffix,$
'rbsp'+probe+'_efw_xspec_'+bins+'_xspec2_phase'+suffix,$
'rbsp'+probe+'_efw_xspec_'+bins+'_xspec2_coh'+suffix,$
'rbsp'+probe+'_efw_vb1_available',$
'rbsp'+probe+'_efw_vb2_available']
tplot_options,'title','rbsp'+probe +' Xspec - ' + date+mess
tplot,['rbsp'+probe+'_efw_xspec_'+bins+'_xspec3_src1'+suffix,$
'rbsp'+probe+'_efw_xspec_'+bins+'_xspec3_src2'+suffix,$
'rbsp'+probe+'_efw_xspec_'+bins+'_xspec3_phase'+suffix,$
'rbsp'+probe+'_efw_xspec_'+bins+'_xspec3_coh'+suffix,$
'rbsp'+probe+'_efw_vb1_available',$
'rbsp'+probe+'_efw_vb2_available']
old_pcharsize=!p.charsize
!p.charsize=0.6
popen,'RBSP'+strupcase(probe)+'_XSPEC_summary_'+strcompress(date,/remove_all),/port
tplot_options,'title','rbsp'+probe +' Xspec - ' + date+mess
tplot,['rbsp'+probe+'_efw_xspec_'+bins+'_xspec0_src1',$
'rbsp'+probe+'_efw_xspec_'+bins+'_xspec0_src2',$
'rbsp'+probe+'_efw_xspec_'+bins+'_xspec0_phase',$
'rbsp'+probe+'_efw_xspec_'+bins+'_xspec0_coh']+suffix
pclose
!p.charsize=old_pcharsize
end