Loading dev/.directory +1 −2 Original line number Diff line number Diff line [Dolphin] Timestamp=2018,6,1,15,24,17 Timestamp=2018,7,19,12,32,15 Version=3 ViewMode=1 dev/errmap.m +2 −1 Original line number Diff line number Diff line Loading @@ -135,7 +135,8 @@ function errmap(fconf) end figure(1); imagesc(dx*(-mp/2:mp/2),dx*(-mp/2:mp/2),u1); % imagesc(dx*(-mp/2:mp/2),dx*(-mp/2:mp/2),u1); plotmap(u1,dx,r0,r1,mp,1); caxis([-tol3 tol3]); %grid minor on; axis('square'); Loading dev/mresize.m 0 → 100644 +13 −0 Original line number Diff line number Diff line function m2=mresize(m1,mp,ca) n0=rows(m1); xx=1:n0; x=linspace(1,n0,mp); y=x'; m2=interp2(xx,xx,m1,x,y); imagesc(m2); caxis([-ca ca]); axis('square'); colormap('jet'); colorbar; end dev/plotmap.m 0 → 100644 +22 −0 Original line number Diff line number Diff line function plotmap(u4,dx,r0,r1,mp,t) b=ones(mp,mp); c=ones(mp,mp).*(1:mp); r=transpose(c); if(r0) i1=find(sqrt((r-mp/2).^2+(c-mp/2).^2)<=r0); b(i1)=NaN; end if(r1) i1=find(sqrt((r-mp/2).^2+(c-mp/2).^2)>r1); b(i1)=NaN; end % switch(t) case 1 pcolor(dx*(-mp/2+1:mp/2),dx*(-mp/2+1:mp/2),b.*u4(end:-1:1,:)); shading('flat'); axis([-dx*mp/2 dx*mp/2 -dx*mp/2 dx*mp/2]); case 2 contourf(dx*(-mp/2+1:mp/2),dx*(-mp/2+1:mp/2),-u4); end end No newline at end of file dev/preproc.m +26 −3 Original line number Diff line number Diff line Loading @@ -112,9 +112,11 @@ function preproc(fconf) y=(linspace(1,n,n1))'; % x=x/max(x); % y=y/max(y); %ph1=atan(e_im_s./e_re_s); ph1=atan2(e_im_s,e_re_s); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ph1=atan(e_im_s./e_re_s); % ph1=atan2(e_im_s,e_re_s); ph1=unw0(ph1); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ph3=movave(ph1,nma); figure(3); plot(180/pi*ph1,'.1;source phase (deg);'); Loading Loading @@ -239,3 +241,24 @@ function y=movave(x,n) y(1:n-1)=y(n); y(m-n+1:m)=y(m-n); end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function retval = unw0(a,range,thresh) % if (nargin < 3) thresh = 0.5; endif if (nargin < 2) range = max(a) - min(a); endif % ra = reshape(a,1,columns(a)*rows(a)); diff = filter([-1,1],1,ra); p = range * (((diff > thresh*range)>0) - ((diff < -thresh*range)>0)); r = filter(1,[1,-1],p); retval = reshape(ra+r,rows(a),columns(a)); % end Loading
dev/.directory +1 −2 Original line number Diff line number Diff line [Dolphin] Timestamp=2018,6,1,15,24,17 Timestamp=2018,7,19,12,32,15 Version=3 ViewMode=1
dev/errmap.m +2 −1 Original line number Diff line number Diff line Loading @@ -135,7 +135,8 @@ function errmap(fconf) end figure(1); imagesc(dx*(-mp/2:mp/2),dx*(-mp/2:mp/2),u1); % imagesc(dx*(-mp/2:mp/2),dx*(-mp/2:mp/2),u1); plotmap(u1,dx,r0,r1,mp,1); caxis([-tol3 tol3]); %grid minor on; axis('square'); Loading
dev/mresize.m 0 → 100644 +13 −0 Original line number Diff line number Diff line function m2=mresize(m1,mp,ca) n0=rows(m1); xx=1:n0; x=linspace(1,n0,mp); y=x'; m2=interp2(xx,xx,m1,x,y); imagesc(m2); caxis([-ca ca]); axis('square'); colormap('jet'); colorbar; end
dev/plotmap.m 0 → 100644 +22 −0 Original line number Diff line number Diff line function plotmap(u4,dx,r0,r1,mp,t) b=ones(mp,mp); c=ones(mp,mp).*(1:mp); r=transpose(c); if(r0) i1=find(sqrt((r-mp/2).^2+(c-mp/2).^2)<=r0); b(i1)=NaN; end if(r1) i1=find(sqrt((r-mp/2).^2+(c-mp/2).^2)>r1); b(i1)=NaN; end % switch(t) case 1 pcolor(dx*(-mp/2+1:mp/2),dx*(-mp/2+1:mp/2),b.*u4(end:-1:1,:)); shading('flat'); axis([-dx*mp/2 dx*mp/2 -dx*mp/2 dx*mp/2]); case 2 contourf(dx*(-mp/2+1:mp/2),dx*(-mp/2+1:mp/2),-u4); end end No newline at end of file
dev/preproc.m +26 −3 Original line number Diff line number Diff line Loading @@ -112,9 +112,11 @@ function preproc(fconf) y=(linspace(1,n,n1))'; % x=x/max(x); % y=y/max(y); %ph1=atan(e_im_s./e_re_s); ph1=atan2(e_im_s,e_re_s); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ph1=atan(e_im_s./e_re_s); % ph1=atan2(e_im_s,e_re_s); ph1=unw0(ph1); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ph3=movave(ph1,nma); figure(3); plot(180/pi*ph1,'.1;source phase (deg);'); Loading Loading @@ -239,3 +241,24 @@ function y=movave(x,n) y(1:n-1)=y(n); y(m-n+1:m)=y(m-n); end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function retval = unw0(a,range,thresh) % if (nargin < 3) thresh = 0.5; endif if (nargin < 2) range = max(a) - min(a); endif % ra = reshape(a,1,columns(a)*rows(a)); diff = filter([-1,1],1,ra); p = range * (((diff > thresh*range)>0) - ((diff < -thresh*range)>0)); r = filter(1,[1,-1],p); retval = reshape(ra+r,rows(a),columns(a)); % end