From f6a423183ecaa5a7d6c169603a82e89dc544a725 Mon Sep 17 00:00:00 2001
From: Tamas Gal <tgal@km3net.de>
Date: Fri, 8 Mar 2019 17:19:10 +0100
Subject: [PATCH] Add ROy

---
 scripts/online_reco.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/scripts/online_reco.py b/scripts/online_reco.py
index 1b1d89e..47356fd 100644
--- a/scripts/online_reco.py
+++ b/scripts/online_reco.py
@@ -56,11 +56,14 @@ class ZenithDistribution(kp.Module):
         n_ok = n - np.count_nonzero(np.isnan(self.zeniths))
         fontsize = 16
 
+        roy_zeniths = -np.loadtxt("reco.txt", "r")[-self.max_events:]
+        roy_zeniths[np.abs(roy_zeniths) > .99] = np.nan
+        n_roy = len(roy_zeniths)
+
         fig, ax = plt.subplots(figsize=(16, 8))
-        ax.hist(self.zeniths, bins=180)
-        ax.set_title(
-            r"Zenith distribution of JGandalf track reconstructions"
-            "\nbased on %d reconstructed tracks out of %d events" % (n_ok, n))
+        ax.hist(self.zeniths, bins=180, label="JGandalf (last %d events)" % n)
+        ax.hist(roy_zeniths, bins=180, label="ROy (last %d events)" % n_roy)
+        ax.set_title("Zenith distribution of online track reconstructions")
         ax.set_xlabel(r"cos(zenith)", fontsize=fontsize)
         ax.set_ylabel("count", fontsize=fontsize)
         ax.tick_params(labelsize=fontsize)
-- 
GitLab