Changeset cee5c78 in sasview for src/sas/qtgui/Plotting/Slicers
- Timestamp:
- Nov 9, 2017 8:41:55 AM (7 years ago)
- Branches:
- 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
- Children:
- 7fb471d
- Parents:
- b3e8629
- git-author:
- Piotr Rozyczko <rozyczko@…> (10/27/17 03:42:57)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (11/09/17 08:41:55)
- Location:
- src/sas/qtgui/Plotting/Slicers
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Plotting/Slicers/AnnulusSlicer.py
- Property mode changed from 100755 to 100644
rb3e8629 rcee5c78 145 145 new_plot.xtransform = "x" 146 146 new_plot.ytransform = "y" 147 variant_plot = QtCore.QVariant(new_plot) 148 GuiUtils.updateModelItemWithPlot(self._item, variant_plot, new_plot.id) 147 GuiUtils.updateModelItemWithPlot(self._item, new_plot, new_plot.id) 149 148 self.base.manager.communicator.plotUpdateSignal.emit([new_plot]) 150 149 -
src/sas/qtgui/Plotting/Slicers/Arc.py
- Property mode changed from 100755 to 100644
rb3e8629 rcee5c78 70 70 x = [] 71 71 y = [] 72 if theta1 !=None:72 if theta1 is not None: 73 73 self.theta1 = theta1 74 if theta2 !=None:74 if theta2 is not None: 75 75 self.theta2 = theta2 76 76 while self.theta2 < self.theta1: … … 80 80 npts = int((self.theta2 - self.theta1) / (math.pi / 120)) 81 81 82 if r ==None:82 if r is None: 83 83 self.radius = math.sqrt(math.pow(self._mouse_x, 2) + \ 84 84 math.pow(self._mouse_y, 2)) -
src/sas/qtgui/Plotting/Slicers/BoxSlicer.py
- Property mode changed from 100755 to 100644
rb3e8629 rcee5c78 190 190 new_plot.id = (self.averager.__name__) + self.base.data.name 191 191 new_plot.is_data = True 192 variant_plot = QtCore.QVariant(new_plot) 193 GuiUtils.updateModelItemWithPlot(self._item, variant_plot, new_plot.id) 192 GuiUtils.updateModelItemWithPlot(self._item, new_plot, new_plot.id) 194 193 195 194 if self.update_model: -
src/sas/qtgui/Plotting/Slicers/BoxSum.py
- Property mode changed from 100755 to 100644
rb3e8629 rcee5c78 110 110 parameters = self.getParams() 111 111 # Crete/overwrite model items 112 self._model.setData(self._model.index(0, 0), 113 QtCore.QVariant(formatNumber(parameters['Height']))) 114 self._model.setData(self._model.index(0, 1), 115 QtCore.QVariant(formatNumber(parameters['Width']))) 116 self._model.setData(self._model.index(0, 2), 117 QtCore.QVariant(formatNumber(parameters['center_x']))) 118 self._model.setData(self._model.index(0, 3), 119 QtCore.QVariant(formatNumber(parameters['center_y']))) 112 self._model.setData(self._model.index(0, 0), formatNumber(parameters['Height'])) 113 self._model.setData(self._model.index(0, 1), formatNumber(parameters['Width'])) 114 self._model.setData(self._model.index(0, 2), formatNumber(parameters['center_x'])) 115 self._model.setData(self._model.index(0, 3), formatNumber(parameters['center_y'])) 120 116 121 117 self.setReadOnlyParametersFromModel() … … 130 126 """ 131 127 parameters = self.getParams() 132 self._model.setData(self._model.index(0, 4), 133 QtCore.QVariant(formatNumber(parameters['avg']))) 134 self._model.setData(self._model.index(0, 5), 135 QtCore.QVariant(formatNumber(parameters['avg_error']))) 136 self._model.setData(self._model.index(0, 6), 137 QtCore.QVariant(formatNumber(parameters['sum']))) 138 self._model.setData(self._model.index(0, 7), 139 QtCore.QVariant(formatNumber(parameters['sum_error']))) 140 self._model.setData(self._model.index(0, 8), 141 QtCore.QVariant(formatNumber(parameters['num_points']))) 128 self._model.setData(self._model.index(0, 4), formatNumber(parameters['avg'])) 129 self._model.setData(self._model.index(0, 5), formatNumber(parameters['avg_error'])) 130 self._model.setData(self._model.index(0, 6), formatNumber(parameters['sum'])) 131 self._model.setData(self._model.index(0, 7), formatNumber(parameters['sum_error'])) 132 self._model.setData(self._model.index(0, 8), formatNumber(parameters['num_points'])) 142 133 143 134 def setParamsFromModel(self): … … 362 353 Draw the new roughness on the graph. 363 354 """ 364 if center_x !=None:355 if center_x is not None: 365 356 self.x = center_x 366 if center_y !=None:357 if center_y is not None: 367 358 self.y = center_y 368 359 self.center_marker.set(xdata=[self.x], ydata=[self.y]) -
src/sas/qtgui/Plotting/Slicers/SectorSlicer.py
- Property mode changed from 100755 to 100644
rb3e8629 rcee5c78 125 125 data = self.base.data 126 126 # If we have no data, just return 127 if data ==None:127 if data is None: 128 128 return 129 129 # Averaging … … 132 132 phimin = -self.left_line.phi + self.main_line.theta 133 133 phimax = self.left_line.phi + self.main_line.theta 134 if nbins ==None:134 if nbins is None: 135 135 nbins = 20 136 136 sect = SectorQ(r_min=0.0, r_max=radius, … … 168 168 new_plot.id = "SectorQ" + self.base.data.name 169 169 new_plot.is_data = True 170 variant_plot = QtCore.QVariant(new_plot) 171 GuiUtils.updateModelItemWithPlot(self._item, variant_plot, new_plot.id) 170 GuiUtils.updateModelItemWithPlot(self._item, new_plot, new_plot.id) 172 171 self.base.manager.communicator.plotUpdateSignal.emit([new_plot]) 173 172 … … 349 348 self.left_moving = left 350 349 theta3 = 0 351 if phi !=None:350 if phi is not None: 352 351 self.phi = phi 353 if delta ==None:352 if delta is None: 354 353 delta = 0 355 354 if right: … … 361 360 self.theta = mline.theta + self.phi 362 361 363 if mline !=None:362 if mline is not None: 364 363 if delta != 0: 365 364 self.theta2 = mline + delta … … 509 508 """ 510 509 511 if theta !=None:510 if theta is not None: 512 511 self.theta = theta 513 512 x1 = self.radius * numpy.cos(self.theta)
Note: See TracChangeset
for help on using the changeset viewer.