1 function [like,deriv]= evaluate_likes(psi,t,p_like_spline,p_deriv_spline,n_deriv_spline)
3 % function evaluates data likelihood and derivative
5 % psi - matrix with 'fire mask', positive is fire
7 % p_like_spline,p_deriv_spline,n_deriv_spline - splines with likelihood function(s)
9 % like - data likelihood for each time
10 % deriv -derivative of like wrt time
21 %evaluate likelihood on masks
22 % need to think about the bounds of the splines ....
23 l1 = reshape(p_like_spline(t),m,n);
24 d1 = reshape(p_deriv_spline(t),m,n);
25 l2 = log(1-exp(l1)); % can use other spline here, fastest? time ~= 0.012 sec
26 %l2 = reshape(n_like_spline(t),m,n); %time ~= 0.017
27 d2 = reshape(n_deriv_spline(t),m,n);