diff --git a/CHANGELOG.md b/CHANGELOG.md index 546f19fd3..02e5e5fb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ - Spike Sorting - Fix bug in `get_group_by_shank` #1096 + - Fix bug in `_compute_metric` #1099 ## [0.5.3] (August 27, 2024) diff --git a/src/spyglass/spikesorting/v0/spikesorting_curation.py b/src/spyglass/spikesorting/v0/spikesorting_curation.py index 52a2dff73..33469d67c 100644 --- a/src/spyglass/spikesorting/v0/spikesorting_curation.py +++ b/src/spyglass/spikesorting/v0/spikesorting_curation.py @@ -581,7 +581,7 @@ def _compute_metric(self, waveform_extractor, metric_name, **metric_params): peak_sign_metrics = ["snr", "peak_offset", "peak_channel"] if metric_name == "isi_violation": - metric = metric_func(waveform_extractor, **metric_params) + return metric_func(waveform_extractor, **metric_params) elif metric_name in peak_sign_metrics: if "peak_sign" not in metric_params: raise Exception(