Changeset 1d2782d in sasview


Ignore:
Timestamp:
Mar 26, 2009 4:49:11 PM (16 years ago)
Author:
Gervaise Alina <gervyh@…>
Branches:
master, 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
1f57dfd
Parents:
a911b48
Message:

working on simfitpage

Location:
sansview/perspectives/fitting
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/fitpanel.py

    rb28717b r1d2782d  
    7171            # remove the check box link to the model name of this page (selected_page) 
    7272            if self.sim_page !=None : 
    73                 self.sim_page.draw_page(page_finder) 
     73                self.sim_page.draw_page() 
    7474             
    7575            #Delete the page from notebook 
  • sansview/perspectives/fitting/simfitpage.py

    ra911b48 r1d2782d  
    208208        self.model_toFit=[] 
    209209        self.constraints_list=[] 
     210        self.constraint_dict={} 
     211        self.nb_constraint= 0 
     212         
    210213        if len(self.model_list)>0: 
    211214            for item in self.model_list: 
     
    259262        if len(self.model_toFit) < 2: 
    260263            return 
    261         for page, value in self.page_finder.iteritems(): 
    262             model = value.get_model() 
    263             for item in self.model_toFit: 
    264                 if model in item and not model in self.constraint_dict.keys(): 
    265                     self.constraint_dict[model] = page  
     264        for item in self.model_toFit: 
     265            model = item[3] 
     266            page= item[2] 
     267            self.constraint_dict[page] = model 
    266268                    
    267269         
     
    290292        if len(self.constraints_list)!= 0: 
    291293            nb_fit_param = 0 
    292             for model in self.constraint_dict.keys(): 
     294            for model in self.constraint_dict.values(): 
    293295                nb_fit_param += len(get_fittableParam(model)) 
    294296            ##Don't add anymore 
     
    323325        
    324326         
    325         for model, value in self.constraint_dict.iteritems(): 
     327        for page,model in self.constraint_dict.iteritems(): 
    326328            ## check if all parameters have been selected for constraint 
    327329            ## then do not allow add constraint on parameters 
     
    354356            hide buttons related constraint  
    355357        """   
    356         if len(self.constraints_list)>0: 
    357             for item in self.constraints_list: 
    358                 model = item[0].GetClientData(item[0].GetCurrentSelection()) 
    359                 if model  in self.constraint_dict.keys(): 
    360                     page = self.constraint_dict[model] 
    361                     self.page_finder[page].clear_model_param() 
     358        for page  in  self.page_finder.iterkeys(): 
     359            self.page_finder[page].clear_model_param() 
    362360                
    363361        self.nb_constraint =0      
Note: See TracChangeset for help on using the changeset viewer.