diff --git a/notebooks/test_watertank.py b/notebooks/test_watertank.py index 4a4e944a..70b4c58c 100644 --- a/notebooks/test_watertank.py +++ b/notebooks/test_watertank.py @@ -32,7 +32,7 @@ zInput = 50 frequency = 405e3 -voltage = 50.0 +voltage = 25.0 duration = 2e-4 json_trigger_data = { @@ -82,11 +82,8 @@ def log_temperature(): filename = f"{timestamp}_temp.csv" with open(filename, "w") as logfile: while not stop_logging: - print("Retrieving Console temperature...") con_temp = interface.hvcontroller.get_temperature1() - print("Retrieving TX temperature...") tx_temp = interface.txdevice.get_temperature() - print("Retrieving TX Amb temperature...") amb_temp = interface.txdevice.get_ambient_temperature() current_time = time.strftime("%Y-%m-%d %H:%M:%S") log_line = f"{current_time},{frequency},{duration},{voltage},{con_temp},{tx_temp},{amb_temp}\n" diff --git a/src/openlifu/io/LIFUInterface.py b/src/openlifu/io/LIFUInterface.py index d32ed48d..8c191f60 100644 --- a/src/openlifu/io/LIFUInterface.py +++ b/src/openlifu/io/LIFUInterface.py @@ -243,3 +243,12 @@ def __exit__(self, exc_type, exc_value, traceback): self.txdevice.disconnect() if self.hvcontroller: self.hvcontroller.disconnect() + + @staticmethod + def get_sdk_version() -> str: + """Get the SDK version from openlifu.__version__ or fallback.""" + try: + import openlifu as m + return getattr(m, "__version__", "0.3.2") + except ImportError: + return "0.3.2"