Skip to content
Snippets Groups Projects
Commit b1d995ae authored by Franco Buffa's avatar Franco Buffa
Browse files

source

parent 6a58f308
No related branches found
No related tags found
No related merge requests found
......@@ -70,21 +70,27 @@ function errmap(fconf)
a=[ones(length(X),1) X Y RHO2 RHO2.*X RHO2.*Y DELTA2];
c=a\W;
u0=u0-(c(1)+x*c(2)+y*c(3)+rho2*c(4)+rho2.*x*c(5)+rho2.*y*c(6)+delta2*c(7));
case 3
a=[ones(length(X),1) X Y DELTA2];
c=a\W;
u0=u0-(c(1)+x*c(2)+y*c(3)+delta2*c(4));
otherwise
error("invalid aber value");
endswitch
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
printf('********************************\n');
xf=c(5)*2*F^3*lambda/pi;
yf=c(6)*2*F^3*lambda/pi;
zf=c(4)*2*F^2*lambda/pi;
% phi=atan2((c(3)*lambda/(2*pi)-yf/F),(c(2)*lambda/(2*pi)-xf/F))*180/pi
% theta=((c(3)*lambda/(2*pi)-yf/F)/sind(phi))*180/pi
printf('Feed displacements:\n');
printf('x=%f (mm)\n',1E3*xf);
printf('y=%f (mm)\n',1E3*yf);
printf('z=%f (mm)\n',1E3*zf);
printf('********************************\n');
if(aber<3)
printf('********************************\n');
xf=c(5)*2*F^3*lambda/pi;
yf=c(6)*2*F^3*lambda/pi;
zf=c(4)*2*F^2*lambda/pi;
% phi=atan2((c(3)*lambda/(2*pi)-yf/F),(c(2)*lambda/(2*pi)-xf/F))*180/pi
% theta=((c(3)*lambda/(2*pi)-yf/F)/sind(phi))*180/pi
printf('Feed displacements:\n');
printf('x=%f (mm)\n',1E3*xf);
printf('y=%f (mm)\n',1E3*yf);
printf('z=%f (mm)\n',1E3*zf);
printf('********************************\n');
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
else
a=[ones(length(X),1) X Y];
......
function radrms(fconf)
function [x y u]=radrms(fconf)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Function:
......@@ -39,20 +39,29 @@ function radrms(fconf)
[xm ym]=meshgrid(x0,x0);
R=sqrt(xm.^2+ym.^2);
d=5;
x0=y=[];
x0=y=u=[];
for r=r0:r1-d
z=(R>=r);
z=z.*(R<r+d);
i0=find(z>0);
% imagesc(z)
y=[y ;std(u3(i0))];
u=[u ;mean(u3(i0))];
x0=[x0 ; r];
end
dx=D/(mp-1)/k0;
x=x0*dx;
y(end-d:end)=y(end-d);
u(end-d:end)=u(end-d);
figure(9);
plot(x,y,'*-');
grid minor on;
axis([4.5 32]);
figure(10);
plot(x,u,'*-');
grid minor on;
axis([4.5 32]);
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment