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

Fix HRV plot

parent 90e90def
No related branches found
No related tags found
No related merge requests found
...@@ -170,10 +170,13 @@ class PMTRates(kp.Module): ...@@ -170,10 +170,13 @@ class PMTRates(kp.Module):
if np.random.rand() > 0.90: if np.random.rand() > 0.90:
print(f"Rates for DOM ID {dom_id} DU {du}: {tmch_data.pmt_rates}") print(f"Rates for DOM ID {dom_id} DU {du}: {tmch_data.pmt_rates}")
for channel_id, rate in enumerate(tmch_data.pmt_rates): hrv_flags = reversed("{0:b}".format(tmch_data.hrvbmp).zfill(32))
for channel_id, (rate, hrv_flag) in enumerate(
zip(tmch_data.pmt_rates, hrv_flags)):
idx = y_base + kp.hardware.ORDERED_PMT_IDS[channel_id] idx = y_base + kp.hardware.ORDERED_PMT_IDS[channel_id]
with self.lock: with self.lock:
self.rates[idx].append(rate) self.rates[idx].append(rate)
self.hrv[idx].append(int(hrv_flag))
return blob return blob
......
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