- Timestamp:
- Nov 19, 2018 6:34:03 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 8c85ac1
- Parents:
- a2b8607
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Plotting/Plotter2D.py
r1942f63 r87ca467 107 107 zmax=zmax_2D_temp, show_colorbar=show_colorbar, 108 108 update=update) 109 110 self.updateCircularAverage() 109 111 110 112 def calculateDepth(self): … … 240 242 self.slicer_widget.show() 241 243 242 def onCircularAverage(self):243 """ 244 Perform circular averaging on Data2D244 def circularAverage(self): 245 """ 246 Calculate the circular average and create the Data object for it 245 247 """ 246 248 # Find the best number of bins … … 281 283 new_plot.id = "Circ avg " + self.data.name 282 284 new_plot.is_data = True 285 286 return new_plot 287 288 def onCircularAverage(self): 289 """ 290 Perform circular averaging on Data2D 291 """ 292 new_plot = self.circularAverage() 293 283 294 item = self._item 284 295 if self._item.parent() is not None: 285 296 item = self._item.parent() 297 286 298 GuiUtils.updateModelItemWithPlot(item, new_plot, new_plot.id) 287 299 … … 290 302 self.manager.communicator.forcePlotDisplaySignal.emit([item, new_plot]) 291 303 292 # Show the plot 304 def updateCircularAverage(self): 305 """ 306 Update circular averaging plot on Data2D change 307 """ 308 item = self._item 309 if self._item.parent() is not None: 310 item = self._item.parent() 311 312 # Get all plots for current item 313 plots = GuiUtils.plotsFromModel("", item) 314 ca_caption = '2daverage'+self.data.name 315 # See if current item plots contain 2D average plot 316 test = [ca_caption in plot.group_id for plot in plots] 317 # return prematurely if no circular average plot found 318 if not any(test): return 319 320 # Create a new plot 321 new_plot = self.circularAverage() 322 323 # Overwrite existing plot 324 GuiUtils.updateModelItemWithPlot(item, new_plot, new_plot.id) 325 # Show the new plot, if already visible 326 self.manager.communicator.plotUpdateSignal.emit([new_plot]) 293 327 294 328 def setSlicer(self, slicer):
Note: See TracChangeset
for help on using the changeset viewer.