From 68b58a79bd172c607dfaf8ffd177bfd6bd0d2532 Mon Sep 17 00:00:00 2001
From: Tamas Gal <tgal@km3net.de>
Date: Tue, 21 May 2019 23:38:19 +0200
Subject: [PATCH] Only plot available DUs

---
 scripts/ahrs_calibration.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/ahrs_calibration.py b/scripts/ahrs_calibration.py
index 8fe5bc7..bd432c7 100755
--- a/scripts/ahrs_calibration.py
+++ b/scripts/ahrs_calibration.py
@@ -44,7 +44,7 @@ class CalibrateAHRS(kp.Module):
         self.plots_path = self.require('plots_path')
         det_id = self.require('det_id')
         self.detector = kp.hardware.Detector(det_id=det_id)
-        self.dus = self.detector.dus
+        self.dus = set()
 
         self.clbmap = kp.db.CLBMap(det_oid=det_id)
 
@@ -82,6 +82,7 @@ class CalibrateAHRS(kp.Module):
             return blob
 
         du = clb.du
+        self.dus.add(du)
         cyaw, cpitch, croll = fit_ahrs(tmch_data.A, tmch_data.H, *calib)
         self.cuckoo_log("DU{}-DOM{} (random pick): calibrated yaw={}".format(
             clb.du, clb.floor, cyaw))
-- 
GitLab