Commit 9636731a authored by Simone Liuzzo's avatar Simone Liuzzo
Browse files

updated bump property setting function

parent 4bd290cd
......@@ -10,6 +10,8 @@ function beamlines_angle_bumps(varargin)
% ...,'id',true/false(defualt),... modify ID angle and position bumps
% ...,'hor',true(defualt)/false,... modify bumps in horizontal plane
% ...,'ver',true(defualt)/false,... modify bumps in vertical plane
% ...,'horpos',true(defualt)/false,... modify bumps in horizontal plane
% ...,'verpos',true(defualt)/false,... modify bumps in vertical plane
% ...,'ask',true(defualt)/false,... ask confirmation to modify control
% system properties
%
......@@ -20,11 +22,13 @@ p=inputParser;
validbpm = @(y)(any(not(arrayfun(@(x)(isnumeric(x) && (x>0) && (x<=10)),y,'un',1)))==false);
addOptional(p,'cell_num',[1:32],@isnumeric)
addOptional(p,'bpm',[],validbpm)
addOptional(p,'bm',false,@islogic)
addOptional(p,'id',false,@islogic)
addOptional(p,'hor',true,@islogic)
addOptional(p,'ver',true,@islogic)
addOptional(p,'ask',true,@islogic)
addOptional(p,'bm',false,@islogical)
addOptional(p,'id',false,@islogical)
addOptional(p,'hor',true,@islogical)
addOptional(p,'ver',true,@islogical)
addOptional(p,'horpos',true,@islogical)
addOptional(p,'verpos',true,@islogical)
addOptional(p,'ask',true,@islogical)
parse(p,varargin{:})
......@@ -64,10 +68,14 @@ for idnum=cell_num
disp(['---- ID ' num2str(idnum,'%.2d') ' -----']);
if p.Results.hor
setpropbump('h','id',rc,idnum,filedata_ID);
setpropbump('h-pos','id',rc,idnum,filedata_IDp);
end
if p.Results.ver
setpropbump('v','id',rc,idnum,filedata_ID);
end
if p.Results.horpos
setpropbump('h-pos','id',rc,idnum,filedata_IDp);
end
if p.Results.verpos
setpropbump('v-pos','id',rc,idnum,filedata_IDp);
end
end
......@@ -177,15 +185,16 @@ switch beamline
% normalized quantities to maximum bump amplitude
shn = sh'./max(h);
hn = h./max(h);
W = [-1/D 1/D];
case {'h-pos','v-pos'}
% normalized quantities to maximum bump amplitude
shn = sh'./(h_bump);
hn = h./h_bump;
W = [0.5 0.5];
end
PosAngBpmInd = bpmupstream-1;
case 'bm'
......
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