From 3acb78914db1d9e13307e96829f948a1e131b6a0 Mon Sep 17 00:00:00 2001 From: Cees Bassa Date: Mon, 17 Jun 2019 23:46:58 +0200 Subject: [PATCH] Fix bug reading number of channels --- contrib/spectrum_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/spectrum_parser.py b/contrib/spectrum_parser.py index bab6852..e54debb 100644 --- a/contrib/spectrum_parser.py +++ b/contrib/spectrum_parser.py @@ -25,7 +25,7 @@ def read_spectrum(path): next_header = f.read(256) while(next_header): headers.append(parse_header(next_header)) - zs.append(np.fromfile(f, dtype=np.float32, count=400)) + zs.append(np.fromfile(f, dtype=np.float32, count=header["nchan"])) next_header = f.read(256) return np.transpose(np.vstack(zs)), headers