diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-07-20 17:00:40 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-07-20 17:00:40 -0400 |
commit | 6730d0580d5dd92f9eff18b6d83867a074d9511b (patch) | |
tree | b9d48106b37c3d605c9a093e93c7ec21cdd28490 | |
parent | 769e44e97a261d839a5ab0ace1aa07d807c1248b (diff) | |
download | qolab-6730d0580d5dd92f9eff18b6d83867a074d9511b.tar.gz qolab-6730d0580d5dd92f9eff18b6d83867a074d9511b.zip |
changed print statements to logging
-rw-r--r-- | qolab/hardware/scope/rigolds1054z.py | 12 |
1 files 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 ( |