Skip to content
Open
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: 4 additions & 3 deletions neo/rawio/tdtrawio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down