Changeset 1bc27f1 in sasview for src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py
- Timestamp:
- May 11, 2017 4:53:22 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:
- d60da0c
- Parents:
- 672b8ab
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py
r2add354 r1bc27f1 1 from copy import deepcopy 2 1 3 from PyQt4 import QtGui 2 4 from PyQt4 import QtCore 3 5 4 6 import numpy 5 from copy import deepcopy6 7 7 8 from sas.sasgui.guiframe.dataFitting import Data1D … … 57 58 item1.setCheckable(True) 58 59 item1.setEditable(False) 59 item_err = QtGui.QStandardItem()60 # item_err = QtGui.QStandardItem() 60 61 # check for polydisp params 61 62 if param.polydisperse: … … 199 200 #flag = self.get_weight_flag() 200 201 #weight = get_weight(data=self.data, is2d=self._is_2D(), flag=flag) 201 202 if reference_data ==None:203 return chisqr202 chisqr = None 203 if reference_data is None: 204 return chisqr 204 205 205 206 # temporary default values for index and weight … … 209 210 # Get data: data I, theory I, and data dI in order 210 211 if isinstance(reference_data, Data2D): 211 if index ==None:212 if index is None: 212 213 index = numpy.ones(len(current_data.data), dtype=bool) 213 if weight !=None:214 if weight is not None: 214 215 current_data.err_data = weight 215 216 # get rid of zero error points … … 221 222 else: 222 223 # 1 d theory from model_thread is only in the range of index 223 if index ==None:224 if index is None: 224 225 index = numpy.ones(len(current_data.y), dtype=bool) 225 if weight !=None:226 if weight is not None: 226 227 current_data.dy = weight 227 if current_data.dy ==None or current_data.dy == []:228 if current_data.dy is None or current_data.dy == []: 228 229 dy = numpy.ones(len(current_data.y)) 229 230 else: … … 288 289 residuals.dxw = None 289 290 residuals.ytransform = 'y' 290 # For latter scale changes 291 # For latter scale changes 291 292 residuals.xaxis('\\rm{Q} ', 'A^{-1}') 292 293 residuals.yaxis('\\rm{Residuals} ', 'normalized') … … 299 300 """ 300 301 # temporary default values for index and weight 301 index = None302 # index = None 302 303 weight = None 303 304 … … 351 352 group_id = reference_data.group_id 352 353 residuals.group_id = "res" + str(group_id) 353 354 354 355 # Symbol 355 356 residuals.symbol = 0
Note: See TracChangeset
for help on using the changeset viewer.