Skip to content
Snippets Groups Projects
Commit c87f43ed authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Check if rates are emtpy and skip if needed

parent cbc379a2
No related branches found
No related tags found
No related merge requests found
...@@ -115,6 +115,9 @@ class TriggerRate(kp.Module): ...@@ -115,6 +115,9 @@ class TriggerRate(kp.Module):
fig, ax = plt.subplots(figsize=(16, 4)) fig, ax = plt.subplots(figsize=(16, 4))
for trigger, rates in self.trigger_rates.items(): for trigger, rates in self.trigger_rates.items():
if not rates:
self.log.warning("Empty rates, skipping...")
continue
timestamps, trigger_rates = zip(*rates) timestamps, trigger_rates = zip(*rates)
ax.plot(timestamps, trigger_rates, ax.plot(timestamps, trigger_rates,
**self.styles[trigger], **self.styles[trigger],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment