Changeset 250
- Timestamp:
- 05/08/08 19:10:46 (4 years ago)
- Location:
- trunk
- Files:
-
- 54 added
- 20 edited
-
AA_KITP (added)
-
AA_KITP/ic1024 (added)
-
AA_KITP/ic128 (added)
-
AA_KITP/ic256 (added)
-
AA_KITP/ic512 (added)
-
AA_KITP/ic64 (added)
-
AA_KITP/kitp_1024 (added)
-
AA_KITP/kitp_128 (added)
-
AA_KITP/kitp_256 (added)
-
AA_KITP/kitp_512 (added)
-
AA_RMSRHO (added)
-
AA_RMSRHO/64v10b25.6 (added)
-
AA_RMSRHO/v10b0 (added)
-
AA_RMSRHO/v10b0.1 (added)
-
AA_RMSRHO/v10b0.4 (added)
-
AA_RMSRHO/v10b1.6 (added)
-
AA_RMSRHO/v10b25.6 (added)
-
AA_RMSRHO/v10b6.4 (added)
-
AA_RMSRHO/v5b0 (added)
-
AakeKITP (added)
-
AakeKITP/CVS (added)
-
AakeKITP/CVS/Entries (added)
-
AakeKITP/CVS/Repository (added)
-
AakeKITP/CVS/Root (added)
-
AakeKITP/find_cores.pro (added)
-
AakeKITP/grid_double.pro (added)
-
AakeKITP/plot_power.pro (added)
-
AakeKITP/plot_sf.pro (added)
-
AakeKITP/ps_power.pro (added)
-
AakeKITP/ps_sf.pro (added)
-
AakeKITP/read_dim.pro (added)
-
AakeKITP/read_grid.pro (added)
-
AakeKITP/read_namelist.pro (added)
-
AakeKITP/read_power.pro (added)
-
AakeKITP/read_sf.pro (added)
-
AakeKITP/read_sph.pro (added)
-
AakeKITP/smooth_test_data.pro (added)
-
AakeKITP/structurefn.pro (added)
-
Code/gs0.pro (modified) (1 diff)
-
Code/gs2.pro (modified) (3 diffs)
-
Code/gsh.pro (modified) (5 diffs)
-
Code/gui.pro (modified) (2 diffs)
-
Code/p2.pro (modified) (1 diff)
-
Code/slide__define.pro (modified) (2 diffs)
-
Code_Xtras/getset.pro (added)
-
Code_Xtras/pdf_plot.pro (added)
-
Tools/ClosePlotFile.pro (modified) (1 diff)
-
Tools/append.pro (modified) (1 diff)
-
Tools/grid_max.pro (added)
-
Tools/legend.pro (added)
-
Tools/minc.pro (modified) (1 diff)
-
Tools/pdf.pro (modified) (3 diffs)
-
Tools/pdfb.pro (modified) (1 diff)
-
Tools/pdfc.pro (added)
-
Tools/read_aake.pro (modified) (2 diffs)
-
Tools/read_pdf.pro (added)
-
XtraTools/pdf_avg.pro (added)
-
XtraTools/spower.pro (modified) (4 diffs)
-
XtraTools/spower_avg.pro (modified) (2 diffs)
-
XtraTools/spower_fit.pro (modified) (2 diffs)
-
XtraTools/spower_get.pro (modified) (1 diff)
-
XtraTools/spower_m10_wrapper (added)
-
XtraTools/spower_plot.pro (modified) (2 diffs)
-
go (modified) (3 diffs)
-
kitp_anal (added)
-
kitp_anal/kitp1.pro (added)
-
kitp_anal/kitp2.pro (added)
-
kitp_anal/kitp4.pro (added)
-
kitp_anal/kitp5.pro (added)
-
kitp_anal/kitploop1.pro (added)
-
kitp_anal/kitploop5.pro (added)
-
kitp_anal/kitpname.pro (added)
-
pp.pro (modified) (1 diff)
-
tmp.pro (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Code/gs0.pro
r222 r250 19 19 case readmethod of 20 20 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) 22 22 else: $ 23 23 arr = self->gs2(nL,mL,gL,dirL,basenameL, $ -
trunk/Code/gs2.pro
r215 r250 65 65 file_name = file_name + "DD" + zeropad(4,nL) + ".products/" 66 66 endif 67 file_name = file_name + fields( self.field)67 file_name = file_name + fields(mL) 68 68 endif 69 69 … … 79 79 80 80 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. 82 83 ; Since there are several variants on the Total Energy field, those 83 84 ; are also looked for. … … 98 99 if OK EQ 0 then begin 99 100 ; 100 ; For cell width or edges, exit quietly. 101 ; For cell width or edges, exit quietly. (mhd enzo only.) 101 102 ; 102 103 if mL EQ 18 OR mL EQ 19 OR mL EQ 20 then begin -
trunk/Code/gsh.pro
r223 r250 22 22 ; 23 23 ; Additionally, supplying LevelRange [a,b] will only plot levels 24 ; betweeen 'a' and 'b', inclusive. a,b=-1 denot s no bound. default24 ; betweeen 'a' and 'b', inclusive. a,b=-1 denotes no bound. default 25 25 ; is [-1,-1] 26 26 ; … … 61 61 phys_pos_set = 1 62 62 endif 63 ; not yet used.63 ;take_subset and subset aren't used yet. 64 64 if n_elements(subset) EQ 0 then subset = self.subset_p 65 65 if n_elements(take_subset) EQ 0 then take_subset = self.take_subset … … 243 243 244 244 bL[gC] = ptr_new( fltarr( dimsL(dX), dimsL(dY) ) ) 245 246 ;Change coordinate map. 245 247 if slice EQ 0 then *bL[gC] =reform(aL(0,*,*),dimsL(1),dimsL(2)) 246 248 if slice EQ 1 then *bL[gC] =reform(aL(*,0,*),dimsL(0), dimsL(2)) 247 249 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))251 250 252 251 endfor ; get and slice loop … … 259 258 260 259 ;for each grid, congrid it to the Destination Grid. 261 ; 'i' refers to the Destination grid.260 ; 'i' refers to the Destination (image) grid 262 261 ; 'd' refers to the Data grid. 263 262 … … 305 304 306 305 307 print, "Grids shown:", GoodList[0:nGood-1] + 1306 ;print, "Grids shown:", GoodList[0:nGood-1] + 1 308 307 if ptr_valid(self.GridsInPlot) then ptr_free, self.GridsInPlot 309 308 self.GridsInPlot = ptr_new(GoodList, /no_copy) 310 309 311 310 ptr_free, bL 312 313 314 311 315 312 ;dbg -
trunk/Code/gui.pro
r248 r250 165 165 (*top_uvalue).zoom = call_method('ret',cmd.object,'zoom') 166 166 167 nRepeats= call_method('ret',cmd.object,'nRepeats') 168 for thisRepeat=1,nRepeats do begin 167 169 168 170 wset, (*top_uvalue).main_pix_number 169 call_method, 'set', cmd.object, 'message', ''171 Call_method, 'set', cmd.object, 'message', '' 170 172 errormsg,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 188 192 ;save a copy of the data array in the gui. 189 193 ;This is needed by the line picker, among other things. 190 194 ;There might be a better way... 191 if ptr_valid( (*top_uvalue).b ) NE 0 then ptr_free, (*top_uvalue).b192 (*top_uvalue).b = call_method('ret', cmd.object, 'b')193 194 if (*top_uvalue).ValidPlot EQ 1 then begin195 if (*top_uvalue).inquest_persistent EQ 1 then begin196 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 198 202 ;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 226 endfor ;repeater. 222 227 223 228 end … … 751 756 scanz_box = cw_field(scan_base,/row,title="scanz" ,/integer,value = self.scanz, xsize = 4, $ 752 757 uname="scanz") 758 repeater_box = cw_field(scan_base,/row,title="nRepeats", /integer, value = self.nRepeats, xsize=4,$ 759 uname="nRepeats") 753 760 scan_button = widget_button(button_column,value = 'Scans', xsize = button_x,ysize = button_y,$ 754 761 event_pro="menu_buttons", uname = "scan_button", $ -
trunk/Code/p2.pro
r231 r250 261 261 262 262 ;actually plots the file. 263 ClosePlotFile, self, /autometa 263 ;ClosePlotFile, self, /autometa 264 ClosePlotFile, self 264 265 265 266 -
trunk/Code/slide__define.pro
r242 r250 121 121 'show_grids','line_width','line_color[0]','line_color[1]','line_color[2]',$ 122 122 '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'] 124 125 125 126 ;read standard defaults from file, then user supplied defaults, if … … 179 180 hierarchy:ptr_new(), $ ;the array of hierarchy structures. 180 181 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 } ; 183 186 184 187 ; GridMap, $ ;Used for p4. Not used yet. -
trunk/Tools/ClosePlotFile.pro
r231 r250 24 24 wset, old_window_number 25 25 wdelete, pixmap_number 26 print, "monkey: ", filename27 26 if keyword_set(autometa) then auto_meta, suffix_switch(filename,".jpg"), slide 28 27 end -
trunk/Tools/append.pro
r242 r250 8 8 9 9 function 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 10 case n_elements(value) of 11 0: type = 0 12 1: type = 1 13 2: type = 2 14 else: type = 1 15 endcase 16 if type EQ 0 then begin 17 print, "thing = append(thing,value)" 18 return,thing 19 endif 20 if 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 26 endif 27 if 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 33 endif 16 34 17 35 return, thing -
trunk/Tools/minc.pro
r3 r250 69 69 70 70 71 function nanc, array, verbose=verbose 72 if n_elements(verbose) EQ 0 then verbose = 0 73 if n_elements(array) EQ 0 then begin 74 print, "maxc(array)" 75 print, " prints the max AND orderd set of coordinates." 76 return,0 77 endif 78 79 dims = size(array, /dimension) 80 rank = (size(dims, /dimension))(0) 81 coords = intarr(rank) 82 83 nans = where( array NE array, count) 84 if count EQ 0 then begin 85 print, "all ok" 86 return, 0 87 endif 88 carray = [[coord(nans[0],dims)]] 89 for n=1, count-1 do begin 90 carray = [[carray],[coord(nans[n],dims)]] 91 end 92 return ,carray 93 94 end 95 96 pro nanc,array,verbose=verbose 97 if n_elements(verbose) EQ 0 then verbose = 0 98 all = nanc(array, verbose=verbose) 99 if 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 111 endif else print, 0 112 end 113 function 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. 117 rank = n_elements(dims) 118 coords = dims*0 119 for 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 126 end 127 128 return ,coords 129 130 end 131 132 71 133 pro minc, array 72 134 print, minc(array) -
trunk/Tools/pdf.pro
r249 r250 96 96 hi = 1.0*histogram(array , omin = minOut, omax = maxOut, binsize = bs) 97 97 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) 99 99 endelse 100 100 … … 181 181 ;write values to screen 182 182 183 print, "Density Range: ", min Out, maxOut183 print, "Density Range: ", min(bins), max(bins) 184 184 print, "extent of probability", min(hi), max(hi) 185 185 print, "peak density = ", MostProbableDensity … … 187 187 188 188 xpos = 70 189 ypos1 = 100 189 ypos1 = 400 190 if keyword_set(loghi) EQ 1 then ypos1 = 100 191 190 192 xyouts, xpos,ypos1, charsize = 1.2, "Sigma = "+ strtrim(Fits[0],2), /device 191 193 xyouts, xpos,ypos1-20, charsize = 1.2, "Avg = "+ strtrim(Fits[1],2), /device -
trunk/Tools/pdfb.pro
r249 r250 3 3 ;gggIn=[0.5,-0.5, 0.03] 4 4 wset,0 5 pdf, d en, Bins=Bins, hi=hi,nbins=200,/loga,$6 PlotTitle = " d128",/norm, /loghi5 pdf, dp, Bins=Bins, hi=hi,nbins=512,/loga,$ 6 PlotTitle = "512 proj",/norm, /loghi 7 7 8 8 ;plot, bins,hi -
trunk/Tools/read_aake.pro
r222 r250 10 10 ; Step is unused. 11 11 12 function read_aake, step,field,grid, datadir, basename = basename 12 function slide::read_aake, step,field,grid, datadir, basename = basename 13 14 dirL = self.datadir 15 nL = self.step 16 17 if 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" 21 endif else begin 22 filename = dirL+"/" $ ;base dir 23 +self.basename+zeropad(4,nL) + ".dat" 24 25 endelse 13 26 14 27 ;set up arrays and variables. 28 ;These two variables could be done better. Revisit if needed. 15 29 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 30 nx=long64(self.aake_size) 31 n_points = long64(nx*nx*nx) 32 if self.aake_bytes EQ 4 then begin 21 33 array = fltarr(nx,nx,nx) 22 num_size = 434 num_size = long64(4) 23 35 endif else if step EQ 8 then begin 24 36 array = dblarr(nx,nx,nx) 25 num_size = 837 num_size = long64(8) 26 38 endif else begin 27 39 print, "error: " … … 32 44 ;The data set doesn't corespond 1-1 to the record numbers. Adjust 33 45 case 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 43 55 endcase 44 56 ;print, block 45 57 ;hack. for testing the converter 46 print, "read_aake: block = field, no intelegence"47 block = field58 ;print, "read_aake: block = field, no intelegence" 59 ;block = field 48 60 ;/hack 49 61 bytes_to_skip = block * n_points * num_size ;advance record to this point -
trunk/XtraTools/spower.pro
r207 r250 3 3 ; 4 4 5 pro slide::spower, field,step, fit_rng = fit_rng, suffix = suffix 5 pro slide::spower, field,step, fit_rng = fit_rng, suffix = suffix, twod=twod,$ 6 hist=hist 6 7 7 8 if n_elements(field) EQ 0 then field = self.field … … 9 10 if n_elements(suffix) EQ 0 then suffix = "" 10 11 ;set up strings for plot labels, filenames 11 f_string_array = [" vx","vy","vz"]12 f_str = f_string_array[ field -2]12 f_string_array = ["d","te","vx","vy","vz","bx","by","bz"] 13 f_str = f_string_array[ field ] 13 14 step_str = st2(step) 14 15 fileroot = f_str + step_str + suffix … … 19 20 20 21 ;get data, make power spectrum. 22 print, "read: " , fileroot 21 23 self->grab, nL = step, mL = field 22 power3d, *(self.a), fit=fit_rng, wavenumbers=wvs, spectrum=spec , afit=afit 24 print, "spectra: " , fileroot 25 if keyword_set(twod) EQ 0 then $ 26 power3d, *(self.a), fit=fit_rng, wavenumbers=wvs, spectrum=spec , afit=afit 27 if keyword_set(twod) EQ 1 then $ 28 power_2d, *(self.b), spec,wvs 23 29 24 30 ;write spectrum to disk for future use. … … 30 36 print, "wrote spectrum to ", fileroot+".power" 31 37 38 if 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 47 endif 48 32 49 ;make image, jpg, eps. 33 for cap = 0,2 do begin34 OpenPlotFile, filename = fileroot, output_method = cap35 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, /device41 ClosePlotFile42 endfor50 ;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 43 60 44 61 -
trunk/XtraTools/spower_avg.pro
r207 r250 11 11 wset,0 12 12 FileList = files 13 Wvs = fltarr(128) 14 spec = fltarr(128) 15 TotalSpectra = fltarr(128) 13 npts = 256 14 Wvs = fltarr(npts) 15 spec = fltarr(npts) 16 TotalSpectra = fltarr(npts) 16 17 for i=0, n_elements(FileList)-1 do begin $ 17 18 print, "read ", FileList[i] &$ … … 28 29 ;plot, wvs, TotalSpectra, /xlog,/ylog,xrange=[1,1000] 29 30 oplot, wvs, TotalSpectra, color='00ff00'x, thick = 2 ;, /xlog,/ylog,xrange=[1,1000] 30 wset,131 spower_fit, wvs, TotalSpectra, [2, 8], comp = -231 ;wset,1 32 spower_fit, wvs, TotalSpectra, [2,20], comp = -0.860486 -
trunk/XtraTools/spower_fit.pro
r207 r250 3 3 ; and fit a power law. 4 4 5 pro spower_fit, wns, spectrum, fit, _EXTRA= EXTRA, comp=comp 5 pro spower_fit, wns, spectrum, fit, _EXTRA= EXTRA, comp=comp, afit=afit, noplot=noplot,$ 6 oplot=oplot 6 7 7 8 if n_elements(fit) EQ 0 then begin … … 28 29 if comp NE 0 then to_plot = spectrum * wns^(-1*comp) 29 30 endif 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 31 if 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 38 endif 34 39 35 40 end -
trunk/XtraTools/spower_get.pro
r231 r250 4 4 ; Watch the suffix used. 5 5 6 nums =[160,170,180] 6 nums =[200,180,160,140,120] 7 ;fields = [2,4] 8 fields = [0,0] 7 9 8 for n=0,n_elements(nums)-1 do for field=2,4 do li->spower,field,nums[n], suffix = "_li_256_m6b0" 10 for 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 = "M ultiCompedPowers_2", output_method = cap1 OpenPlotFile, filename = "Mach10beta1", output_method = cap 2 2 ;comp = 1.666 ;for mach 0.5 pure hydro 3 3 comp = 2 ; for mach 6 … … 6 6 7 7 ;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 9 plot, 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)" 11 oplot, wvs, li_x*wvs^comp ,linestyle = 0 ,color='0000ff'x, psym = ps, symsize = ss 12 oplot, wvs, li_y*wvs^comp ,linestyle = 0 ,color='00ff00'x, psym = ps, symsize = ss 13 oplot, 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 15 16 ;oplot, wvs, hlle_d0*wvs^comp ,linestyle = 0 ,psym = ps, symsize = ss 16 17 ;oplot, wvs, roe*wvs^comp ,linestyle = 0 ,color='0000ff'x, psym = ps, symsize = ss 17 18 ;oplot, wvs, ppm*wvs^comp ,linestyle = 0 ,color = 'ff0000'x, psym = ps, symsize = ss 18 19 ;oplot, wvs, ppml*wvs^comp ,linestyle = 0 ,color='00ff00'x, psym = ps, symsize = ss 19 ClosePlotFile 20 ClosePlotFile,li10,/autometa -
trunk/go
r241 r250 4 4 5 5 6 ;RootIDL = ":/users/ucsd/ux454321/Microscope/trunk"7 RootIDL = ":/home/dcollins/Microscope/trunk"8 6 RootIDL = ":/users/ucsd/ux454321/Microscope/trunk" 7 ;RootIDL = ":/home/dcollins/Microscope/trunk" 8 print, "Root ", RootIDL 9 9 !path = !path + RootIDL+"/Code" 10 10 !path = !path + RootIDL+"/Code_Xtras" … … 12 12 !path = !path + RootIDL+"/XtraTools" 13 13 !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 14 20 wan = "/gpfs-wan/projects/lca/dcollins/" 15 21 scratch = "/gpfs/ux454321" … … 37 43 .r gs1 ;gets derived data (reads from file w/ gs0, manipulates) 38 44 .r gs ;switches between gs0,gs1 (straight from file or derived.) 39 45 .r read_aake ;IO for KITP comparison. 40 46 ;manipulation, plotting 41 47 .r read_hierarchy_wrapper -
trunk/pp.pro
r221 r250 1 1 2 if n_elements(pp_file) EQ 0 then pp_file = " ARSE"2 if n_elements(pp_file) EQ 0 then pp_file = "v10b64_long_velocities" 3 3 OpenPlotFile, filename = pp_file, output_method = cap 4 4 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 5 plot, f1[1,*],f1[3,*], title = "Vrms vs. <V>", linestyle = 0, ytitle="velocity",$ 6 xtitle="time" 7 oplot, f1[1,*],sqrt(( f1[12,*]^2 + f1[13,*]^2 + f1[14,*]^2 )), linestyle = 2 8 legend, ['vrms','|<V>|'], linestyle=[0,2] 8 9 ;general plot making. No saving. 9 10 ClosePlotFile -
trunk/tmp.pro
r242 r250 4 4 retall 5 5 6 .r tube 7 tube,wolfe,[-2],/units 6 .r kitp4 7 k256->kitp4,1 8 9 10
Note: See TracChangeset
for help on using the changeset viewer.
