We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be094b8 commit 45871e3Copy full SHA for 45871e3
1 file changed
src/probeinterface/neuropixels_tools.py
@@ -1081,7 +1081,11 @@ def read_openephys(
1081
positions[:, 1] = positions[:, 1] - npx_descriptions[ptype]["shank_pitch"] * shank_ids
1082
1083
# x offset so that the first column is at 0x
1084
- positions[:, 0] -= np.min(positions[:, 0])
+ offset = np.min(positions[:, 0])
1085
+ # if some shanks are not used, we need to adjust the offset
1086
+ if shank_ids is not None:
1087
+ offset -= np.min(shank_ids) * npx_descriptions[ptype]["shank_pitch"]
1088
+ positions[:, 0] -= offset
1089
1090
contact_ids = []
1091
for i, pos in enumerate(positions):
0 commit comments