Changeset 250


Ignore:
Timestamp:
05/08/08 19:10:46 (4 years ago)
Author:
ux454321
Message:

new stuf

Location:
trunk
Files:
54 added
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/Code/gs0.pro

    r222 r250  
    1919case readmethod of 
    2020    5: arr = read_ppml(nL,mL,gL, self.datadir, basename = self.basename) 
    21     9: arr = read_aake(nL,mL,gL, self.datadir, basename = self.basename) 
     21    9: arr = self->read_aake(nL,mL,gL, self.datadir, basename = self.basename) 
    2222    else: $ 
    2323      arr = self->gs2(nL,mL,gL,dirL,basenameL, $ 
  • trunk/Code/gs2.pro

    r215 r250  
    6565        file_name = file_name + "DD" + zeropad(4,nL) + ".products/" 
    6666    endif 
    67     file_name = file_name + fields(self.field) 
     67    file_name = file_name + fields(mL) 
    6868endif 
    6969 
     
    7979 
    8080 
    81 ; Compare the requested field name with the list in the file.   
     81; Compare the requested field name with the list in the file, to 
     82; ensure you're opening a field that exists. 
    8283; Since there are several variants on the Total Energy field, those 
    8384; are also looked for. 
     
    9899    if OK EQ 0 then begin 
    99100        ; 
    100         ; For cell width or edges, exit quietly. 
     101        ; For cell width or edges, exit quietly. (mhd enzo only.) 
    101102        ; 
    102103        if mL EQ 18 OR mL EQ 19 OR mL EQ 20 then begin 
  • trunk/Code/gsh.pro

    r223 r250  
    2222;          
    2323; Additionally, supplying LevelRange [a,b] will only plot levels 
    24 ; betweeen 'a' and 'b', inclusive.  a,b=-1 denots no bound.  default 
     24; betweeen 'a' and 'b', inclusive.  a,b=-1 denotes no bound.  default 
    2525; is [-1,-1] 
    2626; 
     
    6161    phys_pos_set = 1 
    6262endif 
    63 ;not yet used. 
     63;take_subset and subset aren't used yet. 
    6464if n_elements(subset) EQ 0 then subset = self.subset_p 
    6565if n_elements(take_subset) EQ 0 then take_subset = self.take_subset 
     
    243243         
    244244    bL[gC] = ptr_new( fltarr( dimsL(dX), dimsL(dY) ) ) 
     245 
     246    ;Change coordinate map. 
    245247    if slice EQ 0 then *bL[gC] =reform(aL(0,*,*),dimsL(1),dimsL(2))  
    246248    if slice EQ 1 then *bL[gC] =reform(aL(*,0,*),dimsL(0), dimsL(2)) 
    247249    if slice EQ 2 then *bL[gC] =reform(aL(*,*, 0),dimsL(0),dimsL(1)) 
    248     ;if slice EQ 0 then *bL[gC] =reform(aL(pxL,*,*),dimsL(1),dimsL(2))  
    249     ;if slice EQ 1 then *bL[gC] =reform(aL(*,pxL,*),dimsL(0), dimsL(2)) 
    250     ;if slice EQ 2 then *bL[gC] =reform(aL(*,*, pxL),dimsL(0),dimsL(1)) 
    251250     
    252251endfor                          ; get and slice loop 
     
    259258 
    260259;for each grid, congrid it to the Destination Grid. 
    261 ; 'i' refers to the Destination grid.  
     260; 'i' refers to the Destination (image) grid  
    262261; 'd' refers to the Data grid. 
    263262 
     
    305304 
    306305 
    307 print, "Grids shown:", GoodList[0:nGood-1] + 1 
     306;print, "Grids shown:", GoodList[0:nGood-1] + 1 
    308307if ptr_valid(self.GridsInPlot) then ptr_free, self.GridsInPlot 
    309308self.GridsInPlot = ptr_new(GoodList, /no_copy) 
    310309 
    311310ptr_free, bL 
    312  
    313  
    314311 
    315312;dbg 
  • trunk/Code/gui.pro

    r248 r250  
    165165(*top_uvalue).zoom = call_method('ret',cmd.object,'zoom') 
    166166 
     167nRepeats= call_method('ret',cmd.object,'nRepeats') 
     168for thisRepeat=1,nRepeats do begin 
    167169 
    168170wset, (*top_uvalue).main_pix_number 
    169 call_method, 'set', cmd.object, 'message', '' 
     171Call_method, 'set', cmd.object, 'message', '' 
    170172errormsg,event,"Working..." 
    171 (*top_uvalue).ValidPlot = 0 
    172  
    173 call_method, cmd.method,cmd.object ;cmd.method is the method 'p2.' 
    174  
    175 msg = call_method('ret', cmd.object, 'message') 
    176  
    177 if msg NE '' then (*top_uvalue).ValidPlot = 0 
    178 if msg EQ '' then (*top_uvalue).ValidPlot = 1 
    179 if (*top_uvalue).ValidPlot EQ 1 then begin 
    180     wset, (*top_uvalue).main_window_number 
    181     device,copy = [0,0,!d.x_size,!d.y_size,0,0,(*top_uvalue).main_pix_number] 
    182     (*top_uvalue).LineDrawn = 0 
    183     pop_gui_from_obj,event 
    184  
    185 endif 
    186 errormsg,event,msg 
    187  
     173 
     174 
     175    (*top_uvalue).ValidPlot = 0 
     176 
     177    call_method, cmd.method,cmd.object ;cmd.method is the method 'p2.' 
     178     
     179    msg = call_method('ret', cmd.object, 'message') 
     180     
     181    if msg NE '' then (*top_uvalue).ValidPlot = 0 
     182    if msg EQ '' then (*top_uvalue).ValidPlot = 1 
     183    if (*top_uvalue).ValidPlot EQ 1 then begin 
     184        wset, (*top_uvalue).main_window_number 
     185        device,copy = [0,0,!d.x_size,!d.y_size,0,0,(*top_uvalue).main_pix_number] 
     186        (*top_uvalue).LineDrawn = 0 
     187        pop_gui_from_obj,event 
     188         
     189    endif 
     190    errormsg,event,msg 
     191     
    188192;save a copy of the data array in the gui.   
    189193;This is needed by the line picker, among other things. 
    190194;There might be a better way... 
    191 if ptr_valid( (*top_uvalue).b ) NE 0 then ptr_free, (*top_uvalue).b 
    192 (*top_uvalue).b = call_method('ret', cmd.object, 'b') 
    193  
    194 if (*top_uvalue).ValidPlot EQ 1 then begin 
    195     if (*top_uvalue).inquest_persistent EQ 1 then begin 
    196          
    197          
     195    if ptr_valid( (*top_uvalue).b ) NE 0 then ptr_free, (*top_uvalue).b 
     196    (*top_uvalue).b = call_method('ret', cmd.object, 'b') 
     197     
     198    if (*top_uvalue).ValidPlot EQ 1 then begin 
     199        if (*top_uvalue).inquest_persistent EQ 1 then begin 
     200             
     201             
    198202                                ;get data, plot into inquest 
    199         indicies = (*(*top_uvalue).indexLine) 
    200         Xaxis = (*(*top_uvalue).coordline) 
    201         DataLine = (*(*top_uvalue).b)[indicies] 
    202         wset, (*top_uvalue).inquest_pix_number ;use this next 
    203         opts = "" 
    204         if (*top_uvalue).inq_plot_opts NE "" then opts = ","+(*top_uvalue).inq_plot_opts 
    205         if (*top_uvalue).inquest_overplot EQ 0 then begin 
    206             ret = execute('plot, Xaxis, DataLine, xstyle=1' + opts) 
    207         endif else begin 
    208             ret = execute('oplot, Xaxis,DataLine' + opts) 
    209         endelse 
    210         wset, (*top_uvalue).inquest_window_number 
    211         device,copy = [0,0,!d.x_size,!d.y_size,0,0,(*top_uvalue).inquest_pix_number]     
    212          
    213         ;draw lines 
    214         wset, (*top_uvalue).main_window_number 
    215         plots, (*top_uvalue).iStart, psym = 5, /device 
    216         plots, (*top_uvalue).iEnd, psym = 5, /device 
    217         plots, [ ((*top_uvalue).iEnd)[0], ((*top_uvalue).iStart)[0] ] , $ 
    218           [ ((*top_uvalue).iEnd)[1],  ((*top_uvalue).iStart)[1] ], /device 
    219         (*top_uvalue).LineDrawn = 1 
    220     endif 
    221 endif 
     203            indicies = (*(*top_uvalue).indexLine) 
     204            Xaxis = (*(*top_uvalue).coordline) 
     205            DataLine = (*(*top_uvalue).b)[indicies] 
     206            wset, (*top_uvalue).inquest_pix_number ;use this next 
     207            opts = "" 
     208            if (*top_uvalue).inq_plot_opts NE "" then opts = ","+(*top_uvalue).inq_plot_opts 
     209            if (*top_uvalue).inquest_overplot EQ 0 then begin 
     210                ret = execute('plot, Xaxis, DataLine, xstyle=1' + opts) 
     211            endif else begin 
     212                ret = execute('oplot, Xaxis,DataLine' + opts) 
     213            endelse 
     214            wset, (*top_uvalue).inquest_window_number 
     215            device,copy = [0,0,!d.x_size,!d.y_size,0,0,(*top_uvalue).inquest_pix_number]     
     216             
     217                                ;draw lines 
     218            wset, (*top_uvalue).main_window_number 
     219            plots, (*top_uvalue).iStart, psym = 5, /device 
     220            plots, (*top_uvalue).iEnd, psym = 5, /device 
     221            plots, [ ((*top_uvalue).iEnd)[0], ((*top_uvalue).iStart)[0] ] , $ 
     222              [ ((*top_uvalue).iEnd)[1],  ((*top_uvalue).iStart)[1] ], /device 
     223            (*top_uvalue).LineDrawn = 1 
     224        endif 
     225    endif  
     226endfor                          ;repeater. 
    222227 
    223228end 
     
    751756scanz_box = cw_field(scan_base,/row,title="scanz"  ,/integer,value = self.scanz, xsize = 4, $ 
    752757                    uname="scanz") 
     758repeater_box = cw_field(scan_base,/row,title="nRepeats", /integer, value = self.nRepeats, xsize=4,$ 
     759                        uname="nRepeats") 
    753760scan_button = widget_button(button_column,value = 'Scans', xsize = button_x,ysize = button_y,$ 
    754761                            event_pro="menu_buttons", uname = "scan_button", $ 
  • trunk/Code/p2.pro

    r231 r250  
    261261 
    262262;actually plots the file. 
    263 ClosePlotFile, self, /autometa 
     263;ClosePlotFile, self, /autometa 
     264ClosePlotFile, self 
    264265 
    265266 
  • trunk/Code/slide__define.pro

    r242 r250  
    121121                  'show_grids','line_width','line_color[0]','line_color[1]','line_color[2]',$ 
    122122                  'vector','vec_n_steps','vec_length','vec_n[0]','vec_n[1]',$ 
    123                   'FixedMinVal','FixedMaxVal','Normal'] 
     123                  'FixedMinVal','FixedMaxVal','Normal','nRepeats',$ 
     124                  'aake_bytes','aake_size'] 
    124125 
    125126;read standard defaults from file, then user supplied defaults, if 
     
    179180           hierarchy:ptr_new(), $ ;the array of hierarchy structures. 
    180181           tlb:0L, $      ;base widget for the guil 
    181            unit_array:ptr_new() $ ;Array of unit structures, for defining units. 
    182            };; 
     182           unit_array:ptr_new(),$ ;Array of unit structures, for defining units. 
     183           nRepeats:1,           $  ;number of times to repeat the plot.  For use with scans. 
     184           aake_bytes:4, aake_size:256 $;parameters for reading in Aake data. 
     185         }                      ; 
    183186 
    184187; GridMap, $ ;Used for p4.  Not used yet. 
  • trunk/Tools/ClosePlotFile.pro

    r231 r250  
    2424        wset, old_window_number 
    2525        wdelete, pixmap_number 
    26         print, "monkey: ", filename 
    2726        if keyword_set(autometa) then auto_meta, suffix_switch(filename,".jpg"), slide 
    2827    end 
  • trunk/Tools/append.pro

    r242 r250  
    88 
    99function append, thing, value 
    10 if n_elements(thing) EQ 0 then begin 
    11     return, [value] 
    12 endif else begin 
    13     return, [thing, value] 
    14 endelse 
    15  
     10case n_elements(value) of  
     11    0: type = 0 
     12    1: type = 1 
     13    2: type = 2 
     14    else: type = 1 
     15endcase 
     16if type EQ 0 then begin 
     17    print, "thing = append(thing,value)" 
     18    return,thing 
     19endif 
     20if type EQ 1 then begin 
     21    if n_elements(thing) EQ 0 then begin 
     22        return, [value] 
     23    endif else begin 
     24        return, [thing, value] 
     25    endelse 
     26endif  
     27if type EQ 2 then begin 
     28    if n_elements(thing) EQ 0 then begin 
     29        return, [[value]] 
     30    endif else begin 
     31        return, [[thing, value]] 
     32    endelse 
     33endif 
    1634     
    1735return, thing 
  • trunk/Tools/minc.pro

    r3 r250  
    6969 
    7070 
     71function nanc, array, verbose=verbose 
     72if n_elements(verbose) EQ 0 then verbose = 0 
     73if n_elements(array) EQ 0 then begin 
     74    print, "maxc(array)" 
     75    print, "   prints the max AND orderd set of coordinates." 
     76    return,0 
     77endif 
     78 
     79dims = size(array, /dimension) 
     80rank = (size(dims, /dimension))(0) 
     81coords = intarr(rank) 
     82 
     83nans = where( array NE array, count) 
     84if count EQ 0 then begin 
     85    print, "all ok" 
     86    return, 0 
     87endif 
     88carray = [[coord(nans[0],dims)]] 
     89for n=1, count-1 do begin 
     90    carray = [[carray],[coord(nans[n],dims)]] 
     91end 
     92return ,carray 
     93 
     94end 
     95 
     96pro nanc,array,verbose=verbose 
     97if n_elements(verbose) EQ 0 then verbose = 0 
     98all = nanc(array, verbose=verbose) 
     99if n_elements(all) GT 1 then begin 
     100    if verbose EQ 0 then begin 
     101        minX = st2(min( all[0,*] )) 
     102        maxX = st2(max( all[0,*] )) 
     103        minY = st2(min( all[1,*] )) 
     104        maxY = st2(max( all[1,*] )) 
     105        minZ = st2(min( all[2,*] )) 
     106        maxZ = st2(max( all[2,*] )) 
     107        print, "[",minX,":",maxX,",",minY,":",maxY,",",minZ,":",maxZ,"]" 
     108    endif else begin 
     109        print, all 
     110    endelse 
     111endif else print, 0 
     112end 
     113function coord, index, dims 
     114; index = i + nx * j + nx*ny*k + nx*ny*nz*L + whatever. 
     115; This works backwards, and uses the fact that integer division always 
     116; truncates. 
     117rank = n_elements(dims) 
     118coords = dims*0 
     119for i=rank-1, 0, -1 do begin 
     120    factor = 1. 
     121    for j=0, i-1 do begin 
     122        factor = factor * dims[j] 
     123    end 
     124    coords[i] = index/factor 
     125    index = index - coords[i]*factor 
     126end  
     127 
     128return ,coords 
     129 
     130end 
     131 
     132 
    71133pro minc, array 
    72134 print, minc(array) 
  • trunk/Tools/pdf.pro

    r249 r250  
    9696        hi = 1.0*histogram(array        , omin = minOut, omax = maxOut, binsize = bs) 
    9797    endif else begin 
    98         hi = 1.0*histogram(thisLog(array), omin = minOut, omax = maxOut, binsize = bs)         
     98        hi = 1.0*histogram(thisLog(array), omin = minOut, omax = maxOut, binsize = bs) 
    9999    endelse 
    100100 
     
    181181;write values to screen 
    182182 
    183 print, "Density Range: ", minOut, maxOut 
     183print, "Density Range: ", min(bins), max(bins) 
    184184print, "extent of probability", min(hi), max(hi) 
    185185print, "peak density = ", MostProbableDensity 
     
    187187 
    188188xpos = 70 
    189 ypos1 = 100 
     189ypos1 = 400 
     190if keyword_set(loghi) EQ 1 then ypos1 = 100 
     191 
    190192xyouts, xpos,ypos1, charsize = 1.2, "Sigma = "+ strtrim(Fits[0],2), /device 
    191193xyouts, xpos,ypos1-20, charsize = 1.2, "Avg = "+ strtrim(Fits[1],2), /device 
  • trunk/Tools/pdfb.pro

    r249 r250  
    33;gggIn=[0.5,-0.5, 0.03] 
    44wset,0 
    5 pdf, den, Bins=Bins, hi=hi,nbins=200,/loga,$ 
    6   PlotTitle = "d128",/norm, /loghi 
     5pdf, dp, Bins=Bins, hi=hi,nbins=512,/loga,$ 
     6  PlotTitle = "512 proj",/norm, /loghi 
    77 
    88;plot, bins,hi 
  • trunk/Tools/read_aake.pro

    r222 r250  
    1010; Step is unused. 
    1111 
    12 function read_aake, step,field,grid, datadir, basename = basename 
     12function slide::read_aake, step,field,grid, datadir, basename = basename 
     13 
     14dirL = self.datadir 
     15nL = self.step 
     16 
     17if self.subdirect EQ 1 then begin 
     18    filename =  dirL+"/" + $   ;base dir 
     19      "DD" + zeropad(4,nL) + ".products/" + $ ;data dir 
     20      self.basename+zeropad(4,nL) + ".dat" 
     21endif else begin 
     22    filename =  dirL+"/" $     ;base dir 
     23      +self.basename+zeropad(4,nL) + ".dat" 
     24     
     25endelse 
    1326 
    1427;set up arrays and variables. 
     28;These two variables could be done better.  Revisit if needed. 
    1529 
    16 ;These two variables could be done better.  Revisit if needed. 
    17 filename = datadir + "/" + basename 
    18 nx=grid 
    19 n_points = long(nx*nx*nx) 
    20 if step EQ 4 then begin 
     30nx=long64(self.aake_size) 
     31n_points = long64(nx*nx*nx) 
     32if self.aake_bytes EQ 4 then begin 
    2133    array = fltarr(nx,nx,nx) 
    22     num_size = 4 
     34    num_size = long64(4) 
    2335endif  else  if step EQ 8 then begin 
    2436    array = dblarr(nx,nx,nx) 
    25     num_size = 8 
     37    num_size = long64(8) 
    2638endif else begin 
    2739    print, "error: " 
     
    3244;The data set doesn't corespond 1-1 to the record numbers. Adjust 
    3345case field of 
    34     0: block = 0 
    35     1: block = -7 
    36     2: block = 1 
    37     3: block = 2 
    38     4: block = 3 
    39     5: block = 4 
    40     6: block = 5 
    41     7: block = 6 
    42     else: block = -22 
     46    0: block = 0L 
     47    1: block = -7L 
     48    2: block = 1L 
     49    3: block = 2L 
     50    4: block = 3L 
     51    5: block = 4L 
     52    6: block = 5L 
     53    7: block = 6L 
     54    else: block = -22L 
    4355endcase 
    4456;print, block 
    4557;hack.  for testing the converter 
    46 print, "read_aake: block = field, no intelegence" 
    47 block = field 
     58;print, "read_aake: block = field, no intelegence" 
     59;block = field 
    4860;/hack 
    4961bytes_to_skip = block * n_points * num_size    ;advance record to this point 
  • trunk/XtraTools/spower.pro

    r207 r250  
    33; 
    44 
    5 pro slide::spower, field,step, fit_rng = fit_rng, suffix = suffix 
     5pro slide::spower, field,step, fit_rng = fit_rng, suffix = suffix, twod=twod,$ 
     6         hist=hist 
    67 
    78if n_elements(field) EQ 0 then field = self.field 
     
    910if n_elements(suffix) EQ 0 then suffix = "" 
    1011;set up strings for plot labels, filenames 
    11 f_string_array = ["vx","vy","vz"] 
    12 f_str = f_string_array[ field-2] 
     12f_string_array = ["d","te","vx","vy","vz","bx","by","bz"] 
     13f_str = f_string_array[ field ] 
    1314step_str = st2(step) 
    1415fileroot = f_str + step_str + suffix 
     
    1920 
    2021;get data, make power spectrum. 
     22print, "read: " , fileroot 
    2123self->grab, nL = step, mL = field 
    22 power3d, *(self.a), fit=fit_rng, wavenumbers=wvs, spectrum=spec , afit=afit 
     24print, "spectra: " , fileroot 
     25if keyword_set(twod) EQ 0 then $ 
     26  power3d, *(self.a), fit=fit_rng, wavenumbers=wvs, spectrum=spec , afit=afit 
     27if keyword_set(twod) EQ 1 then $ 
     28  power_2d, *(self.b), spec,wvs 
    2329 
    2430;write spectrum to disk for future use. 
     
    3036print, "wrote spectrum to ", fileroot+".power" 
    3137 
     38if keyword_set(hist) EQ 1 then begin 
     39    print, "making histogram ", fileroot 
     40    if keyword_set(twod) EQ 0 then array_ptr = self.a 
     41    if keyword_set(twod) EQ 1 then array_ptr = self.b 
     42    pdf, *array_ptr, Bins=Bins, hi=hi, nbins=512, /loga 
     43    openw, lun, fileroot+".pdf", /get_lun 
     44    printf, lun, Bins 
     45    printf, lun, hi 
     46    close, lun & free_lun,lun 
     47endif    
     48 
    3249;make image, jpg, eps. 
    33 for cap = 0,2 do begin 
    34     OpenPlotFile, filename = fileroot, output_method = cap 
    35      
    36     plot, wvs, spec, /xlog, /ylog, xrange = [1,1000], $ 
    37       title = fileroot, $ 
    38       xtitle = "wave number", ytitle = "power" 
    39     oplot, [ wvs[ fit_rng[0] ], wvs[fit_rng[1]] ] , [spec[fit_rng[0]], spec[fit_rng[1]] ] 
    40     xyouts, 350,400, "FitExp = " +strtrim(afit[1],2), charsize = 1.2, /device 
    41     ClosePlotFile  
    42 endfor 
     50;for cap = 0,2 do begin 
     51;    OpenPlotFile, filename = fileroot, output_method = cap 
     52;     
     53;    plot, wvs, spec, /xlog, /ylog, xrange = [1,1000], $ 
     54;      title = fileroot, $ 
     55;      xtitle = "wave number", ytitle = "power" 
     56;    oplot, [ wvs[ fit_rng[0] ], wvs[fit_rng[1]] ] , [spec[fit_rng[0]], spec[fit_rng[1]] ] 
     57;    xyouts, 350,400, "FitExp = " +strtrim(afit[1],2), charsize = 1.2, /device 
     58;    ClosePlotFile  
     59;endfor 
    4360 
    4461 
  • trunk/XtraTools/spower_avg.pro

    r207 r250  
    1111wset,0 
    1212FileList = files 
    13 Wvs = fltarr(128) 
    14 spec = fltarr(128) 
    15 TotalSpectra = fltarr(128) 
     13npts = 256 
     14Wvs = fltarr(npts) 
     15spec = fltarr(npts) 
     16TotalSpectra = fltarr(npts) 
    1617for i=0, n_elements(FileList)-1 do begin $ 
    1718  print, "read ", FileList[i] &$ 
     
    2829;plot, wvs, TotalSpectra, /xlog,/ylog,xrange=[1,1000] 
    2930oplot, wvs, TotalSpectra, color='00ff00'x, thick = 2 ;, /xlog,/ylog,xrange=[1,1000] 
    30 wset,1 
    31 spower_fit, wvs, TotalSpectra, [2,8],  comp = -2 
     31;wset,1 
     32spower_fit, wvs, TotalSpectra, [2,20],  comp = -0.860486 
  • trunk/XtraTools/spower_fit.pro

    r207 r250  
    33; and fit a power law. 
    44 
    5 pro spower_fit, wns, spectrum, fit, _EXTRA= EXTRA, comp=comp 
     5pro spower_fit, wns, spectrum, fit, _EXTRA= EXTRA, comp=comp, afit=afit, noplot=noplot,$ 
     6                oplot=oplot 
    67 
    78if n_elements(fit) EQ 0 then begin 
     
    2829    if comp NE 0 then to_plot = spectrum * wns^(-1*comp) 
    2930endif 
    30 plot, wns, to_plot, /xlog, /ylog, xrange = [1,1000], _EXTRA = EXTRA 
    31 ;oplot, [ wns[ i[0] ], wns[i[1]] ] , [to_plot[i[0]], to_plot[i[1]] ], psym = -5 
    32 xyouts, 350,400, "FitExp = " +strtrim(afit[1],2), charsize = 1.2, /device 
    33  
     31if keyword_set( noplot ) EQ 0 then begin 
     32    if keyword_set( oplot) EQ 0 then begin 
     33        plot, wns, to_plot, /xlog, /ylog, xrange = [1,1000], _EXTRA = EXTRA 
     34        xyouts, 350,400, "FitExp = " +strtrim(afit[1],2), charsize = 1.2, /device 
     35    endif else begin 
     36        oplot, wns, to_plot 
     37    endelse 
     38endif 
    3439 
    3540end 
  • trunk/XtraTools/spower_get.pro

    r231 r250  
    44; Watch the suffix used. 
    55 
    6 nums =[160,170,180] 
     6nums =[200,180,160,140,120] 
     7;fields = [2,4] 
     8fields = [0,0] 
    79 
    8 for n=0,n_elements(nums)-1 do for field=2,4 do li->spower,field,nums[n], suffix = "_li_256_m6b0" 
     10for n=0,n_elements(nums)-1 do for field=fields[0],fields[1] $ 
     11  do v5b0->spower,field,nums[n], suffix = "_v5b02dV",  /hist 
  • trunk/XtraTools/spower_plot.pro

    r231 r250  
    1 OpenPlotFile, filename = "MultiCompedPowers_2", output_method = cap 
     1OpenPlotFile, filename = "Mach10beta1", output_method = cap 
    22;comp = 1.666 ;for mach 0.5 pure hydro 
    33comp = 2   ; for mach 6 
     
    66 
    77;Not sure why we started with hlle. 
    8 ;plot, wvs, hlle*wvs^comp, /xlog,/ylog,xrange = [1,300], yrange = [1e-6, 1], /ystyle, /xstyle, $ 
    9 ;  title = "Avg spectra, 3 solvers", xtitle = "wavenumber", ytitle = "k^(5/3) v(k)" 
    10 plot, wvs, ppm*wvs^comp, /xlog,/ylog,xrange = [1,300],  /ystyle, /xstyle, $ 
    11   title = "Avg spectra, 3 solvers", xtitle = "wavenumber", ytitle = "k^2 v(k)" 
    12 oplot, wvs, li*wvs^comp        ,linestyle = 0 ,color='ff6666'x, psym = ps, symsize = ss 
    13 oplot, wvs, ath_hlld*wvs^comp  ,linestyle = 0 ,color='0000ff'x, psym = ps, symsize = ss 
    14 oplot, wvs, ppml_hlld*wvs^comp ,linestyle = 0 ,color='0088ff'x, psym = ps, symsize = ss 
     8 
     9plot, wvs, li*wvs^comp, /xlog,/ylog,xrange = [1,300],  yrange=[1,100],/ystyle, /xstyle, $ 
     10  title = "Avg spectra, li mach 10", xtitle = "wavenumber", ytitle = "k^2 v(k)" 
     11oplot, wvs, li_x*wvs^comp        ,linestyle = 0 ,color='0000ff'x, psym = ps, symsize = ss 
     12oplot, wvs, li_y*wvs^comp        ,linestyle = 0 ,color='00ff00'x, psym = ps, symsize = ss 
     13oplot, wvs, li_z*wvs^comp        ,linestyle = 0 ,color='ff0000'x, psym = ps, symsize = ss 
     14;oplot, wvs, ath_hlld*wvs^comp  ,linestyle = 0 ,color='0000ff'x, psym = ps, symsize = ss 
     15;oplot, wvs, ppml_hlld*wvs^comp ,linestyle = 0 ,color='0088ff'x, psym = ps, symsize = ss 
    1516;oplot, wvs, hlle_d0*wvs^comp  ,linestyle = 0 ,psym = ps, symsize = ss 
    1617;oplot, wvs, roe*wvs^comp      ,linestyle = 0 ,color='0000ff'x, psym = ps, symsize = ss 
    1718;oplot, wvs, ppm*wvs^comp      ,linestyle = 0 ,color = 'ff0000'x, psym = ps, symsize = ss 
    1819;oplot, wvs, ppml*wvs^comp     ,linestyle = 0 ,color='00ff00'x, psym = ps, symsize = ss 
    19 ClosePlotFile 
     20ClosePlotFile,li10,/autometa 
  • trunk/go

    r241 r250  
    44 
    55 
    6 ;RootIDL = ":/users/ucsd/ux454321/Microscope/trunk" 
    7 RootIDL = ":/home/dcollins/Microscope/trunk" 
    8  
     6RootIDL = ":/users/ucsd/ux454321/Microscope/trunk" 
     7;RootIDL = ":/home/dcollins/Microscope/trunk" 
     8print, "Root ", RootIDL 
    99!path = !path + RootIDL+"/Code" 
    1010!path = !path + RootIDL+"/Code_Xtras" 
     
    1212!path = !path + RootIDL+"/XtraTools" 
    1313!path = !path + RootIDL+"/autoMeta" 
     14!path = !path + RootIDL+"/kitp_anal" 
     15!path = !path + RootIDL+"/AakeKITP" 
     16 
     17;!path = !path + ":/gpfs-wan/projects/cadac/software/contrib/aake/idl" 
     18;!path = !path + ":/gpfs-wan/projects/cadac/software/contrib/aake/codes/KITPcompare07/idl" 
     19 
    1420wan = "/gpfs-wan/projects/lca/dcollins/" 
    1521scratch = "/gpfs/ux454321" 
     
    3743.r gs1           ;gets derived data (reads from file w/ gs0, manipulates) 
    3844.r gs            ;switches between gs0,gs1 (straight from file or derived.) 
    39  
     45.r read_aake     ;IO for KITP comparison. 
    4046;manipulation, plotting 
    4147.r read_hierarchy_wrapper 
  • trunk/pp.pro

    r221 r250  
    11 
    2 if n_elements(pp_file) EQ 0 then pp_file = "ARSE" 
     2if n_elements(pp_file) EQ 0 then pp_file = "v10b64_long_velocities" 
    33OpenPlotFile, filename = pp_file, output_method = cap 
    44 
    5 plot, nov->retb(),/xstyle, yrange=[0.5,1.5], ytitle="Density", xtitle="zone", title="Decrease in Even-Odd by using Athena CT", xrange=[0,30] 
    6 oplot, p_ver->retb(), color='0000ff'x 
    7  
     5plot, f1[1,*],f1[3,*], title = "Vrms vs. <V>", linestyle = 0, ytitle="velocity",$ 
     6  xtitle="time" 
     7oplot, f1[1,*],sqrt(( f1[12,*]^2 + f1[13,*]^2 + f1[14,*]^2 )), linestyle = 2 
     8legend, ['vrms','|<V>|'], linestyle=[0,2] 
    89;general plot making.  No saving. 
    910ClosePlotFile  
  • trunk/tmp.pro

    r242 r250  
    44retall 
    55 
    6 .r tube 
    7 tube,wolfe,[-2],/units 
     6.r kitp4 
     7k256->kitp4,1 
     8 
     9 
     10 
Note: See TracChangeset for help on using the changeset viewer.