- Timestamp:
- Dec 8, 2016 3:46:27 AM (8 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:
- b4b8589, d1fb22ee
- Parents:
- 416fa8f
- Location:
- src/sas
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/DataExplorer.py
r416fa8f rcad617b 801 801 def showEditDataMask(self): 802 802 """ 803 Mask Editor for 2D plots 803 804 """ 804 805 index = self.treeView.selectedIndexes()[0] … … 807 808 808 809 mask_editor = MaskEditor(self, data) 809 810 # Modal dialog here. 810 811 mask_editor.exec_() 811 812 -
src/sas/qtgui/Plotter2D.py
r416fa8f rcad617b 47 47 self.scale = 'linear' 48 48 if not self.zmin is None: 49 zmin_2D_temp = numpy.pow (10, self.zmin)49 zmin_2D_temp = numpy.power(10, self.zmin) 50 50 if not self.zmax is None: 51 zmax_2D_temp = numpy.pow (10, self.zmax)51 zmax_2D_temp = numpy.power(10, self.zmax) 52 52 else: 53 53 self.scale = 'log_{10}' … … 194 194 195 195 QtGui.QDialog.__init__(self) 196 Plotter2DWidget.__init__(self, manager=parent, quickplot=quickplot, dimension= 2)196 Plotter2DWidget.__init__(self, manager=parent, quickplot=quickplot, dimension=dimension) -
src/sas/qtgui/UI/MaskEditorUI.ui
r416fa8f rcad617b 26 26 <layout class="QVBoxLayout" name="verticalLayout"> 27 27 <item> 28 <widget class="QRadioButton" name="r adioButton">28 <widget class="QRadioButton" name="rbWings"> 29 29 <property name="text"> 30 30 <string>Double Wings</string> … … 33 33 </item> 34 34 <item> 35 <widget class="QRadioButton" name="r adioButton_3">35 <widget class="QRadioButton" name="rbCircularDisk"> 36 36 <property name="text"> 37 37 <string>Circular Disk</string> … … 40 40 </item> 41 41 <item> 42 <widget class="QRadioButton" name="r adioButton_2">42 <widget class="QRadioButton" name="rbRectangularDisk"> 43 43 <property name="text"> 44 44 <string>Rectangular Disk</string> … … 47 47 </item> 48 48 <item> 49 <widget class="QRadioButton" name="r adioButton_4">49 <widget class="QRadioButton" name="rbDoubleWingWindow"> 50 50 <property name="text"> 51 51 <string>Double Wing Window</string> … … 54 54 </item> 55 55 <item> 56 <widget class="QRadioButton" name="r adioButton_5">56 <widget class="QRadioButton" name="rbCircularWindow"> 57 57 <property name="text"> 58 58 <string>Circular Window</string> … … 61 61 </item> 62 62 <item> 63 <widget class="QRadioButton" name="r adioButton_6">63 <widget class="QRadioButton" name="rbRectangularWindow"> 64 64 <property name="text"> 65 65 <string>Rectangular Window</string> … … 97 97 </item> 98 98 <item row="2" column="0"> 99 <widget class="QPushButton" name=" pushButton">99 <widget class="QPushButton" name="btnAdd"> 100 100 <property name="sizePolicy"> 101 101 <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> … … 110 110 </item> 111 111 <item row="3" column="0"> 112 <widget class="QPushButton" name=" pushButton_2">112 <widget class="QPushButton" name="btnReset"> 113 113 <property name="sizePolicy"> 114 114 <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> … … 123 123 </item> 124 124 <item row="4" column="0"> 125 <widget class="QPushButton" name=" pushButton_3">125 <widget class="QPushButton" name="btnClear"> 126 126 <property name="sizePolicy"> 127 127 <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> -
src/sas/qtgui/UnitTesting/DataExplorerTest.py
r6d05e1d rcad617b 7 7 from mock import MagicMock 8 8 from mock import patch 9 from mpl_toolkits.mplot3d import Axes3D 9 10 10 11 # set up import paths … … 21 22 from UnitTesting.TestUtils import QtSignalSpy 22 23 from sas.qtgui.Plotter import Plotter 24 from sas.qtgui.Plotter2D import Plotter2D 23 25 import sas.qtgui.PlotHelper as PlotHelper 24 26 … … 758 760 """ 759 761 Quick data plot generation. 762 """ 763 # get Data1D 764 p_file=["cyl_400_20.txt"] 765 # Read in the file 766 output, message = self.form.readData(p_file) 767 self.form.loadComplete((output, message)) 768 769 # select the data 770 self.form.treeView.selectAll() 771 772 Plotter.show = MagicMock() # for masking the display 773 774 self.form.quickDataPlot() 775 self.assertTrue(Plotter.show.called) 776 777 def testQuickData3DPlot(self): 778 """ 779 Slow(er) 3D data plot generation. 780 """ 781 # get Data1D 782 p_file=["Dec07031.ASC"] 783 # Read in the file 784 output, message = self.form.readData(p_file) 785 self.form.loadComplete((output, message)) 786 787 # select the data 788 self.form.treeView.selectAll() 789 790 Plotter2D.show = MagicMock() # for masking the display 791 792 self.form.quickData3DPlot() 793 794 self.assertTrue(Plotter2D.show.called) 795 796 def testShowEditMask(self): 797 """ 798 Edit mask on a 2D plot. 760 799 761 800 TODO: add content once plotting finalized 762 801 """ 763 802 pass 803 764 804 765 805 if __name__ == "__main__": -
src/sas/sasgui/plottools/PlotPanel.py
rf74bd6e rcad617b 10 10 matplotlib.interactive(False) 11 11 #Use the WxAgg back end. The Wx one takes too long to render 12 matplotlib.use('WXAgg')12 #matplotlib.use('WXAgg') 13 13 from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg 14 14 from matplotlib.figure import Figure -
src/sas/sasgui/plottools/config.py
r6d05e1d rcad617b 31 31 32 32 plot_version = "0.98" 33 plot_backend = "WXAgg" 33 #plot_backend = "WXAgg" 34 plot_backend = "Qt4Agg" 34 35 35 36 # Sort out matplotlib version -
src/sas/sasgui/plottools/plottables.py
r821c330 rcad617b 676 676 # Sanity check 677 677 # Do the transofrmation only when x and y are empty 678 has_err_x = not (dx ==None or len(dx) == 0)679 has_err_y = not (dy ==None or len(dy) == 0)680 681 if(x != None) and (y !=None):682 if not dx ==None and not len(dx) == 0 and not len(x) == len(dx):678 has_err_x = not (dx is None or len(dx) == 0) 679 has_err_y = not (dy is None or len(dy) == 0) 680 681 if(x is not None) and (y is not None): 682 if not dx is None and not len(dx) == 0 and not len(x) == len(dx): 683 683 msg = "Plottable.View: Given x and dx are not" 684 684 msg += " of the same length" … … 690 690 raise ValueError, msg 691 691 692 if not dy ==None and not len(dy) == 0 and not len(y) == len(dy):692 if not dy is None and not len(dy) == 0 and not len(y) == len(dy): 693 693 msg = "Plottable.View: Given y and dy are not of the same " 694 694 msg += "length: len(y)=%s, len(dy)=%s" % (len(y), len(dy))
Note: See TracChangeset
for help on using the changeset viewer.