From cad48e40fb37c73fcd420f2e37b2c507fa2e2f33 Mon Sep 17 00:00:00 2001 From: Jacob Pennington Date: Tue, 3 Dec 2024 15:53:07 -0500 Subject: [PATCH] Fixed bug for .prb files with np statements --- kilosort/io.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kilosort/io.py b/kilosort/io.py index 94a5d1a..10ebc4b 100644 --- a/kilosort/io.py +++ b/kilosort/io.py @@ -63,8 +63,10 @@ def load_probe(probe_path): # !DOES NOT WORK FOR PHASE3A PROBES WITH DISCONNECTED CHANNELS! # Also does not remove reference channel in PHASE3B probes contents = probe_path.read_text() - metadata = {} + metadata = {'np': np} exec(contents, {}, metadata) + # TODO: Figure out an alternative for exec, it's a security risk. + probe['chanMap'] = [] probe['xc'] = [] probe['yc'] = []