Changeset d5c5d3d in sasview for src/sas/qtgui/Utilities
- Timestamp:
- Oct 17, 2017 3:25:17 PM (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:
- f0bb711
- Parents:
- d6e5b31
- Location:
- src/sas/qtgui/Utilities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Utilities/GuiUtils.py
re694f0f rd5c5d3d 230 230 dataDeletedSignal = QtCore.pyqtSignal(list) 231 231 232 # Send data to Data Operation Utility panel 233 sendDataToPanel = QtCore.pyqtSignal(dict) 234 235 # Send result of Data Operation Utility panel to Data Explorer 236 updateModelFromDataOperationPanelSignal = QtCore.pyqtSignal(QtGui.QStandardItem, dict) 232 237 233 238 def updateModelItemWithPlot(item, update_data, name=""): … … 430 435 text += 'X_min = %s: X_max = %s\n' % (xmin, max(data.x)) 431 436 text += 'Y_min = %s: Y_max = %s\n' % (ymin, max(data.y)) 432 if data.dy !=None:437 if data.dy is not None: 433 438 text += 'dY_min = %s: dY_max = %s\n' % (min(data.dy), max(data.dy)) 434 439 text += '\nData Points:\n' 435 440 x_st = "X" 436 441 for index in range(len(data.x)): 437 if data.dy !=None and len(data.dy) > index:442 if data.dy is not None and len(data.dy) > index: 438 443 dy_val = data.dy[index] 439 444 else: 440 445 dy_val = 0.0 441 if data.dx !=None and len(data.dx) > index:446 if data.dx is not None and len(data.dx) > index: 442 447 dx_val = data.dx[index] 443 448 else: 444 449 dx_val = 0.0 445 if data.dxl !=None and len(data.dxl) > index:450 if data.dxl is not None and len(data.dxl) > index: 446 451 if index == 0: 447 452 x_st = "Xl" 448 453 dx_val = data.dxl[index] 449 elif data.dxw !=None and len(data.dxw) > index:454 elif data.dxw is not None and len(data.dxw) > index: 450 455 if index == 0: 451 456 x_st = "Xw" … … 486 491 y_val = data.qy_data[index] 487 492 i_val = data.data[index] 488 if data.err_data !=None:493 if data.err_data is not None: 489 494 di_val = data.err_data[index] 490 if data.dqx_data !=None:495 if data.dqx_data is not None: 491 496 dx_val = data.dqx_data[index] 492 if data.dqy_data !=None:497 if data.dqy_data is not None: 493 498 dy_val = data.dqy_data[index] 494 499 -
src/sas/qtgui/Utilities/UnitTesting/GuiUtilsTest.py
r464cd07 rd5c5d3d 69 69 'progressBarUpdateSignal', 70 70 'activeGraphName', 71 'sendDataToPanel', 72 'updateModelFromDataOperationPanelSignal' 71 73 ] 72 74 … … 412 414 self.assertEqual(yscale, "log") 413 415 416 414 417 class FormulaValidatorTest(unittest.TestCase): 415 418 """ Test the formula validator """
Note: See TracChangeset
for help on using the changeset viewer.