Skip to content

Commit 8649dc4

Browse files
committed
Revert "allow to only memmap one stream"
This reverts commit 9c487f5.
1 parent 9c487f5 commit 8649dc4

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

neo/rawio/tdtrawio.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
class TdtRawIO(BaseRawIO):
3737
rawmode = 'one-dir'
3838

39-
def __init__(self, dirname='', sortname='', stream_name_neo=None):
39+
def __init__(self, dirname='', sortname=''):
4040
"""
4141
Initialize reader for one or multiple TDT data blocks.
4242
@@ -48,9 +48,6 @@ def __init__(self, dirname='', sortname='', stream_name_neo=None):
4848
if sortname=='PLX', there should be a ./sort/PLX/*.SortResult file in the tdt block,
4949
which stores the sortcode for every spike
5050
Default: '', uses the original online sort.
51-
stream_name (str):
52-
If there are several streams, specify the stream name you want to load.
53-
Default: None, load all streams.
5451
5552
5653
"""
@@ -67,7 +64,6 @@ def __init__(self, dirname='', sortname='', stream_name_neo=None):
6764
raise ValueError(f'No data folder or file found for {dirname}')
6865

6966
self.sortname = sortname
70-
self.stream_name_neo = stream_name_neo
7167

7268
def _source_name(self):
7369
return self.dirname
@@ -182,16 +178,12 @@ def _parse_header(self):
182178
self._sigs_t_start = {seg_index: {}
183179
for seg_index in range(nb_segment)} # key = seg_index then group_id
184180

185-
if self.stream_name_neo is not None:
186-
keep = info_channel_groups['StoreName'].astype(str) == self.stream_name_neo
187-
else:
188-
keep = info_channel_groups['TankEvType'] == EVTYPE_STREAM
189-
181+
keep = info_channel_groups['TankEvType'] == EVTYPE_STREAM
190182
missing_sev_channels = []
191183
for stream_index, info in enumerate(info_channel_groups[keep]):
192184
self._sig_sample_per_chunk[stream_index] = info['NumPoints']
193185

194-
stream_name = info['StoreName'].astype(str)
186+
stream_name = str(info['StoreName'])
195187
stream_id = f'{stream_index}'
196188
signal_streams.append((stream_name, stream_id))
197189

0 commit comments

Comments
 (0)