compile_opt idl2
thm_init
timespan,'2007-03-23'
thm_load_state,probe='c',coord='gsm',suffix='_gsm'
ttrace2iono,'thc_state_pos_gsm',newname='thc_ifoot_gsm',external_model='t89',par=2.0D,/km
ttrace2equator,'thc_state_pos_gsm',newname='thc_efoot_gsm',external_model='t89',par=2.0D,/km
tplot_options, 'xmargin', [15, 5]
tplot,['thc_state_pos_gsm','thc_ifoot_gsm','thc_efoot_gsm'], title = 'Themis C position & footprints'
stop
del_data,'*'
thm_load_state,probe='c',coord='geo'
ttrace2iono,'thc_state_pos',newname='thc_ifoot',external_model='t89',par=2.0D,/km,in_coord='geo',out_coord='geo'
xyz_to_polar,'thc_ifoot'
get_data,'thc_ifoot_phi',data=d
i_lon=d.y
get_data,'thc_ifoot_th',data=d
i_lat=d.y
thm_map_set,central_lon=i_lon[400],central_lat=i_lat[400],xsize=700,ysize=400
plots,i_lon,i_lat
stop
del_data,'*'
device,decomposed=0
loadct2,43
thm_load_state,probe='c',coord='gsm'
tKm2Re,'thc_state_pos',/replace
ttrace2equator,'thc_state_pos',newname='thc_efoot',external_model='t89',par=2.0D,in_coord='gsm',out_coord='gsm'
tplotxy,'thc_state_pos',multi='2 2',versus='xryr', xtitle = 'Re', ytitle = 'Re',title='x vs y, pos and e-foot',window=0,xsize=1000,ysize=1000,wtitle='position & footprint plots'
tplotxy,'thc_efoot',versus='xryr',/overplot,linestyle=2,/isotropic
tplotxy,'thc_state_pos',/add,versus='yrz', xtitle = 'Re', ytitle = 'Re',/isotropic,title='y vs z, pos and e-foot'
tplotxy,'thc_efoot',versus='yrz',/overplot,linestyle=2,/isotropic
tplotxy,'thc_state_pos',/add,versus='xrz', xtitle = 'Re', ytitle = 'Re',/isotropic,title='x vs z, pos and e-foot'
tplotxy,'thc_efoot',versus='xrz',/overplot,linestyle=2,/isotropic
stop
t = replicate(time_double('2007-03-23/11:00:00'), 18)
x = -1*(dindgen(18)+2)^2
y = replicate(0D,18)
z = replicate(0D,18)
v = [[x], [y], [z]]
str = {x:t, y:v}
store_data, 'trace_data', data = str
ttrace2iono,'trace_data',trace_var_name = 'trace_n', newname='thc_ifoot',external_model='t89',par=2.0D,in_coord='gsm',out_coord='gsm'
ttrace2iono,'trace_data',trace_var_name = 'trace_s', newname='thc_ifoot',external_model='t89',par=2.0D,in_coord='gsm',out_coord='gsm', /south
timespan,'2007-03-23/10:00:00',2,/hour
tplotxy,'thc_state_pos',/add, versus = 'xrz', xtitle = 'Re', ytitle = 'Re',title = 'fields x vs z',xrange=[-10,-4],yrange=[-6,4]
tplotxy,'thc_efoot', versus = 'xrz', /overplot, linestyle = 5
tplotxy, 'trace_n', versus = 'xrz', /overplot, linestyle = 2
tplotxy, 'trace_s', versus = 'xrz', /overplot, linestyle = 2
stop
timespan, '2010-07-30',1,/day
thm_load_state,probe='c',coord='gsm'
kyoto_load_dst
wi_mfi_load
wi_3dp_load
cotrans,'wi_h0_mfi_B3GSE','wi_b3gsm',/GSE2GSM
get_tsy_params,'kyoto_dst','wi_b3gsm','wi_3dp_k0_ion_density','wi_3dp_k0_ion_vel','T96'
timespan,'2010-07-30/12:00:00',30,/minute
time_clip,'thc_state_pos','2010-07-30/12:00:00','2010-07-30/12:30:00',newname='pos_clipped'
ttrace2iono,'pos_clipped',newname='thc_ifoot_gsm',external_model='t96',par='t96_par',/km
tplot,['pos_clipped','thc_ifoot_gsm'], title = 'Themis C position & footprints'
stop
tplotxy,'pos_clipped',multi='2,1',title='thc_state_pos',versus='xrz',xtitle='X(km)',ytitle='Z(km)',xsize=1000,ysize=500,window=2
tplotxy,'thc_ifoot_gsm',/add,title='thc_ifoot_gsm',versus='xrz',xtitle='X(km)',ytitle='Z(km))'
stop
get_tsy_params,'kyoto_dst','wi_b3gsm','wi_3dp_k0_ion_density','wi_3dp_k0_ion_vel','T01'
ttrace2iono,'pos_clipped',newname='thc_ifoot_gsm',external_model='t01',par='t01_par',/km
tplot,['thc_ifoot_gsm','pos_clipped']
stop
tplotxy,'pos_clipped',multi='2,1',title='thc_state_pos',versus='xrz',xtitle='X(km)',ytitle='Z(km)',xsize=1000,ysize=500,window=2
tplotxy,'thc_ifoot_gsm',/add,title='thc_ifoot_gsm',versus='xrz',xtitle='X(km)',ytitle='Z(km)'
stop
get_tsy_params,'kyoto_dst','wi_b3gsm','wi_3dp_k0_ion_density','wi_3dp_k0_ion_vel','T04s'
ttrace2iono,'pos_clipped',newname='thc_ifoot_gsm',external_model='t04s',par='t04s_par',/km
tplot,['thc_ifoot_gsm','pos_clipped']
stop
tplotxy,'pos_clipped',multi='2,1',title='thc_state_pos',versus='xrz',xtitle='X(km)',ytitle='Z(km)',xsize=1000,ysize=500,window=2
tplotxy,'thc_ifoot_gsm',/add,title='thc_ifoot_gsm',versus='xrz',xtitle='X(km)',ytitle='Z(km)'
stop
ace_mfi_load
ace_swe_load
cotrans,'ace_k0_mfi_BGSEc','ace_mag_Bgsm',/GSE2GSM
get_tsy_params,'kyoto_dst','ace_mag_Bgsm','ace_k0_swe_Np','ace_k0_swe_Vp','T96',/speed
ttrace2iono,'thc_state_pos',newname='thc_ifoot_gsm',external_model='t96',par='t96_par',/km
tplot,['thc_state_pos','thc_ifoot_gsm'], title = 'Themis C position & footprints'
stop
tplotxy,'pos_clipped',multi='2,1',title='thc_state_pos',versus='xrz',xtitle='X(km)',ytitle='Z(km)',xsize=1000,ysize=500,window=2
tplotxy,'thc_ifoot_gsm',/add,title='thc_ifoot_gsm',versus='xrz',xtitle='X(km)',ytitle='Z(km)'
stop
omni_hro_load
store_data,'omni_imf',data=['OMNI_HRO_1min_BY_GSM','OMNI_HRO_1min_BZ_GSM']
get_tsy_params,'kyoto_dst','omni_imf','OMNI_HRO_1min_proton_density','OMNI_HRO_1min_flow_speed','T96',/speed,/imf_yz
ttrace2iono,'thc_state_pos',newname='thc_ifoot_gsm',external_model='t96',par='t96_par',/km
tplot,['thc_state_pos','thc_ifoot_gsm'], title = 'Themis C position & footprints'
stop
timespan,'2007-03-23',1,/day
thm_load_state,probe='c',coord='gsm'
ttrace2iono,'thc_state_pos',newname='thc_ifoot',external_model='t89',par=2.0D,in_coord='gsm',out_coord='gsm',get_tilt='out_tilt_reg',get_nperiod=np,/km
ttrace2equator,'thc_state_pos',newname='thc_efoot',external_model='t89',par=2.0D,in_coord='gsm',out_coord='gsm',get_tilt='out_tilt_eq',add_tilt=randomn(1,np),/km
ttrace2iono,'thc_state_pos',newname='thc_ifoot',external_model='t89',par=2.0D,in_coord='gsm',out_coord='gsm',get_tilt='out_tilt_io',get_nperiod=np,set_tilt=randomn(1,1440),/km
tplot,['out_tilt_reg','out_tilt_eq','out_tilt_io']
end