Skip to content

Commit 698b077

Browse files
committed
test struct.unpack rather than class
1 parent 129da57 commit 698b077

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

neo/rawio/micromedrawio.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,13 @@ def _parse_header(self):
146146
gain = factor
147147
offset = -logical_ground * factor
148148

149-
f.seek(8, 1)
150-
(sampling_rate,) = f.read_f("H")
149+
# this skips the filtering info done with the machine
150+
f.seek(8, 1)
151+
152+
#(sampling_rate,) = f.read_f("H")
153+
# sampling_rate is actually the rate_coefficient which is multipled by the
154+
# Rate_Min which is the sampling_rate
155+
sampling_rate = struct.unpack("H", f.read(struct.calcsize("H")))
151156
sampling_rate *= Rate_Min
152157
chan_id = str(c)
153158
signal_channels.append(

0 commit comments

Comments
 (0)