0001 clear all
0002 close all
0003
0004
0005 load ../../ESRFLattice.mat
0006
0007
0008 indc=indHCor;
0009
0010
0011 ring0=ring;
0012 ring=atsetfieldvalues(ring,indc(45),'PolynomB',{1,1},1e-4);
0013
0014
0015
0016 dt=1e-3*randn(size(indc));
0017
0018
0019 ringerr=atsettilt(ring,indc,dt);
0020
0021
0022
0023 [twin,~,~]=atlinopt(ring0,0,1);
0024
0025 figure('units','normalized','position',[0.3 0.3 0.45 0.35])
0026 atplot(ring,'comment',[],'inputtwiss',twin,@plClosedOrbit)
0027 saveas(gca,'OrbitNoErrTiltCor.fig')
0028 export_fig('OrbitNoErrTiltCor.jpg','-r300')
0029
0030 figure('units','normalized','position',[0.3 0.3 0.45 0.35])
0031 atplot(ringerr,'comment',[],'inputtwiss',twin,@plClosedOrbit)
0032 saveas(gca,'OrbitWithErrTiltCor.fig')
0033 export_fig('OrbitWithErrTiltCor.jpg','-r300')
0034
0035 figure('units','normalized','position',[0.3 0.3 0.45 0.35])
0036 s=findspos(ring,indc);
0037 plot(s,dt,'b.');
0038 atplotsyn(gca,ringerr);
0039 axis tight;
0040 xlabel('s [m]');
0041 ylabel('s-axis rotation [rad]');
0042
0043 saveas(gca,'SetErrTiltCor.fig')
0044 export_fig('SetErrTiltCor.jpg','-r300')
0045