diff --git a/neo/rawio/tdtrawio.py b/neo/rawio/tdtrawio.py index a0e3cb673..cd6a0e49b 100644 --- a/neo/rawio/tdtrawio.py +++ b/neo/rawio/tdtrawio.py @@ -283,11 +283,12 @@ def _parse_header(self): raise ValueError("Dtype is changing!!") # data buffer test if SEV file exists otherwise TEV - # path = self.dirname / segment_name if self.tdt_block_mode == "multi": # for multi block datasets the names of sev files are fixed - sev_stem = f"{tankname}_{segment_name}_{stream_name}_ch{chan_id}" - sev_filename = (path / sev_stem).with_suffix(".sev") + block_path = self.dirname / segment_name + sev_regex = f"{tankname}_{segment_name}_{stream_name}_[cC]h{chan_id}.sev" + sev_filename = list(block_path.glob(sev_regex)) + sev_filename = sev_filename[0] if len(sev_filename) == 1 else None else: # for single block datasets the exact name of sev files is not known sev_regex = f"*_[cC]h{chan_id}.sev"