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

Use fancy logging

parent 357363a4
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@ class CalibrateAHRS(kp.Module):
self.clbmap = kp.db.CLBMap(det_oid=det_id)
self.cuckoo = kp.time.Cuckoo(60, self.create_plot)
self.cuckoo_log = kp.time.Cuckoo(10, print)
self.cuckoo_log = kp.time.Cuckoo(10, self.cprint)
self.data = {}
self.queue_size = 100000
......@@ -107,7 +107,7 @@ class CalibrateAHRS(kp.Module):
return blob
def create_plot(self):
print(self.__class__.__name__ + ": updating plot.")
self.cprint(self.__class__.__name__ + ": updating plot.")
if self.time_range > 24:
xfmt = md.DateFormatter('%Y-%m-%d %H:%M')
else:
......
......@@ -69,7 +69,7 @@ class DOMActivityPlotter(kp.Module):
return blob
def create_plot(self):
print(self.__class__.__name__ + ": updating plot.")
slef.cprint(self.__class__.__name__ + ": updating plot.")
filename = os.path.join(self.plots_path, 'dom_activity.png')
# now = kp.time.tai_timestamp()
now = time.time()
......
......@@ -72,7 +72,7 @@ class DOMRates(kp.Module):
def create_plot(self):
"""Creates the actual plot"""
print(self.__class__.__name__ + ": updating plot.")
self.cprint(self.__class__.__name__ + ": updating plot.")
filename = os.path.join(self.plots_path, 'dom_rates.png')
plot_dom_parameters(
......@@ -87,7 +87,7 @@ class DOMRates(kp.Module):
missing='black',
under='darkorchid',
over='deeppink')
print("done")
self.cprint("plot up to date.")
def main():
......
......@@ -169,7 +169,7 @@ class PMTRates(kp.Module):
y_base = (floor - 1) * 31
if np.random.rand() > 0.99:
print(f"Rates for DOM ID {dom_id} DU {du}: {tmch_data.pmt_rates}")
self.cprint(f"Rates for DOM ID {dom_id} DU {du}: {tmch_data.pmt_rates}")
hrv_flags = reversed("{0:b}".format(tmch_data.hrvbmp).zfill(32))
for channel_id, (rate, hrv_flag) in enumerate(
......
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