Changeset b0b09b9 in sasview for src/sas/qtgui/Calculators/SlitSizeCalculator.py
- Timestamp:
- Oct 26, 2017 3:13:05 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:
- 895e7359
- Parents:
- def64a0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Calculators/SlitSizeCalculator.py
- Property mode changed from 100644 to 100755
rf4a1433 rb0b09b9 11 11 import sas.qtgui.Utilities.GuiUtils as GuiUtils 12 12 13 from UI.SlitSizeCalculator import Ui_SlitSizeCalculator13 from .UI.SlitSizeCalculator import Ui_SlitSizeCalculator 14 14 from sas.sascalc.dataloader.loader import Loader 15 15 from sas.sascalc.calculator.slit_length_calculator import SlitlengthCalculator … … 76 76 # But only with Qt built-in dialog (non-platform native) 77 77 path = QtGui.QFileDialog.getOpenFileName(self, "Choose a file", "", 78 "SAXSess 1D data (*.txt *.TXT *.dat *.DAT)", None,78 "SAXSess 1D data (*.txt *.TXT *.dat *.DAT)", 79 79 QtGui.QFileDialog.DontUseNativeDialog) 80 80 … … 107 107 self.clearResults() 108 108 msg = "ERROR: Data hasn't been loaded correctly" 109 raise RuntimeError , msg109 raise RuntimeError(msg) 110 110 111 111 if data.__class__.__name__ == 'Data2D': 112 112 self.clearResults() 113 113 msg = "Slit Length cannot be computed for 2D Data" 114 raise RuntimeError , msg114 raise RuntimeError(msg) 115 115 116 116 #compute the slit size … … 120 120 if xdata == [] or xdata is None or ydata == [] or ydata is None: 121 121 msg = "The current data is empty please check x and y" 122 raise ValueError , msg122 raise ValueError(msg) 123 123 slit_length_calculator = SlitlengthCalculator() 124 124 slit_length_calculator.set_data(x=xdata, y=ydata) … … 126 126 except: 127 127 self.clearResults() 128 msg = "Slit Size Calculator: %s" % (sys.exc_ value)129 raise RuntimeError , msg128 msg = "Slit Size Calculator: %s" % (sys.exc_info()[1]) 129 raise RuntimeError(msg) 130 130 131 131 slit_length_str = "{:.5f}".format(slit_length)
Note: See TracChangeset
for help on using the changeset viewer.