From 406f99bf7d2f68b68db3e4535ba6e004331de419 Mon Sep 17 00:00:00 2001 From: chrishalcrow <57948917+chrishalcrow@users.noreply.github.com> Date: Thu, 12 Sep 2024 08:39:56 +0100 Subject: [PATCH] update warning to include metric names --- src/spikeinterface/postprocessing/template_metrics.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/spikeinterface/postprocessing/template_metrics.py b/src/spikeinterface/postprocessing/template_metrics.py index d05e3ae7ef..0d0d633c04 100644 --- a/src/spikeinterface/postprocessing/template_metrics.py +++ b/src/spikeinterface/postprocessing/template_metrics.py @@ -152,7 +152,9 @@ def _set_params( # checks that existing metrics were calculated using the same params if existing_params != metrics_kwargs_: warnings.warn( - "The parameters used to calculate the previous template metrics are different than those used now. Deleting previous template metrics..." + f"The parameters used to calculate the previous template metrics are different" + f"than those used now.\nPrevious parameters: {existing_params}\nCurrent " + f"parameters: {metrics_kwargs_}\nDeleting previous template metrics..." ) tm_extension.params["metric_names"] = [] existing_metric_names = []