Changeset ee69839 in sasview for guiframe/local_perspectives/plotting/boxSum.py
- Timestamp:
- Feb 4, 2009 11:22:04 AM (16 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:
- a2b6c05f
- Parents:
- 7ce6c72
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/local_perspectives/plotting/boxSum.py
r1f3655a ree69839 27 27 self.markers = [] 28 28 self.axes = axes 29 self.qmax = self.base.data2D.xmax29 self.qmax = min(self.base.data2D.xmax, self.base.data2D.xmin) 30 30 self.connect = self.base.connect 31 31 self.xmin= -1* 0.5*min(math.fabs(self.base.data2D.xmax),math.fabs( self.base.data2D.xmin)) … … 150 150 data = self.base.data2D 151 151 from DataLoader.manipulations import Boxavg 152 radius = math.sqrt(math.pow(self.qmax,2)+math.pow(self.qmax,2))153 x_min= self. vertical_lines.x2154 x_max= self. vertical_lines.x1152 #radius = math.sqrt(math.pow(self.qmax,2)+math.pow(self.qmax,2)) 153 x_min= self.horizontal_lines.x2 154 x_max= self.horizontal_lines.x1 155 155 y_min= self.vertical_lines.y2 156 156 y_max= self.vertical_lines.y1 157 157 box = Boxavg (x_min=x_min, x_max=x_max, y_min=y_min, y_max=y_max) 158 158 self.count, self.error = box(self.base.data2D) 159 print "count, error",self.count, self.error159 #print "count, error",self.count, self.error 160 160 161 161 def moveend(self, ev): … … 163 163 # Post paramters 164 164 self._post_data() 165 """ 166 event = SlicerParameters.SlicerParameterEvent() 167 event.type = self.__class__.__name__ 168 print "event type boxsum: ", event.type 169 event.params = self.get_params() 170 wx.PostEvent(self.base, event) 171 """ 165 172 166 self.type= self.__class__.__name__ 173 167 params= self.get_params() … … 195 189 params = {} 196 190 197 params[" x"] = math.fabs(self.horizontal_lines.half_width)198 params[" y"] = math.fabs(self.vertical_lines.half_height)191 params["Width"] = math.fabs(self.vertical_lines.half_width)*2 192 params["Height"] = math.fabs(self.horizontal_lines.half_height)*2 199 193 200 194 params["center_x"] = self.center.x … … 218 212 def set_params(self, params): 219 213 220 x_max = math.fabs(params[" x"] )221 y_max = math.fabs(params[" y"] )214 x_max = math.fabs(params["Width"] )/2 215 y_max = math.fabs(params["Height"] )/2 222 216 223 217 self.center_x=params["center_x"] 224 218 self.center_y=params["center_y"] 225 219 """ 226 220 self.center.update(center_x=self.center_x,center_y=self.center_y) 227 221 … … 235 229 self._post_data() 236 230 237 231 """ 238 232 239 233 def freeze_axes(self): … … 410 404 self.save_half_height= math.fabs(y) 411 405 412 self.half_width= math.fabs( x)413 self.save_half_width=math.fabs( x)406 self.half_width= math.fabs(self.x1- self.x2)/2 407 self.save_half_width=math.fabs(self.x1- self.x2)/2 414 408 415 409 try: … … 470 464 Draw the new roughness on the graph. 471 465 """ 466 print "self.half_height",self.half_height,self.half_width 472 467 if width!=None: 473 468 self.half_width= width … … 477 472 self.center_x= center.x 478 473 self.center_y= center.y 479 474 print "vertical width",self.half_width ,self.center_x 480 475 self.x1 = self.half_width + self.center_x 481 476 self.x2= -self.half_width + self.center_x … … 516 511 517 512 self.save_half_height= self.half_height 518 self.save_half_width = self.half_width 513 #self.save_half_width = math.fabs(self.x1-self.x2)/2 514 self.save_half_width = self.half_width 519 515 self.base.freeze_axes() 520 516 … … 535 531 536 532 self.half_height= self.save_half_height 533 #self.half_width= math.fabs(self.x1-self.x2)/2 537 534 self.half_width= self.save_half_width 538 535 … … 545 542 self.x2= self.center_x - delta 546 543 547 self.half_width= math.fabs(self.x1)-self.center_x 544 self.half_width= math.fabs(self.x1-self.x2)/2 545 print "Move vert: vertical width",self.half_width ,self.center_x 548 546 self.has_move=True 549 547 self.base.base.update() … … 660 658 Draw the new roughness on the graph. 661 659 """ 660 print "self.half_width",self.half_width 662 661 if width!=None: 663 662 self.half_width= width
Note: See TracChangeset
for help on using the changeset viewer.