From e33fbe5b2284f9ed18b4d224b3cea76063895230 Mon Sep 17 00:00:00 2001 From: Baptiste Grimaud <83828302+b-grimaud@users.noreply.github.com> Date: Wed, 22 Jul 2026 12:55:01 +0200 Subject: [PATCH 1/2] BRW6 --- src/probeinterface/io.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/probeinterface/io.py b/src/probeinterface/io.py index 80023693..66dc3e62 100644 --- a/src/probeinterface/io.py +++ b/src/probeinterface/io.py @@ -567,7 +567,10 @@ def read_3brain(file: str | Path, mea_pitch: float = None, electrode_width: floa num_channels = None for key in rf: if key.startswith("Well_"): - num_channels = len(rf[key]["StoredChIdxs"]) + if "ExperimentSettings" in rf: # BRW5 + num_channels = len(rf[key]["StoredChIdxs"]) + elif "ExperimentInfo" in rf: # BRW6 + num_channels = max(rf[key]["NoisePlateElIdxs"]) + 1 break assert num_channels is not None, "No Well found in the file" From a1cacfb73265faaceb1ade6cb8188bc953ce1b43 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2026 11:51:06 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/probeinterface/io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/probeinterface/io.py b/src/probeinterface/io.py index 66dc3e62..84924300 100644 --- a/src/probeinterface/io.py +++ b/src/probeinterface/io.py @@ -567,9 +567,9 @@ def read_3brain(file: str | Path, mea_pitch: float = None, electrode_width: floa num_channels = None for key in rf: if key.startswith("Well_"): - if "ExperimentSettings" in rf: # BRW5 + if "ExperimentSettings" in rf: # BRW5 num_channels = len(rf[key]["StoredChIdxs"]) - elif "ExperimentInfo" in rf: # BRW6 + elif "ExperimentInfo" in rf: # BRW6 num_channels = max(rf[key]["NoisePlateElIdxs"]) + 1 break assert num_channels is not None, "No Well found in the file"