Ignore:
Timestamp:
Nov 15, 2017 4:33:09 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:
d4881f6a
Parents:
7c487846
Message:

Initial commit of the P(r) inversion perspective.
Code merged from Jeff Krzywon's ESS_GUI_Pr branch.
Also, minor 2to3 mods to sascalc/sasgui to enble error free setup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/simfitpage.py

    • Property mode changed from 100644 to 100755
    r0a3c740 rfa81e94  
    168168        i = 0 
    169169        for model in self.model_list: 
    170             model_id = self._format_id(model[1].keys()[0]) 
     170            model_id = self._format_id(list(model[1].keys())[0]) 
    171171            for saved_model in sim_state.model_list: 
    172172                save_id = saved_model.pop('name') 
     
    195195                param = item.pop('param_cbox') 
    196196                equality = item.pop('egal_txt') 
    197                 for key, value in init_map.items(): 
     197                for key, value in list(init_map.items()): 
    198198                    model_cbox = model_cbox.replace(key, value) 
    199199                    constraint_value = constraint_value.replace(key, value) 
    200                 for key, value in final_map.items(): 
     200                for key, value in list(final_map.items()): 
    201201                    model_cbox = model_cbox.replace(key, value) 
    202202                    constraint_value = constraint_value.replace(key, value) 
     
    328328        sizer.Add(tab_used, (iy, ix), (1, 1), 
    329329                  wx.EXPAND | wx.ADJUST_MINSIZE, 0) 
    330         for id, value in self.page_finder.iteritems(): 
     330        for id, value in self.page_finder.items(): 
    331331            if id not in self.parent.opened_pages: 
    332332                continue 
     
    757757        self.set_button.Disable() 
    758758 
    759         for id, model in self.constraint_dict.iteritems(): 
     759        for id, model in self.constraint_dict.items(): 
    760760            # check if all parameters have been selected for constraint 
    761761            # then do not allow add constraint on parameters 
    762762            self.model_cbox_left.Append(str(model.name), model) 
    763763        self.model_cbox_left.Select(0) 
    764         for id, model in self.constraint_dict.iteritems(): 
     764        for id, model in self.constraint_dict.items(): 
    765765            # check if all parameters have been selected for constraint 
    766766            # then do not allow add constraint on parameters 
     
    814814        model_right = self.model_cbox_right.GetValue() 
    815815        model_b = self.model_cbox_right.GetClientData(selection_b) 
    816         for id, dic_model in self.constraint_dict.iteritems(): 
     816        for id, dic_model in self.constraint_dict.items(): 
    817817            if model == dic_model: 
    818818                param_list = self.page_finder[id].get_param2fit() 
     
    857857        if len(self.constraints_list) != 0: 
    858858            nb_fit_param = 0 
    859             for id, model in self.constraint_dict.iteritems(): 
     859            for id, model in self.constraint_dict.items(): 
    860860                nb_fit_param += len(self.page_finder[id].get_param2fit()) 
    861861            # Don't add anymore 
     
    879879        model_cbox = wx.ComboBox(self, wx.ID_ANY, style=wx.CB_READONLY) 
    880880        model_cbox.Clear() 
    881         for id, model in self.constraint_dict.iteritems(): 
     881        for id, model in self.constraint_dict.items(): 
    882882            # check if all parameters have been selected for constraint 
    883883            # then do not allow add constraint on parameters 
     
    898898        # Remove button 
    899899        #btRemove = wx.Button(self, self.ID_REMOVE, 'Remove') 
    900         bt_remove = wx.Button(self, self._ids.next(), 'Remove') 
     900        bt_remove = wx.Button(self, next(self._ids), 'Remove') 
    901901        bt_remove.Bind(wx.EVT_BUTTON, self.on_remove, 
    902902                      id=bt_remove.GetId()) 
     
    931931        hide buttons related constraint 
    932932        """ 
    933         for id in self.page_finder.iterkeys(): 
     933        for id in self.page_finder.keys(): 
    934934            self.page_finder[id].clear_model_param() 
    935935 
     
    969969        model = model_cbox.GetClientData(n) 
    970970        param_list = [] 
    971         for id, dic_model in self.constraint_dict.iteritems(): 
     971        for id, dic_model in self.constraint_dict.items(): 
    972972            if model == dic_model: 
    973973                param_list = self.page_finder[id].get_param2fit() 
     
    10561056                msg += " in combobox to set constraint! " 
    10571057                wx.PostEvent(self.parent.parent, StatusEvent(status=msg)) 
    1058             for id, value in self.constraint_dict.iteritems(): 
     1058            for id, value in self.constraint_dict.items(): 
    10591059                if model == value: 
    10601060                    if constraint == "": 
     
    10801080                        return False 
    10811081 
    1082                     for fid in self.page_finder[id].iterkeys(): 
     1082                    for fid in self.page_finder[id].keys(): 
    10831083                        # wrap in param/constraint in str() to remove unicode 
    10841084                        self.page_finder[id].set_model_param(str(param), 
Note: See TracChangeset for help on using the changeset viewer.