1 function [ out_struct ] = compute_log_likelihoods( in_struct )
\r
2 % [ out_struct ] = compute_log_likelihoods( in_struct )
\r
3 % function takes in a struct with fire data and returns a struct with log
\r
4 % likelihoods corresponding to fire data
\r
7 % in_struct Matlab structure with the following fields
\r
8 % in_struct.pts : nx2 array containing coordinates of ignitions
\r
9 % in_struct.dirs : n^2x1 cell array with directories containing w.mat and
\r
13 % out_struct Matlb structure with the same fields as input as well as
\r
14 % out_struct.logs : nx1 array with log likelihoods corresponding to the
\r
17 out_struct = in_struct;
\r
20 [m n] = size(in_struct.names');
\r
22 % loop over number of ignitions
\r
25 % cd folders to get w,fuels files
\r
27 cd(in_struct.dirs{i});
\r
28 copyfile('w.mat','C:\cygwin64\home\paulc\fs\w.mat')
\r
29 copyfile('fuels.m','C:\cygwin64\home\paulc\fs\fuels.m')
\r
34 logs(i) = detection_log_likelihood('TIFs/',w);
\r
36 out_struct.logs = logs;
\r
37 %save out_struct_new_objective.mat out_struct;
\r