Skip to content

Commit f4dd922

Browse files
authored
better error message (#3479)
1 parent 203c28c commit f4dd922

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/spikeinterface/core/baserecordingsnippets.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,10 @@ def _set_probes(self, probe_or_probegroup, group_mode="by_probe", in_place=False
172172
number_of_device_channel_indices = np.max(list(device_channel_indices) + [0])
173173
if number_of_device_channel_indices >= self.get_num_channels():
174174
error_msg = (
175-
f"The given Probe have 'device_channel_indices' that do not match channel count \n"
176-
f"{number_of_device_channel_indices} vs {self.get_num_channels()} \n"
175+
f"The given Probe either has 'device_channel_indices' that does not match channel count \n"
176+
f"{len(device_channel_indices)} vs {self.get_num_channels()} \n"
177+
f"or it's max index {number_of_device_channel_indices} is the same as the number of channels {self.get_num_channels()} \n"
178+
f"If using all channels remember that python is 0-indexed so max device_channel_index should be {self.get_num_channels() - 1} \n"
177179
f"device_channel_indices are the following: {device_channel_indices} \n"
178180
f"recording channels are the following: {self.get_channel_ids()} \n"
179181
)

0 commit comments

Comments
 (0)