Commit 73cc9d48 authored by ncarmignani's avatar ncarmignani

2 options added to run_by_hand to start from a given magnet

parent f28c928e
......@@ -16,11 +16,25 @@ function run_by_hand_singlemagnets(MagType,Range,varargin)
% run_by_hand_singlemagnets(MagType,Range,'IDLosses')
% will use only losses from the first BLM after SS except inj and RF
%
% run_by_hand_singlemagnets(MagType,Range,'Seed',7)
% Option 'Seed' to select the seed of random number generator
% (default seed is 1)
%
% run_by_hand_singlemagnets(MagType,Range,'StartFrom',10)
% Option 'StartFrom' is to start from a precise magnet of the list
% (default value is 1)
%
[automatic,~]=getflag(varargin,'Automatic');
[IDLosses,~]=getflag(varargin,'IDLosses');
[seed,varargin]=getoption(varargin,'Seed',1);
rng(seed);
[StartFrom,varargin]=getoption(varargin,'StartFrom',1);
% rips=tango.Device('sy/ps-rips/manager');
SI3=tango.Device('sr/ps-si/3');
......@@ -95,7 +109,7 @@ dirname=['Optim_' MagType '_' datestr(now,'YYYYmmDD_hhMMss')];
mkdir(dirname);
gains=zeros(1,length(indmags));
residualLosses=zeros(1,length(indmags));
for is = 1:length(indmags)
for is = StartFrom:length(indmags)
sel = indmags(is);
name = names{sel};
......
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