-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
I wrote this when I was testing, just putting it here for safe-keeping
function installKilosort(vers, localpath)
% INSTALLKILOSORT - install Kilosort on Windows
%
% INSTALLKILOSORT()
%
% Installs v3.0.2 of Kilosort in a subdirectory called 'tools'
% of the user's userpath.
%
% INSTALLKILOSORT(VERS)
%
% Installs a particular Kilsort version (e.g., 'v.3.0.2').
%
% INSTALLKILOSORT(VERS, LOCALPATH)
%
% Installs a particular Kilosort version at LOCALPATH instead
% of [userpath filesep 'tools'].
%
%
if nargin<2
localpath = [userpath filesep 'tools'];
end;
if nargin<1
vers = 'v.3.0.2';
end;
% now do the installation
if ~isfolder(localpath)
mkdir(localpath);
end
filename = [localpath filesep vers '.zip'];
remoteFilename = ['https://github.com/MouseLand/Kilosort/archive/refs/tags/' vers '.zip'];
websave(filename, remoteFilename);
currentwd = pwd;
try
cd(localpath);
unzippedFiles = unzip(filename);
cd(currentwd);
catch
cd(currentwd);
error([lasterr]);
end;
kilosortParentDir = fileparts(unzippedFiles{1});
addpath(genpath(kilosortParentDir));
Metadata
Metadata
Assignees
Labels
No labels