Skip to content

Commit

Permalink
port plot_probe_map() to new widgets API
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelgarcia committed Sep 19, 2023
1 parent e49071e commit 3d79295
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 79 deletions.
1 change: 0 additions & 1 deletion src/spikeinterface/widgets/_legacy_mpl_widgets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# basics
# from .timeseries import plot_timeseries, TracesWidget
from .rasters import plot_rasters, RasterWidget
from .probemap import plot_probe_map, ProbeMapWidget

# isi/ccg/acg
from .isidistribution import plot_isi_distribution, ISIDistributionWidget
Expand Down
77 changes: 0 additions & 77 deletions src/spikeinterface/widgets/_legacy_mpl_widgets/probemap.py

This file was deleted.

8 changes: 7 additions & 1 deletion src/spikeinterface/widgets/tests/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ def test_plot_confusion_matrix(self):
if backend not in self.skip_backends:
sw.plot_confusion_matrix(self.gt_comp)

def test_plot_probe_map(self):
possible_backends = list(sw.ProbeMapWidget.get_possible_backends())
for backend in possible_backends:
if backend not in self.skip_backends:
sw.plot_probe_map(self.recording, with_channel_ids=True, with_contact_id=True)


if __name__ == "__main__":
Expand All @@ -359,7 +364,8 @@ def test_plot_confusion_matrix(self):
# mytest.test_template_metrics()
# mytest.test_amplitudes()
# mytest.test_plot_agreement_matrix()
mytest.test_plot_confusion_matrix()
# mytest.test_plot_confusion_matrix()
mytest.test_plot_probe_map()

# plt.ion()
plt.show()
3 changes: 3 additions & 0 deletions src/spikeinterface/widgets/widget_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from .confusion_matrix import ConfusionMatrixWidget
from .crosscorrelograms import CrossCorrelogramsWidget
from .motion import MotionWidget
from .probe_map import ProbeMapWidget
from .quality_metrics import QualityMetricsWidget
from .sorting_summary import SortingSummaryWidget
from .spike_locations import SpikeLocationsWidget
Expand All @@ -32,6 +33,7 @@
ConfusionMatrixWidget,
CrossCorrelogramsWidget,
MotionWidget,
ProbeMapWidget,
QualityMetricsWidget,
SortingSummaryWidget,
SpikeLocationsWidget,
Expand Down Expand Up @@ -87,6 +89,7 @@
plot_confusion_matrix = ConfusionMatrixWidget
plot_crosscorrelograms = CrossCorrelogramsWidget
plot_motion = MotionWidget
plot_probe_map = ProbeMapWidget
plot_quality_metrics = QualityMetricsWidget
plot_sorting_summary = SortingSummaryWidget
plot_spike_locations = SpikeLocationsWidget
Expand Down

0 comments on commit 3d79295

Please sign in to comment.