|
4 | 4 |
|
5 | 5 | Note: |
6 | 6 | * 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. |
8 | 7 |
|
9 | 8 | """ |
10 | 9 |
|
|
81 | 80 | "lf_gains", |
82 | 81 | "ap_hp_filters", |
83 | 82 | ), |
84 | | - "oe_x_shift": -11, |
85 | 83 | }, |
86 | 84 | # Neuropixels 2.0 - Single Shank - Prototype |
87 | 85 | "21": { |
|
97 | 95 | "contour_description": "np70", |
98 | 96 | "contour_shift": [-27, -11], |
99 | 97 | "fields_in_imro_table": ("channel_ids", "banks", "references", "elec_ids"), |
100 | | - "oe_x_shift": -8, |
101 | 98 | }, |
102 | 99 | # Neuropixels 2.0 - Four Shank - Prototype |
103 | 100 | "24": { |
|
119 | 116 | "references", |
120 | 117 | "elec_ids", |
121 | 118 | ), |
122 | | - "oe_x_shift": -8, |
123 | 119 | }, |
124 | 120 | # Neuropixels 2.0 - Single Shank - Commercial without metal cap |
125 | 121 | "2003": { |
|
135 | 131 | "contour_description": "np70", |
136 | 132 | "contour_shift": [-27, -11], |
137 | 133 | "fields_in_imro_table": ("channel_ids", "banks", "references", "elec_ids"), |
138 | | - "oe_x_shift": -8, |
139 | 134 | }, |
140 | 135 | # Neuropixels 2.0 - Single Shank - Commercial with metal cap |
141 | 136 | "2004": { |
|
151 | 146 | "contour_description": "np70", |
152 | 147 | "contour_shift": [-27, -11], |
153 | 148 | "fields_in_imro_table": ("channel_ids", "banks", "references", "elec_ids"), |
154 | | - "oe_x_shift": -8, |
155 | 149 | }, |
156 | 150 | # Neuropixels 2.0 - Four Shank - Commercial without metal cap |
157 | 151 | "2013": { |
|
173 | 167 | "references", |
174 | 168 | "elec_ids", |
175 | 169 | ), |
176 | | - "oe_x_shift": -8, |
177 | 170 | }, |
178 | 171 | # Neuropixels 2.0 - Four Shank - Commercial with metal cap |
179 | 172 | "2014": { |
|
195 | 188 | "references", |
196 | 189 | "elec_ids", |
197 | 190 | ), |
198 | | - "oe_x_shift": -8, |
199 | 191 | }, |
200 | 192 | # NXT |
201 | 193 | "2020": { |
|
217 | 209 | "references", |
218 | 210 | "elec_ids", |
219 | 211 | ), |
220 | | - "oe_x_shift": -8, |
221 | 212 | }, |
222 | 213 | # Experimental probes previous to 1.0 |
223 | 214 | "Phase3a": { |
|
239 | 230 | "ap_gains", |
240 | 231 | "lf_gains", |
241 | 232 | ), |
242 | | - "oe_x_shift": -11, |
243 | 233 | }, |
244 | 234 | # Neuropixels 1.0-NHP Short (10mm) |
245 | 235 | "1015": { |
|
262 | 252 | "lf_gains", |
263 | 253 | "ap_hp_filters", |
264 | 254 | ), |
265 | | - "oe_x_shift": -11, |
266 | 255 | }, |
267 | 256 | ################# |
268 | 257 | # Neuropixels 1.0-NHP Medium (25mm) |
|
286 | 275 | "lf_gains", |
287 | 276 | "ap_hp_filters", |
288 | 277 | ), |
289 | | - "oe_x_shift": -11, |
290 | 278 | }, |
291 | 279 | # Neuropixels 1.0-NHP Medium (25mm) |
292 | 280 | "1021": { |
|
309 | 297 | "lf_gains", |
310 | 298 | "ap_hp_filters", |
311 | 299 | ), |
312 | | - "oe_x_shift": -11, |
313 | 300 | }, |
314 | 301 | ################# |
315 | 302 | # Neuropixels 1.0-NHP Medium (25mm) |
|
333 | 320 | "lf_gains", |
334 | 321 | "ap_hp_filters", |
335 | 322 | ), |
336 | | - "oe_x_shift": -11, |
337 | 323 | }, |
338 | 324 | # Neuropixels 1.0-NHP 45mm SOI90 - NHP long 90um wide, staggered contacts |
339 | 325 | "1030": { |
|
356 | 342 | "lf_gains", |
357 | 343 | "ap_hp_filters", |
358 | 344 | ), |
359 | | - "oe_x_shift": -11, |
360 | 345 | }, |
361 | 346 | # Neuropixels 1.0-NHP 45mm SOI125 - NHP long 125um wide, staggered contacts |
362 | 347 | "1031": { |
|
379 | 364 | "lf_gains", |
380 | 365 | "ap_hp_filters", |
381 | 366 | ), |
382 | | - "oe_x_shift": -11, |
383 | 367 | }, |
384 | 368 | # 1.0-NHP 45mm SOI115 / 125 linear - NHP long 125um wide, linear contacts |
385 | 369 | "1032": { |
|
402 | 386 | "lf_gains", |
403 | 387 | "ap_hp_filters", |
404 | 388 | ), |
405 | | - "oe_x_shift": -11, |
406 | 389 | }, |
407 | 390 | # Ultra probes 1 bank |
408 | 391 | "1100": { |
|
425 | 408 | "lf_gains", |
426 | 409 | "ap_hp_filters", |
427 | 410 | ), |
428 | | - "oe_x_shift": -12, |
429 | 411 | }, |
430 | 412 | # Ultra probes 16 banks |
431 | 413 | "1110": { |
|
448 | 430 | "lf_gains", |
449 | 431 | "ap_hp_filters", |
450 | 432 | ), |
451 | | - "oe_x_shift": -8, |
452 | 433 | }, |
453 | 434 | "1121": { |
454 | 435 | "model_name": "Neuropixels Ultra - Type 2", |
|
470 | 451 | "lf_gains", |
471 | 452 | "ap_hp_filters", |
472 | 453 | ), |
473 | | - "oe_x_shift": 18, |
474 | 454 | }, |
475 | 455 | # NP-Opto |
476 | 456 | "1300": { |
|
493 | 473 | "lf_gains", |
494 | 474 | "ap_hp_filters", |
495 | 475 | ), |
496 | | - "oe_x_shift": -11, |
497 | 476 | }, |
498 | 477 | } |
499 | 478 |
|
@@ -1097,13 +1076,12 @@ def read_openephys( |
1097 | 1076 | if probe_part_number not in probe_part_number_to_probe_type: |
1098 | 1077 | raise NotImplementedError(f"Probe part number {probe_part_number} is not supported yet") |
1099 | 1078 | 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 |
1101 | 1079 |
|
1102 | 1080 | if fix_x_position_for_oe_5 and oe_version < parse("0.6.0") and shank_ids is not None: |
1103 | 1081 | positions[:, 1] = positions[:, 1] - npx_descriptions[ptype]["shank_pitch"] * shank_ids |
1104 | 1082 |
|
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]) |
1107 | 1085 |
|
1108 | 1086 | contact_ids = [] |
1109 | 1087 | for i, pos in enumerate(positions): |
|
0 commit comments