Changeset 949aa2c in sasview for src/sans/perspectives/fitting/console.py
- Timestamp:
- Jun 3, 2014 6:13:26 PM (10 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:
- f8940db
- Parents:
- 35086c3 (diff), eb9fc6d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sans/perspectives/fitting/console.py
r5777106 r35086c3 5 5 import time 6 6 import wx 7 import park 8 from park.fitresult import FitHandler 7 from sans.fit import FitHandler 9 8 10 9 class ConsoleUpdate(FitHandler): … … 88 87 Print result object 89 88 """ 90 msg = " \n %s \n" % s elf.result.__str__()89 msg = " \n %s \n" % str(self.result) 91 90 wx.PostEvent(self.parent, StatusEvent(status=msg)) 92 91 … … 129 128 130 129 131 def update_fit(self, msg="",last=False):130 def update_fit(self, last=False): 132 131 """ 133 132 """ … … 136 135 self.update_duration = t1 137 136 self.fit_duration += self.elapsed_time 138 str_time = time.strftime("% a, %d %b %Y%H:%M:%S ", time.localtime(t1))139 UPDATE_INTERVAL = 0.5137 str_time = time.strftime("%Y-%m-%d %H:%M:%S ", time.localtime(t1)) 138 UPDATE_INTERVAL = 5.0 140 139 u_flag = False 141 140 if self.fit_duration >= UPDATE_INTERVAL: 142 141 self.fit_duration = 0 143 142 u_flag = True 144 if not last: 145 msg += "Fit Updates ... %s \n" % str_time 146 else: 147 msg += "Final updates ........." 143 msg = str_time 148 144 if u_flag or last: 149 145 if self.result is not None: … … 164 160 msg += str(self.result) 165 161 msg += "\n" 166 if not last:167 msg += "About %s s elapsed......... \n" % \168 str (UPDATE_INTERVAL)169 162 else: 170 163 msg += "No result available\n"
Note: See TracChangeset
for help on using the changeset viewer.