diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ce3e70..ce75a8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ This document contains the pymapvbvd release history in reverse chronological order. +0.5.6 (Wednesday 11th October 2023) +----------------------------------- +- Fixed issue with large files on Windows. Thanks to FrankZijlstra for reporting. +- Fixed subtle bug with precisely sized files interacting with memory chunking size. Thanks to FrankZijlstra for reporting. + 0.5.5 (Tuesday 10th October 2023) --------------------------------- - Suppress warning `RuntimeWarning: invalid value encountered in cast`. diff --git a/mapvbvd/mapVBVD.py b/mapvbvd/mapVBVD.py index 185f03e..a82dd3b 100644 --- a/mapvbvd/mapVBVD.py +++ b/mapvbvd/mapVBVD.py @@ -140,7 +140,7 @@ def loop_mdh_read(fid, version, Nscans, scan, measOffset, measLength, print_prog n_acq = n_acq + 1 # grow arrays in batches - if n_acq > szBlob: + if n_acq >= szBlob: grownArray = np.zeros((mdh_blob.shape[0], allocSize), dtype=np.uint8) # pylint: disable=E1136 # pylint/issues/3139 mdh_blob = np.concatenate((mdh_blob, grownArray), axis=1) @@ -160,7 +160,7 @@ def loop_mdh_read(fid, version, Nscans, scan, measOffset, measLength, print_prog cPos = cPos + int(ulDMALength) - if isEOF or n_acq == len(filePos): + if isEOF: n_acq = n_acq - 1 # ignore the last attempt # import pdb; pdb.set_trace() filePos[n_acq] = cPos