From 7098a6b09f6953f1b768567418793002e29fba5d Mon Sep 17 00:00:00 2001 From: chrishalcrow Date: Mon, 18 May 2026 11:38:51 +0100 Subject: [PATCH] Allow for 3D probes --- spikeinterface_gui/controller.py | 4 +++- spikeinterface_gui/probeview.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/spikeinterface_gui/controller.py b/spikeinterface_gui/controller.py index e150888..6f3f60c 100644 --- a/spikeinterface_gui/controller.py +++ b/spikeinterface_gui/controller.py @@ -726,7 +726,9 @@ def get_traces(self, trace_source='preprocessed', **kargs): def get_contact_location(self): location = self.analyzer.get_channel_locations() - return location + # for now, we only use information from the first two dimensions of channel location + location_2d = location[:,0:2] + return location_2d def get_channel_groups(self): if self.has_extension("recording"): diff --git a/spikeinterface_gui/probeview.py b/spikeinterface_gui/probeview.py index ebba875..d1eb4dd 100644 --- a/spikeinterface_gui/probeview.py +++ b/spikeinterface_gui/probeview.py @@ -21,7 +21,8 @@ class ProbeView(ViewBase): _need_compute = True def __init__(self, controller=None, parent=None, backend="qt"): - self.contact_positions = controller.get_contact_location() + # for now, we only use information from the first two dimensions of contact location + self.contact_positions = controller.get_contact_location()[:,:2] self.probes = controller.get_probegroup().probes self._unit_positions = controller.unit_positions ViewBase.__init__(self, controller=controller, parent=parent, backend=backend)