dx2
add spherical aberration as a defect - now no ideal solution exists
Contents
system definition
global cv th rn;
cv = [ 0 0.25 -0.15 0];
th = [ 0 0 0 0];
rn = [ 1 1.5 1 1];
find contours
n=128; u1 = linspace(-0.3,0.3,n); u2 = linspace(-0.4,0.2,n); map = zeros(n,n); for r=1:n v(2)=u2(r); for c=1:n v(1)=u1(c); f = sing2(v); map(r,c)=f'*f; end end cmax = max(max(map)); fprintf('contour map max %g min %g\n',cmax,min(min(map))); map = map/cmax; save sing2 cv th rn u1 u2 map
contour map max 1.16758 min 2.82131e-006
contours
[c2 hc2] = contour(u1,u2,map,logspace(1,-4,16)); nc = get(hc2,'Children'); for i = 1:4:length(nc) set(nc(i),'LineWidth',1.5); end axis square; legend; xlabel('cv1'); ylabel('cv2');
% resize plot window pos = get(gcf,'Position'); pos(3)=480; pos(4)=480; set(gcf,'Position',pos);
optimization
x = [ 0.25 -0.15]'; for (k=1:5) fprintf('step %d\n\n',k); fprintf('starting point: %.6f %.6f\n',x); % display starting point [A fz] = calculate_derivatives(@sing2,x); x = SVD_diagram(A,fz,x,0.05); end
step 1 starting point: 0.250000 -0.150000 step 2 starting point: -0.155673 -0.283581 step 3 starting point: -0.074541 -0.173431 step 4 starting point: 0.016005 -0.083650 step 5 starting point: 0.071000 -0.029008