Changeset bc2db41 in sasview for sansguiframe/src/sans/guiframe/local_perspectives
- Timestamp:
- Apr 18, 2012 10:17:01 AM (13 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:
- 6605880
- Parents:
- da8f4c8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/local_perspectives/plotting/Arc.py
r8c347a6 rbc2db41 1 1 """ 2 Arc slicer for 2D data 3 """ 2 4 import math 3 import wx4 from copy import deepcopy5 5 6 6 from BaseInteractor import _BaseInteractor 7 from sans.guiframe.events import NewPlotEvent8 from sans.guiframe.events import StatusEvent9 7 from sans.guiframe.events import SlicerParameterEvent 10 from sans.guiframe.events import EVT_SLICER_PARS11 12 8 13 9 class ArcInteractor(_BaseInteractor): … … 42 38 def set_layer(self, n): 43 39 """ 40 Allow adding plot to the same panel 41 :param n: the number of layer 44 42 """ 45 43 self.layernum = n … … 48 46 def clear(self): 49 47 """ 48 Clear this slicer and its markers 50 49 """ 51 50 self.clear_markers() … … 60 59 def get_radius(self): 61 60 """ 61 Return arc radius 62 62 """ 63 63 radius = math.sqrt(math.pow(self._mouse_x, 2) + \ … … 67 67 def update(self, theta1=None, theta2=None, nbins=None, r=None): 68 68 """ 69 Update the plotted arc 70 :param theta1: starting angle of the arc 71 :param theta2: ending angle of the arc 72 :param nbins: number of points along the arc 73 :param r: radius of the arc 69 74 """ 70 75 # Plot inner circle … … 75 80 if theta2 != None: 76 81 self.theta2 = theta2 77 #print "ring update theta1 theta2", math.degrees(self.theta1),78 #math.degrees(self.theta2)79 82 while self.theta2 < self.theta1: 80 83 self.theta2 += (2 * math.pi) … … 111 114 def moveend(self, ev): 112 115 """ 116 After a dragging motion reset the flag self.has_move to False 117 :param ev: event 113 118 """ 114 119 self.has_move = False … … 117 122 event.type = self.__class__.__name__ 118 123 event.params = self.get_params() 119 #print "in arc moveend params",self.get_params()120 #wx.PostEvent(self.base.base.parent, event)121 124 self.base.moveend(ev) 122 125
Note: See TracChangeset
for help on using the changeset viewer.