Changeset 30e0be0 in sasview for src/sas/qtgui/Calculators/GenericScatteringCalculator.py
- Timestamp:
- Sep 25, 2018 6:35:13 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:
- 4e85147
- Parents:
- 6923863
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Calculators/GenericScatteringCalculator.py
raed0532 r30e0be0 32 32 33 33 trigger_plot_3d = QtCore.pyqtSignal() 34 calculationFinishedSignal = QtCore.pyqtSignal() 34 35 35 36 def __init__(self, parent=None): … … 100 101 # plots - 3D in real space 101 102 self.trigger_plot_3d.connect(lambda: self.plot3d(has_arrow=False)) 103 104 # plots - 3D in real space 105 self.calculationFinishedSignal.connect(self.plot_1_2d) 102 106 103 107 # TODO the option Ellipsoid has not been implemented … … 545 549 d = threads.deferToThread(self.complete, inputs, self._update) 546 550 # Add deferred callback for call return 547 d.addCallback(self.plot_1_2d) 551 #d.addCallback(self.plot_1_2d) 552 d.addCallback(self.calculateComplete) 548 553 d.addErrback(self.calculateFailed) 549 554 except: … … 563 568 print("Calculate Failed with:\n", reason) 564 569 pass 570 571 def calculateComplete(self, d): 572 """ 573 Notify the main thread 574 """ 575 self.calculationFinishedSignal.emit() 565 576 566 577 def complete(self, input, update=None): … … 629 640 self.graph_num += 1 630 641 631 def plot_1_2d(self , d):642 def plot_1_2d(self): 632 643 """ Generate 1D or 2D plot, called in Compute""" 633 644 if self.is_avg or self.is_avg is None: … … 637 648 data.xaxis('\\rm{Q_{x}}', '\AA^{-1}') 638 649 data.yaxis('\\rm{Intensity}', 'cm^{-1}') 639 plot1D = Plotter(self )650 plot1D = Plotter(self, quickplot=True) 640 651 plot1D.plot(data) 641 652 plot1D.show() … … 655 666 data.title = "GenSAS {} #{} 2D".format(self.file_name, 656 667 int(self.graph_num)) 657 plot2D = Plotter2D(self )668 plot2D = Plotter2D(self, quickplot=True) 658 669 plot2D.plot(data) 659 670 plot2D.show() … … 825 836 self.figure.canvas.draw() 826 837 838 def createContextMenu(self): 839 """ 840 Define common context menu and associated actions for the MPL widget 841 """ 842 return 843 844 def createContextMenuQuick(self): 845 """ 846 Define context menu and associated actions for the quickplot MPL widget 847 """ 848 return 849 827 850 828 851 class Plotter3D(QtWidgets.QDialog, Plotter3DWidget):
Note: See TracChangeset
for help on using the changeset viewer.