We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f401627 commit f1a32bcCopy full SHA for f1a32bc
neo/rawio/tdtrawio.py
@@ -557,8 +557,16 @@ def read_tbk(tbk_filename):
557
infos.append(info)
558
559
# and put into numpy
560
+ tbk_field_names = [tbk_field_type[0] for tbk_field_type in tbk_field_types]
561
info_channel_groups = np.zeros(len(infos), dtype=tbk_field_types)
562
for i, info in enumerate(infos):
563
+ missing_keys = set(tbk_field_names) - set(info.keys())
564
+ if missing_keys:
565
+ warnings.warn(
566
+ f"Could not find all channel group info in tbk file, the missing keys are {missing_keys}.\n"
567
+ "The reader will continue with channel groups that could be parsed."
568
+ )
569
+ continue
570
for k, dt in tbk_field_types:
571
v = np.dtype(dt).type(info[k])
572
info_channel_groups[i][k] = v
0 commit comments