Skip to content

Commit

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

# isi/ccg/acg
from .isidistribution import plot_isi_distribution, ISIDistributionWidget

Expand Down
120 changes: 0 additions & 120 deletions src/spikeinterface/widgets/_legacy_mpl_widgets/rasters.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -43,43 +43,7 @@ def setUp(self):
def tearDown(self):
pass

# def test_timeseries(self):
# sw.plot_timeseries(self._rec, mode='auto')
# sw.plot_timeseries(self._rec, mode='line', show_channel_ids=True)
# sw.plot_timeseries(self._rec, mode='map', show_channel_ids=True)
# sw.plot_timeseries(self._rec, mode='map', show_channel_ids=True, order_channel_by_depth=True)

def test_rasters(self):
sw.plot_rasters(self._sorting)

def test_plot_probe_map(self):
sw.plot_probe_map(self._rec)
sw.plot_probe_map(self._rec, with_channel_ids=True)

# TODO
# def test_spectrum(self):
# sw.plot_spectrum(self._rec)

# TODO
# def test_spectrogram(self):
# sw.plot_spectrogram(self._rec, channel=0)

# def test_unitwaveforms(self):
# w = sw.plot_unit_waveforms(self._we)
# unit_ids = self._sorting.unit_ids[:6]
# sw.plot_unit_waveforms(self._we, max_channels=5, unit_ids=unit_ids)
# sw.plot_unit_waveforms(self._we, radius_um=60, unit_ids=unit_ids)

# def test_plot_unit_waveform_density_map(self):
# unit_ids = self._sorting.unit_ids[:3]
# sw.plot_unit_waveform_density_map(self._we, unit_ids=unit_ids, max_channels=4)
# sw.plot_unit_waveform_density_map(self._we, unit_ids=unit_ids, radius_um=50)
#
# sw.plot_unit_waveform_density_map(self._we, unit_ids=unit_ids, radius_um=25, same_axis=True)
# sw.plot_unit_waveform_density_map(self._we, unit_ids=unit_ids, max_channels=2, same_axis=True)

# def test_unittemplates(self):
# sw.plot_unit_templates(self._we)


def test_plot_unit_probe_map(self):
sw.plot_unit_probe_map(self._we, with_channel_ids=True)
Expand Down Expand Up @@ -120,12 +84,6 @@ def test_plot_peak_activity_map(self):
sw.plot_peak_activity_map(self._rec, with_channel_ids=True)
sw.plot_peak_activity_map(self._rec, bin_duration_s=1.0)

def test_confusion(self):
sw.plot_confusion_matrix(self._gt_comp, count_text=True)

def test_agreement(self):
sw.plot_agreement_matrix(self._gt_comp, count_text=True)

def test_multicomp_graph(self):
msc = sc.compare_multiple_sorters([self._sorting, self._sorting, self._sorting])
sw.plot_multicomp_graph(msc, edge_cmap="viridis", node_cmap="rainbow", draw_labels=False)
Expand All @@ -150,8 +108,6 @@ def test_sorting_performance(self):
mytest.setUp()

# ~ mytest.test_timeseries()
# ~ mytest.test_rasters()
mytest.test_plot_probe_map()
# ~ mytest.test_unitwaveforms()
# ~ mytest.test_plot_unit_waveform_density_map()
# mytest.test_unittemplates()
Expand All @@ -169,8 +125,6 @@ def test_sorting_performance(self):
# ~ mytest.test_plot_drift_over_time()
# ~ mytest.test_plot_peak_activity_map()

# mytest.test_confusion()
# mytest.test_agreement()
# ~ mytest.test_multicomp_graph()
#  mytest.test_sorting_performance()

Expand Down
Loading

0 comments on commit 4501289

Please sign in to comment.