Changeset 24


Ignore:
Timestamp:
06/24/10 10:23:43 (2 years ago)
Author:
tabel
Message:

Some cleaning up. Comments in example script to go with documentation.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/TOOLS/construct_histogram.pro

    r23 r24  
    184184                 xstyle=1, ystyle=1, $ 
    185185                 charsize=2, thick=2 
     186           meanx = obin1 
     187           meanh = mh 
    186188        endif else begin 
    187189           if ((dims eq 1) or (hi.cumoption eq 3)) then begin ; requested plot instead of histogram 
  • trunk/TOOLS/construct_interpolated_slice_data.pro

    r23 r24  
    190190              < (index_range[const_sub,*]-1) 
    191191 
    192   ind = where((ii_s eq (index_range[const_sub,*]-1)) eq 1, count) 
    193   if count gt 0 then  ii_s[ind] -= 1 
     192  read_two = 0 
     193  read_two = (total(["div V", "density slope", "DM density slope"] eq list_str[var_index]) gt 0) < 1 
     194  print, "read_two", read_two 
     195  if read_two then begin 
     196     ind = where((ii_s eq (index_range[const_sub,*]-1)) eq 1, count) 
     197     if count gt 0 then  ii_s[ind] -= 1 
     198  endif 
    194199 
    195200  ii_sp1 = (ii_s+1) ; plus one to have two indices to interpolate from 
     
    208213start[*,other_subs[0]] = ii_l1 
    209214start[*,other_subs[1]] = ii_l2 
    210 read_two = 0 
    211 read_two = (total(["div V", "density slope", "DM density slope"] eq list_str[var_index]) gt 0) < 1 
    212 print, "read_two", read_two 
    213215if read_two then righti[*,const_sub]   = ii_sp1[*] $ 
    214216else righti[*,const_sub]     = ii_s[*] 
  • trunk/scripts/time_averaged_density_pdf.pro

    r16 r24  
    22; use the loaded snapshots to make a time average density probability 
    33; distributions function (pdf) 
     4; at the end the variable mh holds the function and obin1 the 
     5; corresponding density values. 
     6 
    47pro time_averaged_density_pdf 
    58@TOOLS/common_blocks.inc 
     
    2023;  if time_index lt ntimes-1 then starttime = time_index 
    2124 
     25; tells jacques to switch to the histogram tab 
    2226  J_event, 'HISTOGRAMS' 
    2327  hi.field1 = this_field 
     
    2529 
    2630  for time_index=starttime,ntimes-1,astep DO BEGIN ; loop over all loaded timesteps 
    27      set_list_widget_values 
    28      wait, 1.Ma 
    29      select_current_grids  
    30      check_cancel 
     31     set_list_widget_values                        ; update gui with the new time 
     32     wait, 1. 
     33     select_current_grids       ; 
     34     check_cancel               ; allow user to type  c in command line to stop  
    3135     if stopit then begin 
    3236        stopit = 0 
    3337        break 
    3438     endif 
     39; tells jacques to draw the histogram 
    3540     J_event, 'DRAW_BUTTON' 
    3641 
     
    4045     if verbose then print, 'memory use in Mb', memory()/1024./1e3 
    4146  endfor 
    42   time_index = ntimes-1 
    43   tapdf /= totaltime 
     47  time_index = ntimes-1         ; keep time_index in loaded range 
     48 
     49  tapdf /= totaltime            ; compute the average 
     50 
    4451  mh = tapdf                    ;  store in this common block variable 
    4552                                ; to make it accesible from 
    46                                 ; ccommandline 
     53                                ; commandline 
    4754 
     55; show the plot of the final result 
    4856  titlestring1=this_field+' ['+get_unit(this_field,/ulabel)+']' 
    4957  plot, obin1, (mh) , xlog=shouldbe_logged(this_field), $ 
Note: See TracChangeset for help on using the changeset viewer.