Skip to content

Commit 60d1f94

Browse files
committed
solve case of sample prefix
1 parent 9a71fd9 commit 60d1f94

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

neo/rawio/plexonrawio.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,10 @@ def _parse_header(self):
298298
self._sig_sampling_rate = {}
299299

300300
for stream_index, (channel_prefix, sr, length) in enumerate(buffer_stream_groups):
301+
# The users of plexon can modify the channel names, is not common but in that case
302+
# We assign the channel_prefix both as stream_name and stream_id
301303
stream_name = channel_prefix_to_stream_name.get(channel_prefix, channel_prefix)
302-
stream_id = channel_prefix_to_stream_id[channel_prefix]
304+
stream_id = channel_prefix_to_stream_id.get(channel_prefix, channel_prefix)
303305

304306
mask = (sig_channels["sampling_rate"] == sr) & (all_sig_length == length)
305307
sig_channels["stream_id"][mask] = stream_id

neo/test/iotest/test_plexonio.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class TestPlexonIO(
1818
"plexon/File_plexon_1.plx",
1919
"plexon/File_plexon_2.plx",
2020
"plexon/File_plexon_3.plx",
21+
"plexon/4chDemoPLX.plx"
2122
]
2223

2324

neo/test/rawiotest/test_plexonrawio.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class TestPlexonRawIO(
1515
"plexon/File_plexon_1.plx",
1616
"plexon/File_plexon_2.plx",
1717
"plexon/File_plexon_3.plx",
18+
"plexon/4chDemoPLX.plx"
1819
]
1920

2021

0 commit comments

Comments
 (0)