File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff 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' )
You can’t perform that action at this time.
0 commit comments