@@ -778,6 +778,15 @@ def write_csv(file, probe):
778
778
"elec_ids" ,
779
779
),
780
780
},
781
+ 'Ultra' : {
782
+ "x_pitch" : 6 ,
783
+ "y_pitch" : 6 ,
784
+ "contact_width" : 5 ,
785
+ "stagger" : 0.0 ,
786
+ "shank_pitch" : 0 ,
787
+ "shank_number" : 1 ,
788
+ "ncol" : 8
789
+ },
781
790
#
782
791
"Phase3a" : {
783
792
"probe_name" : "Phase3a" ,
@@ -1319,6 +1328,9 @@ def read_openephys(
1319
1328
elif "1.0" in pname :
1320
1329
ptype = 0
1321
1330
x_shift = - 11
1331
+ elif "Ultra" in pname :
1332
+ ptype = "Ultra"
1333
+ x_shift = - 8
1322
1334
else : # Probe type unknown
1323
1335
ptype = None
1324
1336
x_shift = 0
@@ -1333,7 +1345,7 @@ def read_openephys(
1333
1345
if ptype is None :
1334
1346
contact_ids = None
1335
1347
break
1336
-
1348
+
1337
1349
stagger = np .mod (pos [1 ] / npx_probe [ptype ]["y_pitch" ] + 1 , 2 ) * npx_probe [ptype ]["stagger" ]
1338
1350
shank_id = shank_ids [0 ] if ptype == 24 else 0
1339
1351
@@ -1344,15 +1356,15 @@ def read_openephys(
1344
1356
else :
1345
1357
contact_ids .append (f"e{ contact_id } " )
1346
1358
1347
-
1348
1359
np_probe_dict = {'channel_names' : channel_names ,
1349
1360
'shank_ids' : shank_ids ,
1350
1361
'contact_ids' : contact_ids ,
1351
1362
'positions' : positions ,
1352
1363
'slot' : slot ,
1353
1364
'port' : port ,
1354
1365
'dock' : dock ,
1355
- 'serial_number' : np_serial_number }
1366
+ 'serial_number' : np_serial_number ,
1367
+ 'ptype' : ptype }
1356
1368
# Sequentially assign probe names
1357
1369
np_probe_dict .update ({'name' : probe_names_used [probe_idx ]})
1358
1370
np_probes_info .append (np_probe_dict )
@@ -1441,15 +1453,20 @@ def read_openephys(
1441
1453
return None
1442
1454
probe_idx = 0
1443
1455
1444
- contact_width = 12
1445
- shank_pitch = 250
1446
-
1447
1456
np_probe_info = np_probes_info [probe_idx ]
1448
1457
np_probe = np_probes [probe_idx ]
1449
1458
positions = np_probe_info ['positions' ]
1450
1459
shank_ids = np_probe_info ['shank_ids' ]
1451
1460
pname = np_probe .attrib ['probe_name' ]
1452
1461
1462
+ ptype = np_probe_info ['ptype' ]
1463
+ if ptype in npx_probe :
1464
+ contact_width = npx_probe [ptype ]['contact_width' ]
1465
+ shank_pitch = npx_probe [ptype ]['shank_pitch' ]
1466
+ else :
1467
+ contact_width = 12
1468
+ shank_pitch = 250
1469
+
1453
1470
probe = Probe (ndim = 2 , si_units = "um" )
1454
1471
probe .set_contacts (
1455
1472
positions = positions ,
0 commit comments