Changeset 6ca0da0 in sasview for src/sas/qtgui/Perspectives/Fitting


Ignore:
Timestamp:
Feb 13, 2018 9:08:33 AM (7 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:
c736154
Parents:
731efec
Message:

More code review fixes

File:
1 edited

Legend:

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

    r731efec r6ca0da0  
    1 import os 
    2 import sys 
    31import logging 
    42 
     
    141139 
    142140        # Single fitter for the simultaneous run 
    143         sim_fitter = Fit() 
    144         sim_fitter.fitter_id = self.page_id 
     141        fitter = Fit() 
     142        fitter.fitter_id = self.page_id 
    145143 
    146144        # Notify the parent about fitting started 
     
    151149        page_ids = [] 
    152150        fitter_id = 0 
    153         sim_fitter=[sim_fitter] 
     151        sim_fitter_list=[fitter] 
    154152        # Prepare the fitter object 
    155153        try: 
     
    159157                    # No such tab! 
    160158                    return 
    161                 sim_fitter, fitter_id = tab_object.prepareFitters(fitter=sim_fitter[0], fit_id=fitter_id) 
     159                sim_fitter_list, fitter_id = tab_object.prepareFitters(fitter=sim_fitter_list[0], fit_id=fitter_id) 
    162160                page_ids.append([tab_object.page_id]) 
    163         except ValueError as ex: 
     161        except ValueError: 
    164162            # No parameters selected in one of the tabs 
    165163            no_params_msg = "Fitting can not be performed.\n" +\ 
    166164                            "Not all tabs chosen for fitting have parameters selected for fitting." 
    167             reply = QtWidgets.QMessageBox.question(self, 
    168                                                'Warning', 
    169                                                no_params_msg, 
    170                                                QtWidgets.QMessageBox.Ok) 
     165            QtWidgets.QMessageBox.question(self, 
     166                                           'Warning', 
     167                                            no_params_msg, 
     168                                            QtWidgets.QMessageBox.Ok) 
    171169 
    172170            return 
     
    189187        # new fit thread object 
    190188        calc_fit = FitThread(handler=handler, 
    191                              fn=sim_fitter, 
     189                             fn=sim_fitter_list, 
    192190                             batch_inputs=batch_inputs, 
    193191                             batch_outputs=batch_outputs, 
     
    389387        # Select for fitting 
    390388        param_string = "Fit Page " if num_rows==1 else "Fit Pages " 
    391         to_string = "to its current value" if num_rows==1 else "to their current values" 
    392389 
    393390        self.actionSelect = QtWidgets.QAction(self) 
     
    435432        # Select for fitting 
    436433        param_string = "constraint " if num_rows==1 else "constraints " 
    437         to_string = "to its current value" if num_rows==1 else "to their current values" 
    438434 
    439435        self.actionSelect = QtWidgets.QAction(self) 
Note: See TracChangeset for help on using the changeset viewer.