Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions neo/rawio/tdtrawio.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,9 @@ def _get_analogsignal_chunk(self, block_index, seg_index, i_start, i_stop,
# right border
# be careful that bl could be both bl0 and bl1!!
border = data.size - (i_stop % sample_per_chunk)
data = data[:-border]
# cut data if not all samples are requested
if border != len(data):
data = data[:-border]
if bl == bl0:
# left border
border = i_start % sample_per_chunk
Expand Down Expand Up @@ -520,7 +522,8 @@ def read_tbk(tbk_filename):

# parse into a dict
info = OrderedDict()
pattern = br'NAME=(\S+);TYPE=(\S+);VALUE=(\S+);'
# name and type have to be words, but value can contain floating numbers
pattern = br'NAME=(\w+);TYPE=(\w+);VALUE=(\S+);'
r = re.findall(pattern, chan_grp_header)
for name, _type, value in r:
info[name.decode('ascii')] = value
Expand Down
7 changes: 6 additions & 1 deletion neo/test/iotest/test_tdtio.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ class TestTdtIO(BaseTestIO, unittest.TestCase, ):
'tdt'
]
entities_to_test = [
'tdt/aep_05'
# test structure directory with multiple blocks
'tdt/aep_05',
# test single block
'tdt/dataset_0_single_block/512ch_reconly_all-181123_B24_rest.Tdx',
'tdt/dataset_1_single_block/ECTest-220207-135355_ECTest_B1.Tdx',
'tdt/aep_05/Block-1/aep_05_Block-1.Tdx'
]

def test_signal_group_mode(self):
Expand Down
4 changes: 4 additions & 0 deletions neo/test/rawiotest/test_tdtrawio.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ class TestTdtRawIO(BaseTestRawIO, unittest.TestCase, ):
'tdt'
]
entities_to_test = [
# test structure directory with multiple blocks
'tdt/aep_05',
# test single block
'tdt/dataset_0_single_block/512ch_reconly_all-181123_B24_rest.Tdx',
'tdt/dataset_1_single_block/ECTest-220207-135355_ECTest_B1.Tdx',
'tdt/aep_05/Block-1/aep_05_Block-1.Tdx'
]

Expand Down