Commit 04dc1222 authored by Simone Liuzzo's avatar Simone Liuzzo

display text and figure show same values

parent e3b33633
......@@ -5,7 +5,6 @@ classdef OrbitCorrection < RingControl
properties
ModelRM % response matrix structure for trajectory correction
end
......@@ -32,7 +31,7 @@ classdef OrbitCorrection < RingControl
switch obj.machine
case 'ebs-simu'
b = load('/machfs/liuzzo/EBS/Simulator/commissioningtools/@OrbitCorrection/EBSOrbitRM.mat');
b = load('/machfs/liuzzo/EBS/Simulator/commissioningtools/matlab/@OrbitCorrection/EBSOrbitRM.mat');
obj.ModelRM = b.ModelRM;
case 'esrf-sr'
......
......@@ -386,12 +386,17 @@ while ~stopped
end
% SVD/bestcor Correction
dch=obj.computecorrection(corropt.svdmode,FRH,vec,corropt.svdparam);
dch1=obj.computecorrection(corropt.svdmode,FRH,vec1,corropt.svdparam);
% apply only a fraction of the computed correction
dch = dch*corropt.fraction;
if ~corropt.absolute
dch=obj.computecorrection(corropt.svdmode,FRH,vec,corropt.svdparam);
% apply only a fraction of the computed correction
dch = dch*corropt.fraction;
else
dch1=obj.computecorrection(corropt.svdmode,FRH,vec1,corropt.svdparam);
end
% if dpp correction separate dpp from correctors
if corropt.corRF
deltacor0=deltacor;
......@@ -505,13 +510,14 @@ while ~stopped
end
% SVD/bestcor Correction
dcv=obj.computecorrection(corropt.svdmode,FRV,vec,corropt.svdparam);
dcv1=obj.computecorrection(corropt.svdmode,FRV,vec1,corropt.svdparam);
% apply only a fraction of the computed correction
dcv = dcv*corropt.fraction;
if ~corropt.absolute
dcv=obj.computecorrection(corropt.svdmode,FRV,vec,corropt.svdparam);
% apply only a fraction of the computed correction
dcv = dcv*corropt.fraction;
else
dcv1=obj.computecorrection(corropt.svdmode,FRV,vec1,corropt.svdparam);
end
totvcor=corv0;
% limit steerers strengths
......@@ -549,7 +555,7 @@ while ~stopped
plot(sbpm,t0is(1,:),'r+-'); hold on;
%plot(sbpm(~usebpm),t0is(1,~usebpm),'mx','MarkerSize',15,'LineWidth',2);hold on;
if corropt.corH
plot(sbpm,t0is(1,:)+(RespH*(corh0(usecorH)-tothcor(usecorH))')','co-');
plot(sbpm,t0is(1,:)-(RespH*(corh0(usecorH)-tothcor(usecorH))')','co-');
end
legend('objective','measured','proposed');
ylabel('hor [m]');
......@@ -585,7 +591,7 @@ while ~stopped
plot(sbpm,t0is(2,:),'r+-'); hold on;
% plot(sbpm(~usebpm),t0is(2,~usebpm),'mx','MarkerSize',15,'LineWidth',2); hold on;
if corropt.corV
plot(sbpm,t0is(2,:)+(RespV*(corv0(usecorV)-totvcor(usecorV))')','co-');
plot(sbpm,t0is(2,:)-(RespV*(corv0(usecorV)-totvcor(usecorV))')','co-');
end
legend('objective','measured','proposed');
ylabel('ver [m]'); grid on;
......@@ -604,9 +610,9 @@ while ~stopped
% display results
disp('Forseen change: ')
disp(['hor. : ' num2str(std2(ox(usebpm))*1e6,'%3.3f') ' -> '...
num2str(std2(RespH*(corh0(usecorH)-tothcor(usecorH))')*1e6,'%3.3f') ' um'])
num2str(std2(t0is(1,:)'-RespH*(corh0(usecorH)-tothcor(usecorH))')*1e6,'%3.3f') ' um'])
disp(['ver. : ' num2str(std2(oy(usebpm))*1e6,'%3.3f') ' -> '...
num2str(std2(RespV*(corv0(usecorV)-totvcor(usecorV))')*1e6,'%3.3f') ' um'])
num2str(std2(t0is(2,:)'-RespV*(corv0(usecorV)-totvcor(usecorV))')*1e6,'%3.3f') ' um'])
disp(['H cor mean: ' num2str(std2(corh0*1e6),'%3.3f') ' -> ' num2str(std2(tothcor*1e6),'%3.3f') ' murad']);
disp(['V cor mean: ' num2str(std2(corv0*1e6),'%3.3f') ' -> ' num2str(std2(totvcor*1e6),'%3.3f') ' murad']);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment