We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2a358a commit d1c3ec8Copy full SHA for d1c3ec8
neo/rawio/blackrockrawio.py
@@ -276,7 +276,10 @@ def _parse_header(self):
276
self.internal_unit_ids = [] # pair of chan['packet_id'], spikes['unit_class_nb']
277
for i in range(len(self.__nev_ext_header[b"NEUEVWAV"])):
278
279
- channel_id = self.__nev_ext_header[b"NEUEVWAV"]["electrode_id"][i]
+ # electrode_id values are stored at uint16 which can be overflowed when
280
+ # multiplying by 1000 below. We convert to a regular pyton into which
281
+ # won't overflow
282
+ channel_id = int(self.__nev_ext_header[b"NEUEVWAV"]["electrode_id"][i])
283
284
chan_mask = spikes["packet_id"] == channel_id
285
chan_spikes = spikes[chan_mask]
0 commit comments