We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5b2ce1 commit b7d8cacCopy full SHA for b7d8cac
1 file changed
neo/rawio/tdtrawio.py
@@ -288,7 +288,12 @@ def _parse_header(self):
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
+if len(sev_filename) == 1:
292
+ sev_filename = sev_filename[0]
293
+elif len(sev_filename) == 0:
294
+ sev_filename = None # Indirect flag for TEV Format, see issue 1087
295
+else:
296
+ raise ValueError(f"Multiple SEV files matched for channel {chan_id}: {sev_filename}")
297
else:
298
# for single block datasets the exact name of sev files is not known
299
sev_regex = f"*_[cC]h{chan_id}.sev"
0 commit comments