Ignore:
Timestamp:
May 11, 2017 4:53:22 AM (8 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
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
Message:

Code review fixes SASVIEW-588
Pylint related fixes in Perspectives/Fitting?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py

    r2add354 r1bc27f1  
     1from copy import deepcopy 
     2 
    13from PyQt4 import QtGui 
    24from PyQt4 import QtCore 
    35 
    46import numpy 
    5 from copy import deepcopy 
    67 
    78from sas.sasgui.guiframe.dataFitting import Data1D 
     
    5758        item1.setCheckable(True) 
    5859        item1.setEditable(False) 
    59         item_err = QtGui.QStandardItem() 
     60        # item_err = QtGui.QStandardItem() 
    6061        # check for polydisp params 
    6162        if param.polydisperse: 
     
    199200    #flag = self.get_weight_flag() 
    200201    #weight = get_weight(data=self.data, is2d=self._is_2D(), flag=flag) 
    201  
    202     if reference_data == None: 
    203        return chisqr 
     202    chisqr = None 
     203    if reference_data is None: 
     204        return chisqr 
    204205 
    205206    # temporary default values for index and weight 
     
    209210    # Get data: data I, theory I, and data dI in order 
    210211    if isinstance(reference_data, Data2D): 
    211         if index == None: 
     212        if index is None: 
    212213            index = numpy.ones(len(current_data.data), dtype=bool) 
    213         if weight != None: 
     214        if weight is not None: 
    214215            current_data.err_data = weight 
    215216        # get rid of zero error points 
     
    221222    else: 
    222223        # 1 d theory from model_thread is only in the range of index 
    223         if index == None: 
     224        if index is None: 
    224225            index = numpy.ones(len(current_data.y), dtype=bool) 
    225         if weight != None: 
     226        if weight is not None: 
    226227            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 == []: 
    228229            dy = numpy.ones(len(current_data.y)) 
    229230        else: 
     
    288289    residuals.dxw = None 
    289290    residuals.ytransform = 'y' 
    290     # For latter scale changes  
     291    # For latter scale changes 
    291292    residuals.xaxis('\\rm{Q} ', 'A^{-1}') 
    292293    residuals.yaxis('\\rm{Residuals} ', 'normalized') 
     
    299300    """ 
    300301    # temporary default values for index and weight 
    301     index = None 
     302    # index = None 
    302303    weight = None 
    303304 
     
    351352    group_id = reference_data.group_id 
    352353    residuals.group_id = "res" + str(group_id) 
    353      
     354 
    354355    # Symbol 
    355356    residuals.symbol = 0 
Note: See TracChangeset for help on using the changeset viewer.