0001 clear all
0002 close all
0003
0004 addpath('/mntdirect/_machfs/liuzzo/CODE/LatticeTuningFunctions/errors')
0005 addpath('/mntdirect/_machfs/liuzzo/CODE/LatticeTuningFunctions/errors/errordisplayfunctions');
0006
0007
0008 load ../../ESRFLattice.mat
0009
0010
0011 indq=find(atgetcells(ring,'Class','Quadrupole'));
0012
0013
0014 dx=1e-6*randn(size(indq));
0015 dy=1e-6*randn(size(indq));
0016
0017
0018 ringerr=atsetshift(ring,indq,dx,dy);
0019
0020
0021 figure('units','normalized','position',[0.3 0.3 0.45 0.35])
0022 atplot(ring,'comment',[],@plClosedOrbit)
0023 saveas(gca,'OrbitNoErr.fig')
0024 export_fig('OrbitNoErr.jpg','-r300')
0025
0026 figure('units','normalized','position',[0.3 0.3 0.45 0.35])
0027 atplot(ringerr,'comment',[],@plClosedOrbit)
0028 saveas(gca,'OrbitWithErr.fig')
0029 export_fig('OrbitWithErr.jpg','-r300')
0030
0031 figure('units','normalized','position',[0.3 0.3 0.45 0.35])
0032 atplot(ringerr,'comment',[],@pltmisalignments)
0033 saveas(gca,'SetErrDxDy.fig')
0034 export_fig('SetErrDxDy.jpg','-r300')
0035
0036 figure('units','normalized','position',[0.3 0.3 0.45 0.35])
0037 atplot(ringerr,[0,52],'comment',[],@pltmisalignments)
0038 saveas(gca,'SetErrDxDyZoom.fig')
0039 export_fig('SetErrDxDyZoom.jpg','-r300')
0040