Changeset 9a42ea1 in sasview


Ignore:
Timestamp:
Oct 18, 2018 5:40:10 AM (5 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
9d23e4c, 1e0296b
Parents:
6040cd7
Message:

Don't forget about weighting in copy/paste parameters.

File:
1 edited

Legend:

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

    r6040cd7 r9a42ea1  
    567567        self.communicate.customModelDirectoryChanged.connect(self.onCustomModelChange) 
    568568        self.communicate.saveAnalysisSignal.connect(self.savePageState) 
     569        #self.communicate.loadAnalysisSignal.connect(self.loadPageState) 
    569570        self.smearing_widget.smearingChangedSignal.connect(self.onSmearingOptionsUpdate) 
    570571 
     
    34183419 
    34193420        with open(filepath, 'r') as statefile: 
    3420             statefile.read(lines) 
     3421            #column_data = [line.rstrip().split() for line in statefile.readlines()] 
     3422            lines = statefile.readlines() 
    34213423 
    34223424        # convert into list of lists 
     3425        pass 
    34233426 
    34243427    def loadAnalysisFile(self): 
     
    34453448        param_list = self.getFitParameters() 
    34463449        if format=="": 
     3450            param_list = self.getFitPage() 
     3451            param_list += self.getFitModel() 
    34473452            formatted_output = FittingUtilities.formatParameters(param_list) 
    34483453        elif format == "Excel": 
     
    34593464    def getFitModel(self): 
    34603465        """ 
    3461         serializes model combos state 
     3466        serializes combobox state 
    34623467        """ 
    34633468        param_list = [] 
     
    34683473        param_list.append(['fitpage_model', model]) 
    34693474        param_list.append(['fitpage_structure', structure]) 
     3475 
    34703476        return param_list 
    34713477 
     
    34773483        # first - regular params 
    34783484        param_list = self.getFitParameters() 
     3485 
     3486        param_list.append(['is_data', str(self.data_is_loaded)]) 
     3487        if self.data_is_loaded: 
     3488            param_list.append(['data_id', str(self.logic.data.id)]) 
     3489            param_list.append(['data_name', str(self.logic.data.filename)]) 
    34793490 
    34803491        # option tab 
     
    34823493        param_list.append(['q_range_max', str(self.q_range_max)]) 
    34833494        param_list.append(['q_weighting', str(self.weighting)]) 
     3495        param_list.append(['weighting', str(self.options_widget.weighting)]) 
    34843496 
    34853497        # resolution 
     
    36863698                pass 
    36873699        self.options_widget.updateQRange(self.q_range_min, self.q_range_max, self.npts) 
     3700        try: 
     3701            button_id = int(line_dict['weighting'][0]) 
     3702            for button in self.options_widget.weightingGroup.buttons(): 
     3703                if abs(self.options_widget.weightingGroup.id(button)) == button_id+2: 
     3704                    button.setChecked(True) 
     3705                    break 
     3706        except ValueError: 
     3707            pass 
    36883708 
    36893709        self.updateFullModel(context) 
Note: See TracChangeset for help on using the changeset viewer.