From 6730d0580d5dd92f9eff18b6d83867a074d9511b Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Sat, 20 Jul 2024 17:00:40 -0400 Subject: changed print statements to logging --- qolab/hardware/scope/rigolds1054z.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qolab/hardware/scope/rigolds1054z.py b/qolab/hardware/scope/rigolds1054z.py index 76478fd..34beaee 100644 --- a/qolab/hardware/scope/rigolds1054z.py +++ b/qolab/hardware/scope/rigolds1054z.py @@ -223,20 +223,20 @@ class RigolDS1054z(ScopeSCPI): errorFreeChunkSize.append(chunk_size) chunk_size = min(maxreadable, int(chunk_size * 1.1)) except VisaIOError as err: - print(f"{err=}") + logger.info(f"Detected recoverable {err}") errCnt += 1 errorProneChunkSize.append(chunk_size) - print(f"Warning: count is {errCnt} while reading raw chunk the scope") - print(f"Warning: Current pointers are {strt=} {stp=} with {chunk_size=}") - print("Warning: Redoing, chunk reading.") + logger.debug(f"Visa error count is {errCnt} while reading raw chunk the scope") + logger.debug(f"Current pointers are {strt=} {stp=} with {chunk_size=}") if len(errorFreeChunkSize) > 10: chunk_size = int(np.mean(errorFreeChunkSize)) else: chunk_size = max(1, int(np.mean(errorProneChunkSize) * 0.8)) - print(f"new {chunk_size=}") + logger.debug(f"New {chunk_size=}") + logger.debug("Redoing, chunk reading.") pass # we repeat this loop iteration again - print(f"final {chunk_size=}") + logger.debug(f"final {chunk_size=}") if True: return wfRaw, errorFreeChunkSize, errorProneChunkSize ( -- cgit v1.2.3