Changeset 70bf68c in sasview


Ignore:
Timestamp:
Jul 13, 2009 11:25:26 AM (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:
077809c
Parents:
770e4c9
Message:

working on residual function

Location:
park_integration
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • park_integration/AbstractFitEngine.py

    r4331b05e r70bf68c  
    324324        self.qmin = 1e-16 
    325325        self.qmax = math.sqrt(x*x +y*y) 
    326         
     326        ## new error image for fitting purpose 
     327        if self.err_image== None or self.err_image ==[]: 
     328            self.res_err_image= numpy.zeros(len(self.y_bins),len(self.x_bins)) 
     329        else: 
     330            self.res_err_image = copy.deepcopy(self.err_image) 
     331        self.res_err_image[self.err_image==0]=1 
    327332        
    328333        
     
    349354        """ 
    350355        res=[] 
    351         if self.err_image== None or self.err_image ==[]: 
    352             err_image= numpy.zeros(len(self.y_bins),len(self.x_bins)) 
    353         else: 
    354             err_image = copy.deepcopy(self.err_image) 
    355              
    356         err_image[err_image==0]=1 
     356        
    357357        for i in range(len(self.x_bins)): 
    358358            for j in range(len(self.y_bins)): 
     
    361361                if self.qmin <= radius and radius <= self.qmax: 
    362362                    res.append( (self.image[j][i]- fn([self.x_bins[i],self.y_bins[j]]))\ 
    363                             /err_image[j][i] ) 
     363                            /self.res_err_image[j][i] ) 
    364364         
    365365        return numpy.array(res) 
     
    380380 
    381381 
    382 class sansAssembly: 
     382class SansAssembly: 
    383383    """ 
    384384         Sans Assembly class a class wrapper to be call in optimizer.leastsq method 
  • park_integration/ScipyFitting.py

    r6963aa3 r70bf68c  
    8383         
    8484        try: 
    85             functor= sansAssembly(self.paramList,model,data, curr_thread= self.curr_thread) 
     85            functor= SansAssembly(self.paramList,model,data, curr_thread= self.curr_thread) 
    8686            out, cov_x, info, mesg, success = optimize.leastsq(functor,model.getParams(self.paramList), full_output=1, warning=True) 
    8787             
Note: See TracChangeset for help on using the changeset viewer.