-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmake_sta_plots.m
34 lines (29 loc) · 890 Bytes
/
make_sta_plots.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
function make_sta_plots( sta , invww, filenames )
% Given a cell struct of stas, for example as output by denoised_sta, save
% imagesc plots to current directory. Negative regions in STA are shown in
% white.
NGC = size( sta, 2 ) ;
h = figure ;
for i=1:NGC
st = plotable_evidence( sta{1,i} ) ;
st = st.^(0.5) ;
try
imagesc(st) ;
filename = sprintf('%s_%d_STA',filenames,i) ;
saveas(h,filename,'jpg') ;
catch E
fprintf('Error while attempting to plot %s',filename)
disp(E)
end
try
std = sqrt( sta{2,i} - sta{1,i}.^2 + invww ) ;
std = std-min(std(:)) ;
std = std / max(std(:)) ;
imagesc(std)
filename = sprintf('%s_%d_std',filenames,i) ;
saveas(h,filename,'jpg') ;
catch E
fprintf('Error while attempting to plot %s',filename)
disp(E)
end
end