diff options
-rw-r--r-- | qolab/hardware/scope/rigolds1054z.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/qolab/hardware/scope/rigolds1054z.py b/qolab/hardware/scope/rigolds1054z.py index a6f484b..ce42268 100644 --- a/qolab/hardware/scope/rigolds1054z.py +++ b/qolab/hardware/scope/rigolds1054z.py @@ -174,18 +174,18 @@ class RigolDS1054z(ScopeSCPI): to the "Vertical Reference Position" in the Y direction. <yreference>: the vertical reference position in the Y direction. """ - Npnts = int(preamble[2]) - wfRaw = np.zeros(Npnts, dtype=np.uint8) + availableNpnts = int(preamble[2]) + wfRaw = np.zeros(availableNpnts, dtype=np.uint8) maxreadable = 250_000 # the maximum number of bytes readable in one go chunk_size = 70_000 # unfortunately large chunk size prone to read errors errCnt = 0 strt = 1 - stp = min(chunk_size, Npnts) + stp = min(chunk_size, availableNpnts) errorFreeChunkSize = [] errorProneChunkSize = [] - while strt <= Npnts: + while strt <= availableNpnts: stp = strt - 1 + chunk_size - stp = min(stp, Npnts) + stp = min(stp, availableNpnts) chunk_size = stp-strt+1 # reading requested number of points in chunks self.write(f":WAVeform:STARt {strt}") |