1 function mesh_tign_detect(fig,fxlong,fxlat,tign,v,str)
2 % 3d ignition time and detections
4 % reduced resolution 3d plot
9 m_plot=min(m,res); n_plot=min(n,res);
11 mi=m1:ceil((m2-m1+1)/m_plot):m2; % reduced index vectors
12 ni=n1:ceil((n2-n1+1)/n_plot):n2;
13 mesh_fxlong=fxlong(mi,ni);
14 mesh_fxlat=fxlat(mi,ni);
15 mesh_tign=tign(mi,ni);
16 [mesh_m,mesh_n]=size(mesh_fxlat)
17 % mesh_tign(mesh_tign(:)==max(mesh_tign(:)))=NaN;
18 surf(mesh_fxlong,mesh_fxlat,mesh_tign,'EdgeAlpha',0,'FaceAlpha',0.5)
26 unit_fxlat = eradius*2*pi/360;
27 lon_ctr=mean(fxlong(:));
28 unit_fxlong = unit_fxlat*cos(lon_ctr*2*pi/360);
29 % plot black patches as detection squares as patches
32 min_fxlon=min(fxlong(:));
33 max_fxlon=max(fxlong(:));
34 min_fxlat=min(fxlat(:));
35 max_fxlat=max(fxlat(:));
36 isel=find(v.lon > min_fxlon & v.lon< max_fxlon ...
37 & v.lat > min_fxlat & v.lat< max_fxlat);
39 X=zeros(4,ndet);Y=X;Z=X;
43 dx2=0.5*res/unit_fxlong;
44 dy2=0.5*res/unit_fxlat;
45 X(:,ix)=[v.lon(i)-dx2,v.lon(i)+dx2,v.lon(i)+dx2,v.lon(i)-dx2]';
46 Y(:,ix)=[v.lat(i)-dy2,v.lat(i)-dy2,v.lat(i)+dy2,v.lat(i)+dy2]';
55 fprintf('Figure %i %s\n',fig,str)