Browse Source

Bugfix: plotPeak
Triage: Switch ADC Fine Dealy banks with each other

kapture2 3 years ago
parent
commit
2c9e2a5616
2 changed files with 18 additions and 10 deletions
  1. 13 5
      KCG/base/backend/DataSet.py
  2. 5 5
      KCG/widgets/PlotWidget.py

+ 13 - 5
KCG/base/backend/DataSet.py

@@ -195,7 +195,13 @@ class DataSet(object):
 
 
         finedelay_factor = board_config.get("chip_delay_factor")
-        finedelays = board_config.get("chip_delay")
+
+        #TRIAGE:
+        #FMC Banks are currently (18.12.2020) switched, so the slots for the
+        #ADC delay slots 1,2,3,4 are for ADCs 5,6,7,8 and vice versa
+        fdelays = board_config.get("chip_delay")
+        finedelays = fdelays[:4] + fdelays[4:]
+        
         finedelays = [i * finedelay_factor for i in finedelays]
 
 
@@ -240,11 +246,13 @@ class DataSet(object):
 
 
         #Express the delays as fractions of full timing distance between bunches
-        adcdelays_ps = [i / time_between_bunches_ps for i in adcdelays_ps]
+        adcdelays_ps = [float(i) / time_between_bunches_ps for i in adcdelays_ps]
 
-        print("###############################")
-        print(adcdelays_ps)
-        print("###############################")
+        #print("###############################")
+        #print(finedelays)
+        #print(adcdelays_ps)
+        #print(board_config.dump())
+        #print("###############################")
 
 
         return adcdelays_ps

+ 5 - 5
KCG/widgets/PlotWidget.py

@@ -406,7 +406,7 @@ class SubPlotWidget(pg.GraphicsLayoutWidget):
 
 
 
-    def plotPeak(self, data)
+    def plotPeak(self, data):
         """
         Plot the datapoints of all available ADCs as time-series data and
         optionally do a polyfit between the points to visualize an
@@ -421,11 +421,11 @@ class SubPlotWidget(pg.GraphicsLayoutWidget):
         self.plotItemPlotScatter1.show()
         
         baseline = []
-        doFit = 6 if self.fittGauss.isChecked() else 0
-
         #Currently not supported / cleanup required
-        #if doFit > 0:
-        if False:
+        #doFit = 6 if self.fittGauss.isChecked() else 0
+        doFit = 0
+
+        if doFit > 0:
              
             x = np.reshape(data[0][0], (-1, doFit))
             y = np.reshape(data[0][1], (-1, doFit))