Skip to content

Commit 1cc9cb4

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 666d7dc commit 1cc9cb4

4 files changed

Lines changed: 8 additions & 18 deletions

File tree

src/spikeinterface/benchmark/benchmark_base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,6 @@ def compute_result(self):
621621
raise NotImplementedError
622622

623623

624-
625624
# Common feature accross some benchmark : sorter + matching
626625
class MixinStudyUnitCount:
627626
def get_count_units(self, case_keys=None, well_detected_score=None, redundant_score=None, overmerged_score=None):

src/spikeinterface/benchmark/benchmark_clustering.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def plot_performances_vs_depth_and_snr(self, *args, **kwargs):
195195
from .benchmark_plot_tools import plot_performances_vs_depth_and_snr
196196

197197
return plot_performances_vs_depth_and_snr(self, *args, **kwargs)
198-
198+
199199
def plot_performances_ordered(self, *args, **kwargs):
200200
from .benchmark_plot_tools import plot_performances_ordered
201201

src/spikeinterface/benchmark/benchmark_plot_tools.py

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ def despine(ax_or_axes):
1414
sns.despine(ax=ax)
1515

1616

17-
18-
1917
def clean_axis(ax):
2018
for loc in ("top", "right", "left", "bottom"):
2119
ax.spines[loc].set_visible(False)
@@ -30,19 +28,19 @@ def plot_study_legend(study, case_keys=None, ax=None):
3028
Make a ax with only legend
3129
"""
3230
import matplotlib.pyplot as plt
33-
31+
3432
if case_keys is None:
3533
case_keys = list(study.cases.keys())
36-
34+
3735
if ax is None:
3836
fig, ax = plt.subplots(figsize=figsize)
3937
else:
4038
fig = ax.get_figure()
4139

4240
colors = study.get_colors()
43-
41+
4442
for k in case_keys:
45-
ax.plot([], color=colors[k], label=study.cases[k]['label'])
43+
ax.plot([], color=colors[k], label=study.cases[k]["label"])
4644
ax.legend()
4745
clean_axis(ax)
4846
return fig
@@ -126,7 +124,6 @@ def plot_run_times(study, case_keys=None, levels_to_keep=None, figsize=None, ax=
126124
The resulting figure containing the plots
127125
"""
128126
import matplotlib.pyplot as plt
129-
130127

131128
if case_keys is None:
132129
case_keys = list(study.cases.keys())
@@ -138,7 +135,6 @@ def plot_run_times(study, case_keys=None, levels_to_keep=None, figsize=None, ax=
138135
else:
139136
fig = ax.get_figure()
140137

141-
142138
if levels_to_keep is None:
143139
colors = study.get_colors()
144140
labels = []
@@ -183,7 +179,6 @@ def plot_run_times(study, case_keys=None, levels_to_keep=None, figsize=None, ax=
183179
plt_fun = sns.barplot
184180
palette_keys = hues
185181

186-
187182
assert all(
188183
[key in colors for key in palette_keys]
189184
), f"colors must have a color for each palette key: {palette_keys}"
@@ -230,7 +225,6 @@ def plot_unit_counts(study, case_keys=None, levels_to_keep=None, colors=None, fi
230225
if case_keys is None:
231226
case_keys = list(study.cases.keys())
232227

233-
234228
if ax is None:
235229
fig, ax = plt.subplots(figsize=figsize)
236230
else:
@@ -294,7 +288,6 @@ def plot_unit_counts(study, case_keys=None, levels_to_keep=None, colors=None, fi
294288
else:
295289
assert all([col in colors for col in columns]), f"colors must have a color for each column: {columns}"
296290

297-
298291
df = pd.melt(
299292
count_units.reset_index(),
300293
id_vars=levels_to_keep,
@@ -496,12 +489,11 @@ def plot_performances_vs_snr(
496489
if levels_to_keep is not None:
497490
case_group_keys, labels = study.get_grouped_keys_mapping(levels_to_group_by=levels_to_keep)
498491
else:
499-
labels = {k: study.cases[k]['label'] for k in case_keys}
500-
case_group_keys = {k : [k] for k in case_keys}
501-
492+
labels = {k: study.cases[k]["label"] for k in case_keys}
493+
case_group_keys = {k: [k] for k in case_keys}
502494

503495
colors = study.get_colors(levels_to_group_by=levels_to_keep)
504-
496+
505497
assert all([key in colors for key in case_keys]), f"colors must have a color for each case key: {case_keys}"
506498

507499
for key, key_list in case_group_keys.items():

src/spikeinterface/benchmark/benchmark_sorter.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def remove_benchmark(self, key):
6565
if sorter_folder.exists():
6666
shutil.rmtree(sorter_folder)
6767

68-
6968
# plotting as methods
7069
def plot_unit_counts(self, **kwargs):
7170
from .benchmark_plot_tools import plot_unit_counts

0 commit comments

Comments
 (0)