Commit 78592b3b authored by Thomas Perron's avatar Thomas Perron
Browse files

update ftcheck_sr to start from turn 0

parent 0f002925
......@@ -56,7 +56,7 @@ pause(2);
pause(3);
%adapts BPMOK mask to cope with beam presence.
bpmok=bpmok(1:numbpm)&intens(1:numbpm)>ithresh;
bpmok=bpmok(1:numbpm)&intens(1:numbpm)>ithresh ;
%averages the tbt data sets to extract h,v postion and intensity
......@@ -65,7 +65,7 @@ posm(:,2)=mean2(posztest(:,1:numbpm),1)';
cur=mean2(curtest(:,1:numbpm),1)';
traj=posm;
traj(~bpmok(1:numbpm),:)=nan;
traj(~bpmok(1:numbpm),:)=nan
cur(~bpmok(1:numbpm))=nan;
%if tune flag is turned on takes data with increases TL2/CV9 and S3
......@@ -135,12 +135,12 @@ traj=([posxp poszp]);
tunes=findtunetom2(traj(:,:),200,1);
tunes=tunes*320;
m=ebs.model;
mach=m.ring;
if flagtune==1
%extract the tunes via fit of model
m=ebs.model;
mach=m.ring;
%%%bpm=findcells(mach,'FamName','BPM');
bpm=m.get(0,'BPM');
x0=[0 0 0 0 -0.6087/0.2277 0.7922/0.3119];
......@@ -214,8 +214,8 @@ grid on;
intens=load_sumdd();
vx0=cat(3,vx0h,vx0v);
[xx]=preparevvtom(vx0(7:nbturns+7-1,:,1));
[zz]=preparevvtom(vx0(7:nbturns+7-1,:,2));
[xx]=preparevvtom(vx0(1:nbturns,:,1));
[zz]=preparevvtom(vx0(1:nbturns,:,2));
intens=intens(7:end,:);
end
function [oscill]=preparevvtom(vx0)
......
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