Skip to content

Commit a7db1e3

Browse files
committed
remove cache
1 parent cc9e9b0 commit a7db1e3

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

src/spikeinterface/core/baserecordingsnippets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def _set_probes(self, probe_or_probegroup, group_mode="auto", in_place=False):
206206
sub_recording.annotate(probes_info=[])
207207
return sub_recording
208208

209-
probe_as_numpy_array = probegroup._contact_vector
209+
probe_as_numpy_array = probegroup._build_contact_vector()
210210

211211
# duplicate positions to "location" property so SpikeInterface-level readers keep working
212212
locations = np.zeros((probe_as_numpy_array.size, ndim), dtype="float64")
@@ -360,7 +360,7 @@ def get_channel_locations(self, channel_ids=None, axes: str = "xy") -> np.ndarra
360360
channel_ids = self.get_channel_ids()
361361
channel_indices = self.ids_to_indices(channel_ids)
362362
if self.has_probe():
363-
contact_vector = self._probegroup._contact_vector
363+
contact_vector = self._probegroup._build_contact_vector()
364364
ndim = len(axes)
365365
all_positions = np.zeros((contact_vector.size, ndim), dtype="float64")
366366
for i, dim in enumerate(axes):

src/spikeinterface/preprocessing/tests/test_interpolate_bad_channels.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ def test_compare_input_argument_ranges_against_ibl(shanks, p, sigma_um, num_chan
128128
x = rng.choice(shanks, num_channels)
129129
probe = recording._probegroup.probes[0]
130130
probe._contact_positions[:, 0] = x
131-
recording._probegroup._build_contact_vector()
132131
recording.set_property("location", recording.get_channel_locations())
133132

134133
# generate random bad channel locations
@@ -176,7 +175,6 @@ def test_output_values():
176175
for idx, (x, y) in enumerate(zip(*new_probe_locs)):
177176
probe._contact_positions[idx, 0] = x
178177
probe._contact_positions[idx, 1] = y
179-
recording._probegroup._build_contact_vector()
180178
recording.set_property("location", recording.get_channel_locations())
181179

182180
# Run interpolation in SI and check the interpolated channel
@@ -194,7 +192,6 @@ def test_output_values():
194192
probe = recording._probegroup.probes[0]
195193
probe._contact_positions[-1, 0] = 5
196194
probe._contact_positions[-1, 1] = 9
197-
recording._probegroup._build_contact_vector()
198195
recording.set_property("location", recording.get_channel_locations())
199196
expected_weights = np.r_[np.tile(np.exp(-2), 3), np.exp(-4)]
200197
expected_weights /= np.sum(expected_weights)

0 commit comments

Comments
 (0)