From f30aa401a0f9246af2000dfdaf64aa1ea5b70c87 Mon Sep 17 00:00:00 2001 From: Sebastien Date: Thu, 27 Jun 2024 10:36:42 +0200 Subject: [PATCH] Side effects in SC2 --- src/spikeinterface/sorters/internal/spyking_circus2.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/spikeinterface/sorters/internal/spyking_circus2.py b/src/spikeinterface/sorters/internal/spyking_circus2.py index b5df0f1059..4aef3adcd7 100644 --- a/src/spikeinterface/sorters/internal/spyking_circus2.py +++ b/src/spikeinterface/sorters/internal/spyking_circus2.py @@ -363,11 +363,13 @@ def final_cleaning_circus(recording, sorting, templates, **merging_kwargs): sparsity = templates.sparsity templates_array = templates.get_dense_templates().copy() - + ms_before = templates.ms_before + ms_after = templates.ms_after sa = create_sorting_analyzer(sorting, recording, format="memory", sparsity=sparsity) - sa.extensions["templates"] = ComputeTemplates(sa) - sa.extensions["templates"].params = {"nbefore": templates.nbefore} + sa.extensions["templates"].params = {'ms_before' : ms_before, + 'ms_after' : ms_after, + 'operators' : None} sa.extensions["templates"].data["average"] = templates_array sa.compute("unit_locations", method="monopolar_triangulation") merges = get_potential_auto_merge(sa, **merging_kwargs)