From 55c90d8611072b84c703e17c31b1a3aa656c3647 Mon Sep 17 00:00:00 2001
From: Tamas Gal <tgal@km3net.de>
Date: Wed, 17 Oct 2018 16:48:52 +0200
Subject: [PATCH] Cleanup

---
 scripts/pmt_hrv.py   | 6 +++---
 scripts/pmt_rates.py | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/pmt_hrv.py b/scripts/pmt_hrv.py
index a523b54..30b4aac 100755
--- a/scripts/pmt_hrv.py
+++ b/scripts/pmt_hrv.py
@@ -44,7 +44,7 @@ VERSION = "1.0"
 log = kp.logger.logging.getLogger("PMTrates")
 
 
-class PMTRates(kp.Module):
+class PMTHRV(kp.Module):
     def configure(self):
         self.detector = self.require("detector")
         self.du = self.require("du")
@@ -107,7 +107,7 @@ class PMTRates(kp.Module):
         ax.imshow(m, origin='lower', interpolation='none')
         ax.set_title("HRV Ratios (Monitoring Channel) for DetID-{} DU-{}\n"
                      "PMTs ordered from top to bottom - {}"
-                     .format(self.det_id, self.du, datetime.utcnow()))
+                     .format(self.detector.det_id, self.du, datetime.utcnow()))
         ax.set_xlabel("UTC time [{}s/px]".format(interval))
         plt.yticks([i*31 for i in range(18)],
                    ["Floor {}".format(f) for f in range(1, 19)])
@@ -169,7 +169,7 @@ def main():
                 tags='IO_MONIT',
                 timeout=60*60*24*7,
                 max_queue=2000)
-    pipe.attach(PMTRates,
+    pipe.attach(PMTHRV,
                 detector=detector,
                 du=du,
                 interval=interval,
diff --git a/scripts/pmt_rates.py b/scripts/pmt_rates.py
index 992ae66..ee2bc25 100755
--- a/scripts/pmt_rates.py
+++ b/scripts/pmt_rates.py
@@ -110,7 +110,7 @@ class PMTRates(kp.Module):
         ax.set_title("Mean PMT Rates (Monitoring Channel) for DetID-{} DU-{} "
                      "- colours from 5kHz to 15kHz\n"
                      "PMTs ordered from top to bottom - {}"
-                     .format(self.det_id, self.du, datetime.utcnow()))
+                     .format(self.detector.det_id, self.du, datetime.utcnow()))
         ax.set_xlabel("UTC time [{}s/px]".format(interval))
         plt.yticks([i*31 for i in range(18)],
                    ["Floor {}".format(f) for f in range(1, 19)])
-- 
GitLab