diff --git a/src/spikeinterface/widgets/_legacy_mpl_widgets/tests/test_widgets_legacy.py b/src/spikeinterface/widgets/_legacy_mpl_widgets/tests/test_widgets_legacy.py index defe10f0d4..39eb80e2e5 100644 --- a/src/spikeinterface/widgets/_legacy_mpl_widgets/tests/test_widgets_legacy.py +++ b/src/spikeinterface/widgets/_legacy_mpl_widgets/tests/test_widgets_legacy.py @@ -43,8 +43,6 @@ def setUp(self): def tearDown(self): pass - - def test_plot_unit_probe_map(self): sw.plot_unit_probe_map(self._we, with_channel_ids=True) sw.plot_unit_probe_map(self._we, animated=True) diff --git a/src/spikeinterface/widgets/agreement_matrix.py b/src/spikeinterface/widgets/agreement_matrix.py index 22617f6be0..ec6ea1c87c 100644 --- a/src/spikeinterface/widgets/agreement_matrix.py +++ b/src/spikeinterface/widgets/agreement_matrix.py @@ -5,7 +5,6 @@ from .utils import get_unit_colors - class AgreementMatrixWidget(BaseWidget): """ Plots sorting comparison agreement matrix. @@ -22,12 +21,11 @@ class AgreementMatrixWidget(BaseWidget): If True counts are displayed as text unit_ticks: bool If True unit tick labels are displayed - + """ def __init__( - self, sorting_comparison, ordered=True, count_text=True, unit_ticks=True, - backend=None, **backend_kwargs + self, sorting_comparison, ordered=True, count_text=True, unit_ticks=True, backend=None, **backend_kwargs ): plot_data = dict( sorting_comparison=sorting_comparison, @@ -87,5 +85,3 @@ def plot_matplotlib(self, data_plot, **backend_kwargs): N1 - 0.5, -0.5, ) - - diff --git a/src/spikeinterface/widgets/confusion_matrix.py b/src/spikeinterface/widgets/confusion_matrix.py index b76283b421..8eb58f30b2 100644 --- a/src/spikeinterface/widgets/confusion_matrix.py +++ b/src/spikeinterface/widgets/confusion_matrix.py @@ -5,7 +5,6 @@ from .utils import get_unit_colors - class ConfusionMatrixWidget(BaseWidget): """ Plots sorting comparison confusion matrix. @@ -18,13 +17,10 @@ class ConfusionMatrixWidget(BaseWidget): If True counts are displayed as text unit_ticks: bool If True unit tick labels are displayed - + """ - def __init__( - self, gt_comparison, count_text=True, unit_ticks=True, - backend=None, **backend_kwargs - ): + def __init__(self, gt_comparison, count_text=True, unit_ticks=True, backend=None, **backend_kwargs): plot_data = dict( gt_comparison=gt_comparison, count_text=count_text, @@ -80,4 +76,4 @@ def plot_matplotlib(self, data_plot, **backend_kwargs): self.ax.set_ylim( N1 + 0.5, -0.5, - ) \ No newline at end of file + ) diff --git a/src/spikeinterface/widgets/probe_map.py b/src/spikeinterface/widgets/probe_map.py index 193711a34f..7fb74abd7c 100644 --- a/src/spikeinterface/widgets/probe_map.py +++ b/src/spikeinterface/widgets/probe_map.py @@ -5,7 +5,6 @@ from .utils import get_unit_colors - class ProbeMapWidget(BaseWidget): """ Plot the probe of a recording. @@ -23,10 +22,8 @@ class ProbeMapWidget(BaseWidget): """ def __init__( - self, recording, channel_ids=None, with_channel_ids=False, - backend=None, **backend_or_plot_probe_kwargs + self, recording, channel_ids=None, with_channel_ids=False, backend=None, **backend_or_plot_probe_kwargs ): - # split backend_or_plot_probe_kwargs backend_kwargs = dict() plot_probe_kwargs = dict() diff --git a/src/spikeinterface/widgets/rasters.py b/src/spikeinterface/widgets/rasters.py index de855ebe45..4a1d76279f 100644 --- a/src/spikeinterface/widgets/rasters.py +++ b/src/spikeinterface/widgets/rasters.py @@ -4,7 +4,6 @@ from .base import BaseWidget, to_attr, default_backend_kwargs - class RasterWidget(BaseWidget): """ Plots spike train rasters. @@ -24,16 +23,13 @@ class RasterWidget(BaseWidget): """ def __init__( - self, sorting, segment_index=None, unit_ids=None, time_range=None, color="k", - backend=None, **backend_kwargs + self, sorting, segment_index=None, unit_ids=None, time_range=None, color="k", backend=None, **backend_kwargs ): - - if segment_index is None: if sorting.get_num_segments() != 1: raise ValueError("You must provide segment_index=...") segment_index = 0 - + if time_range is None: frame_range = [0, sorting.to_spike_vector()[-1]["sample_index"]] time_range = [f / sorting.sampling_frequency for f in frame_range] @@ -86,10 +82,3 @@ def plot_matplotlib(self, data_plot, **backend_kwargs): self.ax.set_yticklabels(units_ids) self.ax.set_xlim(*dp.time_range) self.ax.set_xlabel("time (s)") - - - - - - - diff --git a/src/spikeinterface/widgets/tests/test_widgets.py b/src/spikeinterface/widgets/tests/test_widgets.py index 509194cb93..2c583391c3 100644 --- a/src/spikeinterface/widgets/tests/test_widgets.py +++ b/src/spikeinterface/widgets/tests/test_widgets.py @@ -349,7 +349,6 @@ def test_plot_rasters(self): sw.plot_rasters(self.sorting) - if __name__ == "__main__": # unittest.main() @@ -371,7 +370,7 @@ def test_plot_rasters(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() mytest.test_plot_rasters()