diff --git a/scripts/online_reco.py b/scripts/online_reco.py index 1b1d89e4d523ff8afe398be28ef2eff35431b3bb..47356fd4be5b45d451c7e1eabc96c23096d470c5 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)