From 47e6f9508da52348a6f6e02246bf6c93b3523b50 Mon Sep 17 00:00:00 2001 From: Jan Zimmermann Date: Mon, 17 Jun 2024 22:50:07 -0500 Subject: [PATCH] fix for cases in which filename contains string "ap" such as subject id --- kilosort/io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kilosort/io.py b/kilosort/io.py index 71d3bd6..f898f72 100644 --- a/kilosort/io.py +++ b/kilosort/io.py @@ -37,7 +37,7 @@ def find_binary(data_dir: Union[str, os.PathLike]) -> Path: # TODO: Why give this preference? Not all binary files will have this tag. # If there are multiple binary files, find one with "ap" tag if len(filenames) > 1: - filenames = [f for f in filenames if 'ap' in f.as_posix()] + filenames = [f for f in filenames if 'ap.bin' in f.as_posix()] # If there is still more than one, raise an error, user needs to specify # full path.