From da21e78de7d4397af1927566d9362e90515af91d Mon Sep 17 00:00:00 2001 From: jacobpennington Date: Thu, 9 May 2024 15:12:59 -0700 Subject: [PATCH] Added message about negative spike times --- kilosort/run_kilosort.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kilosort/run_kilosort.py b/kilosort/run_kilosort.py index dfb10a42..5ea55f5c 100644 --- a/kilosort/run_kilosort.py +++ b/kilosort/run_kilosort.py @@ -422,6 +422,14 @@ def detect_spikes(ops, device, bfile, tic0=np.nan, progress_bar=None): print(f'{len(st)} spikes extracted in {time.time()-tic : .2f}s; ' + f'total {time.time()-tic0 : .2f}s') + negative_spikes = (st[:,0] < 0).sum() + if negative_spikes > 0: + print( + f'{negative_spikes} spikes with negative spike times were detected.\n' + 'We are aware of an issue causing this to happen for a small number ' + 'of spikes, and are working on a fix.' + ) + return st, tF, Wall, clu