0001 clear all
0002 close all
0003
0004
0005 load ../../ESRFLattice.mat
0006
0007
0008 indq=find(atgetcells(ring,'Class','Quadrupole'));
0009
0010
0011 dt=1e-6*randn(size(indq));
0012
0013
0014 ringerr=atsettilt(ring,indq,dt);
0015
0016
0017 figure('units','normalized','position',[0.3 0.3 0.45 0.35])
0018 atplot(ring,'comment',[],@plClosedOrbit)
0019 saveas(gca,'OrbitNoErrTilt.fig')
0020 export_fig('OrbitNoErrTilt.jpg','-r300')
0021
0022 figure('units','normalized','position',[0.3 0.3 0.45 0.35])
0023 atplot(ringerr,'comment',[],@plClosedOrbit)
0024 saveas(gca,'OrbitWithErrTilt.fig')
0025 export_fig('OrbitWithErrTilt.jpg','-r300')
0026
0027 figure('units','normalized','position',[0.3 0.3 0.45 0.35])
0028 s=findspos(ring,indq);
0029 plot(s,dt,'b.');
0030 atplotsyn(gca,ringerr);
0031 axis tight;
0032 xlabel('s [m]');
0033 ylabel('s-axis rotation [rad]');
0034
0035 saveas(gca,'SetErrTilt.fig')
0036 export_fig('SetErrTilt.jpg','-r300')
0037