Skip to content

Commit 603a89b

Browse files
committed
oups
1 parent 22321d3 commit 603a89b

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

neo/rawio/plexonrawio.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ class PlexonRawIO(BaseRawIO):
4545
rawmode = 'one-file'
4646

4747
def __init__(self, filename='', progress_bar=True):
48+
"""
49+
50+
Parameters
51+
----------
52+
filename: str
53+
The filename.
54+
progress_bar: bool, default True
55+
Display progress bar using tqdm (if installed) when parsing the file.
56+
57+
"""
4858
BaseRawIO.__init__(self)
4959
self.filename = filename
5060
self.progress_bar = HAVE_TQDM and progress_bar
@@ -288,7 +298,11 @@ def _parse_header(self):
288298

289299
# Event channels
290300
event_channels = []
291-
for chan_index in trange(nb_event_chan, desc="Parsing event channels", leave=True):
301+
if self.progress_bar:
302+
chan_loop = trange(nb_event_chan, desc="Parsing event channels", leave=True)
303+
else:
304+
chan_loop = range(nb_event)
305+
for chan_index in chan_loop:
292306
h = eventHeaders[chan_index]
293307
chan_id = h['Channel']
294308
name = h['Name'].decode('utf8')

0 commit comments

Comments
 (0)