From ee4b5ade5986a6fe9dc797c0a68886bdc726e495 Mon Sep 17 00:00:00 2001 From: Gabriele Girelli Date: Sat, 15 Aug 2020 12:14:42 +0200 Subject: [PATCH] Allowing case of multiple unwanted bytes per step --- nd2reader/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nd2reader/parser.py b/nd2reader/parser.py index a5239e2..d9bf593 100644 --- a/nd2reader/parser.py +++ b/nd2reader/parser.py @@ -264,7 +264,7 @@ class Parser(object): if all([0 == image_group_data[byte_ids[i]+i] for i in range(len(byte_ids))]): warnings.warn(f'Identified {n_unwanted_bytes} ({unwanted_byte_per_step}*{height}) unwanted zero-bytes in the ND2 file, removed.') for i in range(len(byte_ids)): - del image_group_data[byte_ids[i]] + del image_group_data[byte_ids[i]:(byte_ids[i]+unwanted_byte_per_step)] else: warnings.warn(f'Identified {n_unwanted_bytes} unwanted non-zero bytes in the ND2 file.')