Commit e1962176 authored by Simone Liuzzo's avatar Simone Liuzzo

MeasureOrbitResponseMatrix disabled correctors not correctly selected

parent 5a05477a
......@@ -252,10 +252,12 @@ NBPM = length(o0(1,:));
% check if it is enabled
en = obj.getEnabledHsteerers;
if en(actuatorindex)
disp(['Measuring ' hnames{actuatorindex} ' ' num2str(actuatorindex) ' / ' num2str(length(hnames))])
if en(hlist(actuatorindex))
disp(['Measuring ' hnames{actuatorindex} ...
' ' num2str(actuatorindex) ' / ' num2str(length(hnames))])
else % if not enabled skip measurement
warning([hnames{actuatorindex} ' is not enabled (either in orbit correction or itself). SKIPPED'])
warning([hnames{actuatorindex} ' is not enabled '...
'(either in orbit correction or itself). SKIPPED'])
response = zeros(size(o0));
return;
end
......@@ -275,10 +277,12 @@ NBPM = length(o0(1,:));
end
% check if it is enabled
en = obj.getEnabledVsteerers;
if en(actuatorindex)
disp(['Measuring ' vnames{actuatorindex} ' ' num2str(actuatorindex) ' / ' num2str(length(vnames))])
if en(vlist(actuatorindex))
disp(['Measuring ' vnames{actuatorindex} ...
' ' num2str(actuatorindex) ' / ' num2str(length(vnames))])
else % if not enabled skip measurement
warning([vnames{actuatorindex} ' is not enabled (either in orbit correction or itself). SKIPPED'])
warning([vnames{actuatorindex} ' is not enabled '...
'(either in orbit correction or itself). SKIPPED'])
response = NaN(size(o0));
return;
end
......@@ -304,7 +308,9 @@ NBPM = length(o0(1,:));
% up
Kp=K0;
Kp(hvlist(actuatorindex)) = K0(hvlist(actuatorindex)) + 0.5*variation;
disp(['UP: ' num2str(K0(hvlist(actuatorindex)),'%3.2e') ' + ' num2str(0.5*variation,'%3.2e') ' = ' num2str(Kp(hvlist(actuatorindex)),'%3.2e')]);
disp(['UP: ' num2str(K0(hvlist(actuatorindex)),'%3.2e') ...
' + ' num2str(0.5*variation,'%3.2e') ...
' = ' num2str(Kp(hvlist(actuatorindex)),'%3.2e')]);
A.set(Kp); % moovable set also waits for setpoint reach.
% get real variation in case it could not reach set point
......@@ -317,7 +323,9 @@ NBPM = length(o0(1,:));
% down
Km=K0;
Km(hvlist(actuatorindex)) = K0(hvlist(actuatorindex)) - 0.5*variation;
disp(['DOWN: ' num2str(K0(hvlist(actuatorindex)),'%3.2e') ' - ' num2str(0.5*variation,'%3.2e') ' = ' num2str(Km(hvlist(actuatorindex)),'%3.2e')]);
disp(['DOWN: ' num2str(K0(hvlist(actuatorindex)),'%3.2e') ...
' - ' num2str(0.5*variation,'%3.2e') ...
' = ' num2str(Km(hvlist(actuatorindex)),'%3.2e')]);
A.set(Km);% moovable set also waits for setpoint reach.
% get real variation in case it could not reach set point
warning('impement get real variation');
......@@ -330,7 +338,9 @@ NBPM = length(o0(1,:));
else % single sided
Kp=K0;
Kp(hvlist(actuatorindex)) = K0(hvlist(actuatorindex)) + variation;
disp(['UP: ' num2str(K0(hvlist(actuatorindex)),'%3.2e') ' + ' num2str(variation,'%3.2e') ' = ' num2str(Kp(hvlist(actuatorindex)),'%3.2e')]);
disp(['UP: ' num2str(K0(hvlist(actuatorindex)),'%3.2e') ...
' + ' num2str(variation,'%3.2e') ...
' = ' num2str(Kp(hvlist(actuatorindex)),'%3.2e')]);
A.set(Kp);% moovable set also waits for setpoint reach.
warning('impement get real variation');
pause(additional_wait_time)
......@@ -390,14 +400,14 @@ h2v = NaN(NBPM,NH); % horizontal steerer to vertical orbit
v2h = NaN(NBPM,NV); % vertical steerer to horizontal orbit
% for plots
hplot = NaN(NBPM,NH);
vplot = NaN(NBPM,NV);
hplot = h;
vplot = v;
rfhplot = NaN(NBPM,1);
rfvplot = NaN(NBPM,1);
rfhplot = rfh;
rfvplot = rfv;
h2vplot = NaN(NBPM,NH); % horizontal steerer to vertical orbit
v2hplot = NaN(NBPM,NV); % vertical steerer to horizontal orbit
h2vplot = h2v; % horizontal steerer to vertical orbit
v2hplot = v2h; % vertical steerer to horizontal orbit
......@@ -522,7 +532,7 @@ disp('End of measurement');
% csv files for operation
switch obj.machine
case 'ebs-simu'
ebs.autocor_model(obj.rmodel,'exp',pwd)
% ebs.autocor_model(obj.rmodel,'exp',pwd)
otherwise
end
......
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