Today, I discussed with you, Dr. Misra, and made an agreement about how to deal with the imperfect data. Finally, I have keep all depths following the agreement.
Summary:
I conclude all depths' conditions of t2 distribution and made a sheet (3 means 3 or more).
Codes changed:
%% whole depth
% find peaks
for i=1:4256
for j=2:63
if T2distri(i,j-1)<T2distri(i,j) && T2distri(i,j)>T2distri(i,j+1)
p(i,j)=T2distri(i,j);
end
end
end
[row,col,v]=find(p);
col1=col+1;
p2=[row,col1,v]; % ascending it by row
% if there are more than two peaks at one depth, delete some of them
p3=p2;
for i=1:9674
if p3(i,1)==p3(i+1,1) && p3(i+1,1)==p3(i+2,1)
if p3(i,3)>=0.1*p3(i+1,3) && p3(i,3)>=0.1*p3(i+2,3) && p3(i+1,3)>=0.1*p3(i,3) && p3(i+1,3)>=0.1*p3(i+2,3) && p3(i+2,3)>=0.1*p3(i,3) && p3(i+2,3)>=0.1*p3(i+1,3)
p3(i,3)=0;
p3(i+1,3)=0;
p3(i+2,3)=0;
end
end
end
for i=1:9675
if p3(i,3)==0
if p3(i,1)==p3(i+1,1)
p3(i+1,3)=0;
end
end
end
for i=1:6046 % change till the end
if p3(i,3)==0
p3(i,:)=[];
end
end
% for every depth with more than 2 peaks and other peaks cannot be ignored,
% i have deleted them.
p4=p3;
%% for other depths with more than 2 peaks, i can choose the largest 2 peaks
for i=1:5651 % change till the end
if p4(i,1)==p4(i+1,1) && p4(i+1,1)==p4(i+2,1)
if p4(i,3)<p4(i+1,3) && p4(i,3)<p4(i+2,3)
p4(i,:)=[];
else if p4(i+1,3)<p4(i,3) && p4(i+1,3)<p4(i+2,3)
p4(i+1,:)=[];
else
p4(i+2,:)=[];
end
end
end
end
% now there is only one or two peaks at every depth
%% adjust two peaks at every depth
p5=p4;
for i=2:6175 % change the number till the end
if p5(i,1)~=p5(i-1,1) && p5(i,1)~=p5(i+1,1)
if p5(i,2)<=32
p5=[p5(1:i,:);[p5(i,1),0,0];p5(i+1:end,:)];
else
p5=[p5(1:i-1,:);[p5(i,1),0,0];p5(i:end,:)];
end
end
end
%% set initial values for iteration
for i=1:6176
if p5(i,3)==0
beta0(i,:)=[0;0;0];
else
beta0(i,:)=[0.01;1;p5(i,3)];
end
end
I have set the initial values for iteration for every depth.
Tomorrow, I will do the fitting step.
No comments:
Post a Comment