Changeset a4d4b35 in sasview
- Timestamp:
- Mar 12, 2010 10:48:57 AM (15 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 08ece0b
- Parents:
- 095ab1b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/local_perspectives/plotting/boxSlicer.py
r4ac8556 ra4d4b35 42 42 ## Number of points on the plot 43 43 self.nbins = 30 44 ## If True, I(|Q|) will be return, otherwise, negative q-values are allowed 45 self.fold = True 44 46 ## reference of the current Slab averaging 45 47 self.averager=None … … 135 137 136 138 137 def post_data(self,new_slab=None , nbins=None ):139 def post_data(self,new_slab=None , nbins=None, direction =None): 138 140 """ 139 141 post data averaging in Qx or Qy given new_slab type 140 142 @param new_slab: slicer that determine with direction to average 141 143 @param nbins: the number of points plotted when averaging 144 @param direction: the direction of averaging 142 145 """ 143 146 x_min= -1*math.fabs(self.vertical_lines.x) … … 153 156 raise ValueError,"post data:cannot average , averager is empty" 154 157 self.averager= new_slab 155 bin_width= (x_max + math.fabs(x_min))/self.nbins 158 if direction == "X": 159 if self.fold: x_low = 0 160 else: x_low = math.fabs(x_min) 161 bin_width= (x_max + x_low)/self.nbins 162 else: 163 if self.fold: y_low = 0 164 else: y_low = math.fabs(y_min) 165 bin_width= (y_max + y_low)/self.nbins 156 166 ## Average data2D given Qx or Qy 157 167 box = self.averager( x_min=x_min, x_max=x_max, y_min=y_min, y_max=y_max, 158 168 bin_width=bin_width) 159 169 box.fold = self.fold 160 170 boxavg = box(self.base.data2D) 161 171 #3 Create Data1D to plot … … 541 551 """ 542 552 from DataLoader.manipulations import SlabX 543 self.post_data(SlabX 553 self.post_data(SlabX, direction ="X") 544 554 545 555 … … 559 569 """ 560 570 from DataLoader.manipulations import SlabY 561 self.post_data(SlabY 562 563 571 self.post_data(SlabY, direction ="Y") 572 573
Note: See TracChangeset
for help on using the changeset viewer.