Ignore:
Timestamp:
Sep 12, 2011 12:56:53 PM (13 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:
33dd2e5
Parents:
8aa5788
Message:

make sure smearer is not computed multplie time

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fittingview/src/sans/perspectives/fitting/fitproblem.py

    r8aa5788 r7afcae8  
    400400        self.list_param = [] 
    401401        ## smear object to smear or not data1D 
    402         self.smearer_compute_count = 0 
     402        self.smearer_computed = False 
    403403        self.smearer_enable = False 
    404404        self.smearer_computer_value = None 
     
    432432        if not self.smearer_enable: 
    433433            return None 
    434         #if self.smearer_computer_value is None and \ 
    435         #     self.smearer_compute_count > 1: 
     434        if not self.smearer_computed: 
    436435            #smeari_selection should be call only once per fitproblem 
    437         self.smearer_computer_value = smear_selection(self.fit_data, 
     436            self.smearer_computer_value = smear_selection(self.fit_data, 
    438437                                                           self.model) 
    439         self.smearer_compute_count += 1 
     438            self.smearer_computed = True 
    440439        return self.smearer_computer_value 
    441440     
     
    456455        :param name: name created for model 
    457456        """ 
    458         self.model= model 
     457        self.model = model 
     458        self.smearer_computer_value = smear_selection(self.fit_data, 
     459                                                           self.model) 
     460        self.smearer_computed = True 
    459461         
    460462    def get_model(self): 
     
    487489        """ 
    488490        self.fit_data = copy.deepcopy(data) 
     491        self.smearer_computer_value = smear_selection(self.fit_data, 
     492                                                           self.model) 
     493        self.smearer_computed = True 
    489494         
    490495    def get_fit_data(self): 
Note: See TracChangeset for help on using the changeset viewer.