Skip to content

Commit

Permalink
check protocol name in a case-insensitive way
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaquier Aurélien Tristan committed Mar 21, 2024
1 parent f37d9b6 commit 7f9e3a4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bluepyefe/nwbreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ def read(self):
if not isinstance(protocol_name, str):
protocol_name = protocol_name.decode('UTF-8')

if self.target_protocols and protocol_name not in self.target_protocols:
if (
self.target_protocols and
protocol_name.lower() not in [prot.lower() for prot in self.target_protocols]
):
continue

data.append(self._format_nwb_trace(
Expand All @@ -113,7 +116,10 @@ def read(self):
key_current = sweep.replace('Series', 'StimulusSeries')
protocol_name = "Step"

if self.target_protocols and protocol_name not in self.target_protocols:
if (
self.target_protocols and
protocol_name.lower() not in [prot.lower() for prot in self.target_protocols]
):
continue

if key_current not in self.content['stimulus']['presentation']:
Expand Down

0 comments on commit 7f9e3a4

Please sign in to comment.