Home > pubtools > LatticeTuningFunctions > errors > Survey > testerr.m

testerr

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 /machfs/liuzzo/ESRF/StorageRing/LATTICE/AT/ESRF_fortol.mat
0006 
0007 
0008 
0009 algedir='/machfs/liuzzo/EBS';
0010 algeactfile=fullfile(algedir,'Actual_Position_Simu.xlsx');
0011 rerr=SetESRFAlgeAlignmentError(ring,algeactfile,'',1);
0012     
0013 figure('units','normalized','position',[0.1 0.4 0.65 0.35])
0014 atplot(rerr,'comment',[],@pltmisalignments)
0015 
0016 saveas(gca,'SurveyErrors.fig')
0017 export_fig('SurveyErrors.jpg','-r300')
0018   
0019 indm=find(atgetcells(rerr,'Class','Monitor'));
0020 
0021 %% plots
0022 figure('units','normalized','position',[0.1 0.4 0.65 0.35])
0023 s=findspos(rerr,indm);
0024 o=findorbit4(rerr,0,indm);
0025 plot(s,o(1,:)'*1e3,'k');
0026 hold on;
0027 oe=findorbit4Err(rerr,0,indm);
0028 plot(s,oe(1,:)'*1e3,'rx');
0029 legend('orbit','bpm reading');
0030 oe=findorbit4Err(rerr,0,indm);
0031 plot(s,oe(1,:)'*1e3,'rx');
0032 oe=findorbit4Err(rerr,0,indm);
0033 plot(s,oe(1,:)'*1e3,'rx');
0034 oe=findorbit4Err(rerr,0,indm);
0035 plot(s,oe(1,:)'*1e3,'rx');
0036 oe=findorbit4Err(rerr,0,indm);
0037 plot(s,oe(1,:)'*1e3,'rx');
0038 xlabel('s [m]');ylabel('x [mm]')
0039 saveas(gca,'OrbitBPMAllErrX.fig')
0040 export_fig('OrbitBPMAllErrX.jpg','-r300')

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