Commit 2a2505ff authored by Simone Liuzzo's avatar Simone Liuzzo
Browse files

minitial tune taken in account

parent f627a6bc
...@@ -102,11 +102,18 @@ allq_unsort = [iq;iq8;idq]; ...@@ -102,11 +102,18 @@ allq_unsort = [iq;iq8;idq];
% get order of quadrupoles components in lattice % get order of quadrupoles components in lattice
[allq,iqa] = sort(allq_unsort); [allq,iqa] = sort(allq_unsort);
% get lattice with initial tunes
latinitunes=ebs.model(latmodel);%,'reduce',true);
latinitunes.settune(Q0,tunemode);
% get lattice with final tunes
latnewtunes=ebs.model(latmodel);%,'reduce',true); latnewtunes=ebs.model(latmodel);%,'reduce',true);
latnewtunes.settune(Q1,tunemode); latnewtunes.settune(Q1,tunemode);
DGL_=latnewtunes.get(1,'qp') - latmodel.get(1,'qp');
D8GL=latnewtunes.get(1,'qf8d') - latmodel.get(1,'qf8d'); % compute difference in gradients
DqGL=latnewtunes.get(1,'dq') - latmodel.get(1,'dq'); DGL_=latnewtunes.get(1,'qp') - latinitunes.get(1,'qp');
D8GL=latnewtunes.get(1,'qf8d') - latinitunes.get(1,'qf8d');
DqGL=latnewtunes.get(1,'dq') - latinitunes.get(1,'dq');
DGL=[DGL_; D8GL; DqGL]; DGL=[DGL_; D8GL; DqGL];
q_group = NaN(size(allq)); q_group = NaN(size(allq));
......
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