;Run this crib sheet to produce a pitch angle versus energy plot for electrons and 2-D cuts of distribution for ions . ; to run, simply type: .r crib_distributions_rumi ; IDL codes needed to run: ; get_en_pa_spec_themis.pro ; dat_avg.pro ; angl.pro ; dotp.pro ; fixangdata.pro ; get_counts.pro ; last modified by: Tai Phan on October 17,2008. ; ************* start of user input **************** ; set ipostscript=0 the first time the program is run ipostscript=0; 0= plot on screen, 1=postscript plots stored in plot.ps file in the local directory if ipostscript eq 1 then popen,port=1,ct=34 timespan,'2008-02-16',1 t0=time_double('2008-02-16/02:42'); start time of interval t1=time_double('2008-02-16/02:48'); end time of interval iread=1 ; 1= load data, 0= data was already loaded ions=1 ; 1= produce ion distribution plots electrons=0 ; 1= produce electron distribution plots sc='c' ; spacecraft 'a', 'b', 'c', 'd', or 'e' type= 'b'; 'b', 'r', or 'f' for "burst", "reduced" or "full" distributions if ions eq 1 then begin ;to change the x-axis range xrange_set_keyword=0 xrange_set=[-1000,1000] ; not used if xrange_set_keyword eq 0 ;to change the z range (color scale range) range_set_keyword=0 range_set=[1e-13,1e-7] ; not used if range_set_keyword eq 0 endif; ions if electrons eq 1 then begin ;to change the x-axis range xrange_e_set_keyword=1; 0= full range, 1=set to a specified range below xrange_e_set=[50,30000] ; not used if xrange_e_set_keyword eq 0 ;to change the z range (color scale range) range_e_set_keyword=0; ; 0= full range, 1=set to a specified range below range_e_set=[1e4,1e9] ; not used if range_e_set_keyword eq 0 endif; electrons ; ************* end of user input **************** if iread eq 1 then begin thm_load_esa_pkt,probe=sc thm_load_fgm,probe=sc,level=2,coord='dsl gsm' thm_load_esa,probe=sc endif; iread get_data,strjoin('th'+sc+'_fgs_gsm'),data=d store_data,strjoin('th'+sc+'_fgs_gsm_z'),data={x:d.x,y:d.y(*,2)} get_data,strjoin('th'+sc+'_pei'+type+'_magt3'),data=d store_data,strjoin('th'+sc+'_Tp_1'),data={x:d.x,y:d.y(*,0)} store_data,strjoin('th'+sc+'_Tp_2'),data={x:d.x,y:d.y(*,1)} store_data,strjoin('th'+sc+'_Tp_3'),data={x:d.x,y:d.y(*,2)} get_data,strjoin('th'+sc+'_pei'+type+'_velocity_gsm'),data=d store_data,strjoin('th'+sc+'_pei'+type+'_vx'),data={x:d.x,y:d.y(*,0)} store_data,strjoin('th'+sc+'_pei'+type+'_vy'),data={x:d.x,y:d.y(*,1)} store_data,strjoin('th'+sc+'_pei'+type+'_vz'),data={x:d.x,y:d.y(*,2)} var_lab_i=[strjoin('th'+sc+'_fgs_gsm_z'),strjoin('th'+sc+'_pei'+type+'_vx'),strjoin('th'+sc+'_pei'+type+'_density')] var_lab_e=var_lab_i ;ions if ions eq 1 then begin get_data,strjoin('th'+sc+'_pei'+type+'_density'),data=d index=where(d.x ge t0 and d.x le t1) for i=0, n_elements(index)-1 do begin time=d.x(index(i))+2d dat=thm_part_dist(strjoin('th'+sc+'_pei'+type),time,type=strjoin('pei'+type),probe=sc) if (xrange_set_keyword eq 0 and range_set_keyword eq 0) then begin slice2d_themis,dat,thebdata=strjoin('th'+sc+'_fgs_dsl'),var_lab=var_lab_i,/nosun;,/cut_bulk_vel endif if (xrange_set_keyword eq 0 and range_set_keyword eq 1) then begin slice2d_themis,dat,thebdata=strjoin('th'+sc+'_fgs_dsl'),range=range_set,var_lab=var_lab_i,/nosun;,/cut_bulk_vel ;,/cut_bulk_vel endif if (xrange_set_keyword eq 1 and range_set_keyword eq 0) then begin slice2d_themis,dat,thebdata=strjoin('th'+sc+'_fgs_dsl'),xrange=xrange_set,var_lab=var_lab_i,/nosun;,/cut_bulk_vel ;,/cut_bulk_vel endif if (xrange_set_keyword eq 1 and range_set_keyword eq 1) then begin slice2d_themis,dat,thebdata=strjoin('th'+sc+'_fgs_dsl'),xrange=xrange_set, range=range_set,var_lab=var_lab_i,/nosun;,/cut_bulk_vel ;,/cut_bulk_vel endif endfor endif ;ions if electrons eq 1 then begin get_data,strjoin('th'+sc+'_pee'+type+'_density'),data=d index=where(d.x ge t0 and d.x le t1) for i=0, n_elements(index)-1 do begin time=d.x(index(i))+2d dat=thm_part_dist(strjoin('th'+sc+'_pee'+type),time,type=strjoin('pee'+type),probe=sc) if (xrange_e_set_keyword eq 0 and range_e_set_keyword eq 0) then begin get_en_pa_spec_themis,dat,thebdata=strjoin('th'+sc+'_fgs_dsl'),var_lab=var_lab_e,/nosun endif if (xrange_e_set_keyword eq 0 and range_e_set_keyword eq 1) then begin get_en_pa_spec_themis,dat,thebdata=strjoin('th'+sc+'_fgs_dsl'),range=range_e_set,var_lab=var_lab_e,/nosun endif if (xrange_e_set_keyword eq 1 and range_e_set_keyword eq 0) then begin get_en_pa_spec_themis,dat,thebdata=strjoin('th'+sc+'_fgs_dsl'),xrange=xrange_e_set,var_lab=var_lab_e,/nosun endif if (xrange_e_set_keyword eq 1 and range_e_set_keyword eq 1) then begin get_en_pa_spec_themis,dat,thebdata=strjoin('th'+sc+'_fgs_dsl'),xrange=xrange_e_set, range=range_e_set,var_lab=var_lab_e,/nosun endif endfor endif ;electrons if ipostscript eq 1 then pclose end