Skip to content

Commit c5b2ce1

Browse files
committed
fix TdtRawIO multi-block SEV file lookup (wrong path + case mismatch)
1 parent c672dbd commit c5b2ce1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

neo/rawio/tdtrawio.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,12 @@ def _parse_header(self):
283283
raise ValueError("Dtype is changing!!")
284284

285285
# data buffer test if SEV file exists otherwise TEV
286-
# path = self.dirname / segment_name
287286
if self.tdt_block_mode == "multi":
288287
# for multi block datasets the names of sev files are fixed
289-
sev_stem = f"{tankname}_{segment_name}_{stream_name}_ch{chan_id}"
290-
sev_filename = (path / sev_stem).with_suffix(".sev")
288+
block_path = self.dirname / segment_name
289+
sev_regex = f"{tankname}_{segment_name}_{stream_name}_[cC]h{chan_id}.sev"
290+
sev_filename = list(block_path.glob(sev_regex))
291+
sev_filename = sev_filename[0] if len(sev_filename) == 1 else None
291292
else:
292293
# for single block datasets the exact name of sev files is not known
293294
sev_regex = f"*_[cC]h{chan_id}.sev"

0 commit comments

Comments
 (0)