diff --git a/src/probeinterface/io.py b/src/probeinterface/io.py index 04e8357..f5cbe8f 100644 --- a/src/probeinterface/io.py +++ b/src/probeinterface/io.py @@ -1468,13 +1468,13 @@ def read_openephys( break stagger = np.mod(pos[1] / npx_probe[ptype]["y_pitch"] + 1, 2) * npx_probe[ptype]["stagger"] - shank_id = shank_ids[0] if ptype == 24 else 0 + shank_id = shank_ids[i] if npx_probe[ptype]["shank_number"] > 1 else 0 contact_id = int( (pos[0] - stagger - npx_probe[ptype]["shank_pitch"] * shank_id) / npx_probe[ptype]["x_pitch"] + npx_probe[ptype]["ncol"] * pos[1] / npx_probe[ptype]["y_pitch"] ) - if ptype == 24: + if npx_probe[ptype]["shank_number"] > 1: contact_ids.append(f"s{shank_id}e{contact_id}") else: contact_ids.append(f"e{contact_id}") diff --git a/tests/test_io/test_openephys.py b/tests/test_io/test_openephys.py index edc3b46..a9efb15 100644 --- a/tests/test_io/test_openephys.py +++ b/tests/test_io/test_openephys.py @@ -117,5 +117,5 @@ def test_older_than_06_format(): if __name__ == "__main__": - test_multiple_probes() + # test_multiple_probes() test_older_than_06_format() diff --git a/tests/test_io/test_spikeglx.py b/tests/test_io/test_spikeglx.py index e22cc55..1f66693 100644 --- a/tests/test_io/test_spikeglx.py +++ b/tests/test_io/test_spikeglx.py @@ -96,7 +96,7 @@ def test_NP2_2013_all(): assert probe.ndim == 2 # all channels are from the first shank - assert probe.get_shank_count() == 1 + assert probe.get_shank_count() == 4 assert probe.get_contact_count() == 384 # Test contact geometry @@ -121,7 +121,7 @@ def test_NP2_2013_subset(): assert probe.ndim == 2 # all channels are from the first shank - assert probe.get_shank_count() == 1 + assert probe.get_shank_count() == 4 assert probe.get_contact_count() == 120 # Test contact geometry