; ; This is a cut-and-paste crib ; ; UPDATED TO ALLOW: ; ; 1. Distribution Function plots for a LONGER interval than 3 sec (specified in the TIMEINTERVAL keyword). ; The Distribution Function would be averaged during the whole time interval. ; 2. Different kinds of 2-D cuts for the 3-D distribution. (see the ROTATION, ANGLE and THIRDDIRLIM keywords). ; 3. Either png or ps file output (specified in the FILETYPE keyword). ; ---- Xuzhi Zhou (UCLA) 4-22-08 ; ;This program will automatically print off png files of Distribution Functions for the spacecraft (sc), ;type of data (full, reduced, or burst), and time interval that you input. You can also choose the ;time increments (in seconds) by which the program prints the distribution functions. (ie 3.0) ;You have to designate the file folder that you want to put your images in below. ;Don't forget to input the timespan. ;This program was last edited by Christine Gabrielse 8-20-07 pro themis_cut_crib filetype='png' ; 'png' or 'ps' species ='ion' ; 'ele' or 'ion' ; choose which spacecraft (a-e): sc = 'b' ; choose type of data - f-full, r-reduced, b-burst: typ = 'r' ;Choose start and end times start_time='2007-03-23/11:20:00' start_time=time_double(start_time) timespan, start_time, 0.05 end_time = '2007-03-23/11:22:00' end_time = time_double(end_time) ; Input the increment in seconds increment = 3.0 ; Input the time interval for each plot (in seconds) timeinterval = 30.0 ;load support data: ;thm_init ;thm_load_state,probe=sc,/get_supp,version=2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;load the esa data: thm_load_esa_pkt,probe=sc if typ eq 'f' then gap_time=1000. else gap_time=10. thm_load_fgm,level=2,coord='dsl gse gsm',probe = sc current_time = start_time ; ROTATION: SUGGESTING THE MEANING OF THE X AND Y AXIS IN THE OUTPUT FILE, WHICH CAN BE SELECTED AS THE FOLLOWINGS: ; 'BV': the x axis would be V_para (to the magnetic field) and the bulk velocity would be in the x-y plane. (DEFAULT) ; 'BE': the x axis would be V_para (to the magnetic field) and the VxB direction would be in the x-y plane. ; 'xy': the x axis would be V_x and the y axis would be V_y. ; 'xz': the x axis would be V_x and the y axis would be V_z. ; 'yz': the x axis would be V_y and the y axis would be V_z. ; 'perp': the x-y plane is perpendicular to the magnetic field, while the x axis would be the velocity projection on the plane. ; 'perp_xy': the x-y plane is perpendicular to the magnetic field, whild the x axis representing the x projection on the plane. ; 'perp_xz': the x-y plane is perpendicular to the magnetic field, whild the x axis representing the x projection on the plane. ; 'perp_yz': the x-y plane is perpendicular to the magnetic field, whild the x axis representing the y projection on the plane. rotation='BV' angle=[-20.,20.] ;ThirdDirLim=[-600,-1000] range=[1.E-14,1.E-6] .run while current_time lt end_time do begin clock_time = time_string(format=2,current_time) if species eq 'ion' then begin outputfile = clock_time+'_th'+sc+'_pei'+typ ; slice2d_themis_longer_esa,sc,typ,current_time,timeinterval,thebdata='th'+sc+'_fgs_dsl',species=species,range=range,rotation=rotation,ThirdDirlim=ThirdDirLim,filetype=filetype,outputfile=outputfile slice2d_themis_longer_esa,sc,typ,current_time,timeinterval,thebdata='th'+sc+'_fgs_dsl',species=species,range=range,rotation=rotation,angle=angle,filetype=filetype,outputfile=outputfile;,nosmooth=1 endif if species eq 'ele' then begin outputfile = clock_time+'_th'+sc+'_pee'+typ slice2d_themis_longer_esa,sc,typ,current_time,timeinterval,thebdata='th'+sc+'_fgs_dsl',species=species,range=range,rotation=rotation,filetype=filetype,outputfile=outputfile,xrange=[-13000.,13000.] endif if filetype eq 'png' then begin makepng, outputfile endif current_time = current_time + increment print,clock_time,current_time endwhile end end