...
 
Commits (2)
......@@ -118,7 +118,7 @@ addOptional(p,'steerers_max',[0.0003 0.0003],@isnumeric); % if cell compute, if
addOptional(p,'verbose',true,@islogical); % if cell compute, if struct RM already computed
addOptional(p,'ask_to_continue',true,@islogical); % if cell compute, if struct RM already computed
addOptional(p,'ask_to_change_options',true,@islogical); %
addOptional(p,'savetrajfile',false,@islogical); %
addOptional(p,'savetrajfile',true,@islogical); %
parse(p,obj,varargin{:});
......
......@@ -26,6 +26,9 @@ obj.cv9 = movable('');
getfunction = @(devname)tango.Attribute(devname).value;
setfunction = @(devname,val)setfield(tango.Attribute(devname),'set',val);
%%% change all get and set function
obj.sh = movable([TANGO_HOST 'srmag/hst/all/Strengths'],...
'get_fun',getfunction,'set_fun',setfunction,...
'absolute',true,'limits',[-4e-4 4e-4]);
......@@ -43,6 +46,8 @@ obj.rf = movable([TANGO_HOST 'srrf/master-oscillator/1/Frequency'],...
'get_fun',getfunction,'set_fun',setfunction,...
'absolute',false,'limits',[0.99 1.01]);
%%% we can ignore
obj.quad = movable([TANGO_HOST 'srmag/m-q/all/CorrectionStrengths'],...
'get_fun',getfunction,'set_fun',setfunction);
......@@ -59,23 +64,25 @@ obj.initial_coordinates = movable([TANGO_HOST 'sys/ringsimulator/ebs/TbT_InCoord
%% function to measure trajectory, takes as input the class instance.
obj.getTbTdata = @(obj)getTbTdata_EBS_SIMU(obj); % might or migth not use the following properties
% inputs to function getTbTdata
obj.hor_bpm_TBT = @()tango.Attribute([TANGO_HOST 'srdiag/beam-position/all/TBT_HPositions']).value;
obj.ver_bpm_TBT = @()tango.Attribute([TANGO_HOST 'srdiag/beam-position/all/TBT_VPositions']).value;
obj.sum_bpm_TBT = @()tango.Attribute([TANGO_HOST 'srdiag/beam-position/all/TBT_Sums']).value;
obj.hor_bpm_TBT = zeros(1,122);
obj.ver_bpm_TBT = zeros(1,122);
obj.sum_bpm_TBT = zeros(1,122);
% bpm fresh data counter
obj.bpm_trigger_counter = @()tango.Attribute('sys/ringsimulator/ebs/Counter').value;
obj.bpm_trigger_counter = zeros(1,122);
%= @()tango.Attribute('sys/ringsimulator/ebs/Counter').value;
% load reference sum signal
obj.sum_signal_beam = ones(1,320); % sum signal with beam (sensitivity of each BPM)
obj.sum_signal_background = zeros(1,320);
obj.sum_signal_beam = ones(1,122); % sum signal with beam (sensitivity of each BPM) %not used
obj.sum_signal_background = zeros(1,122);
obj.sum_signal_threshold = 0.5e-6; % sum signal below this value is considered not good
%% function to measure COD, takes as input the class instance.
obj.getSAdata = @(obj)getSAdata_EBS_SIMU(obj); % might or migth not use the following properties
% inputs to function getTbTdata
obj.hor_bpm_SA = @()tango.Attribute([TANGO_HOST 'srdiag/beam-position/all/SA_HPositions']).value;
obj.ver_bpm_SA = @()tango.Attribute([TANGO_HOST 'srdiag/beam-position/all/SA_VPositions']).value;
obj.sum_bpm_SA = @()tango.Attribute([TANGO_HOST 'srdiag/beam-position/all/SA_Sums']).value;
% %% function to measure COD, takes as input the class instance.
% obj.getSAdata = @(obj)getSAdata_EBS_SIMU(obj); % might or migth not use the following properties
% % inputs to function getTbTdata
% obj.hor_bpm_SA = @()tango.Attribute([TANGO_HOST 'srdiag/beam-position/all/SA_HPositions']).value;
% obj.ver_bpm_SA = @()tango.Attribute([TANGO_HOST 'srdiag/beam-position/all/SA_VPositions']).value;
% obj.sum_bpm_SA = @()tango.Attribute([TANGO_HOST 'srdiag/beam-position/all/SA_Sums']).value;
%% state and enabled disabled for RingControl
% mask of correctors to exclude
......@@ -88,7 +95,7 @@ obj.orbit_cor_disabled_bpm =@()([]);% @()(tango.Attribute([TANGO_HOST 'sr/beam-o
obj.orbit_cor_disabled_hst =@()([]);% @()(tango.Attribute([TANGO_HOST 'sr/beam-orbitcor/svd-h/DisabledActuatorsIndex']).value); % H steerer not in orbit correction
obj.orbit_cor_disabled_vst =@()([]);% @()(tango.Attribute([TANGO_HOST 'sr/beam-orbitcor/svd-v/DisabledActuatorsIndex']).value); % V steerer not in orbit correction
obj.autocor =@()(tango.Attribute([TANGO_HOST 'sr/beam-orbitcor/svd-auto']).state);
obj.autocor = false; %=@()(tango.Attribute([TANGO_HOST 'sr/beam-orbitcor/svd-auto']).state);
%% diagnostics, read only attributes
obj.stored_current = @()NaN(1);% @()tango.Attribute([TANGO_HOST 'srdiag/beam-current/total/Current']).value;
......@@ -113,11 +120,11 @@ obj.K3 = K3;
obj.K4 = K4;
obj.injoff = -0.0060; % set simulator TbT input to [injoff, 0,0,0,0,0]
addpath('/machfs/liuzzo/soleil/')
% addpath('/machfs/liuzzo/soleil/')
ring = lattice_SOLEIL_2019();
obj.indBPM = find(atgetcells(ring,'FamName','BPM'))';
obj.indHst = find(atgetcells(ring,'FamName','COR'))';
obj.indHst = find(atgetcells(ring,'FamName','COR'))'; %%%% check which ones are h and v
obj.indVst = find(atgetcells(ring,'FamName','COR'))';
obj.indSkew = find(atgetcells(ring,'FamName','SkewQuad'))';
......
......@@ -53,7 +53,7 @@ for i=1:average
try
% acquire closed orbit
[hor,ver,sig] = obj.gtSAdata;
[hor,ver,sig] = obj.getSAdata;
catch err
disp(err)
......
This source diff could not be displayed because it is too large. You can view the blob instead.