@@ -90,20 +90,21 @@ def _load_np_probe_features():
9090}
9191
9292# Map from ProbeInterface to ProbeTable naming conventions
93- pi_to_pt_names = {
94- "x_pitch" : "electrode_pitch_horz_um" ,
95- "y_pitch" : "electrode_pitch_vert_um" ,
96- "contact_width" : "electrode_size_horz_direction_um" ,
97- "shank_pitch" : "shank_pitch_um" ,
98- "shank_number" : "num_shanks" ,
99- "ncols_per_shank" : "cols_per_shank" ,
100- "nrows_per_shank" : "rows_per_shank" ,
101- "adc_bit_depth" : "adc_bit_depth" ,
102- "model_name" : "description" ,
103- "num_readout_channels" : "num_readout_channels" ,
104- "shank_width_um" : "shank_width_um" ,
105- "tip_length_um" : "tip_length_um" ,
106- }
93+ # @Chris : is this necessary ?
94+ # pi_to_pt_names = {
95+ # "x_pitch": "electrode_pitch_horz_um",
96+ # "y_pitch": "electrode_pitch_vert_um",
97+ # "contact_width": "electrode_size_horz_direction_um",
98+ # "shank_pitch": "shank_pitch_um",
99+ # "shank_number": "num_shanks",
100+ # "ncols_per_shank": "cols_per_shank",
101+ # "nrows_per_shank": "rows_per_shank",
102+ # "adc_bit_depth": "adc_bit_depth",
103+ # "model_name": "description",
104+ # "num_readout_channels": "num_readout_channels",
105+ # "shank_width_um": "shank_width_um",
106+ # "tip_length_um": "tip_length_um",
107+ # }
107108
108109
109110def get_probe_length (probe_part_number : str ) -> int :
@@ -271,9 +272,8 @@ def _make_npx_probe_from_description(probe_description, model_name, elec_ids, sh
271272 positions = np .stack ((x_pos , y_pos ), axis = 1 )
272273
273274 # construct Probe object
274- probe = Probe (
275- ndim = 2 , si_units = "um" , model_name = model_name , manufacturer = "imec" , name = probe_description ["description" ]
276- )
275+ probe = Probe (ndim = 2 , si_units = "um" , model_name = model_name , manufacturer = "imec" )
276+ probe .description = probe_description ["description" ]
277277 probe .set_contacts (
278278 positions = positions ,
279279 shapes = "square" ,
@@ -905,14 +905,12 @@ def read_openephys(
905905 )
906906 num_shanks = pt_metadata ["num_shanks" ]
907907
908- model_name = pt_metadata .get ("description" )
909- if model_name is None :
910- model_name = "Unknown"
908+ description = pt_metadata .get ("description" )
911909
912910 elec_ids = []
913911 for i , pos in enumerate (positions ):
914912 # Do not calculate contact ids if the model name is not known
915- if model_name == "Unknown" :
913+ if description is None :
916914 elec_ids = None
917915 break
918916
@@ -1060,6 +1058,7 @@ def read_openephys(
10601058 pt_metadata , probe_part_number , elec_ids , shank_ids = shank_ids , mux_table = mux_table
10611059 )
10621060 probe .serial_number = np_probe_info ["serial_number" ]
1061+ probe .name = np_probe_info ["name" ]
10631062
10641063 probe .annotate (
10651064 part_number = np_probe_info ["part_number" ],
0 commit comments