Commit 8d996d41 authored by perron's avatar perron

add reponse dteereron BLM

parent 96230255
......@@ -26,17 +26,18 @@ classdef search_obs
function obj = search_obs()
%UNTITLED Construct an instance of this class
% Detailed explanation goes here
% f=pwd;
%cd /machfs/perron/matlab/programs;
%addpathtom;
%cd(f);
f=pwd;
cd /machfs/perron/matlab/programs;
addpathtom;
cd(f);
curdir=pwd;
cd /machfs/perron/matlab/programs;
addpathtom;
cd(curdir);
obj.CUR=tango.Attribute('sr/d-ct/1/current');
obj.BLM=tango.Device('srdiag/beam-position/all');
obj.BLM=1+mod([3:0.25:34.75],32);
%obj.BLM=tango.Device('srdiag/beam-position/all');
obj.ORBITH=tango.Attribute('srdiag/beam-position/all/SA_HPositions');
obj.ORBITV=tango.Attribute('srdiag/beam-position/all/SA_VPositions');
obj.LT=tango.Attribute('srdiag/beam-position/all/SA_HPositions_Peak');
......@@ -278,27 +279,34 @@ classdef search_obs
end
end
function res=obs_search(obj,cell,plane,amplitude)
for i=1:9
if numel(num2str(cell))==1;
cell_str=[num2str(0) num2str(cell)];
else
cell_str=[num2str(cell)];
end
figure(i);
if plane==1
bump_name=['c' cell_str 'h0' num2str(i)];
end
if plane==2
bump_name=['c' cell_str 'v0' num2str(i)];
end
end
[bumpini,bump_name]=mkbump(obj,bump_name,amplitude)
obj.plot_blm_cells(cell-1,cell+2);
hold on
obj.plot_orb_cells(cell-1,cell+2);
function resp=resp_or_blm(obj,plane,strength)
if plane ==1
for i=1:32
blmini=obj.BLM(:);
cell=i
obj.BLM=obj.BLM(:)+randn(numel(obj.BLM),1);
sti=obj.HSTRENGTH.read;
stt=sti;
stt((i-1)*12+1)=stt((i-1)*12+1)+strength;
obj.HSTRENGTH.set(:)=stt(:);
pause(4)
resp.blm(:,i)=obj.BLM(:)-blmini(:);
resp.or(:,i)=obj.ORBITH.read(:);
resp.stt(:,i)=stt;
obj.HSTRENGTH.set=sti;
pause(4)
end
figure(3)
plot(sum(resp.blm,2));
xlabel('BLM number');
ylabel('BLM signal sumed over all orbits');
grid on
end
end
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