thm_esa_specmom_calc,date='2007-06-17',dur=2,probe='b',mtypes='spectrogram velocity density temperature', $
distribution_type='full',species='ion'
tplot_names
tplot,['thb_peif_en_eflux','thb_peif_density','thb_peif_velocity_dsl','thb_peif_T_dsl']
thm_esa_specmom_calc,date='2007-06-17',dur=2,probe='c',mtypes='spectrogram velocity density temperature', $
distribution_type='burst',species='electron'
tplot_names
tplot,['thc_peeb_en_eflux','thc_peeb_density','thc_peeb_velocity_dsl','thc_peeb_T_dsl']
thm_esa_specmom_calc,date='2007-06-17',dur=2,probe='a',mtypes='spec vel den temp',dist='f',sp='i'
tplot_names
tplot,['tha_peif_en_eflux','tha_peif_density','tha_peif_velocity_dsl','tha_peif_T_dsl']
startdate = '2007-06-17/0:00'
t1=time_double(startdate)
ndays=2
t2=t1+ndays*24.*3600.
timespan,startdate,ndays
sc='a'
scc=sc
thm_load_state,probe=scc
thm_load_esa_pkt,probe=scc
typ='f'
if typ eq 'f' then gap_time=1000. else gap_time=10.
sheath=1
nmax=100.
emin=15
thm_cotrans,strjoin('th'+sc+'_state_pos'),in_coord='gei',out_coord='gse',out_suf='_gse'
get_data,strjoin('th'+sc+'_state_pos_gse'),data=tmp
store_data,'th'+sc+'_state_pos_gse_x',data={x:tmp.x,y:tmp.y(*,0)/6370.}
options,'th'+sc+'_state_gse_pos_x','ytitle','th'+sc+'_X-GSE'
store_data,'th'+sc+'_state_pos_gse_y',data={x:tmp.x,y:tmp.y(*,1)/6370.}
options,'th'+sc+'_state_pos_gse_y','ytitle','th'+sc+'_Y-GSE'
store_data,'th'+sc+'_state_pos_gse_z',data={x:tmp.x,y:tmp.y(*,2)/6370.}
options,'th'+sc+'_state_pos_gse_z','ytitle','th'+sc+'_Z-GSE'
get_dat='th'+sc+'_pei'+typ
name1='th'+sc+'_pei'+typ+'_en_eflux'
thm_get_en_spec,get_dat,units='eflux',retrace=1,name=name1,gap_time=gap_time,t1=t1,t2=t2
zlim,name1,1.e3,1.e7,1
ylim,name1,3.,40000.,1
options,name1,'ztitle','Eflux !C!C eV/cm!U2!N-s-sr-eV'
options,name1,'ytitle','i+ th'+sc+'!C!C eV'
options,name1,'spec',1
options,name1,'x_no_interp',1
options,name1,'y_no_interp',1
name1='th'+sc+'_pei'+typ+'_density'
thm_get_2dt,'n_3d_new',get_dat,name=name1,gap_time=gap_time,t1=t1,t2=t2,energy=[20.,21000.]
ylim,name1,.1,nmax,1
options,name1,'ytitle','Ni th'+sc+'!C!C1/cm!U3'
name1='th'+sc+'_pei'+typ+'_velocity_dsl'
thm_get_2dt,'v_3d_new',get_dat,name=name1,gap_time=gap_time,t1=t1,t2=t2,energy=[20.,21000.]
get_data,name1,data=d,dlimits=a
cotrans_set_coord,a,'dsl'
store_data,name1,data=d,dlimits=a
ylim,name1,-500,500.,0
ylim,name1,-200,200.,0
if sheath then ylim,name1,-500,200.,0
options,name1,'ytitle','Vi th'+sc+'!C!Ckm/s'
options,name1,labels=['Vi!dx!n', 'Vi!dy!n', 'Vi!dz!n'],constant=0.
name1='th'+sc+'_pei'+typ+'_T_dsl'
thm_get_2dt,'t_3d_new',get_dat,name=name1,gap_time=gap_time,t1=t1,t2=t2,energy=[20.,21000.]
get_data,name1,data=d,dlimits=a
cotrans_set_coord,a,'dsl'
store_data,name1,data=d,dlimits=a
ylim,name1,100,10000.,1
if sheath then ylim,name1,10,10000.,1
options,name1,'ytitle','Ti th'+sc+'!C!CeV'
tplot,['th'+sc+'_pei'+typ+'_en_eflux','th'+sc+'_pei'+typ+'_density','th'+sc+'_pei'+typ+'_velocity_dsl','th'+sc+'_pei'+typ+'_T_dsl'],$
title='Themis',var_label=['th'+sc+'_state_pos_x','th'+sc+'_state_pos_y','th'+sc+'_state_pos_z']
get_dat='th'+sc+'_pee'+typ
name1='th'+sc+'_pee'+typ+'_en_eflux'
thm_get_en_spec,get_dat,units='eflux',retrace=1,name=name1,gap_time=gap_time,t1=t1,t2=t2
zlim,name1,1.e5,1.e9,1
ylim,name1,3.,40000.,1
options,name1,'ztitle','Eflux !C!C eV/cm!U2!N-s-sr-eV'
options,name1,'ytitle','e- th'+sc+'!C!C eV'
options,name1,'spec',1
options,name1,'x_no_interp',1
options,name1,'y_no_interp',1
name1='th'+sc+'_pee'+typ+'_density'
thm_get_2dt,'n_3d_new',get_dat,name=name1,gap_time=gap_time,t1=t1,t2=t2,energy=[emin,27000.]
ylim,name1,.1,nmax,1
options,name1,'ytitle','Ne th'+sc+'!C!C1/cm!U3'
name1='th'+sc+'_pee'+typ+'_velocity_dsl'
thm_get_2dt,'v_3d_new',get_dat,name=name1,gap_time=gap_time,t1=t1,t2=t2,energy=[emin,27000.]
get_data,name1,data=d,dlimits=a
cotrans_set_coord,a,'dsl'
store_data,name1,data=d,dlimits=a
ylim,name1,-500,500.,0
ylim,name1,-200,200.,0
if sheath then ylim,name1,-500,200.,0
options,name1,'ytitle','Ve th'+sc+'!C!Ckm/s'
options,name1,labels=['V!dex!n', 'V!dey!n', 'V!dez!n'],constant=0.
name1='th'+sc+'_pee'+typ+'_T_dsl'
thm_get_2dt,'t_3d_new',get_dat,name=name1,gap_time=gap_time,t1=t1,t2=t2,energy=[emin,27000.]
get_data,name1,data=d,dlimits=a
cotrans_set_coord,a,'dsl'
store_data,name1,data=d,dlimits=a
ylim,name1,100,10000.,1
if sheath then ylim,name1,10,10000.,1
options,name1,'ytitle','Te th'+sc+'!C!CeV'
tplot,['th'+sc+'_pee'+typ+'_en_eflux','th'+sc+'_pee'+typ+'_density','th'+sc+'_pee'+typ+'_velocity_dsl','th'+sc+'_pee'+typ+'_T_dsl'],$
title='Themis',var_label=['th'+sc+'_state_pos_gse_x','th'+sc+'_state_pos_gse_y','th'+sc+'_state_pos_gse_z']
timespan,'2007-07-01'
thm_load_esa,probe='b'
thm_load_esa,probe=['c','d'],coord='gse'
thm_load_esa,probe='a',varformat='*density*'
thm_load_esa,probe='a b d',coord='gse dsl'
end