@@ -58,7 +58,8 @@ def test_constructor_from_probe_single_shank(self):
5858 """Test that the constructor from Probe sets values as expected for single-shank."""
5959
6060 probe = self .probe0
61- device = Probe .from_probe (probe )
61+ devices = Probe .from_probeinterface (probe )
62+ device = devices [0 ]
6263 # assert correct objects
6364 self .assertIsInstance (device , Device )
6465 self .assertIsInstance (device , Probe )
@@ -76,7 +77,8 @@ def test_constructor_from_probe_single_shank(self):
7677 # set channel indices
7778 device_channel_indices = np .arange (probe .get_contact_count ())
7879 probe .set_device_channel_indices (device_channel_indices )
79- device_w_indices = Probe .from_probe (probe )
80+ devices_w_indices = Probe .from_probeinterface (probe )
81+ device_w_indices = devices_w_indices [0 ]
8082 shank_names = list (device_w_indices .shanks .keys ())
8183 contact_table = device_w_indices .shanks [shank_names [0 ]].contact_table
8284 np .testing .assert_array_equal (contact_table ["device_channel_index_pi" ][:], device_channel_indices )
@@ -85,7 +87,8 @@ def test_constructor_from_probe_multi_shank(self):
8587 """Test that the constructor from Probe sets values as expected for multi-shank."""
8688
8789 probe = self .probe1
88- device = Probe .from_probe (probe )
90+ devices = Probe .from_probeinterface (probe )
91+ device = devices [0 ]
8992 # assert correct objects
9093 self .assertIsInstance (device , Device )
9194 self .assertIsInstance (device , Probe )
@@ -100,7 +103,8 @@ def test_constructor_from_probe_multi_shank(self):
100103 # set channel indices
101104 device_channel_indices = np .arange (probe .get_contact_count ())
102105 probe .set_device_channel_indices (device_channel_indices )
103- device_w_indices = Probe .from_probe (probe )
106+ devices_w_indices = Probe .from_probeinterface (probe )
107+ device_w_indices = devices_w_indices [0 ]
104108 for i_s , shank_name in enumerate (shank_names ):
105109 contact_table = device_w_indices .shanks [shank_name ].contact_table
106110 pi_shank = probe .get_shanks ()[i_s ]
@@ -120,7 +124,7 @@ def test_constructor_from_probegroup(self):
120124 probegroup = self .probegroup
121125 global_device_channel_indices = np .arange (probegroup .get_channel_count ())
122126 probegroup .set_global_device_channel_indices (global_device_channel_indices )
123- devices = Probe .from_probegroup (probegroup )
127+ devices = Probe .from_probeinterface (probegroup )
124128 probes = probegroup .probes
125129 shank_counts = [1 , 2 ]
126130
@@ -175,7 +179,8 @@ def tearDown(self):
175179 remove_test_file (path )
176180
177181 def test_roundtrip_nwb_from_probe_single_shank (self ):
178- device = Probe .from_probe (self .probe0 )
182+ devices = Probe .from_probeinterface (self .probe0 )
183+ device = devices [0 ]
179184 self .nwbfile0 .add_device (device )
180185
181186 with NWBHDF5IO (self .path0 , mode = "w" ) as io :
@@ -187,7 +192,8 @@ def test_roundtrip_nwb_from_probe_single_shank(self):
187192 self .assertContainerEqual (device , read_nwbfile .devices [device .name ])
188193
189194 def test_roundtrip_nwb_from_probe_multi_shank (self ):
190- device = Probe .from_probe (self .probe1 )
195+ devices = Probe .from_probeinterface (self .probe1 )
196+ device = devices [0 ]
191197 self .nwbfile1 .add_device (device )
192198
193199 with NWBHDF5IO (self .path1 , mode = "w" ) as io :
@@ -199,7 +205,7 @@ def test_roundtrip_nwb_from_probe_multi_shank(self):
199205 self .assertContainerEqual (device , read_nwbfile .devices [device .name ])
200206
201207 def test_roundtrip_nwb_from_probegroup (self ):
202- devices = Probe .from_probegroup (self .probegroup )
208+ devices = Probe .from_probeinterface (self .probegroup )
203209 for device in devices :
204210 self .nwbfile2 .add_device (device )
205211
@@ -213,12 +219,14 @@ def test_roundtrip_nwb_from_probegroup(self):
213219
214220 def test_roundtrip_pi_from_probe_single_shank (self ):
215221 probe_arr = self .probe0 .to_numpy ()
216- device = Probe .from_probe (self .probe0 )
222+ devices = Probe .from_probeinterface (self .probe0 )
223+ device = devices [0 ]
217224 np .testing .assert_array_equal (probe_arr , device .to_probeinterface ().to_numpy ())
218225
219226 def test_roundtrip_pi_from_probe_multi_shank (self ):
220227 probe_arr = self .probe1 .to_numpy ()
221- device = Probe .from_probe (self .probe1 )
228+ devices = Probe .from_probeinterface (self .probe1 )
229+ device = devices [0 ]
222230 np .testing .assert_array_equal (probe_arr , device .to_probeinterface ().to_numpy ())
223231
224232
0 commit comments