Changeset 513115c in sasview


Ignore:
Timestamp:
Apr 20, 2009 4:38:55 PM (15 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:
773806e
Parents:
2b8b1a2
Message:

reducing possibility to fit the same model many time

Location:
sansview/perspectives/fitting
Files:
3 edited

Legend:

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

    r1c1436d r513115c  
    11571157        if len(self.param_toFit)>0: 
    11581158            for item in self.fittable_param: 
    1159                 if item in self.para_toFit: 
     1159                if item in self.param_toFit: 
    11601160                    self.param_toFit.remove(item) 
    11611161            for item in self.orientation_params_disp: 
    1162                 if item in self.para_toFit: 
     1162                if item in self.param_toFit: 
    11631163                    self.param_toFit.remove(item) 
    1164                  
     1164          
    11651165        self.fittable_param=[] 
    11661166        self.fixed_param=[] 
     
    12291229            draw sizer with array dispersity  parameters 
    12301230        """ 
     1231        if len(self.param_toFit)>0: 
     1232            for item in self.fittable_param: 
     1233                if item in self.param_toFit: 
     1234                    self.param_toFit.remove(item) 
     1235            for item in self.orientation_params_disp: 
     1236                if item in self.param_toFit: 
     1237                    self.param_toFit.remove(item) 
    12311238        self.fittable_param=[] 
    12321239        self.fixed_param=[] 
  • sansview/perspectives/fitting/fitpage.py

    r2872035 r513115c  
    814814                        else: 
    815815                            ## for 1D all parameters except orientation 
    816                             if not item in self.orientation_params: 
     816                            if not item in self.orientation_params_disp: 
    817817                                item[0].SetValue(True) 
    818818                                self.param_toFit.append(item ) 
  • sansview/perspectives/fitting/fitting.py

    r1c1436d r513115c  
    167167        self.graph=graph 
    168168        for item in graph.plottables: 
     169            if hasattr(item,"is_data"): 
     170                if item.is_data== False: 
     171                    return [] 
     172            
    169173            if item.__class__.__name__ is "Data2D": 
    170174                return [["Select data  for Fitting",\ 
     
    434438                    templist = page.get_param_list() 
    435439                    for element in templist: 
    436                         name = str(element[0].GetLabelText()) 
     440                        name = str(element[1]) 
    437441                        pars.append(name) 
    438442                    #Set Engine  (model , data) related to the page on  
     
    967971                if new_plot.id == data.id: 
    968972                    new_plot.id += "Model" 
    969           
     973                new_plot.is_data =False  
    970974            # Pass the reset flag to let the plotting event handler 
    971975            # know that we are replacing the whole plot 
     
    10201024         
    10211025        else: 
    1022             theory.id= "Model" 
    1023             theory.group_id= "Model"+data.name 
     1026            theory.id= data.id+"Model" 
     1027            theory.group_id= data.name+"Model" 
    10241028            theory.x_bins= data.x_bins 
    10251029            theory.y_bins= data.y_bins 
    10261030            theory.detector= data.detector 
    10271031            theory.source= data.source 
    1028              
     1032            theory.is_data =False  
    10291033            ## plot boundaries 
    10301034            theory.ymin= data.ymin 
Note: See TracChangeset for help on using the changeset viewer.