Commit 527674ce authored by Simone Liuzzo's avatar Simone Liuzzo

works in case of simulator (no read of set point from kicker devices, default to single kikcer)

parent d1b2c7ea
......@@ -74,10 +74,26 @@ classdef DynamicAperture < RingControl %& GridScan
obj.o = NaN(length(obj.dfreq));
obj.q = NaN(length(obj.dfreq),2);
switch obj.machine
case 'sr'
obj.kickmode= 'fullbump'; % or 'singlekicker'
case 'ebs-simu'
obj.kickmode= 'singlekicker'; % or 'singlekicker'
otherwise
error('DynamicAperture is not supported for this machine')
end
% kicker device used to change amplitude of stored beam
% oscillations
obj.khdev = 'sr/ps-k4/4';
obj.kedev = 'sy/ps-ke/1';
obj.kickmode= 'fullbump'; % or 'singlekicker'
% kicker device used to trigger kickers firing (Extraction
% kicker)
obj.kedev = 'sy/ps-ke/1';
switch obj.kickmode
case 'fullbump'
......@@ -228,7 +244,7 @@ classdef DynamicAperture < RingControl %& GridScan
r2=obj.stored_current(); % mA
deltai=(r2-r1)/nave/r1; % average relative lost current per shot
r=-deltai*sum(1./(1+(0:nave-1)*deltai))/nave;
r=-deltai*sum(1./(1+(0:nave-1)*deltai))/nave; % adjust to correct percentage at each shot (initial current reduces one shot after the other)
cur(i)=r2;
dii(i)=r;
......
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