-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgetKSdir.m
More file actions
33 lines (28 loc) · 885 Bytes
/
getKSdir.m
File metadata and controls
33 lines (28 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
function ksDir = getKSdir(mouseName, thisDate, ephysTag)
% first look in zserver
% rootE = dat.expPath(mouseName, thisDate, 1, 'main', 'master');
% root = fileparts(rootE);
root = getRootDir(mouseName, thisDate);
if ~isempty(ephysTag)
ephysFolder = ['ephys_' ephysTag];
else
ephysFolder = 'ephys';
end
ksDir = fullfile(root, ephysFolder, 'sorting');
if exist(fullfile(ksDir, 'spike_times.npy'), 'file')
return;
else
ksDir = fullfile('\\basket.cortexlab.net\data\nick\', ...
mouseName, thisDate, ephysFolder);
if exist(fullfile(ksDir, 'spike_times.npy'), 'file')
return;
else
ksDir = fullfile('\\basket.cortexlab.net\data\nick\', ...
mouseName, thisDate);
if exist(fullfile(ksDir, 'spike_times.npy'), 'file')
return;
else
fprintf('could not find ksDir\n');
end
end
end