Changeset 12aa9b5 in sasview for guiframe/model_thread.py
- Timestamp:
- Mar 5, 2009 11:46:57 AM (15 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:
- 07a93a1
- Parents:
- 6c0568b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/model_thread.py
r6d920cd r12aa9b5 32 32 CalcThread.isquit(self) 33 33 except KeyboardInterrupt: 34 #printEVT("Calc %s interrupted" % self.model.name)35 34 wx.PostEvent(self.parent, StatusEvent(status=\ 36 35 "Calc %s interrupted" % self.model.name)) … … 108 107 self.x = x 109 108 self.y = y 109 ## the model on to calculate 110 110 self.model = model 111 111 self.starttime = 0 … … 113 113 "Start Drawing model ",curr_thread=self,type="start")) 114 114 115 115 116 def isquit(self): 116 117 try: 117 118 CalcThread.isquit(self) 118 119 except KeyboardInterrupt: 119 #printEVT("Calc %s interrupted" % self.model.name)120 120 wx.PostEvent(self.parent, StatusEvent(status=\ 121 121 "Calc %s interrupted" % self.model.name)) … … 123 123 raise KeyboardInterrupt 124 124 125 125 126 def update(self, output=None): 126 127 """ 128 Post a message if update available 129 """ 127 130 wx.PostEvent(self.parent, StatusEvent(status="Plot \ 128 131 #updating ... ",curr_thread=self,type="update")) … … 130 133 131 134 def compute(self): 135 """ 136 Compute the data given a model function 137 """ 132 138 import numpy 133 139 x = self.x … … 163 169 "Error computing %s at [%g,%g]" %(self.model.name, self.x[i_x],self.y[i_y]))) 164 170 pass 165 #print "model thread ouput",output171 166 172 elapsed = time.time()-self.starttime 167 173 self.complete(
Note: See TracChangeset
for help on using the changeset viewer.