Skip to content

Commit 831052a

Browse files
committed
Enforce strict zip in add_dios channel mapping
Changed the zip function in add_dios to use strict=True, ensuring that channel_name_map, all_state_changes, and all_timestamps have matching lengths. This helps catch mismatches and potential data errors during DI/O conversion.
1 parent f431303 commit 831052a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/trodes_to_nwb/convert_dios.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def add_dios(nwbfile: NWBFile, recfile: list[str], metadata: dict) -> None:
8888
all_timestamps[i].append(timestamps)
8989
all_state_changes[i].append(state_changes)
9090
for channel_name, state_changes, timestamps in zip(
91-
channel_name_map, all_state_changes, all_timestamps, strict=False
91+
channel_name_map, all_state_changes, all_timestamps, strict=True
9292
):
9393
timestamps = np.concatenate(timestamps)
9494
state_changes = np.concatenate(state_changes)

0 commit comments

Comments
 (0)