Ignore:
Timestamp:
Apr 24, 2009 4:40:05 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:
da26c1a
Parents:
4bd557d
Message:

working on stopping scipy fit

File:
1 edited

Legend:

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

    r813334e rad6dd4c  
    354354            Stop the fit engine 
    355355        """ 
    356         if self.calc_fit!= None and self.calc_thread.isrunning(): 
    357             self.calc_thread.stop() 
     356        if self.calc_fit!= None and self.calc_fit.isrunning(): 
     357            self.calc_fit.stop() 
    358358            wx.PostEvent(self.parent, StatusEvent(status="Fitting  \ 
    359359                is cancelled" , type="stop")) 
     
    681681       
    682682        try: 
     683            if result ==None: 
     684                msg= "Simple Fitting Stop !!!" 
     685                wx.PostEvent(self.parent, StatusEvent(status=msg,type="stop")) 
     686                return 
    683687            if numpy.any(result.pvec ==None )or not numpy.all(numpy.isfinite(result.pvec) ): 
    684                 msg= "Fitting did not converge!!!" 
     688                msg= "Single Fitting did not converge!!!" 
    685689                wx.PostEvent(self.parent, StatusEvent(status=msg,type="stop")) 
    686690                return 
     
    727731        ## fit more than 1 model at the same time  
    728732        try: 
     733            if result ==None: 
     734                msg= "Complex Fitting Stop !!!" 
     735                wx.PostEvent(self.parent, StatusEvent(status=msg,type="stop")) 
     736                return 
     737            if numpy.any(result.pvec ==None )or not numpy.all(numpy.isfinite(result.pvec) ): 
     738                msg= "Single Fitting did not converge!!!" 
     739                wx.PostEvent(self.parent, StatusEvent(status=msg,type="stop")) 
     740                return 
    729741            for page, value in self.page_finder.iteritems(): 
    730742                if value.get_scheduled()==1: 
Note: See TracChangeset for help on using the changeset viewer.