@@ -975,8 +975,8 @@ def _read_imro_string(imro_str: str, imDatPrb_pn: str = None) -> Probe:
975
975
if imDatPrb_type in [0 , None ]:
976
976
imDatPrb_type = probe_number_to_probe_type [imDatPrb_pn ]
977
977
978
- probe_information = npx_probe [imDatPrb_type ]
979
- fields = probe_information ["fields_in_imro_table" ]
978
+ probe_description = npx_probe [imDatPrb_type ]
979
+ fields = probe_description ["fields_in_imro_table" ]
980
980
contact_info = {k : [] for k in fields }
981
981
for i , part in enumerate (parts ):
982
982
values = tuple (map (int , part [1 :].split (' ' )))
@@ -991,13 +991,12 @@ def _read_imro_string(imro_str: str, imDatPrb_pn: str = None) -> Probe:
991
991
else :
992
992
elec_ids = np .array (contact_info ['elec_ids' ])
993
993
994
-
995
994
# compute position
996
- y_idx , x_idx = np .divmod (elec_ids , npx_probe [ imDatPrb_type ] ["ncol" ])
997
- x_pitch = npx_probe [ imDatPrb_type ] ["x_pitch" ]
998
- y_pitch = npx_probe [ imDatPrb_type ] ["y_pitch" ]
995
+ y_idx , x_idx = np .divmod (elec_ids , probe_description ["ncol" ])
996
+ x_pitch = probe_description ["x_pitch" ]
997
+ y_pitch = probe_description ["y_pitch" ]
999
998
1000
- stagger = np .mod (y_idx + 1 , 2 ) * probe_information ["stagger" ]
999
+ stagger = np .mod (y_idx + 1 , 2 ) * probe_description ["stagger" ]
1001
1000
x_pos = x_idx * x_pitch + stagger
1002
1001
y_pos = y_idx * y_pitch
1003
1002
positions = np .stack ((x_pos , y_pos ), axis = 1 )
@@ -1015,16 +1014,16 @@ def _read_imro_string(imro_str: str, imDatPrb_pn: str = None) -> Probe:
1015
1014
positions = positions ,
1016
1015
shapes = "square" ,
1017
1016
shank_ids = shank_ids ,
1018
- shape_params = {"width" : probe_information ["contact_width" ]},
1017
+ shape_params = {"width" : probe_description ["contact_width" ]},
1019
1018
)
1020
1019
1021
1020
probe .set_contact_ids (contact_ids )
1022
1021
1023
1022
# Add planar contour
1024
- polygon = np .array (probe_information ["polygon" ])
1023
+ polygon = np .array (probe_description ["polygon" ])
1025
1024
contour = []
1026
- shank_pitch = probe_information ["shank_pitch" ]
1027
- for shank_id in range (probe_information ["shank_number" ]):
1025
+ shank_pitch = probe_description ["shank_pitch" ]
1026
+ for shank_id in range (probe_description ["shank_number" ]):
1028
1027
shift = [shank_pitch * shank_id , 0 ]
1029
1028
contour += list (polygon + shift )
1030
1029
@@ -1033,7 +1032,7 @@ def _read_imro_string(imro_str: str, imDatPrb_pn: str = None) -> Probe:
1033
1032
probe .set_planar_contour (contour )
1034
1033
1035
1034
# this is scalar annotations
1036
- probe_name = probe_information ["probe_name" ]
1035
+ probe_name = probe_description ["probe_name" ]
1037
1036
probe .annotate (
1038
1037
name = probe_name ,
1039
1038
manufacturer = "IMEC" ,
0 commit comments