1 % second test script looking for tails???
\r
9 mask = zeros(domain_size,domain_size);
\r
10 strip = ones(domain_size,1);
\r
11 mask(:,round(domain_size/2)) = strip;
\r
14 heat = zeros(domain_size,domain_size);
\r
15 heat_strip = zeros(1,domain_size);
\r
18 for i = fire_start:domain_size
\r
19 heat_strip(1,i) = exp(-(i-fire_start)*a);
\r
21 for i = 1:domain_size
\r
22 heat(i,:) = heat_strip;
\r
24 figure, plot(heat(50,:)), title('Heat fraction')
\r
25 %make probability matrix
\r
26 detection_probs = zeros(domain_size,domain_size);
\r
28 for i = 1:domain_size
\r
29 for j = 1:domain_size
\r
30 detection_probs(i,j) = detection_probability(heat(i,j));
\r
33 figure,plot(detection_probs(round(domain_size/2),:)),title('Detection probability')
\r
38 %set up of likelihood stuff
\r
41 weight = gauss_weight(radius);
\r
44 %loop to make likelihoods
\r
46 for i=radius+1:domain_size-radius
\r
49 l = compute_pixel_probability(round(domain_size/2),i,heat,radius, weight, detection_probs );
\r
50 like(counter) = log(l);
\r
51 counter = counter +1;
\r
59 % x = 1:domain_size;
\r
60 % center = fire_start*ones(1,domain_size);
\r
61 % g = @(x,x_0,sig) exp(-(x-x_0).^2/2/sig^2);
\r
64 % y = g(x,center,sig);
\r
65 % figure,plot(y),title('gaussian');
\r
66 % yg = log(y(1,1:940));
\r
67 % log_prob = log(detection_probs(round(domain_size/2),1:940));
\r
68 % liker = yg+log_prob;
\r
70 % figure,plot(yp),title('prob');
\r
71 % figure,plot(liker),title('like')
\r