7 fprintf('Making splines \n');
9 [p_like_spline,p_deriv_spline,n_deriv_spline] = make_spline(72,2000);
10 save splines.mat p_like_spline p_deriv_spline n_deriv_spline
14 fire_cone = @(x,y) cone_slope*sqrt(( x.^2 + y.^2));
17 position = linspace(-10,10,grid_size);
18 [x,y]= meshgrid(position,position);
28 slice_time = [47 49 51];
29 fires = -1*ones(size(x));
32 contour3(x,y,z,[49 49],'k')
33 fires = 5*ones(size(x));
35 x_coords = 1+round(2*g*rand(1,num_pts));
36 y_coords = 1+round(2*g*rand(1,num_pts));
37 %figure,scatter(x_coords,y_coords);
40 radius = slice_time(2)/10;
41 angle = linspace(0,2*pi);
42 perim = zeros(length(angle),2);
43 perim(:,1) = radius*cos(angle)';
44 perim(:,2) = radius*sin(angle)';
45 plot(perim(:,1),perim(:,2),'k')
48 u = x(x_coords(i),y_coords(i));
49 v = y(x_coords(i),y_coords(i));
51 if abs(zt - radius) < 2 && zt < radius %49
52 fires(x_coords(i),y_coords(i)) = 1;
56 fires(x_coords(i),y_coords(i)) = -1;
59 fires(x_coords(i),y_coords(i)) = 1;
65 %make all fire detections / ground
66 fires = -ones(grid_size,grid_size);
68 % evaluate and plot likelihoods
69 t = slice_time(2) - z;
71 new_like = input_num('Use new like? yes = 1',1);
73 [like,deriv]= evaluate_likes(fires,t,p_like_spline,p_deriv_spline,n_deriv_spline);
76 stretch = [0.5,10,5,10];
77 [like,deriv] = like2(fires,t,stretch);
79 fprintf('paused for plotting, etc... \n');
80 figure,mesh(like),title('like')
81 figure,mesh(deriv),title('deriv')
82 figure,plot(t(100,:),like(100,:)),title('like slice')
83 figure,plot(t(100,:),deriv(100,:)),title('deriv slice')