Skip to content

Commit 5dc5572

Browse files
sprengerJuliaSprenger
authored andcommitted
[neuralynx] ensure stream order by descending sampling rate
1 parent 64876af commit 5dc5572

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

neo/rawio/neuralynxrawio/neuralynxrawio.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,8 @@ def _parse_header(self):
291291
event_channels = np.array(event_channels, dtype=_event_channel_dtype)
292292

293293
if signal_channels.size > 0:
294+
# ordering streams according from high to low sampling rates
295+
stream_props = {k: stream_props[k] for k in sorted(stream_props, reverse=True)}
294296
names = [f'Stream (rate,#packet,t0): {sp}' for sp in stream_props]
295297
ids = [stream_prop['stream_id'] for stream_prop in stream_props.values()]
296298
signal_streams = list(zip(names, ids))

0 commit comments

Comments
 (0)