Skip to content

Commit 0aa596e

Browse files
authored
Merge pull request #1546 from nikhilchandra/fix_pl2_channel_enabled_bug
Fix pl2 channel enabled bug
2 parents cf99680 + bd9a649 commit 0aa596e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

neo/rawio/plexon2rawio/plexon2rawio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def _parse_header(self):
157157
for c in range(self.pl2reader.pl2_file_info.m_TotalNumberOfAnalogChannels):
158158
achannel_info = self.pl2reader.pl2_get_analog_channel_info(c)
159159
# only consider active channels
160-
if not achannel_info.m_ChannelEnabled:
160+
if not (achannel_info.m_ChannelEnabled and achannel_info.m_ChannelRecordingEnabled):
161161
continue
162162

163163
# assign to matching stream or create new stream based on signal characteristics
@@ -199,7 +199,7 @@ def _parse_header(self):
199199
schannel_info = self.pl2reader.pl2_get_spike_channel_info(c)
200200

201201
# only consider active channels
202-
if not schannel_info.m_ChannelEnabled:
202+
if not (schannel_info.m_ChannelEnabled and schannel_info.m_ChannelRecordingEnabled):
203203
continue
204204

205205
for channel_unit_id in range(schannel_info.m_NumberOfUnits):
@@ -223,7 +223,7 @@ def _parse_header(self):
223223
echannel_info = self.pl2reader.pl2_get_digital_channel_info(i)
224224

225225
# only consider active channels
226-
if not echannel_info.m_ChannelEnabled:
226+
if not (echannel_info.m_ChannelEnabled and echannel_info.m_ChannelRecordingEnabled):
227227
continue
228228

229229
# event channels are characterized by (name, id, type), with type in ['event', 'epoch']

0 commit comments

Comments
 (0)