From 2e9d0f0c8702b6fcae02d56e0fb3ac956cc70b68 Mon Sep 17 00:00:00 2001 From: jacobpennington Date: Fri, 7 Jun 2024 18:58:54 -0700 Subject: [PATCH] Fixed bug introduced with logging for nblocks=0 --- kilosort/run_kilosort.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kilosort/run_kilosort.py b/kilosort/run_kilosort.py index 06177f8a..381a1344 100644 --- a/kilosort/run_kilosort.py +++ b/kilosort/run_kilosort.py @@ -402,10 +402,11 @@ def compute_drift_correction(ops, device, tic0=np.nan, progress_bar=None, bfile.close() logger.info(f'drift computed in {time.time()-tic : .2f}s; ' + f'total {time.time()-tic0 : .2f}s') - logger.debug(f'st shape: {st.shape}') - logger.debug(f'yblk shape: {ops["yblk"].shape}') - logger.debug(f'dshift shape: {ops["dshift"].shape}') - logger.debug(f'iKxx shape: {ops["iKxx"].shape}') + if st is not None: + logger.debug(f'st shape: {st.shape}') + logger.debug(f'yblk shape: {ops["yblk"].shape}') + logger.debug(f'dshift shape: {ops["dshift"].shape}') + logger.debug(f'iKxx shape: {ops["iKxx"].shape}') # binary file with drift correction bfile = io.BinaryFiltered(