Commit ae892ded authored by Simone Liuzzo's avatar Simone Liuzzo

any number of eneabled h or v steerers

parent 9c3975d8
......@@ -35,6 +35,7 @@ if nargin < 8, vsidx=hsidx; end
hsidxlat=hsidx;
vsidxlat=vsidx;
allsidxlat = sort(unique([hsidxlat vsidxlat]));
nq=length(varidx);
nbpm=length(bpmidx);
......@@ -63,11 +64,20 @@ disp('ANALYTIC QEMPANEL Response AT2.0/errors_corrections')
]=AnalyticResponseMatrixDerivative(...
mach',dpp,...
bpmidx',... % bpm
hsidxlat,... % correctors
allsidxlat,... % correctors
varidx,... % quadrupoles
bndidx',... % no dipoles, later
varidx);
% select vertical and horizontal steerers from global vector
hst=find(ismember(allsidxlat,hsidxlat)); % h steerers
dX_dq= dX_dq(:,hst,:);
dXY_ds= dXY_ds(:,hst,:);
vst=find(ismember(allsidxlat,vsidxlat)); % v steerers
dY_dq= dY_dq(:,vst,:);
dYX_ds= dYX_ds(:,vst,:);
%f0=992*PhysConstant.speed_of_light_in_vacuum.value/findspos(mach,length(mach)+1);
alpha_c = mcf(mach);
......
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