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 addpath('/mntdirect/_machfs/liuzzo/CODE/LatticeTuningFunctions/errors/errordisplayfunctions');
0007
0008
0009 load ../../ESRFLattice.mat
0010
0011 r0=ring;
0012
0013
0014 ie=1;
0015
0016 inds=findcells(r0,'Class','Sextupole');
0017 errstruct(ie).indx=inds;
0018 errstruct(ie).type='psi';
0019 errstruct(ie).sigma=200*1e-6;
0020 ie=ie+1;
0021
0022 indqm=[findcells(r0,'Class','Quadrupole')];
0023 errstruct(ie).indx=indqm;
0024 errstruct(ie).type='x';
0025 errstruct(ie).sigma=150*1e-6;
0026 ie=ie+1;
0027 errstruct(ie).indx=indqm;
0028 errstruct(ie).type='y';
0029 errstruct(ie).sigma=170*1e-6;
0030 ie=ie+1;
0031
0032
0033 magindex=arrayfun(@(a)a.indx,errstruct,'un',0);
0034 type=arrayfun(@(a)a.type,errstruct,'un',0);
0035 sigma=arrayfun(@(a)a.sigma,errstruct,'un',0);
0036
0037 rerr=atsetrandomerrors(...
0038 r0,...
0039 magindex,...
0040 findcells(r0,'Class','Monitor'),...
0041 123456,...
0042 sigma,...
0043 2.5,...
0044 type);
0045
0046
0047 figure('units','normalized','position',[0.1 0.4 0.65 0.35])
0048 atplot(rerr,[0,200],'comment',[],@pltmisalignments);
0049 saveas(gca,'LargeList.fig')
0050 export_fig('LargeList.jpg','-r300')
0051