Skip to content

Commit

Permalink
oups
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelgarcia committed Feb 2, 2024
1 parent 22321d3 commit 603a89b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion neo/rawio/plexonrawio.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ class PlexonRawIO(BaseRawIO):
rawmode = 'one-file'

def __init__(self, filename='', progress_bar=True):
"""
Parameters
----------
filename: str
The filename.
progress_bar: bool, default True
Display progress bar using tqdm (if installed) when parsing the file.
"""
BaseRawIO.__init__(self)
self.filename = filename
self.progress_bar = HAVE_TQDM and progress_bar
Expand Down Expand Up @@ -288,7 +298,11 @@ def _parse_header(self):

# Event channels
event_channels = []
for chan_index in trange(nb_event_chan, desc="Parsing event channels", leave=True):
if self.progress_bar:
chan_loop = trange(nb_event_chan, desc="Parsing event channels", leave=True)
else:
chan_loop = range(nb_event)
for chan_index in chan_loop:
h = eventHeaders[chan_index]
chan_id = h['Channel']
name = h['Name'].decode('utf8')
Expand Down

0 comments on commit 603a89b

Please sign in to comment.