Changeset 66ff250 in sasview for sansview/perspectives/fitting/fit_thread.py
- Timestamp:
- Mar 18, 2011 6:20:50 PM (14 years ago)
- 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:
- e4957fb
- Parents:
- 511c6810
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fit_thread.py
r6bbeacd4 r66ff250 1 1 2 import sys 3 from data_util.calcthread import CalcThread 2 4 3 from data_util.calcthread import CalcThread4 5 5 6 class FitThread(CalcThread): … … 8 9 def __init__(self, parent, 9 10 fn, 11 page_id, 10 12 handler, 11 13 pars=None, … … 23 25 self.fitter = fn 24 26 self.pars = pars 27 self.page_id = page_id 25 28 self.starttime = 0 26 29 self.updatefn = updatefn … … 35 38 except KeyboardInterrupt: 36 39 raise KeyboardInterrupt 37 40 38 41 def compute(self): 39 42 """ … … 41 44 """ 42 45 try: 43 self.handler.starting_fit() 44 self.updatefn() 46 #self.handler.starting_fit() 45 47 #Result from the fit 46 48 result = self.fitter.fit(handler=self.handler, curr_thread=self) 47 self.updatefn()48 49 self.complete(result= result, 50 page_id=self.page_id, 49 51 pars = self.pars) 50 52 … … 54 56 #print "keyboard exception" 55 57 #Stop on exception during fitting. Todo: need to put some mssg and reset progress bar. 56 self.handler.error(msg=msg) 58 raise 59 #if self.handler is not None: 60 # self.handler.error(msg=msg) 61 except: 62 raise 63 #if self.handler is not None: 64 # self.handler.error(msg=str(sys.exc_value)) 65 57 66 67
Note: See TracChangeset
for help on using the changeset viewer.