Skip to content

Commit

Permalink
Merge pull request #1546 from nikhilchandra/fix_pl2_channel_enabled_bug
Browse files Browse the repository at this point in the history
Fix pl2 channel enabled bug
  • Loading branch information
zm711 authored Sep 4, 2024
2 parents cf99680 + bd9a649 commit 0aa596e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions neo/rawio/plexon2rawio/plexon2rawio.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def _parse_header(self):
for c in range(self.pl2reader.pl2_file_info.m_TotalNumberOfAnalogChannels):
achannel_info = self.pl2reader.pl2_get_analog_channel_info(c)
# only consider active channels
if not achannel_info.m_ChannelEnabled:
if not (achannel_info.m_ChannelEnabled and achannel_info.m_ChannelRecordingEnabled):
continue

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

# only consider active channels
if not schannel_info.m_ChannelEnabled:
if not (schannel_info.m_ChannelEnabled and schannel_info.m_ChannelRecordingEnabled):
continue

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

# only consider active channels
if not echannel_info.m_ChannelEnabled:
if not (echannel_info.m_ChannelEnabled and echannel_info.m_ChannelRecordingEnabled):
continue

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

0 comments on commit 0aa596e

Please sign in to comment.