-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFanoTresDistribution.m
More file actions
97 lines (60 loc) · 2.03 KB
/
Copy pathFanoTresDistribution.m
File metadata and controls
97 lines (60 loc) · 2.03 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
function fanotresdistribution(sub_bins)
load jonscellsdata
tres_index=[];
fano_index=[];
sub_ind = [10 6 3 2];
sub_ind = find(sub_ind == sub_bins);
for c = 1:length(jonscells)
msc_ind = find(jonscells(c).meanspikecount>=1);
if~isempty(msc_ind)
fano_ind = find(jonscells(c).fanofactor(msc_ind)<1);
if~isempty(fano_ind)
fano_index = [fano_index c];
end
tres = jonscells(c).tresscores{sub_ind};
tres_ind = find(tres(msc_ind)>99);
if~isempty(tres_ind)
tres_index = [tres_index c];
end
end
end
%%%%%%%%%%FANO%%%%%%%%%%%%%
figure
for c = 1:length(fano_index)
msc_ind = find(jonscells(fano_index(c)).meanspikecount>=1);
fanos = find(jonscells(fano_index(c)).fanofactor(msc_ind)<1);
msc_dist(c) = length(msc_ind);
fano_dist(c) = length(fanos);
hold on
plot(c,(length(fanos)/length(msc_ind))*100,'.b')
text(c,((length(fanos)/length(msc_ind))*100)+1,num2str(jonscells(fano_index(c)).cell_num))
title('Fano Factor Distribution')
end
figure
bar(msc_dist)
hold on
bar(fano_dist,'r')
legend MSC FANO
ylabel('Number of Frames')
xlabel('Cells')
title('FANO FACTOR')
figure
for c = 1:length(tres_index)
msc_ind = find(jonscells(tres_index(c)).meanspikecount>=1);
tres = jonscells(tres_index(c)).tresscores{sub_ind};
tres = find(tres(msc_ind)>99);
msc_dist(c) = length(msc_ind);
tres_dist(c) = length(tres);
hold on
plot(c,(length(tres)/length(msc_ind))*100,'.b')
text(c,((length(tres)/length(msc_ind))*100)+1,num2str(jonscells(tres_index(c)).cell_num))
title('TRES Distribution')
end
figure
bar(msc_dist)
hold on
bar(tres_dist,'r')
legend MSC TRES
ylabel('Number of Frames')
xlabel('Cells')
title('TRES')