From a5b43f0e05122e45f71d83525beb3e07bc0d6b56 Mon Sep 17 00:00:00 2001 From: Jacob Pennington Date: Fri, 13 Dec 2024 14:47:39 -0800 Subject: [PATCH] added get_best_channel back in to avoid disrupting scripts --- kilosort/data_tools.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kilosort/data_tools.py b/kilosort/data_tools.py index b33ca87..193b6cf 100644 --- a/kilosort/data_tools.py +++ b/kilosort/data_tools.py @@ -51,6 +51,8 @@ def get_best_channels(results_dir): best_chans = (templates**2).sum(axis=1).argmax(axis=-1) return best_chans +def get_best_channel(results_dir, cluster_id): + return get_best_channels(results_dir)[cluster_id] def get_cluster_spikes(cluster_id, results_dir, n_spikes=np.inf): """Get `n_spikes` random spike times assigned to `cluster_id`."""