Commit 6eeeaa65 authored by beam dyn's avatar beam dyn
Browse files

files saved in directory created by qempanel

parent a0446bb9
function [normI,phi,firstX,MresH,MresVH] = CalMresfdaH(n_and_dateX,Xamp)
function [normI,phi,firstX,MresH,MresVH] = CalMresfdaH(n_and_dateX,Xamp,qemres)
%uses calculated sine and cosine instead of fda Cor96XZstuf signals with a shift by 22 samples for the Q Cor signal
% to get the Iand Q data
set_path
%set_path
clockstart=clock
%load lastMresV
[Xsnif, Zsnif] =getFDAreaderXZ(n_and_dateX);
......@@ -19,57 +19,58 @@ MresHVQ=zeros(224,96);
%[Cor96Xstuf,Cor96Zstuf ] = SortCorrXZstuf( XZCor );
for i=1:96
%[Cor96Xstuf,Cor96Zstuf ] = SortCorrXZstuf( XZCor );
for i=1:96
Cor96Xstuf(i,1:siz(2))=XCor(i,1:siz(2))-mean(XCor(i,:));
end
[ CXI,CXQ,firstX,lastX,lengthX] = Corfast_fda2(Cor96Xstuf,Xamp,Xamp/20);
%[ CZI,CZQ,firstZ,lastZ,lengthZ] = Corfast_fda2(Cor96Zstuf,Zamp,Zamp/20);
end
[ CXI,CXQ,firstX,lastX,lengthX] = Corfast_fda2(Cor96Xstuf,Xamp,Xamp/20);
%[ CZI,CZQ,firstZ,lastZ,lengthZ] = Corfast_fda2(Cor96Zstuf,Zamp,Zamp/20);
Xres=zeros(1,siz(2));
Zres=zeros(1,siz(2));
CX=zeros(1,siz(2));
CZ=zeros(1,siz(2));
for j=1:96
j
Xres=zeros(1,siz(2));
Zres=zeros(1,siz(2));
CX=zeros(1,siz(2));
CZ=zeros(1,siz(2));
for j=1:96
j
for k=1:224
Xres(1:siz(2))=Xsnif(k,1:siz(2));
Zres(1:siz(2))=Zsnif(k,1:siz(2));
CX(1:siz(2))=CXI(j,1:siz(2));
%CZ(1:siz(2))=CZI(j,1:siz(2));
C=CX/sum(abs(CX));
A=max(abs(CX));
for k=1:224
Xres(1:siz(2))=Xsnif(k,1:siz(2));
Zres(1:siz(2))=Zsnif(k,1:siz(2));
CX(1:siz(2))=CXI(j,1:siz(2));
%CZ(1:siz(2))=CZI(j,1:siz(2));
C=CX/sum(abs(CX));
A=max(abs(CX));
MresHI(k,j)=MresH(k,j)+Xres*C'/A;
MresVI(k,j)=MresV(k,j)+Zres*C'/A;
[ CX] = CXQ(j,1:siz(2));
C=CX/sum(abs(CX));
A=max(abs(CX));
[ CX] = CXQ(j,1:siz(2));
C=CX/sum(abs(CX));
A=max(abs(CX));
MresHQ(k,j)=MresH(k,j)+Xres*C'/A;
MresVQ(k,j)=MresV(k,j)+Zres*C'/A;
end
end
end
stdHI=std(MresHI);
stdHQ=std(MresHQ);
......@@ -86,23 +87,17 @@ phi=stdHQ./sqrt(stdHI.^2+stdHQ.^2);
for i=1:96
if phi(i)< .8
MresH(:,i)=MresHI(:,i)*normI(i)/G;
MresVH(:,i)=MresVI(:,i)*normI(i)/G;
MresH(:,i)=MresHI(:,i)*normI(i)/G;
MresVH(:,i)=MresVI(:,i)*normI(i)/G;
else
MresH(:,i)=MresHQ(:,i)*normQ(i)/G;
MresVH(:,i)=MresVQ(:,i)*normQ(i)/G;
end
MresH(:,i)=MresHQ(:,i)*normQ(i)/G;
MresVH(:,i)=MresVQ(:,i)*normQ(i)/G;
end
end
time=time_label;
file=['TimeLabelMresX',time];
DirLabel=pwd
cd ..
cd libera_data
cd TimeLabel
pwd
save(file,'n_and_dateX' , 'MresH','MresVH')
dir
cd (DirLabel)
save(fullfile(qemres.datadir,file),'n_and_dateX' , 'MresH','MresVH')
clock-clockstart
\ No newline at end of file
function [normI,phi,firstZ,MresHV,MresV] = CalMresfdaV(n_and_dateZ,Zamp)
function [normI,phi,firstZ,MresHV,MresV] = CalMresfdaV(n_and_dateZ,Zamp,qemres)
%uses calculated sine and cosine instead of fda Cor96XZstuf signals with a shift by 22 samples for the Q Cor signal
% to get the Iand Q data
set_path
% set_path
clockstart=clock
%load lastMresV
set_path
......@@ -97,13 +97,7 @@ end
time=time_label;
file=['TimeLabelMresZ',time];
DirLabel=pwd
cd ..
cd libera_data
cd TimeLabel
pwd
save(file,'n_and_dateZ' , 'MresV','MresHV')
dir
cd (DirLabel)
save(fullfile(qemres.datadir,file),'n_and_dateZ' , 'MresV','MresHV')
clock-clockstart
\ No newline at end of file
......@@ -276,8 +276,8 @@ else % AC rm measurement
[n_and_dateZ] = StartMresStimZ(n,Zamp,qemres);
% get data from Fast Data Archiver
[normI,phi,firstX,MresH,MresVH] = CalMresfdaH(n_and_dateX,Xamp); %#ok<ASGLU>
[normI,phi,firstZ,MresHV,MresV] = CalMresfdaV(n_and_dateZ,Zamp); %#ok<ASGLU>
[normI,phi,firstX,MresH,MresVH] = CalMresfdaH(n_and_dateX,Xamp,qemres); %#ok<ASGLU>
[normI,phi,firstZ,MresHV,MresV] = CalMresfdaV(n_and_dateZ,Zamp,qemres); %#ok<ASGLU>
responsematrixACfile = fullfile(qemres.datadir,'AC_RM_raw.mat');
......
Supports Markdown
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