kapture2 4 жил өмнө
parent
commit
a84c5898c5

+ 1 - 1
KCG/base/backendinterface.py

@@ -438,7 +438,7 @@ def bk_change_pilot_bunch(board_id, value, silent=False):
 
 def _bif_update_working_dir():
     """
-    make Shure the currently set directory exists an a calibration File is present
+    make Shure the currently set directory exists and a calibration File is present
     """
     path = str(os.path.join(storage.storage.save_location, storage.storage.subdirname))
     print(path)

+ 11 - 4
KCG/widgets/TimescanWidget.py

@@ -1,6 +1,7 @@
 from __future__ import print_function 
 
 from PyQt4 import QtGui, QtCore
+from PyQt4.QtCore import pyqtSlot
 import pyqtgraph as pg
 from PyQt4.QtGui import QFont, QTableWidget
 
@@ -9,6 +10,8 @@ from scipy.stats import chisquare
 from scipy.stats import chi2_contingency
 from scipy.special import erfc, erf
 
+import copy
+
 from ..base import kcgwidget as kcgw
 from ..base.backend import board
 from ..base.backend.DataSet import DataSet
@@ -249,7 +252,8 @@ class ScanThread(QtCore.QObject):
             
         if c25_step_b == 4 and c_step_b == 0:
             print('{:4.3f} emit pbar'.format(time.time()-self.startTime))
-            self.pbarSignal.emit(self.timescan, 
+            tmpScan = copy.deepcopy(self.timescan)
+            self.pbarSignal.emit(tmpScan, 
                                  ((c_step-self.c_min)*(self.c25_max-self.c25_min+1.0) * (self.f_max-self.f_min+1.0) + (c25_step-self.c25_min)*(self.f_max-self.f_min+1.0) + (f_step-self.f_min))/
                                  ((self.c_max-self.c_min+1.0) * (self.c25_max-self.c25_min+1.0) * (self.f_max-self.f_min+1.0))
                                 )
@@ -335,7 +339,7 @@ class ScanPlotWidget(kcgw.KCGWidgets):
         self.par = parent
         self.board_id = board_id
         self.timeScan = None
-        self.block = False
+        #self.block = False
 
         # ------[ Variable declaration ]------------
         self.xrange = (0, 1) #T/H
@@ -483,9 +487,10 @@ class ScanPlotWidget(kcgw.KCGWidgets):
         self.yrange = (f_min, f_max)
         self.step4 = step4
         
+    @pyqtSlot(object)
     def new_data(self, timeScan):
-        while self.block:
-            pass
+        #while self.block:
+        #    pass
 
         self.block = True
         self.timeScan = timeScan
@@ -613,11 +618,13 @@ class ScanPlotWidget(kcgw.KCGWidgets):
         Plot Data
         :return: -
         """
+        """
         if self.block:
             if nonblock == False:
                 return 
         else:
             self.block = True
+        """
         try:
             #print('plot')
             if self.timeScan is None: