Skip to content

Commit be094b8

Browse files
committed
Remove oe_x_shift
1 parent a1f9f94 commit be094b8

1 file changed

Lines changed: 2 additions & 24 deletions

File tree

src/probeinterface/neuropixels_tools.py

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
55
Note:
66
* the centre of the first left columns and the first bottom row is our reference (x=0, y=0)
7-
* "oe_x_shift" is a global shift on x axis to make spikeglx and openephys compatible.
87
98
"""
109

@@ -81,7 +80,6 @@
8180
"lf_gains",
8281
"ap_hp_filters",
8382
),
84-
"oe_x_shift": -11,
8583
},
8684
# Neuropixels 2.0 - Single Shank - Prototype
8785
"21": {
@@ -97,7 +95,6 @@
9795
"contour_description": "np70",
9896
"contour_shift": [-27, -11],
9997
"fields_in_imro_table": ("channel_ids", "banks", "references", "elec_ids"),
100-
"oe_x_shift": -8,
10198
},
10299
# Neuropixels 2.0 - Four Shank - Prototype
103100
"24": {
@@ -119,7 +116,6 @@
119116
"references",
120117
"elec_ids",
121118
),
122-
"oe_x_shift": -8,
123119
},
124120
# Neuropixels 2.0 - Single Shank - Commercial without metal cap
125121
"2003": {
@@ -135,7 +131,6 @@
135131
"contour_description": "np70",
136132
"contour_shift": [-27, -11],
137133
"fields_in_imro_table": ("channel_ids", "banks", "references", "elec_ids"),
138-
"oe_x_shift": -8,
139134
},
140135
# Neuropixels 2.0 - Single Shank - Commercial with metal cap
141136
"2004": {
@@ -151,7 +146,6 @@
151146
"contour_description": "np70",
152147
"contour_shift": [-27, -11],
153148
"fields_in_imro_table": ("channel_ids", "banks", "references", "elec_ids"),
154-
"oe_x_shift": -8,
155149
},
156150
# Neuropixels 2.0 - Four Shank - Commercial without metal cap
157151
"2013": {
@@ -173,7 +167,6 @@
173167
"references",
174168
"elec_ids",
175169
),
176-
"oe_x_shift": -8,
177170
},
178171
# Neuropixels 2.0 - Four Shank - Commercial with metal cap
179172
"2014": {
@@ -195,7 +188,6 @@
195188
"references",
196189
"elec_ids",
197190
),
198-
"oe_x_shift": -8,
199191
},
200192
# NXT
201193
"2020": {
@@ -217,7 +209,6 @@
217209
"references",
218210
"elec_ids",
219211
),
220-
"oe_x_shift": -8,
221212
},
222213
# Experimental probes previous to 1.0
223214
"Phase3a": {
@@ -239,7 +230,6 @@
239230
"ap_gains",
240231
"lf_gains",
241232
),
242-
"oe_x_shift": -11,
243233
},
244234
# Neuropixels 1.0-NHP Short (10mm)
245235
"1015": {
@@ -262,7 +252,6 @@
262252
"lf_gains",
263253
"ap_hp_filters",
264254
),
265-
"oe_x_shift": -11,
266255
},
267256
#################
268257
# Neuropixels 1.0-NHP Medium (25mm)
@@ -286,7 +275,6 @@
286275
"lf_gains",
287276
"ap_hp_filters",
288277
),
289-
"oe_x_shift": -11,
290278
},
291279
# Neuropixels 1.0-NHP Medium (25mm)
292280
"1021": {
@@ -309,7 +297,6 @@
309297
"lf_gains",
310298
"ap_hp_filters",
311299
),
312-
"oe_x_shift": -11,
313300
},
314301
#################
315302
# Neuropixels 1.0-NHP Medium (25mm)
@@ -333,7 +320,6 @@
333320
"lf_gains",
334321
"ap_hp_filters",
335322
),
336-
"oe_x_shift": -11,
337323
},
338324
# Neuropixels 1.0-NHP 45mm SOI90 - NHP long 90um wide, staggered contacts
339325
"1030": {
@@ -356,7 +342,6 @@
356342
"lf_gains",
357343
"ap_hp_filters",
358344
),
359-
"oe_x_shift": -11,
360345
},
361346
# Neuropixels 1.0-NHP 45mm SOI125 - NHP long 125um wide, staggered contacts
362347
"1031": {
@@ -379,7 +364,6 @@
379364
"lf_gains",
380365
"ap_hp_filters",
381366
),
382-
"oe_x_shift": -11,
383367
},
384368
# 1.0-NHP 45mm SOI115 / 125 linear - NHP long 125um wide, linear contacts
385369
"1032": {
@@ -402,7 +386,6 @@
402386
"lf_gains",
403387
"ap_hp_filters",
404388
),
405-
"oe_x_shift": -11,
406389
},
407390
# Ultra probes 1 bank
408391
"1100": {
@@ -425,7 +408,6 @@
425408
"lf_gains",
426409
"ap_hp_filters",
427410
),
428-
"oe_x_shift": -12,
429411
},
430412
# Ultra probes 16 banks
431413
"1110": {
@@ -448,7 +430,6 @@
448430
"lf_gains",
449431
"ap_hp_filters",
450432
),
451-
"oe_x_shift": -8,
452433
},
453434
"1121": {
454435
"model_name": "Neuropixels Ultra - Type 2",
@@ -470,7 +451,6 @@
470451
"lf_gains",
471452
"ap_hp_filters",
472453
),
473-
"oe_x_shift": 18,
474454
},
475455
# NP-Opto
476456
"1300": {
@@ -493,7 +473,6 @@
493473
"lf_gains",
494474
"ap_hp_filters",
495475
),
496-
"oe_x_shift": -11,
497476
},
498477
}
499478

@@ -1097,13 +1076,12 @@ def read_openephys(
10971076
if probe_part_number not in probe_part_number_to_probe_type:
10981077
raise NotImplementedError(f"Probe part number {probe_part_number} is not supported yet")
10991078
ptype = probe_part_number_to_probe_type[probe_part_number]
1100-
x_shift = npx_descriptions[ptype]["oe_x_shift"] if ptype is not None else 0
11011079

11021080
if fix_x_position_for_oe_5 and oe_version < parse("0.6.0") and shank_ids is not None:
11031081
positions[:, 1] = positions[:, 1] - npx_descriptions[ptype]["shank_pitch"] * shank_ids
11041082

1105-
# x offset
1106-
positions[:, 0] += x_shift
1083+
# x offset so that the first column is at 0x
1084+
positions[:, 0] -= np.min(positions[:, 0])
11071085

11081086
contact_ids = []
11091087
for i, pos in enumerate(positions):

0 commit comments

Comments
 (0)