Changeset 31e3298 in sasview
- Timestamp:
- Feb 12, 2009 10:10:23 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:
- 3b909b7
- Parents:
- acb37d9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/local_perspectives/plotting/SectorSlicer.py
r8b30e62 r31e3298 113 113 if self.main_line.has_move: 114 114 self.main_line.update() 115 self.right_line.update( delta = self.main_line.get_radius(),mline= self.main_line) 116 self.left_line.update( delta = self.main_line.get_radius() ,mline= self.main_line) 117 #print "Main line has moved ---> phi right",math.degrees(self.main_line.get_radius()+self.right_line.theta) 115 #print "main_theta--->",self.main_line.get_radius()*180/3.14 116 self.right_line.update( delta = -self.left_line.phi/2+math.pi,mline= self.main_line.theta) 117 #print "main_theta--->",self.main_line.get_radius()*180/3.14 118 self.left_line.update( delta = self.left_line.phi/2+math.pi ,mline= self.main_line.theta) 119 #print "main_theta--->",self.main_line.get_radius()*180/3.14 120 #print "Main line has moved ---> phi right",math.degrees(self.main_line.theta),math.degrees(self.main_line.get_radius()),math.degrees(self.main_line.get_radius()+self.right_line.theta) 118 121 #print "Main line has moved ---> phi left",math.degrees(self.left_line.theta+self.main_line.get_radius()) 119 122 if self.left_line.has_move: … … 153 156 from DataLoader.manipulations import SectorQ 154 157 radius = self.qmax #radius=math.sqrt(math.pow(self.qmax,2)+math.pow(self.qmax,2)) 155 phimin = self.right_line.theta+math.pi156 phimax = self.left_line. theta+math.pi158 phimin = -self.left_line.phi+self.main_line.theta 159 phimax = self.left_line.phi+self.main_line.theta 157 160 #phimin = min(self.right_line.theta+math.pi,self.left_line.theta+math.pi) 158 161 #phimax = max(self.right_line.theta+math.pi,self.left_line.theta+math.pi) 159 #print "sector Q",phimin,phimax 160 sect = SectorQ(r_min=0.0, r_max= radius , phi_min=phimin, phi_max=phimax) 162 #print "sector Q angles=",phimin*180/math.pi,phimax*180/math.pi,self.main_line.theta*180/math.pi 163 #phi must be 0 to 2pi with cut-off line sts on the left. 164 sect = SectorQ(r_min=0.0, r_max= radius , phi_min=phimin+math.pi, phi_max=phimax+math.pi) 161 165 #sect = SectorQ(r_min=-1*radius , r_max= radius , phi_min=phimin, phi_max=phimax) 162 166 if nbins!=None: … … 267 271 self.axes = axes 268 272 273 269 274 self.save_theta = theta2 + phi 270 self.theta= 275 self.theta= theta2 + phi 271 276 self.theta2 = theta2 272 277 self.radius = r … … 336 341 #print "update left or right ", self.has_move 337 342 self.left_moving=left 343 theta3=0 338 344 if phi !=None: 339 345 self.phi= phi 346 if delta==None: 347 delta = 0 348 340 349 if right: 341 350 self.phi = -1*math.fabs(self.phi) 351 #delta=-delta 342 352 else: 343 353 self.phi =math.fabs(self.phi) 344 if delta==None:345 delta = 0346 354 if side: 347 355 self.theta= mline.theta + self.phi 348 349 350 351 if mline!=None: 352 self.theta2 = mline.theta 356 357 if mline!=None : 358 if delta!=0: 359 self.theta2 = mline+delta 360 else: 361 self.theta2 = mline.theta 362 if delta==0: 363 theta3=self.theta+delta 364 else: 365 theta3=self.theta2+delta 366 353 367 #self.phi= math.fabs(self.theta2 - (self.theta+delta)) 354 368 #print "U:for line side theta2, phi, theta",math.degrees(self.theta2),math.degrees(self.phi),math.degrees(self.theta) … … 356 370 # print "between 0-pi",math.degrees(self.theta) 357 371 358 x1= self.radius*math.cos( self.theta + delta)359 y1= self.radius*math.sin( self.theta + delta)360 x2= -1*self.radius*math.cos( self.theta + delta)361 y2= -1*self.radius*math.sin( self.theta + delta)372 x1= self.radius*math.cos(theta3) 373 y1= self.radius*math.sin(theta3) 374 x2= -1*self.radius*math.cos(theta3) 375 y2= -1*self.radius*math.sin(theta3) 362 376 363 377 self.inner_marker.set(xdata=[x1/2.5],ydata=[y1/2.5]) … … 393 407 self.theta= math.atan2(y,x) 394 408 self.has_move=True 395 396 409 #ToDo: Simplify below 397 410 if not self.left_moving: … … 595 608 x = params["radius"] 596 609 self.set_cursor(x, self._inner_mouse_y) 597 598 599 600 610 611 612
Note: See TracChangeset
for help on using the changeset viewer.