-
Notifications
You must be signed in to change notification settings - Fork 0
/
distance_tuning_summary.m
52 lines (45 loc) · 1.54 KB
/
distance_tuning_summary.m
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
40
41
42
43
44
45
46
47
48
49
50
51
52
%% proportion of tuned cells
%% in L2/3 C2, L2/3 non-C2, L4 C2, L4 non-C2
clear
baseDir = 'D:\TPM\JK\suite2p\';
% mice = [25,27,30,36,37,38,39,41,52,53,54,56,70,74,75,76];
% sessions = {[4,19],[3,16],[3,21],[1,17],[7],[2],[1,23],[3],[3,21],[3],[3],[3],[6],[4],[4],[4]};
naiveInds = 1:12;
expertInds = [1:4,7,9];
scnnInds = 13:16;
for ni = 1 : length(naiveInds)
mouse = mice(naiveInds(ni));
cd(sprintf('%s%03d',baseDir, mouse))
session = sessions{naiveInds(ni)}(1);
load(sprintf('JK%03dS%02ddistance_tuning',mouse,session), 'spk')
fieldnames = fields(spk);
for fi = 1 : length(fieldnames)
% if ~strcmp(fieldnames{fi}, 'val')
naive(ni).(fieldnames{fi}) = spk.(fieldnames{fi});
% end
end
end
for ei = 1 : length(expertInds)
mouse = mice(expertInds(ei));
cd(sprintf('%s%03d',baseDir, mouse))
session = sessions{expertInds(ei)}(2);
load(sprintf('JK%03dS%02ddistance_tuning',mouse,session), 'spk')
fieldnames = fields(spk);
for fi = 1 : length(fieldnames)
expert(ei).(fieldnames{fi}) = spk.(fieldnames{fi});
end
end
% for si = 1 : length(scnnInds)
% mouse = mice(scnnInds(si));
% cd(sprintf('%s%03d',baseDir, mouse))
% session = sessions{scnnInds(si)}(1);
% load(sprintf('JK%03dS%02dangle_tuning',mouse,session), 'spk')
% fieldnames = fields(spk);
% for fi = 1 : length(fieldnames)
%
% L4(si).(fieldnames{fi}) = spk.(fieldnames{fi});
%
% end
% end
cd(baseDir)
save('distance_tuning_summary.mat','naive','expert')