Changeset 4fc6dbf in sasview for sansview/perspectives/fitting


Ignore:
Timestamp:
Sep 12, 2008 5:16:33 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:
fa5908de
Parents:
e7430b6
Message:

some mofif added

Location:
sansview/perspectives/fitting
Files:
2 edited

Legend:

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

    r49b7efa r4fc6dbf  
    169169            selected_page.Destroy() 
    170170            self.nb.RemovePage(page_number) 
    171             self.name=None 
    172              
     171            #self.name=None 
     172            self.fit_page_name=None 
    173173             
    174174    def set_model_list(self,dict): 
  • sansview/perspectives/fitting/fitting.py

    r49b7efa r4fc6dbf  
    4949        self.standalone=True 
    5050        ## Fit engine 
    51         self._fit_engine = 'scipy' 
     51        self._fit_engine = 'park' 
    5252        # Log startup 
    5353        logging.info("Fitting plug-in started")    
     
    196196        """ 
    197197        #print "fitting: split :went here"  
    198          
    199198        if string.find(item,".")!=-1: 
    200199            param_names= re.split("\.",item) 
     
    268267             wx.PostEvent(self.parent, StatusEvent(status="Fitting error: %s" % sys.exc_value)) 
    269268             
    270       
    271     def _completed(self,result,pars,current_pg, elapsed): 
    272         """ 
    273             Method called with the results when the inversion 
    274             is done 
    275              
    276             @param out: output coefficient for the base functions 
    277             @param cov: covariance matrix 
    278             @param pr: Invertor instance 
    279             @param elapsed: time spent computing 
    280         """ 
    281         
    282         # Save useful info 
    283         self.elapsed = elapsed 
    284         # Keep a copy of the last result 
    285         self._last_out = result.pvec 
    286         self._last_cov = result.cov 
    287         self._last_chisqr=result.fitness 
    288         #print "fitting: initial parameter ",pars 
    289         #result=self.fitter.fit(qmin,qmax) 
    290          
    291         #print "fitting : result",result,result.pvec,result.cov,result.fitness 
    292         i = 0 
    293         for name in pars: 
    294             if result.pvec.__class__==numpy.float64: 
    295                 model.model.setParam(name,result.pvec) 
    296             else: 
    297                 model.model.setParam(name,result.pvec[i]) 
    298                 #print "fitting: i name out[i]", i,name,float(result.pvec[i]) 
    299                 i += 1 
    300         new_cov=[] 
    301         if result.cov !=None: 
    302              for j in range(len(result.cov)): 
    303                  new_cov.append(result.cov[j][j])   
    304         else: 
    305             new_cov=None 
    306         current_pg.onsetValues(result.fitness, result.pvec,new_cov) 
    307         self.plot_helper(currpage=current_pg,qmin=qmin,qmax=qmax) 
    308   
    309          
     269     
    310270    def _on_single_fit(self,id=None,qmin=None,qmax=None): 
    311271        """  
Note: See TracChangeset for help on using the changeset viewer.