Commit 6722630b authored by Simone Liuzzo's avatar Simone Liuzzo

consider correctors # not identical, not all H/V

parent a956082f
......@@ -4,7 +4,8 @@ function varargout = qembpmdecode(varargin)
%R0=QEMBPMDECODE(RBPM,GAIN)
nk=size(varargin{1},2);
nkh=size(varargin{1},2);
nkv=size(varargin{2},2);
if length(varargin) <= 2
[rbpm,bgain]=deal(varargin{1:2});
varargout={rbpm.*repmat(bgain,1,nk)};
......@@ -12,8 +13,8 @@ else
[rhbpm,rvbpm,brot,bhgain,bvgain]=deal(varargin{1:5});
cb=cos(brot);
sb=sin(brot);
rh0= rhbpm.*repmat(cb.*bhgain,1,nk) - rvbpm.*repmat(sb.*bvgain,1,nk);
rv0= rhbpm.*repmat(sb.*bhgain,1,nk) + rvbpm.*repmat(cb.*bvgain,1,nk);
rh0= rhbpm.*repmat(cb.*bhgain,1,nkh) - rvbpm.*repmat(sb.*bvgain,1,nkv);
rv0= rhbpm.*repmat(sb.*bhgain,1,nkh) + rvbpm.*repmat(cb.*bvgain,1,nkv);
varargout={rh0,rv0};
end
end
......@@ -15,6 +15,16 @@ v_also_h = v_also_h(qemres.vlist);
honly = ~h_also_v;
vonly = ~v_also_h;
if isempty(find(h_also_v,1))
disp('NO H and V common correctors')
rh = resph;
rh2v = resph2v;
rv2h = respv2h;
rv = respv;
return
end
nbpm=size(resph,1);
chk=cos(khrot);
......@@ -70,5 +80,8 @@ if sum(vonly)>0
repmat(svk(vonly),nbpm,1).*rh2vmodel)./...
repmat(cvk(vonly),nbpm,1);
end
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