Home > pubtools > LatticeTuningFunctions > errors > TILT > testerrRotCorrector.m

testerrRotCorrector

PURPOSE ^

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 clear all
0002 close all
0003 
0004 % load lattice
0005 load ../../ESRFLattice.mat
0006 
0007 % get indexes
0008 indc=indHCor;
0009 
0010 %set correctors to 1e-5 rad horizontal kick
0011 ring0=ring;
0012 ring=atsetfieldvalues(ring,indc(45),'PolynomB',{1,1},1e-4);
0013 
0014 
0015 % define s-axis rotation errors in correctors
0016 dt=1e-3*randn(size(indc)); % random errors of 1um
0017 
0018 % set errors
0019 ringerr=atsettilt(ring,indc,dt);
0020 
0021 
0022 % plots
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

Generated on Thu 24-Aug-2017 18:47:33 by m2html © 2005