Commit 8c42d49a authored by Simone Liuzzo's avatar Simone Liuzzo

response with steerers list not including DQ.

parent 45e444ee
......@@ -7,7 +7,7 @@ function [resp,gradients,algos,steerlist]=load_resp(filename,plane,varargin)
%
%DIRNAME: Directory containing measured data or
% file containing a full response matrix
%PLANE: 'h|H|x|X|1' 'v|V|z|Z|2' 'h2v|H2V|x2z|X2Z|3' 'v2h|V2H|z2x|Z2X|4'
%PLANE: 'h|H' 'v|V' 'h2v|H2V' 'v2h|V2H'
%STEERLIST: list of steerers (1..288)
%
%RESPONSE: BPM response [m]
......@@ -26,14 +26,31 @@ function [resp,gradients,algos,steerlist]=load_resp(filename,plane,varargin)
% See also
nb=320;
nkt=288;
[elzeros,options]=getoption(varargin,'Zeros',1);
[elfixed,options]=getoption(options,'Fixed',1);
[eltoolarge,options]=getoption(options,'TooLarge',1);
args={1:nkt};
args(1:length(options))=options;
steerlist=args{1};
switch upper(plane)
case {'V','V2H'}
nkt=288;
allsteer=(1:nkt);
args={1:nkt};
args(1:length(options))=options;
steerlist=args{1};
case {'H','H2V'}
nkt=384;
allsteer=(1:nkt);
allsteer([5:12:end,7:12:end,8:12:end])=[];
args={1:length(allsteer)};
args(1:length(options))=options;
steerlist=allsteer(args{1});
end
if length(steerlist)==nkt
warning('full RM measurement expected')
end
fn=fullfile(filename,['steer' selectplane(plane,{'H','V','V2H','H2V'}) '%.3d']);
nk=length(steerlist);
resp=NaN(nb,nk);
......@@ -43,10 +60,14 @@ if isdir(filename)
for col=1:nk
steer=steerlist(col);
[idx,grad,rsp,alg]=ebs.load_steerresp(sprintf(fn,steer));
if idx == steer
if allsteer(idx) == steer
resp(:,col)=rsp;
gradients(col)=grad;
algos(col)=alg;
else
error(['Measured Steerer idx ' numstr(allsteer(idx))...
' is different from the required steerer index: '...
num2str(steer)]);
end
end
else % the input DIRNAME is filename
......
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