-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExtractSLCdataFromNs5_loop.m
More file actions
39 lines (36 loc) · 1.4 KB
/
ExtractSLCdataFromNs5_loop.m
File metadata and controls
39 lines (36 loc) · 1.4 KB
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
34
35
36
37
38
39
%this loops over the sessions and blocks to get the SLC from NS5s
% should take like forever .
errorns5toslc=[];
tic;
for t=14
fprintf('running session %s \n',sessionList{t,1});
blkno=sessionList{t,2};
%blkno=[1 blkno]; %adding the refblock
blkno=1;
for s=blkno
fprintf('running blkno %d \n',s);
if s~=1
try
ExtractSLCdataFromNs5([sessionDir filesep sessionList{t,1}], s,...
'featureList', {'ncTX', 'spikePower'}, 'savePath', ...
[sessionDir filesep sessionList{t,1} filesep 'Data' filesep 'Extracted Data' filesep],...
'showNS5Alignment', true);
catch
warning('could not run %s, block no %d, ns5 data missing',sessionList{t,1},s)
errorns5toslc=[errorns5toslc;t s];
end
else
try
ExtractSLCdataFromNs5([sessionDir filesep sessionList{t,1}], s,...
'featureList', {'ncTX', 'spikePower'}, 'savePath', ...
[sessionDir filesep sessionList{t,1} filesep 'Data' filesep 'Extracted Data' filesep],...
'showNS5Alignment', true,'isref',true);
catch
warning('could not run %s, block no %d, something wrong with ref block',sessionList{t,1},s)
errorns5toslc=[errorns5toslc;t s];
end
end
close all;
end
end
toc;