Home > pubtools > LatticeTuningFunctions > errors > DeltaS > 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 addpath('/mntdirect/_machfs/liuzzo/CODE/LatticeTuningFunctions/errors');
0005 addpath('/mntdirect/_machfs/liuzzo/CODE/LatticeTuningFunctions/errors/random')
0006 % load lattice
0007 load ../../ESRFLattice.mat
0008 
0009 % get indexes
0010 indm=indBPM;
0011 indq=find(atgetcells(ring,'Class','Quadrupole')); % girders are defined by GS and GE markers (start and end of girder)
0012 
0013 rerr=atsetrandomerrors(...
0014     ring,...
0015     indq,...
0016     indm,...
0017     1,...
0018     5e-2,...
0019     2.5,...
0020     's');
0021 
0022 figure('units','normalized','position',[0.1 0.4 0.65 0.35])
0023 atplot(ring)
0024 hold on;
0025 atplotsyn(gca,rerr);
0026 
0027 saveas(gca,'DeltaSQuad.fig')
0028 export_fig('DeltaSQuad.jpg','-r300')
0029 figure('units','normalized','position',[0.1 0.4 0.65 0.35])
0030 atplot(rerr)
0031 %% get indexes
0032 indm=find(atgetcells(ring,'Class','Monitor'));
0033 indd=find(atgetcells(ring,'Class','Bend')); % girders are defined by GS and GE markers (start and end of girder)
0034 
0035 rerr=atsetrandomerrors(...
0036     ring,...
0037     indd(1:4:end),...
0038     indm,...
0039     123456,...
0040     5e-2,...
0041     2.5,...
0042     's');
0043 
0044 figure('units','normalized','position',[0.1 0.4 0.65 0.35])
0045 atplot(ring)
0046 hold on;
0047 atplotsyn(gca,rerr);
0048 
0049 saveas(gca,'DeltaSDipZoom.fig')
0050 export_fig('DeltaSDipZoom.jpg','-r300')
0051 
0052 figure('units','normalized','position',[0.1 0.4 0.65 0.35])
0053 atplot(rerr)

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