Commit 8d996d41 authored by perron's avatar perron

add reponse dteereron BLM

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