From 1e2ad3a9b66d1cf4b5c6037ff34b8ea03cbb0234 Mon Sep 17 00:00:00 2001 From: Tamas Gal <tgal@km3net.de> Date: Wed, 20 Feb 2019 16:18:17 +0100 Subject: [PATCH] Add titles --- scripts/rttc.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/rttc.py b/scripts/rttc.py index 0cfcf79..bfdde0c 100644 --- a/scripts/rttc.py +++ b/scripts/rttc.py @@ -50,7 +50,7 @@ def main(): plots_path = args['-o'] detector = kp.hardware.Detector(det_id=det_id) - + clbmap = kp.db.CLBMap(det_id) dmm = kp.io.daq.DMMonitor(dm_ip, base='clb/outparams') params = [] @@ -70,7 +70,8 @@ def main(): data[du].append((datetime.utcnow(), [v['value'] for v in values[idx_start:idx_stop]])) - fig, axes = plt.subplots(figsize=(16, 4 * len(detector.dus))) + n_dus = detector.n_dus + fig, axes = plt.subplots(n_dus, figsize=(16, 4 * n_dus)) for ax, du in zip(axes, detector.dus): times = [] rttc = [] @@ -82,6 +83,9 @@ def main(): rttc.append(rttc_value) ax.plot(times, rttc, marker="X", markersize=6, linestyle='None') + + clb = clbmap.base(du) + ax.set_title("RTTC for CLB %s in Det ID %d" % (clb.upi, det_id)) ax.set_xlabel('time [UTC]') ax.set_ylabel('RTTC [ps]') ax.xaxis.set_major_formatter(xfmt) -- GitLab