Loading dev/.directory +2 −1 Original line number Diff line number Diff line [Dolphin] Timestamp=2017,7,17,12,18,31 Timestamp=2018,6,1,15,24,17 Version=3 ViewMode=1 dev/cut.m 0 → 100644 +31 −0 Original line number Diff line number Diff line function cut(v0) % % ex.: cut([-0.01 0.01 -70 10]); % % source('conf.m'); load uuvv.dat; e0=sqrt(er.^2+ei.^2); e=20*log10(e0); e=e-max(max(e)); [r0 c0]=find(e==0); du=k0*lambda/D; u=linspace(-mp/2,mp/2,mp)*du; figure(1); plot(u,e(r0,:),'-*') axis(v0); grid minor on; xlabel('u'); figure(2); plot(u,e(:,c0),'-*') axis(v0); grid minor on; xlabel('v'); end No newline at end of file dev/intmap.m 0 → 100644 +41 −0 Original line number Diff line number Diff line function u1=intmap(u3,n,r0,r1,e0) %load zern.dat m=size(u3)(1); % n=512; % r0=32; % r1=205; x=linspace(1,n,m); [xx,yy] = meshgrid (x,x); X=1:n; [XX,YY] = meshgrid (X,X); u3=interp2(xx,yy,u3,XX,YY,'spline'); b=ones(n,n); c=ones(n,n).*(1:n); r=transpose(c); if(r1>0) i1=find(sqrt((r-n/2+1).^2+(c-n/2+1).^2)>=r1); b(i1)=0; end if(r0>0) i1=find(sqrt((r-n/2+1).^2+(c-n/2+1).^2)<=r0); b(i1)=0; end u1=u3.*b; %save errmap.dat u1 figure(30); imagesc(u1); axis('square'); caxis([-e0 e0]); colorbar; colormap('jet'); print -dpng intmap.png end No newline at end of file dev/map.m 0 → 100644 +47 −0 Original line number Diff line number Diff line function map(s0,ca,x1,lutname,fname,mp) % % lutname='axist_parab.txt'; % fname='map'; % s0=1; % ca=2; % x1=[1,2,3]; % % mp=512; % dx=0.156556; % mp=128; D=64; k0=0.8; dx=D/(mp-1)/k0; map0=load(lutname); x0=map0(:,x1(1))*1E-3; y0=map0(:,x1(2))*1E-3; ep0=s0*map0(:,x1(3)); xx=-dx*(-mp/2:mp/2-1); [x,y] = meshgrid (xx,xx); % ep=griddata (x0,y0,ep0,x,y); i0=find(isnan(ep)); ep(i0)=0.0; ep=ep(end:-1:1,:); % i0=find(sqrt(x.^2+y.^2)<4.0); ep(i0)=0; % i0=find(abs(ep)>0); blk=find(abs(ep)==0); printf('RMS=%f\n',(std(ep(i0)))); imagesc(xx,xx,ep); caxis([-ca ca]); axis('square'); colormap('jet'); colorbar; print ([fname,'.png'],'-dpng'); u1=ep(end:-1:1,end:-1:1); save errmap.dat u1 save unwr.dat blk end dev/zern.m +3 −1 Original line number Diff line number Diff line Loading @@ -153,9 +153,11 @@ function zern(fconf) figure(2); imagesc(dx*(-mp/2:mp/2),dx*(-mp/2:mp/2),uz); caxis([-tol4 tol4]); axis('square'); title('zernike pol. map (mm)'); colormap('gray'); colormap(cmap); %colormap('gray'); %colormap('jet'); colorbar; %print -dpng zern.png Loading Loading
dev/.directory +2 −1 Original line number Diff line number Diff line [Dolphin] Timestamp=2017,7,17,12,18,31 Timestamp=2018,6,1,15,24,17 Version=3 ViewMode=1
dev/cut.m 0 → 100644 +31 −0 Original line number Diff line number Diff line function cut(v0) % % ex.: cut([-0.01 0.01 -70 10]); % % source('conf.m'); load uuvv.dat; e0=sqrt(er.^2+ei.^2); e=20*log10(e0); e=e-max(max(e)); [r0 c0]=find(e==0); du=k0*lambda/D; u=linspace(-mp/2,mp/2,mp)*du; figure(1); plot(u,e(r0,:),'-*') axis(v0); grid minor on; xlabel('u'); figure(2); plot(u,e(:,c0),'-*') axis(v0); grid minor on; xlabel('v'); end No newline at end of file
dev/intmap.m 0 → 100644 +41 −0 Original line number Diff line number Diff line function u1=intmap(u3,n,r0,r1,e0) %load zern.dat m=size(u3)(1); % n=512; % r0=32; % r1=205; x=linspace(1,n,m); [xx,yy] = meshgrid (x,x); X=1:n; [XX,YY] = meshgrid (X,X); u3=interp2(xx,yy,u3,XX,YY,'spline'); b=ones(n,n); c=ones(n,n).*(1:n); r=transpose(c); if(r1>0) i1=find(sqrt((r-n/2+1).^2+(c-n/2+1).^2)>=r1); b(i1)=0; end if(r0>0) i1=find(sqrt((r-n/2+1).^2+(c-n/2+1).^2)<=r0); b(i1)=0; end u1=u3.*b; %save errmap.dat u1 figure(30); imagesc(u1); axis('square'); caxis([-e0 e0]); colorbar; colormap('jet'); print -dpng intmap.png end No newline at end of file
dev/map.m 0 → 100644 +47 −0 Original line number Diff line number Diff line function map(s0,ca,x1,lutname,fname,mp) % % lutname='axist_parab.txt'; % fname='map'; % s0=1; % ca=2; % x1=[1,2,3]; % % mp=512; % dx=0.156556; % mp=128; D=64; k0=0.8; dx=D/(mp-1)/k0; map0=load(lutname); x0=map0(:,x1(1))*1E-3; y0=map0(:,x1(2))*1E-3; ep0=s0*map0(:,x1(3)); xx=-dx*(-mp/2:mp/2-1); [x,y] = meshgrid (xx,xx); % ep=griddata (x0,y0,ep0,x,y); i0=find(isnan(ep)); ep(i0)=0.0; ep=ep(end:-1:1,:); % i0=find(sqrt(x.^2+y.^2)<4.0); ep(i0)=0; % i0=find(abs(ep)>0); blk=find(abs(ep)==0); printf('RMS=%f\n',(std(ep(i0)))); imagesc(xx,xx,ep); caxis([-ca ca]); axis('square'); colormap('jet'); colorbar; print ([fname,'.png'],'-dpng'); u1=ep(end:-1:1,end:-1:1); save errmap.dat u1 save unwr.dat blk end
dev/zern.m +3 −1 Original line number Diff line number Diff line Loading @@ -153,9 +153,11 @@ function zern(fconf) figure(2); imagesc(dx*(-mp/2:mp/2),dx*(-mp/2:mp/2),uz); caxis([-tol4 tol4]); axis('square'); title('zernike pol. map (mm)'); colormap('gray'); colormap(cmap); %colormap('gray'); %colormap('jet'); colorbar; %print -dpng zern.png Loading