From b41de016925e6458c3f3a1e08830802bdf1ee20f Mon Sep 17 00:00:00 2001 From: zhangxiaoxing <58493968+zhangxiaoxing@users.noreply.github.com> Date: Thu, 28 Mar 2024 16:06:45 +0800 Subject: [PATCH] fixed depth estimation during drift map plotting --- ecephys_spike_sorting/common/visualization.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ecephys_spike_sorting/common/visualization.py b/ecephys_spike_sorting/common/visualization.py index 5c8597e2..e5d3976a 100644 --- a/ecephys_spike_sorting/common/visualization.py +++ b/ecephys_spike_sorting/common/visualization.py @@ -148,7 +148,7 @@ def plotDriftmap(ks_directory, sample_rate = 30000, time_range = [0, np.inf], ex use_master_clock = False, include_pcs = True) - spike_depths = get_spike_depths(spike_clusters, pc_features, pc_feature_ind, channel_pos) + spike_depths = get_spike_depths(spike_clusters, np.squeeze(spike_templates), np.square(pc_features[:,0,:]), pc_feature_ind, channel_pos) spike_amplitudes = get_spike_amplitudes(spike_templates, templates, amplitudes) if exclude_noise: @@ -404,4 +404,4 @@ def plotFullProbeTSNE(ks_directory, total_spikes=150000, exclude_noise = True, f if output_path is not None: plt.savefig(output_path) - plt.close('all') \ No newline at end of file + plt.close('all')