Changeset 286
- Timestamp:
- 12/17/08 16:48:11 (3 years ago)
- Location:
- trunk/Code
- Files:
-
- 7 edited
-
extract.pro (modified) (1 diff)
-
grab.pro (modified) (4 diffs)
-
gsh.pro (modified) (7 diffs)
-
gui.pro (modified) (5 diffs)
-
main_window_event.pro (modified) (2 diffs)
-
p2_user.pro (modified) (2 diffs)
-
slide__define.pro (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Code/extract.pro
r257 r286 61 61 return, fltarr(3,3,3) 62 62 endif 63 Output = dblarr(FinalSize)63 Output = fltarr(FinalSize) 64 64 65 65 SLI = 2 ; the axis we loop over -
trunk/Code/grab.pro
r270 r286 89 89 ;this does modify DomainLeft,Right,Width. 90 90 91 LocalA = self->gsh(LocalStep = nL,LocalField = mL )91 LocalA = self->gsh(LocalStep = nL,LocalField = mL, LocalGridMap = LocalGridMap) 92 92 LocalDomainLeft = self.DomainLeft 93 93 LocalDomainLeft = self.DomainLeft … … 153 153 endelse 154 154 155 155 if self.LevelRange[1] ne -1 then begin 156 finest = where( (*self.hierarchy).level EQ self.levelrange[1]) 157 LocalFinestWidth = (*self.hierarchy)[finest[0]].width 158 self.FinestWidth = (*self.hierarchy)[finest[0]].width ; Not sure if doing this here will cause problems. 159 endif 156 160 157 161 ;print, systime(),"after gs" … … 336 340 LocalB = LocalB( ZoomLeftToActuallyUse[0]:ZoomRightToActuallyUse[0],$ 337 341 ZoomLeftToActuallyUse[1]:ZoomRightToActuallyUse[1] ) 342 LocalGridMap = LocalGridMap( ZoomLeftToActuallyUse[0]:ZoomRightToActuallyUse[0],$ 343 ZoomLeftToActuallyUse[1]:ZoomRightToActuallyUse[1] ) 344 338 345 endif else if rank EQ 1 then begin 339 346 LocalB = LocalB( ZoomLeftToActuallyUse[0]:ZoomRightToActuallyUse[0] ) 347 348 LocalGridMap = LocalGridMap( ZoomLeftToActuallyUse[0]:ZoomRightToActuallyUse[0] ) 340 349 endif 341 350 ;print, systime(),"end of grab" … … 400 409 if ptr_valid(self.b) EQ 1 then ptr_free,self.b 401 410 if ptr_valid(self.a) EQ 1 then ptr_free,self.a 411 if ptr_valid(self.grid_map) EQ 1 then ptr_free, self.grid_map 412 402 413 self.b = ptr_new(LocalB,/no_copy) 403 414 self.a = ptr_new(LocalA,/no_copy) 415 416 if n_elements(LocalGridMap) NE 0 then self.grid_map = ptr_new(LocalGridMap,/no_copy) 417 404 418 self.bdims = [0,0] ;When reducing dimensionality, things go funny sometimes. 405 419 self.bdims = bdims -
trunk/Code/gsh.pro
r263 r286 34 34 ; 7.) Fill the output array with the data. 35 35 36 function slide::gsh, LocalStep = LocalStep, LocalField=LocalField, L evelRange,$36 function slide::gsh, LocalStep = LocalStep, LocalField=LocalField, LocalGridMap=LocalGridMap,LevelRange,$ 37 37 slice=slice,phys_pos=phys_pos, subset=subset, take_subset = take_subset, $ 38 38 pick_method = pick_method … … 99 99 FinestCellWidthUsed = FinestCellWidthUsed < ((*self.hierarchy)[grid]).width 100 100 endfor 101 ;print, FinestCellWidthUsed 101 102 102 FinalSize = round( (self.DomainRight - self.DomainLeft)/FinestCellWidthUsed) 103 103 104 ;print, "finest width",FinestCellWidthUsed 105 ;print, "final size = (", 106 ; self.DomainRight, "-",self.DomainLeft,")/",FinestCellWidthUsed 107 104 108 ; Further get some data about the hierarchy. 105 106 109 107 110 iSize = [1,1,1] … … 201 204 ;declare array of pointers to hold slices. 202 205 bL = ptrarr(nGood) 203 206 grid_list = intarr(nGood) 204 207 ; 205 208 ; The data -> image … … 243 246 244 247 bL[gC] = ptr_new( fltarr( dimsL(dX), dimsL(dY) ) ) 245 248 grid_list[gC] = gL + 1 246 249 ;Change coordinate map. 247 250 if slice EQ 0 then *bL[gC] =reform(aL(0,*,*),dimsL(1),dimsL(2)) … … 255 258 type = size( (*bL[0]), /type) 256 259 Output = fltarr( iSize(dX), iSize(dY) ) 260 LocalGridMap = intarr( iSize(dX), iSize(dY) ) 257 261 if type EQ 5 then Output = dblarr( iSize(dX), iSize(dY) ) 258 262 … … 300 304 301 305 Output(iStart(dX):iEnd(dX), iStart(dY):iEnd(dY))= *bL[gC] 302 306 LocalGridMap(iStart(dX):iEnd(dX), iStart(dY):iEnd(dY))= grid_list[gC] 303 307 endfor ;the GoodGrid loop 304 308 … … 313 317 ;time2 = systime(/seconds) 314 318 ;print, "gsh: time ----", st2(time2 - time1), "----" 315 print, "after gsh: ", self.phys_pos319 ;print, "after gsh: ", self.phys_pos 316 320 ;/dbg 317 321 -
trunk/Code/gui.pro
r271 r286 26 26 wdelete, (*top_uvalue).inquest_pix_number 27 27 ptr_free, (*top_uvalue).b 28 ptr_free, (*top_uvalue).grid_map 28 29 ptr_free, top_uvalue 29 30 end … … 211 212 if ptr_valid( (*top_uvalue).b ) NE 0 then ptr_free, (*top_uvalue).b 212 213 (*top_uvalue).b = call_method('ret', cmd.object, 'b') 214 if ptr_valid( (*top_uvalue).grid_map ) NE 0 then ptr_free, (*top_uvalue).grid_map 215 (*top_uvalue).grid_map = call_method('ret', cmd.object, 'grid_map') 213 216 214 217 if (*top_uvalue).ValidPlot EQ 1 then begin … … 877 880 curse_data_val = widget_label(info_column,uname = 'curse_data_val', value = "val:", $ 878 881 xsize = 120, /align_left) 882 curse_grid_num = widget_label(info_column,uname = 'curse_grid_num', value = "grid:", $ 883 xsize = 120, /align_left) 884 879 885 tl_row = widget_base(info_column,/row) ;'total' label 880 886 t_min_row = widget_base(info_column,/row) ;'total' min and max … … 952 958 ;Data that more than one base needs 953 959 b = ptr_new(/allocate_heap) 954 960 grid_map = ptr_new(/allocate_heap) 955 961 DataLine = ptr_new(/allocate_heap) 956 962 CoordLine = ptr_new(/allocate_heap) … … 995 1001 'inquest_pix_number',inquest_pix_number, $ 996 1002 'ValidPlot',0, $ 997 'b',b )1003 'b',b, 'grid_map',grid_map) 998 1004 999 1005 ;In order to skip some code re-write, I mash the inquest, main, and -
trunk/Code/main_window_event.pro
r223 r286 161 161 ;extract value of the grid. 162 162 dataValue = (*(*top_uvalue).b)[ dPos[0], dPos[1] ] 163 grid_number =(*(*top_uvalue).grid_map)[ dPos[0], dPos[1] ] 163 164 ;print indicies and data value to 164 165 ;curse_x_pos = widget_info(event.top, find_by_uname = "curse_x_pos") 165 166 ;curse_y_pos = widget_info(event.top, find_by_uname = "curse_y_pos") 166 167 curse_data_val = widget_info(event.top, find_by_uname = "curse_data_val") 168 curse_grid_num = widget_info(event.top, find_by_uname = "curse_grid_num") 167 169 curse_x_pos_data = widget_info(event.top, find_by_uname = "curse_x_pos_data") 168 170 curse_y_pos_data = widget_info(event.top, find_by_uname = "curse_y_pos_data") … … 222 224 223 225 widget_control, curse_data_val, set_val = "val: " + st2( dataValue ) 224 226 widget_control, curse_grid_num, set_val = "grid: " + st2( grid_number ) 225 227 errormsg, event, '' 226 228 -
trunk/Code/p2_user.pro
r192 r286 14 14 pos = congrid( bL, self.imx,self.imy) 15 15 16 negatives = where( pos lt 0, count)16 negatives = where( pos ne pos, count) 17 17 red = bytscl(pos) 18 18 green = red … … 24 24 blue[ negatives] = 255 25 25 endif 26 26 print, 'NanHunt', count 27 27 img2 = [ [[red]] , [[green]], [[blue]] ] 28 28 -
trunk/Code/slide__define.pro
r269 r286 147 147 define = { slide, $ 148 148 a:ptr_new(), b:ptr_new(),$ ;data and data slice 149 grid_map:ptr_new(), $ ;point by point, the grid from whence the data came. 149 150 mina:0.0, maxa:0.0, minb:0.0, maxb:0.0,$;extents of data,slice. Filled in grab. 150 151 FixedMinVal:0.0, FixedMaxVal:0.0, $ ;extents for fixed table plotting !sc needs help.
Note: See TracChangeset
for help on using the changeset viewer.
