Commit 00e99e8f authored by Damien Naudet's avatar Damien Naudet

Added results property.

parent 61a3bf4e
...@@ -125,6 +125,8 @@ class PeakFitter(Thread): ...@@ -125,6 +125,8 @@ class PeakFitter(Thread):
status = property(lambda self: self.__status) status = property(lambda self: self.__status)
results = property(lambda self: self.__results)
def peak_fit(self, def peak_fit(self,
blocking=True, blocking=True,
callback=None): callback=None):
...@@ -308,6 +310,9 @@ class PeakFitter(Thread): ...@@ -308,6 +310,9 @@ class PeakFitter(Thread):
self.__set_status(self.DONE) self.__set_status(self.DONE)
if self.__callback:
self.__callback()
return fit_results return fit_results
...@@ -523,7 +528,8 @@ def _fit_process(th_idx, roiIndices=None): ...@@ -523,7 +528,8 @@ def _fit_process(th_idx, roiIndices=None):
print 'EX', ex print 'EX', ex
times = (t_read, t_mask, t_fit, t_write) times = (t_read, t_mask, t_fit, t_write)
print('Thread {0} done ({1}).'.format(th_idx, times)) if disp_times:
print('Thread {0} done ({1}).'.format(th_idx, times))
return times return times
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment