1 function comparison_cycling(files,comparison,bounds)
3 % comparison_cycling(files,comparison,bounds)
6 % Plots a comparison of different results from make_mat.py
9 % files cell of file names to compare (size available: from 1 to 3)
10 % comparison file with original pixel detections
11 % bounds array of [min_lon, max_lon, min_lat, max_lat]
13 % Developed in Matlab 9.2.0.556344 (R2017a) on MACINTOSH.
14 % Angel Farguell (angel.farguell@gmail.com), 2019-03-21
15 %-------------------------------------------------------------------------
17 nfiles = length(files);
23 ax(1) = subplot(2,2,1);
24 scatter(lons,lats,s_mark,fires,'filled','o');
26 xlim([bounds(1),bounds(2)]);
27 ylim([bounds(3),bounds(4)]);
28 title('Original nodes to compare');
31 [~,name{k-1},~] = fileparts(files{k-1});
33 [rows,cols] = size(data);
35 Xpixel=(0:cols-1)+0.5;
36 Ypixel=(0:rows-1)+0.5;
37 xx = geo(1)+Xpixel*geo(2);
38 yy = geo(4)+Ypixel*geo(6);
39 [lon,lat] = meshgrid(xx,yy);
40 mask = logical((lon > bounds(1)).*(lon < bounds(2)).*(lat > bounds(3)).*(lat < bounds(4)));
42 ax(k) = subplot(2,2,k);
43 scatter(lon(mask),lat(mask),s_mark,data(mask),'filled','o'); cmfire;
44 xlim([bounds(1),bounds(2)]);
45 ylim([bounds(3),bounds(4)]);
46 title(sprintf('Fire mesh of %s',name{k-1}),'Interpreter','none');