From 8330b603ae3faaaca48c8bb4e76b3c241ccbbd0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Al=C3=A1n=20Mu=C3=B1oz?= <alan.munoz@ed.ac.uk> Date: Mon, 30 Jan 2023 12:53:10 +0000 Subject: [PATCH] fix(signal): timeinterval not being used --- src/agora/io/signal.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/agora/io/signal.py b/src/agora/io/signal.py index c0c3e840..4ea45539 100644 --- a/src/agora/io/signal.py +++ b/src/agora/io/signal.py @@ -1,3 +1,4 @@ +import logging import typing as t from copy import copy from functools import cached_property, lru_cache @@ -85,10 +86,10 @@ class Signal(BridgeH5): """Find the interval between time points (minutes).""" tinterval_location = "time_settings/timeinterval" with h5py.File(self.filename, "r") as f: - if tinterval_location in f: + if tinterval_location in f.attrs: return f.attrs[tinterval_location][0] else: - print( + logging.getlogger("aliby").warn( f"{str(self.filename).split('/')[-1]}: using default time interval of 5 minutes" ) return 5 -- GitLab